--- /dev/null
+support: don't try to run compiled code
+
+When cross-compiling, we can't run the compiled code.
+
+Consider the compiler returning succes as an indication
+it is working.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN tvheadend.orig/support/configure.inc tvheadend-c7d0335eb10d02b780423bef8e7c740e422fff13/support/configure.inc
+--- tvheadend.orig/support/configure.inc 2013-12-01 01:24:26.000000000 +0100
++++ tvheadend-c7d0335eb10d02b780423bef8e7c740e422fff13/support/configure.inc 2013-12-03 22:34:57.547762178 +0100
+@@ -265,8 +265,6 @@
+ EOF
+ $CC $CFLAGS $LDFLAGS $TMPDIR/$$.c -o $TMPDIR/$$.bin $opt #&> /dev/null
+ RET=$?
+- [ $RET -eq 0 ] && $TMPDIR/$$.bin
+- RET=$?
+ rm -f $TMPDIR/$$.{c,bin}
+ return $RET
+ }
# scan files installed by the dvb-apps package
TVHEADEND_DEPENDENCIES += dvb-apps
+define TVHEADEND_CONFIGURE_CMDS
+ (cd $(@D); \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ ./configure \
+ --prefix=/usr \
+ --cc="$(TARGET_CC)" \
+ --cflags="$(TARGET_CFLAGS)" \
+ --arch="$(ARCH)" \
+ --cpu="$(BR2_GCC_TARGET_CPU)" \
+ --python="$(HOST_DIR)/usr/bin/python" \
+ )
+endef
+
+define TVHEADEND_BUILD_CMDS
+ $(MAKE) -C $(@D)
+endef
+
+define TVHEADEND_INSTALL_TARGET_CMDS
+ $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
+endef
+
#----------------------------------------------------------------------------
# To run tvheadend, we need:
# - a startup script, and its config file
tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
endef
-#----------------------------------------------------------------------------
-# tvheadend is not an autotools-based package, but it is possible to
-# call its ./configure script as if it were an autotools one.
-$(eval $(autotools-package))
+$(eval $(generic-package))