[SCM] x265/master: Create multilib build as recommended by upstream

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Mon Oct 12 00:02:49 UTC 2015


The following commit has been merged in the master branch:
commit dc49fed8b52bff0535a91f67c8364d8e6c27eb8c
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Mon Oct 12 01:32:13 2015 +0200

    Create multilib build as recommended by upstream

diff --git a/debian/libx265-68.install b/debian/libx265-68.install
index 413f749..f690fbe 100644
--- a/debian/libx265-68.install
+++ b/debian/libx265-68.install
@@ -1,2 +1 @@
 usr/lib/*/libx265.so.*
-usr/lib/*/x265-10bit/libx265.so.*
diff --git a/debian/libx265-dev.install b/debian/libx265-dev.install
index db93cb4..3d2cf21 100644
--- a/debian/libx265-dev.install
+++ b/debian/libx265-dev.install
@@ -1,6 +1,4 @@
 usr/include/*
 usr/lib/*/libx265.a
 usr/lib/*/libx265.so
-usr/lib/*/x265-10bit/libx265.a
-usr/lib/*/x265-10bit/libx265.so
 usr/lib/*/pkgconfig
diff --git a/debian/patches/highbit-depth-path.patch b/debian/patches/highbit-depth-path.patch
deleted file mode 100644
index ec79926..0000000
--- a/debian/patches/highbit-depth-path.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Description: Pass correct path to dlopen
-Author: Sebastian Ramacher <sramacher at debian.org>
-Forwarded: not-needed
-Last-Update: 2015-05-21
-
---- a/source/encoder/api.cpp
-+++ b/source/encoder/api.cpp
-@@ -333,7 +333,7 @@
- #define ext ".dylib"
- #else
- #include <dlfcn.h>
--#define ext ".so"
-+#define ext ".so." xstr(X265_BUILD)
- #endif
- 
- static int g_recursion /* = 0 */;
-@@ -359,9 +359,9 @@
-         if (bitDepth == 12)
-             libname = "libx265_main12" ext;
-         else if (bitDepth == 10)
--            libname = "libx265_main10" ext;
-+            libname = DEB_HOST_MULTIARCH "x265-10bit/libx265" ext;
-         else if (bitDepth == 8)
--            libname = "libx265_main" ext;
-+            libname = DEB_HOST_MULTIARCH "libx265" ext;
-         else
-             return NULL;
- 
diff --git a/debian/patches/series b/debian/patches/series
index f5452aa..af01a27 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 compile-flags.patch
-highbit-depth-path.patch
 fix-x32.patch
diff --git a/debian/rules b/debian/rules
index 586b852..951689d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,12 +2,13 @@
 
 DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
+export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed \
+	-L$(CURDIR)/x265-10bit \
+	-L$(CURDIR)/x265-12bit
 # see #789111
 export DEB_LDFLAGS_MAINT_STRIP=-Wl,-Bsymbolic-functions
-# LFS support and multiarch path to look up 10bit library
-export DEB_CPPFLAGS_MAINT_APPEND=$(shell getconf LFS_CFLAGS) \
-	-DDEB_HOST_MULTIARCH=\"/usr/lib/$(DEB_HOST_MULTIARCH)/\"
+# LFS support
+export DEB_CPPFLAGS_MAINT_APPEND=$(shell getconf LFS_CFLAGS)
 
 %:
 	dh $@ --parallel --buildsystem=cmake \
@@ -16,26 +17,46 @@ export DEB_CPPFLAGS_MAINT_APPEND=$(shell getconf LFS_CFLAGS) \
 
 override_dh_auto_clean:
 	dh_auto_clean --builddirectory=x265-10bit
+	dh_auto_clean --builddirectory=x265-12bit
 	dh_auto_clean
 	rm -rf doc/reST/build
 
 override_dh_auto_configure:
 	dh_auto_configure --builddirectory=x265-10bit -- \
 		-DENABLE_PIC=ON \
-		-DHIGH_BIT_DEPTH=ON \
 		-DENABLE_CLI=OFF \
-		-DLIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH)/x265-10bit
+		-DENABLE_SHARED=OFF \
+		-DEXPORT_C_API=OFF \
+		-DHIGH_BIT_DEPTH=ON
+	dh_auto_configure --builddirectory=x265-12bit -- \
+		-DENABLE_PIC=ON \
+		-DENABLE_CLI=OFF \
+		-DENABLE_SHARED=OFF \
+		-DEXPORT_C_API=OFF \
+		-DHIGH_BIT_DEPTH=ON \
+		-DMAIN12=ON
 	dh_auto_configure -- \
 		-DENABLE_PIC=ON \
-		-DLIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH)
+		-DLIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH) \
+		-DEXTRA_LIB="x265_main10.a;x265_main12.a" \
+		-DLINKED_10BIT=ON \
+		-DLINKED_12BIT=ON
 
 override_dh_auto_build-arch:
 	dh_auto_build --builddirectory=x265-10bit
+	dh_auto_build --builddirectory=x265-12bit
+	mv x265-10bit/libx265.a x265-10bit/libx265_main10.a
+	mv x265-12bit/libx265.a x265-12bit/libx265_main12.a
 	dh_auto_build
-
-override_dh_auto_install-arch:
-	dh_auto_install --builddirectory=x265-10bit
-	dh_auto_install
+	mv x265-8bit/libx265.a x265-8bit/lib264_main.a
+	ar -M <<EOF \
+		CREATE x265-8bit/libx265.a \
+		ADDLIB x265-8bit/libx265_main.a \
+		ADDLIB x265-10bit/libx265_main10.a \
+		ADDLIB x265-12bit/libx265_main12.a \
+		SAVE \
+		END \
+EOF
 
 override_dh_auto_build-indep:
 	$(MAKE) -C doc/reST html

-- 
x265 packaging



More information about the pkg-multimedia-commits mailing list