Bug#401052: portaudio19: FTBFS on GNU/kFreeBSD (due to unsatisfied Build-Depends on libasound2-dev)

Petr Salinger Petr.Salinger at seznam.cz
Thu Nov 30 15:08:46 UTC 2006


Package: portaudio19
Severity: important
Version: 19+svn20060825-1
Tags: patch


Hi,

the current version fails to build on GNU/kFreeBSD.

It has unsatisfied Build-Depends on libasound2-dev
under non-linux ports, it needs also small tweak.
Please find attached patch with that.

It would also be nice if you can ask upstream
to include change in src/hostapi/oss/pa_unix_oss.c.

Thanks in advance

                         Petr
-------------- next part --------------
only in patch2:
unchanged:
--- portaudio19-19+svn20060825.orig/src/hostapi/oss/pa_unix_oss.c
+++ portaudio19-19+svn20060825/src/hostapi/oss/pa_unix_oss.c
@@ -59,7 +59,7 @@
 #include <limits.h>
 #include <semaphore.h>
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 # include <sys/soundcard.h>
 # define DEVICE_NAME_BASE            "/dev/dsp"
 #elif defined __linux__
diff -u portaudio19-19+svn20060825/debian/control portaudio19-19+svn20060825/debian/control
--- portaudio19-19+svn20060825/debian/control
+++ portaudio19-19+svn20060825/debian/control
@@ -4,7 +4,7 @@
 Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
 Uploaders: Kilian Krause <kilian at debian.org>, Jose Carlos Garcia Sogo <jsogo at debian.org>, Mark Purcell <msp at debian.org>, Mikael Magnusson <mikma at users.sourceforge.net>
 Build-Depends: debhelper (>= 4.0.0), dpatch, autotools-dev,
- libasound2-dev, libjack0.100.0-dev, doxygen
+ libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libjack0.100.0-dev, doxygen
 Standards-Version: 3.7.2
 
 Package: libportaudio2
@@ -25,7 +25,7 @@
 Package: portaudio19-dev
 Section: devel
 Architecture: any
-Depends: libportaudio2 (= ${Source-Version}), libasound2-dev,
+Depends: libportaudio2 (= ${Source-Version}), ${alsa-dev},
  libjack0.100.0-dev
 Conflicts: libportaudio-dev, libportaudio19-dev, libportaudio-19-dev
 Replaces: libportaudio19-dev, libportaudio-19-dev
diff -u portaudio19-19+svn20060825/debian/rules portaudio19-19+svn20060825/debian/rules
--- portaudio19-19+svn20060825/debian/rules
+++ portaudio19-19+svn20060825/debian/rules
@@ -12,6 +12,7 @@
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
 
 CFLAGS = -Wall -g -D_REENTRANT
@@ -25,6 +26,12 @@
 	INSTALL_PROGRAM += -s
 endif
 
+ifeq (linux,$(DEB_HOST_ARCH_OS))
+	CONFIGURE_SOUND_ARGS = --with-oss=yes --with-jack=yes --with-alsa=yes
+else
+	CONFIGURE_SOUND_ARGS = --with-oss=yes --with-jack=yes --with-alsa=no
+endif
+
 DEBVERSION:=$(shell head -n 1 debian/changelog \
 		    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
 UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
@@ -43,7 +50,7 @@
 config: patch config.status
 config.status:
 	dh_testdir
-	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-oss=yes --with-jack=yes --with-alsa=yes --enable-cxx
+	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-cxx $(CONFIGURE_SOUND_ARGS)
 
 
 build: config build-stamp
@@ -98,7 +105,11 @@
 	dh_makeshlibs -V 'libportaudio2 (>= 19+cvs20060311-1)'
 	dh_installdeb
 	dh_shlibdeps
+ifeq (linux,$(DEB_HOST_ARCH_OS))
+	dh_gencontrol -- -Valsa-dev="libasound2-dev"
+else
 	dh_gencontrol
+endif
 	dh_md5sums
 	dh_builddeb
 


More information about the Pkg-voip-maintainers mailing list