[SCM] ffmpeg/master: Build static libraries without -fPIC
aca-guest at users.alioth.debian.org
aca-guest at users.alioth.debian.org
Sun Oct 30 11:31:40 UTC 2016
The following commit has been merged in the master branch:
commit 9986c76437d07189a9d8bd320d7257035d92877f
Author: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
Date: Sat Oct 29 23:20:29 2016 +0200
Build static libraries without -fPIC
Policy 10.2 requires this.
diff --git a/debian/rules b/debian/rules
index 6a57b22..65b7c23 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,7 @@ export DEB_LDFLAGS_MAINT_STRIP=-Wl,-Bsymbolic-functions
# Package name for the extra flavor.
EXTRA_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(.*extra[0-9]+)[[:space:]]*$$/\1/p' debian/control)
-FLAVORS = standard extra
+FLAVORS = standard extra static
# Enable as many features as possible, as long as the result is still GPLv2+ (a GPLv3+ variant is built as libavcodec-extra/libavfilter-extra flavor).
# The following flags (and build-dependencies) are not added, because they would require a libavformat-extra flavor:
@@ -46,7 +46,6 @@ CONFIG := --prefix=/usr \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
--incdir=/usr/include/$(DEB_HOST_MULTIARCH) \
--enable-gpl \
- --enable-shared \
--disable-libtesseract \
--disable-stripping \
--disable-decoder=libschroedinger \
@@ -94,10 +93,11 @@ CONFIG := --prefix=/usr \
--enable-x11grab
# The standard configuration only uses the shared CONFIG.
-CONFIG_standard =
+CONFIG_standard = --enable-shared
# With these enabled, resulting binaries are effectively licensed as GPLv3+.
-CONFIG_extra = --enable-version3 \
+CONFIG_extra = --enable-shared \
+ --enable-version3 \
--disable-doc \
--disable-programs \
--enable-libopencore_amrnb \
@@ -106,6 +106,11 @@ CONFIG_extra = --enable-version3 \
--enable-libvo_amrwbenc \
--enable-netcdf
+# The static libraries should not be built with PIC.
+CONFIG_static = --disable-pic \
+ --disable-doc \
+ --disable-programs
+
# Disable optimizations if requested.
ifneq (,$(filter $(DEB_BUILD_OPTIONS),noopt))
CONFIG += --disable-optimizations
@@ -236,6 +241,8 @@ ifeq ($(DEB_HOST_ARCH),powerpc)
install -d debian/tmp/extra/usr/lib/$(DEB_HOST_MULTIARCH)/altivec
install -m 644 debian/altivec-extra/*/*.so.* debian/tmp/extra/usr/lib/$(DEB_HOST_MULTIARCH)/altivec
endif
+ # Use the static libraries from the --disable-pic build
+ install -m 644 debian/static/*/lib*.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_install:
dh_install $(addprefix -p,$(EXTRA_PKGS)) --sourcedir=debian/tmp/extra
--
ffmpeg packaging
More information about the pkg-multimedia-commits
mailing list