Package: linphone
Version: 3.5.2-2
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)
User: debian-...@lists.debian.org
Usertags: kfreebsd

Hi,

linphone 3.5.x currently fails to build on kFreeBSD.

The problem is that the mediastreamer2 configure detects the Linux
v4l headers (linux/videodev.h and linux/videodev2.h) that newer FreeBSD
kernels provide, but then the v4l code assumes is it a Linux system.
The solution is to disable the v4l1/2 support in any non-Linux OS
(patch non-linux.diff, which also explicitly disables ALSA); although,
to really disable the detection of the videodev*.h headers,
mediastreamer2's configure has to be patched to do the lookup only if
the current OS is linux (patch linux_headers_linux_only.diff).
Please note the latest patch needs autoreconf, which seems to work only
using the provided autogen.sh (and not manually calling autoreconf).

Thanks,
-- 
Pino
--- a/debian/rules
+++ b/debian/rules
@@ -1,9 +1,15 @@
 #!/usr/bin/make -f
+
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+ifneq ($(DEB_HOST_ARCH_OS),linux)
+  CONFIGURE_ARGS += --disable-alsa --disable-libv4l1 --disable-libv4l2
+endif
+
 %:
 	dh $@ --parallel --with autotools_dev
 
 override_dh_auto_configure:
-	dh_auto_configure -- --disable-strict
+	dh_auto_configure -- --disable-strict $(CONFIGURE_ARGS)
 
 override_dh_makeshlibs:
 	dh_makeshlibs -V
--- a/mediastreamer2/configure.ac
+++ b/mediastreamer2/configure.ac
@@ -625,17 +625,25 @@
 AC_SUBST(PACKAGE_DATA_DIR)
 
 dnl check for video4linux headers
-AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
-if test "${ac_cv_header_linux_videodev_h}" = "yes" ; then
-	found_v4l1=yes
-else
+case $host_os in
+linux*)
+	AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h)
+	if test "${ac_cv_header_linux_videodev_h}" = "yes" ; then
+		found_v4l1=yes
+	else
+		found_v4l1=no
+	fi
+	if test "${ac_cv_header_linux_videodev2_h}" = "yes" ; then
+		found_v4l2=yes
+	else
+		found_v4l2=no
+	fi
+	;;
+*)
 	found_v4l1=no
-fi
-if test "${ac_cv_header_linux_videodev2_h}" = "yes" ; then
-	found_v4l2=yes
-else
 	found_v4l2=no
-fi
+	;;
+esac
 
 AM_CONDITIONAL(BUILD_V4L1, test x$found_v4l1 = xyes )
 AM_CONDITIONAL(BUILD_V4L2, test x$found_v4l2 = xyes )

Reply via email to