summaryrefslogtreecommitdiff
path: root/media-libs/x265
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /media-libs/x265
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'media-libs/x265')
-rw-r--r--media-libs/x265/Manifest25
-rw-r--r--media-libs/x265/files/arm-r1.patch42
-rw-r--r--media-libs/x265/files/test-ns.patch295
-rw-r--r--media-libs/x265/files/tests.patch16
-rw-r--r--media-libs/x265/metadata.xml1
-rw-r--r--media-libs/x265/x265-2.8.ebuild8
-rw-r--r--media-libs/x265/x265-2.9.ebuild8
-rw-r--r--media-libs/x265/x265-3.0.ebuild8
-rw-r--r--media-libs/x265/x265-3.1.2.ebuild8
-rw-r--r--media-libs/x265/x265-3.1.ebuild8
-rw-r--r--media-libs/x265/x265-3.2.1.ebuild6
-rw-r--r--media-libs/x265/x265-3.2.ebuild8
-rw-r--r--media-libs/x265/x265-3.3.ebuild6
-rw-r--r--media-libs/x265/x265-3.4.ebuild219
-rw-r--r--media-libs/x265/x265-9999.ebuild133
15 files changed, 683 insertions, 108 deletions
diff --git a/media-libs/x265/Manifest b/media-libs/x265/Manifest
index 0ace40ee6621..62cb0164ed31 100644
--- a/media-libs/x265/Manifest
+++ b/media-libs/x265/Manifest
@@ -1,7 +1,10 @@
+AUX arm-r1.patch 1448 BLAKE2B 1cb6b7282436c23565833eef725f74f6a0780911b54a84f3b552f936288496f429a057410cd57fb0214741b0f6b307ad3bd546872a628fe33cf2e036bb625113 SHA512 43d646200d2df2b041d9c2100559ea84f3a45a974624bd4b174eb4804201f4291a3d4e9915e16d81d781bb8ad49c6d4e61f438f470480362418e4e6e758ff1b5
AUX arm.patch 1188 BLAKE2B 886fd2b177c0e1bc1dbdcb6f6b14219eac807a26dd76e67d57727d9fc523b69388a19b354a6d7c2653d674b8c36dff487ed9533c9d0063721483f9fe2b3bf792 SHA512 2591fdb86494e36d4c44b31ae73c1d544018776f21b4a22410aa48ea3f950c74ee808a8c2759faf9b84e29e4ee4fddd6b1baaa23ac2924da3e408b9947977dec
AUX neon.patch 677 BLAKE2B 805177f9d3d3f703699adad93b0ca655065b9d093ecc3776600fa4eb3c565962beac47ebbeb35dcdf6fa3d0d19c734310b4032bcda62aeeea8ddc99debe901f1 SHA512 69e3d7c6d987ccbbaa7111eb8efc1e02c1e02096936a0eedfbe7e9e1c1377bed0f50f7b09aec0768e8de31251b8e3d2191aab56f19259c0e4aeda9684ab55bc6
AUX non_x86.patch 698 BLAKE2B b565a558e521b32ff67b24abb49a546615f42f009dc12ae9ee00a43df3efa657960601109d3023e07322fc47b5e4d87cd8f4d12efd44888a28f52c9c6784a353 SHA512 444623b91301049175624664de58eef6735c1b86c92792e5a6f1d7154e08f46e861e38f7cec23b5528deaffabcc494ec8754a48ae8cdd9e0f8665bdf96c4cd5b
AUX ppc64.patch 619 BLAKE2B 17ea28b03ee80af9e73222df7d999138a51d6c8836574d005981426465e328cffdde034753fcc510ae305ee061e2aa278fc1a37c3bf2bc439f7c6f21bf991c99 SHA512 7b23e9bdb3cc634206ffd42fc381bb3b7915b7b788b30567e01592d83b3d8aee8ba794a20587a31e5ead02c837deae9c8f3d9e82b2b05409892dbe6ff37fe822
+AUX test-ns.patch 14677 BLAKE2B fa48d03bca5d72b7b3eac7f6ac98c93bde12ec845f9eecdde2c4ed5ed4ac6688d74ea75e11f00d4f901967f81cd80f138eaae662bd6cc1f67948121c3c0b2e34 SHA512 c6d2752027e42403704c68948256c52a237f8b83ee97d4b8e21cc13654964342ed061e5f048984fb649e9980f4899a64931ec97d6dfa1b786db6346134b04281
+AUX tests.patch 650 BLAKE2B 21759b11966e12df1a72a1ed00935ff781ad8b912e734de65cf0872cf92400aef71d4aebbe067dd1059a1d445cd9819cef4dc4b1c7df63ca7b8e97b8e578045e SHA512 a4a3b69fa86e6910ff4f963b9667c8deaea4ff88f3396e8e426e61d036b12cbf550bff7867657da1ba98417f1ccae88db1887b94ea6271604060e01fb8698d79
AUX x265-2.9-detect512.patch 374 BLAKE2B 7123069c19e85ac5953434eb6c4a80135e60178537f3598e796cf6550cc4efdb5bcd358bc96401d948d26f36676892bb344c097143a310a1e19c8b2a921cd44a SHA512 6be1540b89f0f622476d3511dd01cb3dcc24ff4823cef57d08432e857fd7da3c9810904a02d1583896767a33f97140651d3a4c163952ed459338623999d93e18
AUX x265-3.3-arm.patch 1177 BLAKE2B 72ffeda05e1ec23153cd328b18d4719b7883d8f910354405de9780151b013c032fa3489ad7416f2b6dc8a8c016092c5156fbb730722aab3163eb6c3e49160da2 SHA512 9578a3f386e099eb15e5779d7ad99c6f5696f1694656b1ab91f59cdde821008f038bf5ab7901df2b1416b03127f09ef1a2178e3274075fddb41e2c701a2c5ecd
AUX x265-3.3-neon.patch 666 BLAKE2B 27166c0e9de3bf316ac64742c40156a623c362e896ba358e4cbbf5c17a4dbbeccc645fea5731c9ac6615fe1bd254685fc742d5258e2953ddb53e6b0ccfbf7e0c SHA512 a5d84e7f111574a2fce90b24ba67b08d05431c903ad853a976eea476c16bb0b8ff2cc4c43e7212bc1b8b5a3cbbca7a5b346456527a8d6523200db7b9d1501b59
@@ -14,13 +17,15 @@ DIST x265_3.1.tar.gz 1419649 BLAKE2B b9151f136fdc6c0512f481af6c8d4d575ce4c75ef88
DIST x265_3.2.1.tar.gz 1426255 BLAKE2B 4184cfa290b36f497c5f3a5e3b597bf44e52dd20ba6af21c665d98709c9b984122a339d93aae572756a94549c0c1a293ee195c6c1d34902d298664ecf016f896 SHA512 5cb29b9d4475c1f686f6e31e47ccddde3db1639d5dcf9c058513389a9fdeb35a83b14e30e59498a76dec74bb0b410b6d8f5b1b45d18927be9811bb6a40d8d568
DIST x265_3.2.tar.gz 1425689 BLAKE2B 58da4aa52381ec89b0aea1dc896fef92d9ec9fc781fd279acd0a338cd872f52482c81c558dde749c1205dbc13341a9851c381d01e2f312f5e2b4712d2242b7d3 SHA512 08c779026fe4c03797efef9d6a898b16c308355311e167c81b976345eb78039725a31294c77a60b76b4ef648d8720e16b2d6524e7108755531a5375231f5313e
DIST x265_3.3.tar.gz 1438685 BLAKE2B 43806915c3b22fabff71c307dc53e9a3408262528f8ec01bf81168826eee26b468b0e68c738e3c0371f6de6121a3ac090bfaeed0cbfca0a3b8c57710d7f25ad0 SHA512 3d56900ecd58e83d2ecc93d956524e3b0e622dbe3c74a137c7b21f98599245547403401e9ec7f679996fd09fca788aa10272bf17e58a68fce449c8cb555ad7c0
-EBUILD x265-2.8.ebuild 5708 BLAKE2B 3ee8c0f535143ba5ac91476a4d30e5dd546cf3856a81b81ee5ced12414498329d8a5fb24222450770b0856cc5ee4b94018054d4e3437ac7a8bf0a475aac309c1 SHA512 1c91b82022cdc6c24991a891b691f6b13f04eed9aa586bc3fb333f5379bf868d0ab0006a05ce0438adbfdfbac8759360c27f5b3e57e17d4aad9848fd89a4cdcb
-EBUILD x265-2.9.ebuild 5726 BLAKE2B 05f297461b0a065d623e0de43a28d7e8f016c93da9e16b2316ad9ac19ea0ead60eb0f88e0abfa4e753444983b2c52aad673bcb5d41d2703cdb4f06218b94aeae SHA512 153cf5598086e6ef642328133dd8c8ac3d8a157dab810b5a95641dc2dce04ceba3639b0895f06aad5fa03f40d69474bb442dbc46d26fe339209d1be36d72e86e
-EBUILD x265-3.0.ebuild 5684 BLAKE2B 5ac5d28a1de72646b53a556398f42f849c77d7df72dca297d6e692036988112bf25bb2d6e9a6176ff0937cfaa15be46cd9482f912da5e298eb413fcba4044b44 SHA512 3f40e68a5fc46542103d555d6277da304c3c443f546c64c77b24127e28bb1f05ad85d1deec143346f23a0ac91942328e676456058f1b2b7051c7bf13d6a4232f
-EBUILD x265-3.1.2.ebuild 5685 BLAKE2B 6cfac74e85e8b5637b480974c5dfa9be45614b31e720ae0e637309b4d4f0ad5e8b48965fad88b95a071d98f02bd2da8f63f35f71c22c6878cfb26c6c9156cbfe SHA512 900ef8019a7c894bc104ab7a7ef0476ff091e191309af89042a1804a4cae61877bfcd5172a1ba89aedda700d42454d68a92bf4a98fb1fcebc6711680af6871e3
-EBUILD x265-3.1.ebuild 5685 BLAKE2B 6cfac74e85e8b5637b480974c5dfa9be45614b31e720ae0e637309b4d4f0ad5e8b48965fad88b95a071d98f02bd2da8f63f35f71c22c6878cfb26c6c9156cbfe SHA512 900ef8019a7c894bc104ab7a7ef0476ff091e191309af89042a1804a4cae61877bfcd5172a1ba89aedda700d42454d68a92bf4a98fb1fcebc6711680af6871e3
-EBUILD x265-3.2.1.ebuild 5685 BLAKE2B ffe6557df2f83c26883d85d5c014d8d6f5978f93f4882a5a26ef3f139b409f5318043f1242626edd7c32483efbb718e2a3e07f364265a3616e416dacfa798708 SHA512 cc09a08013a2a4645aaa36199633071b408639902ca6d084d2e732b6df857aeb80ef46f29473a4cfe59d58df5af97a5896b5bb06e98ea27af628a7d0aeccd282
-EBUILD x265-3.2.ebuild 5685 BLAKE2B 03a54678214d214fe79b8c4cd5c6bca412f57c87399d0231b30ea7b276ee4bdcaa6438623f6ca6b73e1fdb91349b7b298ff3eae89afc3ecddd704ae3dde7588a SHA512 9bd96418e104f5f3675551aa40bfef52291b22a33e1560133f678feb9cd5b50d75ff10608d54728318e2f1c629b30272717dd9353c080b174c7dd80369c7f365
-EBUILD x265-3.3.ebuild 6105 BLAKE2B 617d44d3f721f322e3f61af3d3376454a919c6b5b2eff43dde47be1d98c306afb8e454f47456531a6cfd9283c1372816cd97c37a9dae73922fdd332bc824b5e3 SHA512 7e39312c29d8c5b0381022cfbc447637f6113afe5fc15d339db3e1a588a7183257aeff3947cba4aad02b35026c5b9c7d3f3a8594ba81c3328839b6eb8907f304
-EBUILD x265-9999.ebuild 6105 BLAKE2B 617d44d3f721f322e3f61af3d3376454a919c6b5b2eff43dde47be1d98c306afb8e454f47456531a6cfd9283c1372816cd97c37a9dae73922fdd332bc824b5e3 SHA512 7e39312c29d8c5b0381022cfbc447637f6113afe5fc15d339db3e1a588a7183257aeff3947cba4aad02b35026c5b9c7d3f3a8594ba81c3328839b6eb8907f304
-MISC metadata.xml 769 BLAKE2B 4e666c1f92c76523b92990a3f23cfe8945b16443ab04957ddb490d9f7c9c5aed7e636b54b823f5bf9123ed46a57a0b53b051812406e013af2b4296edf8b08def SHA512 19576dd98759fceeeb172e846c44354d709fe125a27e9fe027f9d220f3fc839c82f8bbf28014130d761fec05594b5964a31b247f9e3c7ba47099a934fb312b23
+DIST x265_3.4.tar.gz 1469365 BLAKE2B 1021d9d62779d0cecddea56496b4e46bd8ccfd91fdf292efe412dc82b3c974095a5f9bd095057aa08e77b164555adc594549dea6aef7fbc0c025ae7295df721e SHA512 576b18711935e7da8433b2170d24ed159eb12ff1a18399360afa1b2132db33b463145c65ed918f667528ee954bbdfb5c69e5480f1c1df801515cefc592f3206e
+EBUILD x265-2.8.ebuild 5744 BLAKE2B 0fb23baa10a859d8963e557700db0c86684e396955d70bc5703ada64164f18c738f8140518aae87480d1ce32de667672a8e3e5f6e735d60437e78c7ced4d4245 SHA512 9b5a24e32fa6efc04ce7399ca9b4f02cc858f42d5267cef2516f143f7b96fbd3e9dc6de7b3c2c6ab277dc699e820ce860924d28afd376921cccbc50b49327e2a
+EBUILD x265-2.9.ebuild 5762 BLAKE2B 6ff4ca4fd49e7f3f176a2c6dfda6c32f2d3c5e8121ccc25c2e654a3659dbc7b1b9c1e7b805eb90a552207cced06e4c9aae53711eda31cb73f384c7cb359c3cfc SHA512 b9b107cedbc320fd99917303890fe17a881afa418ab8e97260b8cff132a6f876c950034520384dd250f349a8dd973c4102777e2d1f2feae4cbc700e8d5b25089
+EBUILD x265-3.0.ebuild 5720 BLAKE2B a9d02ea77f6a82ae3ed27952b550bb7fba35597cc6d206cbb979a72d649a82a40eebd459c3b1a16df42d29a48283b58ec33bc7c84026d8c322099544656f58dd SHA512 2fa940d2cbad229c46f115a5d8ff8f859cd5244b71fea4306615913d4fa6d5e78b441941071b8b9b8547b4b770bb3994c532d92d50e68114ba242c2276ac505e
+EBUILD x265-3.1.2.ebuild 5721 BLAKE2B cf7994d75d4f5efcdd090c93e608cb55c63bef25efd493bdb63ce0caec7fcebd723c257a835f8a1cd841a32e8fa5e850f82191c6f6450d63769ae6f0f799c625 SHA512 f267d9f6c39294e4584491ac84f4b820b874fa746563971a337d23cd46dd1523e135bdc7af04f495b4c040005d48ee0ef25ac62f9fa5e7d144bbd606c01df86c
+EBUILD x265-3.1.ebuild 5721 BLAKE2B cf7994d75d4f5efcdd090c93e608cb55c63bef25efd493bdb63ce0caec7fcebd723c257a835f8a1cd841a32e8fa5e850f82191c6f6450d63769ae6f0f799c625 SHA512 f267d9f6c39294e4584491ac84f4b820b874fa746563971a337d23cd46dd1523e135bdc7af04f495b4c040005d48ee0ef25ac62f9fa5e7d144bbd606c01df86c
+EBUILD x265-3.2.1.ebuild 5721 BLAKE2B 065ae2fcb9b980145814248eb3588624b6a6f2321e697bd336b9a7bf90d9d167a6cf6218c11d522af78217628e9e2787161be3d88136ca5ce3a0b87488c83b6d SHA512 195be08454c99bae981480f591d5bab69e8e12e8fb3e8e1710395e524281e5d69353aec73cb28185e81d4c891f1b4449b85d78b38ed01da93f67bb6a742320ce
+EBUILD x265-3.2.ebuild 5721 BLAKE2B 065ae2fcb9b980145814248eb3588624b6a6f2321e697bd336b9a7bf90d9d167a6cf6218c11d522af78217628e9e2787161be3d88136ca5ce3a0b87488c83b6d SHA512 195be08454c99bae981480f591d5bab69e8e12e8fb3e8e1710395e524281e5d69353aec73cb28185e81d4c891f1b4449b85d78b38ed01da93f67bb6a742320ce
+EBUILD x265-3.3.ebuild 6104 BLAKE2B 81710a99dd0071e95ef4be31bcb8b3d7b2a9e2d78e9a73989b6b208d4619ca7651638c7679c7d5fcdeed3da4b8132ff12843e715cb720fe1cfc0978cf3916bfc SHA512 45e6861b55dec16c792e29abf0ecac608087e480eada55f96fbf6d4f76201a1a9944754b0bc03d54836dcdcf0af79d8796b06c8f361a54aa765b1daa81604291
+EBUILD x265-3.4.ebuild 6376 BLAKE2B d71b38281b47bccfb953aea2b014caa17f8b02d348c4a6b812b479013555f2171f4b73b3e84e0b6e02afe520635929a4df1d28a1fdeeaced74be22ef6f2191bb SHA512 d326f7fdc89ae914c3e608943bced3b21b4711748d4162dadfe596409c9ee46ebb898a60ec21f7cc15a92b76828b5f13812f094f101a59d0807db7808da2e9b6
+EBUILD x265-9999.ebuild 6376 BLAKE2B d71b38281b47bccfb953aea2b014caa17f8b02d348c4a6b812b479013555f2171f4b73b3e84e0b6e02afe520635929a4df1d28a1fdeeaced74be22ef6f2191bb SHA512 d326f7fdc89ae914c3e608943bced3b21b4711748d4162dadfe596409c9ee46ebb898a60ec21f7cc15a92b76828b5f13812f094f101a59d0807db7808da2e9b6
+MISC metadata.xml 687 BLAKE2B 3d6d04d2ae08bd7ccd6af221eea66b6a4834ff183b69563155c00d9955597f73b18ea057566ac91a775ed5e7533aaea46fe2069d4288e2716ac85ccd953ae862 SHA512 9706d99f55f8426e39e8b7b5df4d27b4b5945fb1e4f1817fe73d50475c896f62efde0a6966129fb6d97c62c30fd35a14b5288a2f40a13aade23352dfc18634dd
diff --git a/media-libs/x265/files/arm-r1.patch b/media-libs/x265/files/arm-r1.patch
new file mode 100644
index 000000000000..8a8102dd2580
--- /dev/null
+++ b/media-libs/x265/files/arm-r1.patch
@@ -0,0 +1,42 @@
+More aliases for ARM.
+Do not force CFLAGS for ARM.
+
+Index: source/CMakeLists.txt
+===================================================================
+--- source.orig/CMakeLists.txt
++++ source/CMakeLists.txt
+@@ -40,7 +40,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
+ # System architecture detection
+ string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
+ set(X86_ALIASES x86 i386 i686 x86_64 amd64)
+-set(ARM_ALIASES armv6l armv7l aarch64)
++set(ARM_ALIASES armv6l armv6l armv7l armv7a aarch64)
+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+ list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
+ set(POWER_ALIASES ppc64 ppc64le)
+@@ -239,11 +239,7 @@ if(GCC)
+ endif()
+ endif()
+ if(ARM AND CROSS_COMPILE_ARM)
+- if(ARM64)
+- set(ARM_ARGS -fPIC)
+- else()
+- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
+- endif()
++ set(ARM_ARGS -fPIC)
+ message(STATUS "cross compile arm")
+ elseif(ARM)
+ if(ARM64)
+@@ -252,10 +248,10 @@ if(GCC)
+ else()
+ find_package(Neon)
+ if(CPU_HAS_NEON)
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
++ set(ARM_ARGS -mfpu=neon -fPIC)
+ add_definitions(-DHAVE_NEON)
+ else()
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
++ set(ARM_ARGS -fPIC)
+ endif()
+ endif()
+ endif()
diff --git a/media-libs/x265/files/test-ns.patch b/media-libs/x265/files/test-ns.patch
new file mode 100644
index 000000000000..898751a7ae2d
--- /dev/null
+++ b/media-libs/x265/files/test-ns.patch
@@ -0,0 +1,295 @@
+Namespace functions for multi-bitdepth builds so that libraries are self-contained.
+
+Index: source/common/param.h
+===================================================================
+--- source.orig/common/param.h
++++ source/common/param.h
+@@ -53,6 +53,18 @@ int x265_param_default_preset(x265_param
+ int x265_param_apply_profile(x265_param *, const char *profile);
+ int x265_param_parse(x265_param *p, const char *name, const char *value);
+ int x265_zone_param_parse(x265_param* p, const char* name, const char* value);
++void x265_free_analysis_data(x265_param *param, x265_analysis_data* analysis);
++void x265_alloc_analysis_data(x265_param *param, x265_analysis_data* analysis);
++void x265_picture_free(x265_picture *);
++x265_zone *x265_zone_alloc(int zoneCount, int isZoneFile);
++void x265_zone_free(x265_param *param);
++FILE* x265_csvlog_open(const x265_param *);
++void x265_csvlog_frame(const x265_param *, const x265_picture *);
++void x265_csvlog_encode(const x265_param*, const x265_stats *, int padx, int pady, int argc, char** argv);
++void x265_dither_image(x265_picture *, int picWidth, int picHeight, int16_t *errorBuf, int bitDepth);
++int x265_encoder_reconfig(x265_encoder *, x265_param *);
++x265_picture *x265_picture_alloc(void);
++void x265_picture_init(x265_param *param, x265_picture *pic);
+ #define PARAM_NS X265_NS
+ #endif
+ }
+Index: source/encoder/api.cpp
+===================================================================
+--- source.orig/encoder/api.cpp
++++ source/encoder/api.cpp
+@@ -106,9 +106,9 @@ x265_encoder *x265_encoder_open(x265_par
+ if (p->rc.zoneCount || p->rc.zonefileCount)
+ {
+ int zoneCount = p->rc.zonefileCount ? p->rc.zonefileCount : p->rc.zoneCount;
+- param->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
+- latestParam->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
+- zoneParam->rc.zones = x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
++ param->rc.zones = PARAM_NS::x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
++ latestParam->rc.zones = PARAM_NS::x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
++ zoneParam->rc.zones = PARAM_NS::x265_zone_alloc(zoneCount, !!p->rc.zonefileCount);
+ }
+
+ x265_copy_params(param, p);
+@@ -216,7 +216,7 @@ x265_encoder *x265_encoder_open(x265_par
+ /* Try to open CSV file handle */
+ if (encoder->m_param->csvfn)
+ {
+- encoder->m_param->csvfpt = x265_csvlog_open(encoder->m_param);
++ encoder->m_param->csvfpt = PARAM_NS::x265_csvlog_open(encoder->m_param);
+ if (!encoder->m_param->csvfpt)
+ {
+ x265_log(encoder->m_param, X265_LOG_ERROR, "Unable to open CSV log file <%s>, aborting\n", encoder->m_param->csvfn);
+@@ -321,7 +321,7 @@ int x265_encoder_reconfig(x265_encoder*
+ if (encoder->m_latestParam->rc.zoneCount || encoder->m_latestParam->rc.zonefileCount)
+ {
+ int zoneCount = encoder->m_latestParam->rc.zonefileCount ? encoder->m_latestParam->rc.zonefileCount : encoder->m_latestParam->rc.zoneCount;
+- save.rc.zones = x265_zone_alloc(zoneCount, !!encoder->m_latestParam->rc.zonefileCount);
++ save.rc.zones = PARAM_NS::x265_zone_alloc(zoneCount, !!encoder->m_latestParam->rc.zonefileCount);
+ }
+ x265_copy_params(&save, encoder->m_latestParam);
+ int ret = encoder->reconfigureParam(encoder->m_latestParam, param_in);
+@@ -604,7 +604,7 @@ fail:
+ *pi_nal = 0;
+
+ if (numEncoded && encoder->m_param->csvLogLevel && encoder->m_outputCount >= encoder->m_latestParam->chunkStart)
+- x265_csvlog_frame(encoder->m_param, pic_out);
++ PARAM_NS::x265_csvlog_frame(encoder->m_param, pic_out);
+
+ if (numEncoded < 0)
+ encoder->m_aborted = true;
+@@ -637,7 +637,7 @@ void x265_vmaf_encoder_log(x265_encoder*
+ encoder->fetchStats(&stats, sizeof(stats));
+ int padx = encoder->m_sps.conformanceWindow.rightOffset;
+ int pady = encoder->m_sps.conformanceWindow.bottomOffset;
+- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
++ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
+ }
+ }
+ #endif
+@@ -651,7 +651,7 @@ void x265_encoder_log(x265_encoder* enc,
+ encoder->fetchStats(&stats, sizeof(stats));
+ int padx = encoder->m_sps.conformanceWindow.rightOffset;
+ int pady = encoder->m_sps.conformanceWindow.bottomOffset;
+- x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
++ PARAM_NS::x265_csvlog_encode(encoder->m_param, &stats, padx, pady, argc, argv);
+ }
+ }
+
+@@ -872,7 +872,7 @@ void x265_alloc_analysis_data(x265_param
+ return;
+
+ fail:
+- x265_free_analysis_data(param, analysis);
++ PARAM_NS::x265_free_analysis_data(param, analysis);
+ }
+
+ void x265_free_analysis_data(x265_param *param, x265_analysis_data* analysis)
+Index: source/encoder/encoder.cpp
+===================================================================
+--- source.orig/encoder/encoder.cpp
++++ source/encoder/encoder.cpp
+@@ -186,8 +186,8 @@ void Encoder::create()
+ {
+ m_dupBuffer[i] = (AdaptiveFrameDuplication*)x265_malloc(sizeof(AdaptiveFrameDuplication));
+ m_dupBuffer[i]->dupPic = NULL;
+- m_dupBuffer[i]->dupPic = x265_picture_alloc();
+- x265_picture_init(p, m_dupBuffer[i]->dupPic);
++ m_dupBuffer[i]->dupPic = PARAM_NS::x265_picture_alloc();
++ PARAM_NS::x265_picture_init(p, m_dupBuffer[i]->dupPic);
+ m_dupBuffer[i]->dupPlane = NULL;
+ m_dupBuffer[i]->dupPlane = X265_MALLOC(char, framesize);
+ m_dupBuffer[i]->dupPic->planes[0] = m_dupBuffer[i]->dupPlane;
+@@ -756,7 +756,7 @@ int Encoder::setAnalysisData(x265_analys
+ curFrame->m_analysisData = (*analysis_data);
+ curFrame->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
+ curFrame->m_analysisData.numPartitions = m_param->num4x4Partitions;
+- x265_alloc_analysis_data(m_param, &curFrame->m_analysisData);
++ PARAM_NS::x265_alloc_analysis_data(m_param, &curFrame->m_analysisData);
+ if (m_param->maxCUSize == 16)
+ {
+ if (analysis_data->sliceType == X265_TYPE_IDR || analysis_data->sliceType == X265_TYPE_I)
+@@ -860,7 +860,7 @@ void Encoder::destroy()
+ for (uint32_t i = 0; i < DUP_BUFFER; i++)
+ {
+ X265_FREE(m_dupBuffer[i]->dupPlane);
+- x265_picture_free(m_dupBuffer[i]->dupPic);
++ PARAM_NS::x265_picture_free(m_dupBuffer[i]->dupPic);
+ X265_FREE(m_dupBuffer[i]);
+ }
+
+@@ -1592,7 +1592,7 @@ int Encoder::encode(const x265_picture*
+ if (m_exportedPic)
+ {
+ if (!m_param->bUseAnalysisFile && m_param->analysisSave)
+- x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &m_exportedPic->m_analysisData);
+ ATOMIC_DEC(&m_exportedPic->m_countRefEncoders);
+ m_exportedPic = NULL;
+ m_dpb->recycleUnreferenced();
+@@ -1968,7 +1968,7 @@ int Encoder::encode(const x265_picture*
+
+ /* Free up inputPic->analysisData since it has already been used */
+ if ((m_param->analysisLoad && !m_param->analysisSave) || ((m_param->bAnalysisType == AVC_INFO) && slice->m_sliceType != I_SLICE))
+- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+
+ if (pic_out)
+ {
+@@ -2046,7 +2046,7 @@ int Encoder::encode(const x265_picture*
+ writeAnalysisFile(&pic_out->analysisData, *outFrame->m_encData);
+ pic_out->analysisData.saveParam = pic_out->analysisData.saveParam;
+ if (m_param->bUseAnalysisFile)
+- x265_free_analysis_data(m_param, &pic_out->analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &pic_out->analysisData);
+ }
+ }
+ if (m_param->rc.bStatWrite && (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion))
+@@ -2061,7 +2061,7 @@ int Encoder::encode(const x265_picture*
+ writeAnalysisFileRefine(&outFrame->m_analysisData, *outFrame->m_encData);
+ }
+ if (m_param->analysisMultiPassRefine || m_param->analysisMultiPassDistortion)
+- x265_free_analysis_data(m_param, &outFrame->m_analysisData);
++ PARAM_NS::x265_free_analysis_data(m_param, &outFrame->m_analysisData);
+ if (m_param->internalCsp == X265_CSP_I400)
+ {
+ if (slice->m_sliceType == P_SLICE)
+@@ -2199,7 +2199,7 @@ int Encoder::encode(const x265_picture*
+ uint32_t heightInCU = (m_param->sourceHeight + m_param->maxCUSize - 1) >> m_param->maxLog2CUSize;
+ frameEnc->m_analysisData.numCUsInFrame = widthInCU * heightInCU;
+ frameEnc->m_analysisData.numPartitions = m_param->num4x4Partitions;
+- x265_alloc_analysis_data(m_param, &frameEnc->m_analysisData);
++ PARAM_NS::x265_alloc_analysis_data(m_param, &frameEnc->m_analysisData);
+ frameEnc->m_analysisData.poc = frameEnc->m_poc;
+ if (m_param->rc.bStatRead)
+ readAnalysisFile(&frameEnc->m_analysisData, frameEnc->m_poc, frameEnc->m_lowres.sliceType);
+@@ -2210,7 +2210,7 @@ int Encoder::encode(const x265_picture*
+ for (int i = 0; i < m_param->rc.zonefileCount; i++)
+ {
+ if (m_param->rc.zones[i].startFrame == frameEnc->m_poc)
+- x265_encoder_reconfig(this, m_param->rc.zones[i].zoneParam);
++ PARAM_NS::x265_encoder_reconfig(this, m_param->rc.zones[i].zoneParam);
+ }
+ }
+
+@@ -2353,7 +2353,7 @@ int Encoder::encode(const x265_picture*
+ analysis->numCUsInFrame = numCUsInFrame;
+ analysis->numCuInHeight = heightInCU;
+ analysis->numPartitions = m_param->num4x4Partitions;
+- x265_alloc_analysis_data(m_param, analysis);
++ PARAM_NS::x265_alloc_analysis_data(m_param, analysis);
+ }
+ /* determine references, setup RPS, etc */
+ m_dpb->prepareEncode(frameEnc);
+@@ -4264,7 +4264,7 @@ void Encoder::readAnalysisFile(x265_anal
+ else if (fread(val, size, readSize, fileOffset) != readSize)\
+ {\
+ x265_log(NULL, X265_LOG_ERROR, "Error reading analysis data\n");\
+- x265_free_analysis_data(m_param, analysis);\
++ PARAM_NS::x265_free_analysis_data(m_param, analysis);\
+ m_aborted = true;\
+ return;\
+ }\
+@@ -4300,7 +4300,7 @@ void Encoder::readAnalysisFile(x265_anal
+ if (poc != curPoc || feof(m_analysisFileIn))
+ {
+ x265_log(NULL, X265_LOG_WARNING, "Error reading analysis data: Cannot find POC %d\n", curPoc);
+- x265_free_analysis_data(m_param, analysis);
++ PARAM_NS::x265_free_analysis_data(m_param, analysis);
+ return;
+ }
+ }
+@@ -4334,7 +4334,7 @@ void Encoder::readAnalysisFile(x265_anal
+ if (m_param->scaleFactor)
+ analysis->numPartitions *= factor;
+ /* Memory is allocated for inter and intra analysis data based on the slicetype */
+- x265_alloc_analysis_data(m_param, analysis);
++ PARAM_NS::x265_alloc_analysis_data(m_param, analysis);
+
+ if (m_param->ctuDistortionRefine == CTU_DISTORTION_INTERNAL)
+ {
+@@ -4587,7 +4587,7 @@ void Encoder::readAnalysisFile(x265_anal
+ else if (fread(val, size, readSize, fileOffset) != readSize)\
+ {\
+ x265_log(NULL, X265_LOG_ERROR, "Error reading analysis data\n");\
+- x265_free_analysis_data(m_param, analysis);\
++ PARAM_NS::x265_free_analysis_data(m_param, analysis);\
+ m_aborted = true;\
+ return;\
+ }\
+@@ -4624,7 +4624,7 @@ void Encoder::readAnalysisFile(x265_anal
+ if (poc != curPoc || feof(m_analysisFileIn))
+ {
+ x265_log(NULL, X265_LOG_WARNING, "Error reading analysis data: Cannot find POC %d\n", curPoc);
+- x265_free_analysis_data(m_param, analysis);
++ PARAM_NS::x265_free_analysis_data(m_param, analysis);
+ return;
+ }
+ }
+@@ -4655,7 +4655,7 @@ void Encoder::readAnalysisFile(x265_anal
+ analysis->numCuInHeight = cuLoc.heightInCU;
+
+ /* Memory is allocated for inter and intra analysis data based on the slicetype */
+- x265_alloc_analysis_data(m_param, analysis);
++ PARAM_NS::x265_alloc_analysis_data(m_param, analysis);
+
+ if (m_param->ctuDistortionRefine == CTU_DISTORTION_INTERNAL)
+ {
+@@ -5257,7 +5257,7 @@ void Encoder::readAnalysisFile(x265_anal
+ if (fread(val, size, readSize, fileOffset) != readSize)\
+ {\
+ x265_log(NULL, X265_LOG_ERROR, "Error reading analysis 2 pass data\n"); \
+- x265_alloc_analysis_data(m_param, analysis); \
++ PARAM_NS::x265_alloc_analysis_data(m_param, analysis); \
+ m_aborted = true; \
+ return; \
+ }\
+@@ -5271,7 +5271,7 @@ void Encoder::readAnalysisFile(x265_anal
+ if (poc != curPoc || feof(m_analysisFileIn))
+ {
+ x265_log(NULL, X265_LOG_WARNING, "Error reading analysis 2 pass data: Cannot find POC %d\n", curPoc);
+- x265_free_analysis_data(m_param, analysis);
++ PARAM_NS::x265_free_analysis_data(m_param, analysis);
+ return;
+ }
+ /* Now arrived at the right frame, read the record */
+@@ -5378,7 +5378,7 @@ void Encoder::writeAnalysisFile(x265_ana
+ if (fwrite(val, size, writeSize, fileOffset) < writeSize)\
+ {\
+ x265_log(NULL, X265_LOG_ERROR, "Error writing analysis data\n");\
+- x265_free_analysis_data(m_param, analysis);\
++ PARAM_NS::x265_free_analysis_data(m_param, analysis);\
+ m_aborted = true;\
+ return;\
+ }\
+@@ -5600,7 +5600,7 @@ void Encoder::writeAnalysisFileRefine(x2
+ if (fwrite(val, size, writeSize, fileOffset) < writeSize)\
+ {\
+ x265_log(NULL, X265_LOG_ERROR, "Error writing analysis 2 pass data\n"); \
+- x265_free_analysis_data(m_param, analysis); \
++ PARAM_NS::x265_free_analysis_data(m_param, analysis); \
+ m_aborted = true; \
+ return; \
+ }\
+Index: source/common/param.cpp
+===================================================================
+--- source.orig/common/param.cpp
++++ source/common/param.cpp
+@@ -102,7 +102,7 @@ x265_param *x265_param_alloc()
+
+ void x265_param_free(x265_param* p)
+ {
+- x265_zone_free(p);
++ PARAM_NS::x265_zone_free(p);
+ #ifdef SVT_HEVC
+ x265_free(p->svtHevcParam);
+ #endif
diff --git a/media-libs/x265/files/tests.patch b/media-libs/x265/files/tests.patch
new file mode 100644
index 000000000000..6c85829ee22d
--- /dev/null
+++ b/media-libs/x265/files/tests.patch
@@ -0,0 +1,16 @@
+Tests run against static library (upstream build system):
+We build main as both shared & static, main10 & 12 are static only and linked into main.
+All need PLATFORM_LIBS, so instruct cmake to also link them.
+
+Index: source/CMakeLists.txt
+===================================================================
+--- source.orig/CMakeLists.txt
++++ source/CMakeLists.txt
+@@ -578,6 +578,7 @@ endif()
+ if(SVTHEVC_FOUND)
+ target_link_libraries(x265-static ${SVT_HEVC_LIBRARY})
+ endif()
++target_link_libraries(x265-static ${PLATFORM_LIBS})
+ install(TARGETS x265-static
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
diff --git a/media-libs/x265/metadata.xml b/media-libs/x265/metadata.xml
index c585d5536314..2049b41f26e7 100644
--- a/media-libs/x265/metadata.xml
+++ b/media-libs/x265/metadata.xml
@@ -10,7 +10,6 @@
<flag name="12bit">Add support for producing 12bits HEVC.</flag>
<flag name="numa">Build with support for NUMA nodes.</flag>
<flag name="pic">Disable optimized assembly code that is not PIC friendly</flag>
- <flag name="power8">Enable support for Power 8 assembly optimizations.</flag>
</use>
<upstream>
<remote-id type="bitbucket">multicoreware/x265</remote-id>
diff --git a/media-libs/x265/x265-2.8.ebuild b/media-libs/x265/x265-2.8.ebuild
index f4bb545314bb..3041c243b775 100644
--- a/media-libs/x265/x265-2.8.ebuild
+++ b/media-libs/x265/x265-2.8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -19,7 +19,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/160"
-IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
RESTRICT="!test? ( test )"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
@@ -143,8 +143,8 @@ multilib_src_configure() {
$(cmake-utils_use_enable test TESTS)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex power8 ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
diff --git a/media-libs/x265/x265-2.9.ebuild b/media-libs/x265/x265-2.9.ebuild
index 5f28b491babf..ead3e157954e 100644
--- a/media-libs/x265/x265-2.9.ebuild
+++ b/media-libs/x265/x265-2.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -19,7 +19,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/165"
-IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
RESTRICT="!test? ( test )"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
@@ -143,8 +143,8 @@ multilib_src_configure() {
$(cmake-utils_use_enable test TESTS)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex power8 ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
diff --git a/media-libs/x265/x265-3.0.ebuild b/media-libs/x265/x265-3.0.ebuild
index 2d1942d399d2..df633a2e1d7f 100644
--- a/media-libs/x265/x265-3.0.ebuild
+++ b/media-libs/x265/x265-3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -19,7 +19,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/169"
-IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
RESTRICT="!test? ( test )"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
@@ -142,8 +142,8 @@ multilib_src_configure() {
$(cmake-utils_use_enable test TESTS)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex power8 ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
diff --git a/media-libs/x265/x265-3.1.2.ebuild b/media-libs/x265/x265-3.1.2.ebuild
index 71303686d68a..b69d74af9802 100644
--- a/media-libs/x265/x265-3.1.2.ebuild
+++ b/media-libs/x265/x265-3.1.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -19,7 +19,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/176"
-IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
RESTRICT="!test? ( test )"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
@@ -142,8 +142,8 @@ multilib_src_configure() {
$(cmake-utils_use_enable test TESTS)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex power8 ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
diff --git a/media-libs/x265/x265-3.1.ebuild b/media-libs/x265/x265-3.1.ebuild
index 71303686d68a..b69d74af9802 100644
--- a/media-libs/x265/x265-3.1.ebuild
+++ b/media-libs/x265/x265-3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -19,7 +19,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/176"
-IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
RESTRICT="!test? ( test )"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
@@ -142,8 +142,8 @@ multilib_src_configure() {
$(cmake-utils_use_enable test TESTS)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex power8 ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
diff --git a/media-libs/x265/x265-3.2.1.ebuild b/media-libs/x265/x265-3.2.1.ebuild
index a7c7ebc8e962..6ce84bf0fa10 100644
--- a/media-libs/x265/x265-3.2.1.ebuild
+++ b/media-libs/x265/x265-3.2.1.ebuild
@@ -19,7 +19,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/179"
-IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
RESTRICT="!test? ( test )"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
@@ -142,8 +142,8 @@ multilib_src_configure() {
$(cmake-utils_use_enable test TESTS)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex power8 ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
diff --git a/media-libs/x265/x265-3.2.ebuild b/media-libs/x265/x265-3.2.ebuild
index b1d719a14b6c..6ce84bf0fa10 100644
--- a/media-libs/x265/x265-3.2.ebuild
+++ b/media-libs/x265/x265-3.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -19,7 +19,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/179"
-IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
RESTRICT="!test? ( test )"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
@@ -142,8 +142,8 @@ multilib_src_configure() {
$(cmake-utils_use_enable test TESTS)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex power8 ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
diff --git a/media-libs/x265/x265-3.3.ebuild b/media-libs/x265/x265-3.3.ebuild
index 736bea15bb84..1bcd7b28a790 100644
--- a/media-libs/x265/x265-3.3.ebuild
+++ b/media-libs/x265/x265-3.3.ebuild
@@ -20,7 +20,7 @@ HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265/wiki/Home"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/188"
-IUSE="+asm +10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_altivec numa power8 test"
+IUSE="+asm +10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa test"
# Test suite requires assembly support and is known to be broken
RESTRICT="test"
@@ -120,8 +120,8 @@ x265_variant_src_configure() {
# because we want those flags apply ONLY to "main" variant
if [[ ${ABI} = ppc* ]] ; then
myabicmakeargs+=(
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_altivec ON OFF)
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
)
fi
fi
diff --git a/media-libs/x265/x265-3.4.ebuild b/media-libs/x265/x265-3.4.ebuild
new file mode 100644
index 000000000000..65ee36367eef
--- /dev/null
+++ b/media-libs/x265/x265-3.4.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake multilib-minimal multilib multibuild flag-o-matic
+
+if [[ ${PV} = 9999* ]]; then
+ inherit mercurial
+ EHG_REPO_URI="https://bitbucket.org/multicoreware/x265"
+else
+ SRC_URI="https://bitbucket.org/multicoreware/x265/downloads/${PN}_${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265/wiki/Home"
+
+LICENSE="GPL-2"
+# subslot = libx265 soname
+SLOT="0/192"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+ASM_DEPEND=">=dev-lang/nasm-2.13"
+BDEPEND="
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
+
+PATCHES=(
+ "${FILESDIR}/arm-r1.patch"
+ "${FILESDIR}/neon.patch"
+ "${FILESDIR}/x265-3.3-ppc64.patch"
+ "${FILESDIR}/tests.patch"
+ "${FILESDIR}/test-ns.patch"
+)
+
+src_unpack() {
+ if [[ ${PV} = 9999* ]]; then
+ mercurial_src_unpack
+ # Can't set it at global scope due to mercurial.eclass limitations...
+ export S=${WORKDIR}/${P}/source
+ else
+ unpack ${A}
+ export S="$(echo "${WORKDIR}/${PN}_"*"/source")"
+ fi
+}
+
+# By default, the library and the encoder is configured for only one output bit
+# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
+# files with a different bit depth, which is annoying. However, upstream
+# supports proper namespacing for 8bits, 10bits & 12bits HEVC and linking all
+# that together so that the resulting library can produce all three of them
+# instead of only one.
+# The API requires the bit depth parameter, so that libx265 can then chose which
+# variant of the encoder to use.
+# To achieve this, we have to build one (static) library for each non-main
+# variant, and link it into the main library.
+# Upstream documents using the 8bit variant as main library, hence we do not
+# allow disabling it: "main" *MUST* come last in the following list.
+
+x265_get_variants() {
+ local variants=""
+ use 12bit && variants+="main12 "
+ use 10bit && variants+="main10 "
+ variants+="main"
+ echo "${variants}"
+}
+
+x265_variant_src_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
+
+ einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}"
+
+ local mycmakeargs=( "${myabicmakeargs[@]}" )
+ case "${MULTIBUILD_VARIANT}" in
+ "main12")
+ mycmakeargs+=(
+ -DHIGH_BIT_DEPTH=ON
+ -DEXPORT_C_API=OFF
+ -DENABLE_SHARED=OFF
+ -DENABLE_CLI=OFF
+ -DMAIN12=ON
+ )
+ if [[ ${ABI} = x86 ]] ; then
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
+ if [[ ${ABI} = arm* ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
+ # disable altivec for 12bit build #607802#c5
+ if [[ ${ABI} = ppc* ]] ; then
+ mycmakeargs+=(
+ -DENABLE_ALTIVEC=OFF
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ )
+ fi
+ ;;
+ "main10")
+ mycmakeargs+=(
+ -DHIGH_BIT_DEPTH=ON
+ -DEXPORT_C_API=OFF
+ -DENABLE_SHARED=OFF
+ -DENABLE_CLI=OFF
+ )
+ if [[ ${ABI} = x86 ]] ; then
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
+ if [[ ${ABI} = arm* ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
+ # disable altivec for 10bit build #607802#c5
+ if [[ ${ABI} = ppc* ]] ; then
+ mycmakeargs+=(
+ -DENABLE_ALTIVEC=OFF
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ )
+ fi
+ ;;
+ "main")
+ if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
+ local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
+ unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
+ local liblist="" v=
+ for v in "${myvariants[@]}" ; do
+ ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
+ liblist+="libx265_${v}.a;"
+ done
+ mycmakeargs+=(
+ -DEXTRA_LIB="${liblist}"
+ -DEXTRA_LINK_FLAGS=-L.
+ -DLINKED_10BIT=$(usex 10bit)
+ -DLINKED_12BIT=$(usex 12bit)
+ )
+ if [[ ${ABI} = ppc* ]] ; then
+ # upstream uses mix of altivec + power8 vectors
+ # it's impossible to enable altivec without CPU_POWER8
+ # and it does not work on ppc32
+ # so we toggle both variables together
+ mycmakeargs+=(
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ )
+ fi
+ fi
+ ;;
+ *)
+ die "Unknown variant: ${MULTIBUILD_VARIANT}";;
+ esac
+ cmake_src_configure
+ popd >/dev/null || die
+}
+
+multilib_src_configure() {
+ local myabicmakeargs=(
+ -DENABLE_TESTS=$(usex test ON OFF)
+ $(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
+ -DENABLE_PIC=ON
+ -DENABLE_LIBNUMA=$(usex numa ON OFF)
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ )
+
+ if [[ ${ABI} = x86 ]] ; then
+ # Bug #528202
+ if use pic ; then
+ ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
+ myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
+ elif [[ ${ABI} = x32 ]] ; then
+ # bug #510890
+ myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ elif [[ ${ABI} = arm ]] ; then
+ myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
+ use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
+ fi
+
+ local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
+ multibuild_foreach_variant x265_variant_src_configure
+}
+
+multilib_src_compile() {
+ local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
+ multibuild_foreach_variant cmake_src_compile
+}
+
+x265_variant_src_test() {
+ if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
+ "${BUILD_DIR}/test/TestBench" || die
+ else
+ einfo "Unit tests check only assembly."
+ einfo "You do not seem to have any for ABI=${ABI}, x265 variant=${MULTIBUILD_VARIANT}"
+ einfo "Skipping tests."
+ fi
+}
+
+multilib_src_test() {
+ local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
+ multibuild_foreach_variant x265_variant_src_test
+}
+
+multilib_src_install() {
+ # Install only "main" variant since the others are already linked into it.
+ local MULTIBUILD_VARIANTS=( "main" )
+ multibuild_foreach_variant cmake_src_install
+}
+
+multilib_src_install_all() {
+ dodoc -r "${S}/../doc/"*
+
+ # we don't install *.a files for all variants,
+ # so just delete these files instead of pretending
+ # real USE=static-libs support
+ find "${ED}" -name "*.a" -delete || die
+}
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
index 736bea15bb84..65ee36367eef 100644
--- a/media-libs/x265/x265-9999.ebuild
+++ b/media-libs/x265/x265-9999.ebuild
@@ -1,10 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=7
-CMAKE_ECLASS=cmake
-inherit flag-o-matic multibuild cmake-multilib
+inherit cmake multilib-minimal multilib multibuild flag-o-matic
if [[ ${PV} = 9999* ]]; then
inherit mercurial
@@ -19,31 +18,27 @@ HOMEPAGE="http://x265.org/ https://bitbucket.org/multicoreware/x265/wiki/Home"
LICENSE="GPL-2"
# subslot = libx265 soname
-SLOT="0/188"
-IUSE="+asm +10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_altivec numa power8 test"
-
-# Test suite requires assembly support and is known to be broken
-RESTRICT="test"
-
-ASM_DEPEND=">=dev-lang/nasm-2.13"
-
-BDEPEND="asm? (
- abi_x86_32? ( ${ASM_DEPEND} )
- abi_x86_64? ( ${ASM_DEPEND} )
- )"
+SLOT="0/192"
+IUSE="+10bit +12bit cpu_flags_arm_neon cpu_flags_ppc_vsx2 numa pic test"
+RESTRICT="!test? ( test )"
RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-
DEPEND="${RDEPEND}"
+ASM_DEPEND=">=dev-lang/nasm-2.13"
+BDEPEND="
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
PATCHES=(
- "${FILESDIR}"/${PN}-3.3-arm.patch
- "${FILESDIR}"/${PN}-3.3-neon.patch
- "${FILESDIR}"/${PN}-3.3-ppc64.patch
+ "${FILESDIR}/arm-r1.patch"
+ "${FILESDIR}/neon.patch"
+ "${FILESDIR}/x265-3.3-ppc64.patch"
+ "${FILESDIR}/tests.patch"
+ "${FILESDIR}/test-ns.patch"
)
src_unpack() {
- if [[ ${PV} = 9999* ]] ; then
+ if [[ ${PV} = 9999* ]]; then
mercurial_src_unpack
# Can't set it at global scope due to mercurial.eclass limitations...
export S=${WORKDIR}/${P}/source
@@ -67,17 +62,19 @@ src_unpack() {
# allow disabling it: "main" *MUST* come last in the following list.
x265_get_variants() {
- local -a variants=()
- use 12bit && variants+=( main12 )
- use 10bit && variants+=( main10 )
- variants+=( main )
- echo "${variants[@]}"
+ local variants=""
+ use 12bit && variants+="main12 "
+ use 10bit && variants+="main10 "
+ variants+="main"
+ echo "${variants}"
}
x265_variant_src_configure() {
mkdir -p "${BUILD_DIR}" || die
pushd "${BUILD_DIR}" >/dev/null || die
+ einfo "Configuring variant: ${MULTIBUILD_VARIANT} for ABI: ${ABI}"
+
local mycmakeargs=( "${myabicmakeargs[@]}" )
case "${MULTIBUILD_VARIANT}" in
"main12")
@@ -88,8 +85,20 @@ x265_variant_src_configure() {
-DENABLE_CLI=OFF
-DMAIN12=ON
)
+ if [[ ${ABI} = x86 ]] ; then
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
+ if [[ ${ABI} = arm* ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
# disable altivec for 12bit build #607802#c5
- [[ ${ABI} = ppc* ]] && mycmakeargs+=( -DENABLE_ALTIVEC=OFF )
+ if [[ ${ABI} = ppc* ]] ; then
+ mycmakeargs+=(
+ -DENABLE_ALTIVEC=OFF
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ )
+ fi
;;
"main10")
mycmakeargs+=(
@@ -98,8 +107,20 @@ x265_variant_src_configure() {
-DENABLE_SHARED=OFF
-DENABLE_CLI=OFF
)
+ if [[ ${ABI} = x86 ]] ; then
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
+ if [[ ${ABI} = arm* ]] ; then
+ # 589674
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
# disable altivec for 10bit build #607802#c5
- [[ ${ABI} = ppc* ]] && mycmakeargs+=( -DENABLE_ALTIVEC=OFF )
+ if [[ ${ABI} = ppc* ]] ; then
+ mycmakeargs+=(
+ -DENABLE_ALTIVEC=OFF
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ )
+ fi
;;
"main")
if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
@@ -107,7 +128,7 @@ x265_variant_src_configure() {
unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
local liblist="" v=
for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
+ ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
liblist+="libx265_${v}.a;"
done
mycmakeargs+=(
@@ -116,12 +137,14 @@ x265_variant_src_configure() {
-DLINKED_10BIT=$(usex 10bit)
-DLINKED_12BIT=$(usex 12bit)
)
- # we have to handle ppc here and not in multilib_src_configure
- # because we want those flags apply ONLY to "main" variant
if [[ ${ABI} = ppc* ]] ; then
- myabicmakeargs+=(
- -DCPU_POWER8=$(usex power8 ON OFF)
- -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_altivec ON OFF)
+ # upstream uses mix of altivec + power8 vectors
+ # it's impossible to enable altivec without CPU_POWER8
+ # and it does not work on ppc32
+ # so we toggle both variables together
+ mycmakeargs+=(
+ -DCPU_POWER8=$(usex cpu_flags_ppc_vsx2 ON OFF)
+ -DENABLE_ALTIVEC=$(usex cpu_flags_ppc_vsx2 ON OFF)
)
fi
fi
@@ -129,55 +152,31 @@ x265_variant_src_configure() {
*)
die "Unknown variant: ${MULTIBUILD_VARIANT}";;
esac
-
cmake_src_configure
popd >/dev/null || die
}
multilib_src_configure() {
local myabicmakeargs=(
+ -DENABLE_TESTS=$(usex test ON OFF)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_PIC=ON
-DENABLE_LIBNUMA=$(usex numa ON OFF)
-DLIB_INSTALL_DIR="$(get_libdir)"
)
- local supports_asm=yes
-
if [[ ${ABI} = x86 ]] ; then
- if use asm ; then
- # Bug #528202
- ewarn "x86 asm is not PIC-safe, disabling it."
- supports_asm=no
+ # Bug #528202
+ if use pic ; then
+ ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
+ myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
fi
elif [[ ${ABI} = x32 ]] ; then
- if use asm ; then
- # bug #510890
- ewarn "x32 ABI doesn't support asm"
- supports_asm=no
- fi
- elif [[ ${ABI} = arm ]] ; then
- if use asm && use cpu_flags_arm_neon ; then
- supports_asm=yes
- elif use asm ; then
- ewarn "arm asm is not PIC-safe, disabling it."
- supports_asm=no
- fi
- elif [[ ${ABI} = ppc* ]] ; then
- if use asm ; then
- ewarn "ppc64 uses altivec instead of asm, disabling it."
- supports_asm=no
- fi
- fi
-
- if [[ "${supports_asm}" = yes ]] && use asm ; then
- myabicmakeargs+=( -DENABLE_ASSEMBLY=ON )
-
- if multilib_is_native_abi ; then
- myabicmakeargs+=( -DENABLE_TESTS=$(usex test ON OFF) )
- fi
- else
+ # bug #510890
myabicmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ elif [[ ${ABI} = arm ]] ; then
+ myabicmakeargs+=( -DENABLE_ASSEMBLY=$(usex pic OFF $(usex cpu_flags_arm_neon ON OFF)) )
+ use cpu_flags_arm_neon && use pic && ewarn "PIC has been requested but arm neon asm is not PIC-safe, disabling it."
fi
local MULTIBUILD_VARIANTS=( $(x265_get_variants) )
@@ -190,7 +189,7 @@ multilib_src_compile() {
}
x265_variant_src_test() {
- if [[ -x "${BUILD_DIR}/test/TestBench" ]] ; then
+ if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
"${BUILD_DIR}/test/TestBench" || die
else
einfo "Unit tests check only assembly."