Re: [vdr] [PATCH v2] Gather necessary options for build in Make.global and include it.

2010-01-29 Thread Frank Schmirler
Hi Paul,

thanks for the patch - looks good. Some suggestions from me:

1) from VDR's Makefile, remove the line
DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
It is already included from Make.global

2) in all plugin Makefiles, remove -fPIC from the line
CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
It will be added by Make.global anyway

3) in Make.config.template, remove only the line
DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
The lines with "+= -fPIC" are still necessary, as Make.config resets
CFLAGS/CXXFLAGS.

4) Script newplugin needs to be modified, too.

Best regards,
Frank

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] vdr-1.7.11 + xineliboutput

2010-01-29 Thread serge pecher

Hello,

I have an installation running with vdr-1.7.10 from the vdr-team PPA, and
sasc-ng to use my 3 off subscribtions card. I have 2 dvb-S2 card in this
computer, so with sasc-ng, 2 virtual dvb adapters.
This is working quite well except the streaming to xbmc (freeze when zapping
in xbmc)
I intend to try a suggestion I found on this list, using vdr-1.7.11
unpatched + streamdev, patched.
To keep it simple, I downloaded vdr-1.7.11, xineliboutput and streamdev
(+applied patches) did make and make plugins. I then copied vdr to
/usr/bin/vdr and the content of ./PLUGINS/lib to /usr/lib/vdr/plugins.
I saw there was a new plugin (something like dvbdevice...for SD Nexus
adapters). I did delete the lib file of that plugin and restarted vdr.
Now I have "channel not available". From what I see in the log, it don't
find the virtual adaptors anymore. The primary adapter was formarly set to
3, now to one, and I cant change it in the osd menu.
Did'nt had a lot of time to look after it yet, but maybe can someone help me
solve this more efficiently.

Is there something changed about that in vdr-1.7.11, that does that I need
to adapt my configuration ?
In the mean time I re-copied the original vdr binary and 1.7.10 lib files in
place, and everything is working again, so I believe my config is still ok.

many thanks,

sp


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH v2] Gather necessary options for build in Make.global and include it.

2010-01-29 Thread Paul Menzel
Dear Frank,


Am Freitag, den 29.01.2010, 10:04 +0100 schrieb Frank Schmirler:

[…]

> 1) from VDR's Makefile, remove the line
> DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> It is already included from Make.global
> 
> 2) in all plugin Makefiles, remove -fPIC from the line
> CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
> It will be added by Make.global anyway

My reasoning was that someone reading the Makefile would have it easier
to see what options are needed. I will change it now.

I will also remove the line `DEFINES += -D_FILE …` in there too because
it should be added by `Make.global` too.

> 3) in Make.config.template, remove only the line
> DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> The lines with "+= -fPIC" are still necessary, as Make.config resets
> CFLAGS/CXXFLAGS.

Correct.

> 4) Script newplugin needs to be modified, too.

I did not know about `newplugin`.


Thanks for the review. I will send a new version of the patch,

Paul


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [PATCH v3] Gather necessary options for build in Make.global and include it.

2010-01-29 Thread Paul Menzel
Without this patch, if some options in `Makefile` were set outside `Makefile` 
and no `Make.config` existed with the necessary options, builds could fail. 
[1][2][3]

Therefore include strictly necessary options in `Make.global` and include this 
in all the Makefiles before `Make.config`.

[1] http://www.linuxtv.org/pipermail/vdr/2009-July/020977.html
[2] http://www.linuxtv.org/pipermail/vdr/2009-December/021807.html
[3] http://www.linuxtv.org/pipermail/vdr/2010-January/022235.html

v2: Use `include` instead of `-include` to get a warning/error if it is not 
present. [4]
v3: Change according to Frank’s comments [5].
 • Delete options set in `Make.global` from other Makefiles.
 • Leave adding `-fPIC` to `C[XX]FLAGS` in `Make.config.template` as the flags 
get reset including `Make.config`.
 • Modify `newplugin`.

[4] http://www.gnu.org/software/make/manual/make.html#Include
[5] http://www.linuxtv.org/pipermail/vdr/2010-January/022243.html

Signed-off-by: Paul Menzel 
---
 Make.config.template |1 -
 Make.global  |   14 ++
 Makefile |3 +--
 PLUGINS/src/dvbsddevice/Makefile |8 +---
 PLUGINS/src/hello/Makefile   |6 +-
 PLUGINS/src/osddemo/Makefile |6 +-
 PLUGINS/src/pictures/Makefile|6 +-
 PLUGINS/src/servicedemo/Makefile |6 +-
 PLUGINS/src/skincurses/Makefile  |6 +-
 PLUGINS/src/status/Makefile  |6 +-
 PLUGINS/src/svdrpdemo/Makefile   |6 +-
 newplugin|8 +---
 12 files changed, 60 insertions(+), 16 deletions(-)
 create mode 100644 Make.global

diff --git a/Make.config.template b/Make.config.template
index 758fc14..6fffa0e 100644
--- a/Make.config.template
+++ b/Make.config.template
@@ -19,7 +19,6 @@ CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
 ifdef PLUGIN
 CFLAGS   += -fPIC
 CXXFLAGS += -fPIC
-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 endif
 
 ### The directory environment:
diff --git a/Make.global b/Make.global
new file mode 100644
index 000..5ef70f0
--- /dev/null
+++ b/Make.global
@@ -0,0 +1,14 @@
+#
+# Strictly necessary Makefile options for the Video Disk Recorder
+#
+# See the main source file 'vdr.c' for copyright information and
+# how to reach the author.
+
+# Plugins need to be compiled with position independent code, otherwise linking
+# VDR against it will fail.
+ifdef PLUGIN
+CFLAGS   += -fPIC
+CXXFLAGS += -fPIC
+endif
+
+DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
diff --git a/Makefile b/Makefile
index e13ea5e..a2659be 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@ CONFDIR  = $(VIDEODIR)
 DOXYGEN  = /usr/bin/doxygen
 DOXYFILE = Doxyfile
 
+include Make.global
 -include Make.config
 
 SILIB= $(LSIDIR)/libsi.a
@@ -60,8 +61,6 @@ DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\" 
-DRCU_DEVICE=\"$(RCU_DEVICE)\"
 
 DEFINES += -D_GNU_SOURCE
 
-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-
 DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
 DEFINES += -DCONFDIR=\"$(CONFDIR)\"
 DEFINES += -DPLUGINDIR=\"$(PLUGINLIBDIR)\"
diff --git a/PLUGINS/src/dvbsddevice/Makefile b/PLUGINS/src/dvbsddevice/Makefile
index 8ef273c..345543e 100644
--- a/PLUGINS/src/dvbsddevice/Makefile
+++ b/PLUGINS/src/dvbsddevice/Makefile
@@ -18,7 +18,11 @@ VERSION = $(shell grep 'static const char \*VERSION *=' 
$(PLUGIN).c | awk '{ pri
 ### The C++ compiler and options:
 
 CXX  ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+
+### Make sure that necessary options are included:
+
+include $(VDRDIR)/Make.global
 
 ### The directory environment:
 
@@ -45,8 +49,6 @@ INCLUDES += -I$(VDRDIR)/include
 
 DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
 
-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-
 ### The object files (add further files here):
 
 OBJS = $(PLUGIN).o dvbsdffdevice.o dvbsdffosd.o
diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile
index ea5b806..1ec3170 100644
--- a/PLUGINS/src/hello/Makefile
+++ b/PLUGINS/src/hello/Makefile
@@ -18,7 +18,11 @@ VERSION = $(shell grep 'static const char \*VERSION *=' 
$(PLUGIN).c | awk '{ pri
 ### The C++ compiler and options:
 
 CXX  ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+
+### Make sure that necessary options are included:
+
+include $(VDRDIR)/Make.global
 
 ### The directory environment:
 
diff --git a/PLUGINS/src/osddemo/Makefile b/PLUGINS/src/osddemo/Makefile
index 1b1c622..2a7f836 100644
--- a/PLUGINS/src/osddemo/Makefile
+++ b/PLUGINS/src/osddemo/Makefile
@@ -16,7 +16,11 @@ VERSION = $(shell grep 'static const char \*VERSION *=' 
$(PLUGIN).c | awk '{ pri
 ### The C++ compiler and options:
 
 CXX  ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -