summaryrefslogtreecommitdiff
path: root/media-libs/libaom
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libaom')
-rw-r--r--media-libs/libaom/Manifest4
-rw-r--r--media-libs/libaom/files/libdirpc.patch40
-rw-r--r--media-libs/libaom/files/pthread_lib.patch14
-rw-r--r--media-libs/libaom/libaom-9999.ebuild3
4 files changed, 60 insertions, 1 deletions
diff --git a/media-libs/libaom/Manifest b/media-libs/libaom/Manifest
index e98a71eeff7f..561f6245ad6b 100644
--- a/media-libs/libaom/Manifest
+++ b/media-libs/libaom/Manifest
@@ -1,2 +1,4 @@
-EBUILD libaom-9999.ebuild 2039 BLAKE2B 57bdf5ef9b2de6a347fb2e0cd1ab6c1ff502800a5257a30d09b6c234c83cd14dd36006118a6c7ad25eada94a1b493ad245c340190693e10d21c11886f36ed562 SHA512 691d3020210c00620fb4cf265ade8d76809df61afe90338de6a9d0f6e5d383c2fd6e41e6d363ea89c484f4f13ad6878e007172b83bcf4044f0a4b548bbb14a55
+AUX libdirpc.patch 1877 BLAKE2B e8df5b7b5a662d68d3386e348964b17b15bfed49b8cafed55b9893878ead75e00a1ceac92e63f5dc446b03faf09af26e732c508c83e851a7e3664471c8dd8521 SHA512 ead273addda6b39b6f10b7636465cf313b1dfeb344457227acb1d8c03bdab8f78ba0e44ec90b1044359ae445e1e1ce1a87a06df91c86a406b6fd4ce41713df0a
+AUX pthread_lib.patch 561 BLAKE2B 7d1a68f9c8a9f250aee9ca44a2cb787a802195708f0dc156d22073f21f83772167c5c57d953551a55385edb13ea8c5e8c28cd1379814175ff915d03ad8bf2860 SHA512 7a7060aa7a7062d85ba9ec3e0bdacdd552c5f2b7ee5c326da1d0d4a48b28693651703deccddcbc31b6e3190fcc6ac6e665bf09621b0ad278638d0812f557be85
+EBUILD libaom-9999.ebuild 2166 BLAKE2B 1aacc17636fac78328fddec4fb26f8fa6b8ceb9a78da48176dd1590f4cf1c5f14d5f03146b1ac47db730207a6bc5b4f234db5d3c677cae242aa97d95b018179a SHA512 378a53fc8896ba82996a0a0293da437086e6c273c2c8c1dac8c6a24d12858a49af461ad8e5275642860c60bd95b5dbf9bc79ad4d3eb3c40376b1fafeab5437fa
MISC metadata.xml 223 BLAKE2B 1a772bb5add75cb4343b09bb2456adcd5e46896daaab4091ab64b667c5fa1a4adab0940015a3e755df3d6540b456694dc67ef9581d02d40c63b89290f8f83e43 SHA512 27b688917e0b1c4a75ea34c97d2d67d309573941492ab04124de11034f3b2796480f02408d86e2eba77ca2000722ea6606fe12a49622c04f9e2c1fa27b6fc8db
diff --git a/media-libs/libaom/files/libdirpc.patch b/media-libs/libaom/files/libdirpc.patch
new file mode 100644
index 000000000000..ac6466433683
--- /dev/null
+++ b/media-libs/libaom/files/libdirpc.patch
@@ -0,0 +1,40 @@
+Index: libaom-9999/CMakeLists.txt
+===================================================================
+--- libaom-9999.orig/CMakeLists.txt
++++ libaom-9999/CMakeLists.txt
+@@ -248,6 +248,7 @@ if (NOT MSVC)
+ -DCMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME}
+ -DCONFIG_MULTITHREAD=${CONFIG_MULTITHREAD}
+ -DHAVE_PTHREAD_H=${HAVE_PTHREAD_H}
++ -DLIB_SUFFIX=${LIB_SUFFIX}
+ -P "${AOM_ROOT}/build/cmake/pkg_config.cmake"
+ COMMENT "Writing aom.pc"
+ VERBATIM)
+Index: libaom-9999/build/cmake/pkg_config.cmake
+===================================================================
+--- libaom-9999.orig/build/cmake/pkg_config.cmake
++++ libaom-9999/build/cmake/pkg_config.cmake
+@@ -35,12 +35,13 @@ endif ()
+
+ # Write pkg-config info.
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
++set(libdir "lib${LIB_SUFFIX}")
+ set(pkgconfig_file "${AOM_CONFIG_DIR}/aom.pc")
+ string(TOLOWER ${CMAKE_PROJECT_NAME} pkg_name)
+ file(WRITE "${pkgconfig_file}" "# libaom pkg-config.\n")
+ file(APPEND "${pkgconfig_file}" "prefix=${prefix}\n")
+ file(APPEND "${pkgconfig_file}" "exec_prefix=\${prefix}/bin\n")
+-file(APPEND "${pkgconfig_file}" "libdir=\${prefix}/lib\n")
++file(APPEND "${pkgconfig_file}" "libdir=\${prefix}/${libdir}\n")
+ file(APPEND "${pkgconfig_file}" "includedir=\${prefix}/include\n\n")
+ file(APPEND "${pkgconfig_file}" "Name: ${pkg_name}\n")
+ file(APPEND "${pkgconfig_file}"
+@@ -48,7 +49,7 @@ file(APPEND "${pkgconfig_file}"
+ file(APPEND "${pkgconfig_file}" "Version: ${package_version}\n")
+ file(APPEND "${pkgconfig_file}" "Requires:\n")
+ file(APPEND "${pkgconfig_file}" "Conflicts:\n")
+-file(APPEND "${pkgconfig_file}" "Libs: -L\${prefix}/lib -l${pkg_name} -lm\n")
++file(APPEND "${pkgconfig_file}" "Libs: -L\${prefix}/${libdir} -l${pkg_name} -lm\n")
+ if (CONFIG_MULTITHREAD AND HAVE_PTHREAD_H)
+ file(APPEND "${pkgconfig_file}" "Libs.private: -lm -lpthread\n")
+ else ()
diff --git a/media-libs/libaom/files/pthread_lib.patch b/media-libs/libaom/files/pthread_lib.patch
new file mode 100644
index 000000000000..d8770bc687ca
--- /dev/null
+++ b/media-libs/libaom/files/pthread_lib.patch
@@ -0,0 +1,14 @@
+Index: libaom-9999/CMakeLists.txt
+===================================================================
+--- libaom-9999.orig/CMakeLists.txt
++++ libaom-9999/CMakeLists.txt
+@@ -598,6 +598,9 @@ if (BUILD_SHARED_LIBS)
+ include("${AOM_ROOT}/build/cmake/exports.cmake")
+ setup_exports_target()
+ set_target_properties(aom PROPERTIES SOVERSION 0)
++ if (HAVE_PTHREAD_H AND CONFIG_MULTITHREAD)
++ target_link_libraries(aom ${AOM_LIB_LINK_TYPE} Threads::Threads)
++ endif ()
+ endif ()
+
+ # Handle user supplied compile and link flags last to ensure they're obeyed.
diff --git a/media-libs/libaom/libaom-9999.ebuild b/media-libs/libaom/libaom-9999.ebuild
index f940504046ee..9b472bd99def 100644
--- a/media-libs/libaom/libaom-9999.ebuild
+++ b/media-libs/libaom/libaom-9999.ebuild
@@ -35,6 +35,8 @@ REQUIRED_USE="
cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
"
+PATCHES=( "${FILESDIR}/libdirpc.patch" "${FILESDIR}/pthread_lib.patch" )
+
src_prepare() {
sed -e 's/lib"/lib${LIB_SUFFIX}"/' -i CMakeLists.txt || die
cmake-utils_src_prepare
@@ -63,6 +65,7 @@ multilib_src_configure() {
-DBUILD_SHARED_LIBS=ON
)
cmake-utils_src_configure
+ rm aom.pc # ensure it is rebuilt with proper libdir
}
multilib_src_install() {