Source: transcode
Version: 3:1.1.7-3
Severity: normal
Tags: patch

Hi,

currently transcode uncoditionally enables alsa and v4l, which are
Linux-only systems, causing build failures on non-Linux architectures.
The attached patch enables them only on Linux (restricting the alsa
build dependency too), allowing to compile transcode at least on
kFreeBSD (on Hurd it fails due to PATH_MAX, but that's another story).

Thanks,
-- 
Pino
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
 nooptflags += --disable-3dnow
 nooptflags += --disable-altivec
 nooptflags += --disable-mmx
@@ -8,7 +10,6 @@ nooptflags += --disable-sse2
 
 confflags += $(nooptflags)
 confflags += --enable-a52
-confflags += --enable-alsa
 #confflags += --enable-faac
 confflags += --enable-ffmpeg
 confflags += --enable-freetype2
@@ -32,11 +33,15 @@ confflags += --enable-ogg
 confflags += --enable-oss
 confflags += --enable-sdl
 confflags += --enable-theora
-confflags += --enable-v4l
 confflags += --enable-vorbis
 confflags += --enable-x264
 confflags += --enable-xvid
 
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+confflags += --enable-alsa
+confflags += --enable-v4l
+endif
+
 CFLAGS  := $(shell dpkg-buildflags --get CFLAGS)
 LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends:
  debhelper (>= 7.2),
  dh-autoreconf,
  liba52-0.7.4-dev,
- libasound2-dev,
+ libasound2-dev [linux-any],
  libavcodec-dev,
  libavformat-dev,
  libavutil-dev,

Reply via email to