[SCM] xvidcore/master: Introduce a debian/confflags file to conditionally disable assembly optimizations on certain archs until we introduce flavours.
fabian-guest at users.alioth.debian.org
fabian-guest at users.alioth.debian.org
Fri Jul 29 08:07:37 UTC 2011
The following commit has been merged in the master branch:
commit b31e422384a8425477d0fb5f7ca31359f0a27853
Author: Fabian Greffrath <fabian at greffrath.com>
Date: Fri Jul 29 10:06:47 2011 +0200
Introduce a debian/confflags file to conditionally disable assembly optimizations on certain archs until we introduce flavours.
diff --git a/debian/confflags b/debian/confflags
new file mode 100644
index 0000000..6ea4574
--- /dev/null
+++ b/debian/confflags
@@ -0,0 +1,22 @@
+# -*- mode: makefile -*-
+# vim:syntax=make
+
+# Set CFLAGS from DEB_CFLAGS if defined, otherwise let xvidcore's build system
+# set CFLAGS to use.
+DEFAULT_CFLAGS = -Wall -O3 -fstrength-reduce -finline-functions -ffast-math \
+ -fomit-frame-pointer
+export CFLAGS = $(or $(DEB_CFLAGS),$(DEFAULT_CFLAGS))
+
+export DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+export DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+# Explicitely disable Altivec support on powerpc until we introduce flavours
+ifeq ($(DEB_HOST_ARCH_CPU),powerpc)
+ confflags += --disable-assembly
+endif
+
+# Explicitely disable yasm support on kfreebsd, it's broken on 64bit;
+# see: http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/xvid/Makefile?rev=1.36
+ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
+ confflags += --disable-assembly
+endif
diff --git a/debian/control b/debian/control
index 090cfee..4e1b49d 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,6 @@ Uploaders: Loïc Martin <loic.martin3 at gmail.com>,
Build-Depends: debhelper (>= 7.3~),
yasm (>= 1.0) [any-i386 amd64],
autoconf
-Build-Conflicts: yasm [kfreebsd-amd64]
Standards-Version: 3.9.2
DM-Upload-Allowed: yes
Homepage: http://www.xvid.org/
diff --git a/debian/rules b/debian/rules
index c838b48..aa7dd43 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,6 @@
#!/usr/bin/make -f
-# Set CFLAGS from DEB_CFLAGS if defined, otherwise let xvidcore's build system
-# set CFLAGS to use.
-DEFAULT_CFLAGS = -Wall -O3 -fstrength-reduce -finline-functions -ffast-math \
- -fomit-frame-pointer
-CFLAGS = $(or $(DEB_CFLAGS),$(DEFAULT_CFLAGS))
+include debian/confflags
%:
dh $@ --sourcedirectory=build/generic \
@@ -12,4 +8,4 @@ CFLAGS = $(or $(DEB_CFLAGS),$(DEFAULT_CFLAGS))
override_dh_auto_configure:
cd build/generic && autoconf
- dh_auto_configure
+ dh_auto_configure $(confflags)
--
xvidcore packaging
More information about the pkg-multimedia-commits
mailing list