Patchwork [meta-oe,meta-multimedia,2/6] tvheadend: add git version

login
register
mail settings
Submitter Koen Kooi
Date Dec. 21, 2012, 2 p.m.
Message ID <1356098450-27475-2-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/41479/
State Accepted, archived
Commit d3bcb21db84a04bfaaa239f287513ad51bd9f613
Headers show

Comments

Koen Kooi - Dec. 21, 2012, 2 p.m.
From the homepage:

	"Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources."

No startup scripts or config files are currently provided.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 ...end-specific-LD-CFLAGS-into-a-helper-vari.patch |   92 ++++++++++++++++++++
 .../recipes-dvb/tvheadend/tvheadend_git.bb         |   30 +++++++
 2 files changed, 122 insertions(+), 0 deletions(-)
 create mode 100644 meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Move-tvheadend-specific-LD-CFLAGS-into-a-helper-vari.patch
 create mode 100644 meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb

Patch

diff --git a/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Move-tvheadend-specific-LD-CFLAGS-into-a-helper-vari.patch b/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Move-tvheadend-specific-LD-CFLAGS-into-a-helper-vari.patch
new file mode 100644
index 0000000..943e102
--- /dev/null
+++ b/meta-multimedia/recipes-dvb/tvheadend/tvheadend/0001-Move-tvheadend-specific-LD-CFLAGS-into-a-helper-vari.patch
@@ -0,0 +1,92 @@ 
+From 2ee64b359464b48f751683faa5ded3ee8200fe90 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Fri, 21 Dec 2012 10:15:42 +0100
+Subject: [PATCH] Move tvheadend specific LD/CFLAGS into a helper variable to
+ avoid being overwritten
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+Upstream-status: Inappropriate [OE specific]
+---
+ Makefile              |   20 ++++++++++----------
+ support/configure.inc |    8 ++++----
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8c6b293..daf5f14 100644
+--- a/Makefile
++++ b/Makefile
+@@ -27,12 +27,12 @@ PROG = ${BUILDDIR}/tvheadend
+ # Common compiler flags
+ #
+ 
+-CFLAGS  += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
+-CFLAGS  += -Wmissing-prototypes -fms-extensions
+-CFLAGS  += -g -funsigned-char -O2 
+-CFLAGS  += -D_FILE_OFFSET_BITS=64
+-CFLAGS  += -I${BUILDDIR} -I${CURDIR}/src -I${CURDIR}
+-LDFLAGS += -lrt -ldl -lpthread -lm
++TVH_CFLAGS  += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
++TVH_CFLAGS  += -Wmissing-prototypes -fms-extensions
++TVH_CFLAGS  += -g -funsigned-char -O2 
++TVH_CFLAGS  += -D_FILE_OFFSET_BITS=64
++TVH_CFLAGS  += -I${BUILDDIR} -I${CURDIR}/src -I${CURDIR}
++TVH_LDFLAGS += -lrt -ldl -lpthread -lm
+ 
+ #
+ # Other config
+@@ -179,8 +179,8 @@ SRCS-${CONFIG_CWC}  += src/ffdecsa/ffdecsa_interface.c \
+ 	src/ffdecsa/ffdecsa_int.c
+ SRCS-${CONFIG_MMX}  += src/ffdecsa/ffdecsa_mmx.c
+ SRCS-${CONFIG_SSE2} += src/ffdecsa/ffdecsa_sse2.c
+-${BUILDDIR}/src/ffdecsa/ffdecsa_mmx.o  : CFLAGS += -mmmx
+-${BUILDDIR}/src/ffdecsa/ffdecsa_sse2.o : CFLAGS += -msse2
++${BUILDDIR}/src/ffdecsa/ffdecsa_mmx.o  : TVH_CFLAGS += -mmmx
++${BUILDDIR}/src/ffdecsa/ffdecsa_sse2.o : TVH_CFLAGS += -msse2
+ endif
+ 
+ # File bundles
+@@ -217,12 +217,12 @@ all: ${PROG}
+ 
+ # Binary
+ ${PROG}: $(OBJS) $(ALLDEPS)
+-	$(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
++	$(CC) -o $@ $(OBJS) $(TVH_CFLAGS) $(TVH_LDFLAGS) $(CFLAGS) $(LDFLAGS)
+ 
+ # Object
+ ${BUILDDIR}/%.o: %.c
+ 	@mkdir -p $(dir $@)
+-	$(CC) -MD -MP $(CFLAGS) -c -o $@ $(CURDIR)/$<
++	$(CC) -MD -MP $(TVH_CFLAGS) $(CFLAGS) -c -o $@ $(CURDIR)/$<
+ 
+ # Add-on
+ ${BUILDDIR}/%.so: ${SRCS_EXTRA}
+diff --git a/support/configure.inc b/support/configure.inc
+index 0130880..332511e 100644
+--- a/support/configure.inc
++++ b/support/configure.inc
+@@ -464,8 +464,8 @@ ifeq (\$(origin CC),default)
+ CC        = ${CC}
+ endif
+ PYTHON   ?= ${PYTHON}
+-CFLAGS   += ${CFLAGS}
+-LDFLAGS  += ${LDFLAGS}
++TVH_CFLAGS   += ${CFLAGS}
++TVH_LDFLAGS  += ${LDFLAGS}
+ prefix    = ${prefix}
+ bindir    = ${bindir}
+ mandir    = ${mandir}
+@@ -482,8 +482,8 @@ EOF
+   # Add package config
+   for pkg in ${PACKAGES[*]}; do
+     cat >>${CONFIG_MK} <<EOF
+-LDFLAGS += $(pkg-config --libs $pkg)
+-CFLAGS  += $(pkg-config --cflags $pkg)
++TVH_LDFLAGS += $(pkg-config --libs $pkg)
++TVH_CFLAGS  += $(pkg-config --cflags $pkg)
+ EOF
+   done
+ 
+-- 
+1.7.7.6
+
diff --git a/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
new file mode 100644
index 0000000..212bca1
--- /dev/null
+++ b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
@@ -0,0 +1,30 @@ 
+SUMMARY = "Tvheadend TV streaming server"
+HOMEPAGE = "https://www.lonelycoder.com/redmine/projects/tvheadend"
+
+DEPENDS = "avahi zlib openssl python-native"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9eef91148a9b14ec7f9df333daebc746"
+
+SRC_URI = "git://github.com/tvheadend/tvheadend.git \
+           file://0001-Move-tvheadend-specific-LD-CFLAGS-into-a-helper-vari.patch \
+          "
+SRCREV = "a420c83a0e0d2c31c2c15d0fec6fedc3f5a36dfe"
+PV = "3.3"
+
+S = "${WORKDIR}/git"
+
+do_configure() {
+	./configure --prefix=${prefix} \
+	            --libdir=${libdir} \
+	            --bindir=${bindir} \
+	            --datadir=${datadir} \
+	            --arch=${TARGET_ARCH} \
+	            --disable-bundle
+}
+
+do_install() {
+	oe_runmake install DESTDIR=${D}
+}
+
+FILES_${PN} += "${datadir}/${BPN}"