summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-10-16 11:28:49 +0200
committerAlexis Ballier <aballier@gentoo.org>2015-10-16 11:29:00 +0200
commitb67f0bc2ed20d6b73cf4528818faef7bfcfb2254 (patch)
tree129b28fe6cc2a32a48a1c93e8578227d1849b064
parentdev-python/pretty-yaml: Keyword for ~x86 (diff)
downloadgentoo-b67f0bc2ed20d6b73cf4528818faef7bfcfb2254.tar.gz
gentoo-b67f0bc2ed20d6b73cf4528818faef7bfcfb2254.tar.bz2
gentoo-b67f0bc2ed20d6b73cf4528818faef7bfcfb2254.zip
media-libs/x265: Add patch to fix link order when doing multi-variant build.
as-needed might drop important libraries (dl here), causing the library to be underlinked. Package-Manager: portage-2.2.23
-rw-r--r--media-libs/x265/files/1.8-extralibs_order.patch27
-rw-r--r--media-libs/x265/x265-1.8-r3.ebuild (renamed from media-libs/x265/x265-1.8-r2.ebuild)1
2 files changed, 28 insertions, 0 deletions
diff --git a/media-libs/x265/files/1.8-extralibs_order.patch b/media-libs/x265/files/1.8-extralibs_order.patch
new file mode 100644
index 000000000000..95f6887eb725
--- /dev/null
+++ b/media-libs/x265/files/1.8-extralibs_order.patch
@@ -0,0 +1,27 @@
+Link EXTRA_LIB before PLATFORM_LIBS since they're static libraries and as-needed
+might drop required libraries if they come after.
+
+Index: x265_11047/source/CMakeLists.txt
+===================================================================
+--- x265_11047.orig/source/CMakeLists.txt
++++ x265_11047/source/CMakeLists.txt
+@@ -455,6 +455,9 @@ option(ENABLE_SHARED "Build shared libra
+ if(ENABLE_SHARED)
+ add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.def" ${YASM_OBJS}
+ ${X265_RC_FILE} $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)
++ if(EXTRA_LIB)
++ target_link_libraries(x265-shared ${EXTRA_LIB})
++ endif()
+ target_link_libraries(x265-shared ${PLATFORM_LIBS})
+ if(MSVC)
+ set_target_properties(x265-shared PROPERTIES OUTPUT_NAME libx265)
+@@ -480,9 +483,6 @@ if(ENABLE_SHARED)
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR})
+ endif()
+- if(EXTRA_LIB)
+- target_link_libraries(x265-shared ${EXTRA_LIB})
+- endif()
+ if(LINKER_OPTIONS)
+ # set_target_properties can't do list expansion
+ string(REPLACE ";" " " LINKER_OPTION_STR "${LINKER_OPTIONS}")
diff --git a/media-libs/x265/x265-1.8-r2.ebuild b/media-libs/x265/x265-1.8-r3.ebuild
index 18bfcc1caaae..ae1ad80d990e 100644
--- a/media-libs/x265/x265-1.8-r2.ebuild
+++ b/media-libs/x265/x265-1.8-r3.ebuild
@@ -43,6 +43,7 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}/${PV}-build-Disable-march-selection-from-CMakeLists.txt.patch" # bug #510890
+ epatch "${FILESDIR}/1.8-extralibs_order.patch"
}
# By default, the library and the encoder is configured for only one output bit