1 |
commit: b8f01c6fb2a8d5a29eddde87cb2e09e1d66df333 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 28 14:40:39 2018 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 28 17:23:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8f01c6f |
7 |
|
8 |
media-libs/libaom: update patches for live ebuild |
9 |
|
10 |
Closes: https://bugs.gentoo.org/654430 |
11 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
12 |
|
13 |
media-libs/libaom/files/libdirpc2.patch | 48 ++++++++++++++++++++++++++++++ |
14 |
media-libs/libaom/files/pthread_lib2.patch | 14 +++++++++ |
15 |
media-libs/libaom/libaom-9999.ebuild | 2 +- |
16 |
3 files changed, 63 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/media-libs/libaom/files/libdirpc2.patch b/media-libs/libaom/files/libdirpc2.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..cbd1b901fb3 |
21 |
--- /dev/null |
22 |
+++ b/media-libs/libaom/files/libdirpc2.patch |
23 |
@@ -0,0 +1,48 @@ |
24 |
+Index: libaom-9999/CMakeLists.txt |
25 |
+=================================================================== |
26 |
+--- libaom-9999.orig/CMakeLists.txt |
27 |
++++ libaom-9999/CMakeLists.txt |
28 |
+@@ -234,8 +234,9 @@ if(NOT MSVC) |
29 |
+ -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} |
30 |
+ -DCMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME} |
31 |
+ -DCONFIG_MULTITHREAD=${CONFIG_MULTITHREAD} |
32 |
+- -DHAVE_PTHREAD_H=${HAVE_PTHREAD_H} -P |
33 |
+- "${AOM_ROOT}/build/cmake/pkg_config.cmake" |
34 |
++ -DHAVE_PTHREAD_H=${HAVE_PTHREAD_H} |
35 |
++ -DLIB_SUFFIX=${LIB_SUFFIX} |
36 |
++ -P "${AOM_ROOT}/build/cmake/pkg_config.cmake" |
37 |
+ COMMENT "Writing aom.pc" VERBATIM) |
38 |
+ add_dependencies(aom_pc aom_version) |
39 |
+ endif() |
40 |
+Index: libaom-9999/build/cmake/pkg_config.cmake |
41 |
+=================================================================== |
42 |
+--- libaom-9999.orig/build/cmake/pkg_config.cmake |
43 |
++++ libaom-9999/build/cmake/pkg_config.cmake |
44 |
+@@ -34,12 +34,13 @@ endif() |
45 |
+ |
46 |
+ # Write pkg-config info. |
47 |
+ set(prefix "${CMAKE_INSTALL_PREFIX}") |
48 |
++set(libdir "lib${LIB_SUFFIX}") |
49 |
+ set(pkgconfig_file "${AOM_CONFIG_DIR}/aom.pc") |
50 |
+ string(TOLOWER ${CMAKE_PROJECT_NAME} pkg_name) |
51 |
+ file(WRITE "${pkgconfig_file}" "# libaom pkg-config.\n") |
52 |
+ file(APPEND "${pkgconfig_file}" "prefix=${prefix}\n") |
53 |
+ file(APPEND "${pkgconfig_file}" "exec_prefix=\${prefix}/bin\n") |
54 |
+-file(APPEND "${pkgconfig_file}" "libdir=\${prefix}/lib\n") |
55 |
++file(APPEND "${pkgconfig_file}" "libdir=\${prefix}/${libdir}\n") |
56 |
+ file(APPEND "${pkgconfig_file}" "includedir=\${prefix}/include\n\n") |
57 |
+ file(APPEND "${pkgconfig_file}" "Name: ${pkg_name}\n") |
58 |
+ file(APPEND "${pkgconfig_file}" |
59 |
+@@ -49,10 +50,10 @@ file(APPEND "${pkgconfig_file}" "Require |
60 |
+ file(APPEND "${pkgconfig_file}" "Conflicts:\n") |
61 |
+ if(CONFIG_MULTITHREAD AND HAVE_PTHREAD_H) |
62 |
+ file(APPEND "${pkgconfig_file}" |
63 |
+- "Libs: -L\${prefix}/lib -l${pkg_name} -lm -lpthread\n") |
64 |
++ "Libs: -L\${prefix}/${libdir} -l${pkg_name} -lm -lpthread\n") |
65 |
+ file(APPEND "${pkgconfig_file}" "Libs.private: -lm -lpthread\n") |
66 |
+ else() |
67 |
+- file(APPEND "${pkgconfig_file}" "Libs: -L\${prefix}/lib -l${pkg_name} -lm\n") |
68 |
++ file(APPEND "${pkgconfig_file}" "Libs: -L\${prefix}/${libdir} -l${pkg_name} -lm\n") |
69 |
+ file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n") |
70 |
+ endif() |
71 |
+ file(APPEND "${pkgconfig_file}" "Cflags: -I\${prefix}/include\n") |
72 |
|
73 |
diff --git a/media-libs/libaom/files/pthread_lib2.patch b/media-libs/libaom/files/pthread_lib2.patch |
74 |
new file mode 100644 |
75 |
index 00000000000..ec4b9107e99 |
76 |
--- /dev/null |
77 |
+++ b/media-libs/libaom/files/pthread_lib2.patch |
78 |
@@ -0,0 +1,14 @@ |
79 |
+Index: libaom-9999/CMakeLists.txt |
80 |
+=================================================================== |
81 |
+--- libaom-9999.orig/CMakeLists.txt |
82 |
++++ libaom-9999/CMakeLists.txt |
83 |
+@@ -575,6 +575,9 @@ |
84 |
+ include("${AOM_ROOT}/build/cmake/exports.cmake") |
85 |
+ setup_exports_target() |
86 |
+ set_target_properties(aom PROPERTIES SOVERSION 0) |
87 |
++ if(HAVE_PTHREAD_H AND CONFIG_MULTITHREAD) |
88 |
++ target_link_libraries(aom ${AOM_LIB_LINK_TYPE} Threads::Threads) |
89 |
++ endif() |
90 |
+ endif() |
91 |
+ |
92 |
+ # Handle user supplied compile and link flags last to ensure they're obeyed. |
93 |
|
94 |
diff --git a/media-libs/libaom/libaom-9999.ebuild b/media-libs/libaom/libaom-9999.ebuild |
95 |
index 68a8ddfdb1a..29e0528f563 100644 |
96 |
--- a/media-libs/libaom/libaom-9999.ebuild |
97 |
+++ b/media-libs/libaom/libaom-9999.ebuild |
98 |
@@ -36,7 +36,7 @@ REQUIRED_USE=" |
99 |
cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 ) |
100 |
" |
101 |
|
102 |
-PATCHES=( "${FILESDIR}/libdirpc.patch" "${FILESDIR}/pthread_lib.patch" ) |
103 |
+PATCHES=( "${FILESDIR}/libdirpc2.patch" "${FILESDIR}/pthread_lib2.patch" ) |
104 |
|
105 |
src_prepare() { |
106 |
sed -e 's/lib"/lib${LIB_SUFFIX}"/' -i CMakeLists.txt || die |