From 2df2c1a6865084e75f1aae3199f68052f519ee10 Mon Sep 17 00:00:00 2001 From: kenmays Date: Tue, 18 Jun 2019 12:55:47 -0700 Subject: [PATCH] x265: bump to 3.0 (#3842) --- media-libs/x265/patches/x265-2.0.patchset | 90 ------------------- media-libs/x265/patches/x265-2.1_hg.patchset | 90 ------------------- .../{x265-2.8.patchset => x265-3.0.patchset} | 27 +++--- media-libs/x265/x265-2.1_hg.recipe | 71 --------------- media-libs/x265/x265-2.8.recipe | 71 --------------- .../x265/{x265-2.0.recipe => x265-3.0.recipe} | 14 +-- 6 files changed, 25 insertions(+), 338 deletions(-) delete mode 100644 media-libs/x265/patches/x265-2.0.patchset delete mode 100644 media-libs/x265/patches/x265-2.1_hg.patchset rename media-libs/x265/patches/{x265-2.8.patchset => x265-3.0.patchset} (86%) delete mode 100644 media-libs/x265/x265-2.1_hg.recipe delete mode 100644 media-libs/x265/x265-2.8.recipe rename media-libs/x265/{x265-2.0.recipe => x265-3.0.recipe} (84%) diff --git a/media-libs/x265/patches/x265-2.0.patchset b/media-libs/x265/patches/x265-2.0.patchset deleted file mode 100644 index 108b89ee1..000000000 --- a/media-libs/x265/patches/x265-2.0.patchset +++ /dev/null @@ -1,90 +0,0 @@ -From b2a16767983618709903e175f6f3d94a36e35832 Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Sun, 28 Dec 2014 07:11:55 +0000 -Subject: Check if threading library needs to be linked separately - - -diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 353003e..6fd2cbe 100644 ---- a/source/CMakeLists.txt -+++ b/source/CMakeLists.txt -@@ -68,7 +68,8 @@ else() - endif() - - if(UNIX) -- list(APPEND PLATFORM_LIBS pthread) -+ find_package(Threads) -+ list(APPEND PLATFORM_LIBS ${CMAKE_THREAD_LIBS_INIT}) - find_library(LIBRT rt) - if(LIBRT) - list(APPEND PLATFORM_LIBS rt) --- -2.2.2 - - -From 3649a1e872b18b9e5b2562e12d581d43be916e6a Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Sun, 28 Dec 2014 07:13:56 +0000 -Subject: Add an option to adjust headers installation path - - -diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 6fd2cbe..bd6fbdb 100644 ---- a/source/CMakeLists.txt -+++ b/source/CMakeLists.txt -@@ -290,6 +290,7 @@ endif() - # Build options - set(LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries") - set(BIN_INSTALL_DIR bin CACHE STRING "Install location of executables") -+set(INCLUDE_INSTALL_DIR include CACHE STRING "Install location of headers") - set(EXTRA_LIB "" CACHE STRING "Extra libraries to link against") - set(EXTRA_LINK_FLAGS "" CACHE STRING "Extra link flags") - if(EXTRA_LINK_FLAGS) -@@ -440,7 +441,8 @@ endif() - install(TARGETS x265-static - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) --install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) -+install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" -+ DESTINATION "${INCLUDE_INSTALL_DIR}") - - if(CMAKE_RC_COMPILER) - # The resource compiler does not need CFLAGS or macro defines. It --- -2.2.2 - - -From 524b178975d953535acb23fcc9f240b3c5742ce0 Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Sun, 28 Dec 2014 07:14:34 +0000 -Subject: Add Haiku version of adjusting thread priority - - -diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp -index 6cb815f..a4b138d 100644 ---- a/source/common/threadpool.cpp -+++ b/source/common/threadpool.cpp -@@ -53,6 +53,9 @@ - - #endif - -+#if defined(__HAIKU__) -+#include -+#endif - #if MACOS - #include - #include -@@ -95,7 +98,10 @@ void WorkerThread::threadMain() - - #if _WIN32 - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); --#else -+#elif defined(__HAIKU__) -+ __attribute__((unused)) status_t -+ val = set_thread_priority(find_thread(NULL), B_LOW_PRIORITY); -+ #else - __attribute__((unused)) int val = nice(10); - #endif - --- -2.2.2 diff --git a/media-libs/x265/patches/x265-2.1_hg.patchset b/media-libs/x265/patches/x265-2.1_hg.patchset deleted file mode 100644 index 202241b23..000000000 --- a/media-libs/x265/patches/x265-2.1_hg.patchset +++ /dev/null @@ -1,90 +0,0 @@ -From b2a16767983618709903e175f6f3d94a36e35832 Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Sun, 28 Dec 2014 07:11:55 +0000 -Subject: Check if threading library needs to be linked separately - - -diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 353003e..6fd2cbe 100644 ---- a/source/CMakeLists.txt -+++ b/source/CMakeLists.txt -@@ -66,7 +66,8 @@ else() - endif() - - if(UNIX) -- list(APPEND PLATFORM_LIBS pthread) -+ find_package(Threads) -+ list(APPEND PLATFORM_LIBS ${CMAKE_THREAD_LIBS_INIT}) - find_library(LIBRT rt) - if(LIBRT) - list(APPEND PLATFORM_LIBS rt) --- -2.2.2 - - -From 3649a1e872b18b9e5b2562e12d581d43be916e6a Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Sun, 28 Dec 2014 07:13:56 +0000 -Subject: Add an option to adjust headers installation path - - -diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 6fd2cbe..bd6fbdb 100644 ---- a/source/CMakeLists.txt -+++ b/source/CMakeLists.txt -@@ -277,6 +277,7 @@ endif() - # Build options - set(LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries") - set(BIN_INSTALL_DIR bin CACHE STRING "Install location of executables") -+set(INCLUDE_INSTALL_DIR include CACHE STRING "Install location of headers") - set(EXTRA_LIB "" CACHE STRING "Extra libraries to link against") - set(EXTRA_LINK_FLAGS "" CACHE STRING "Extra link flags") - if(EXTRA_LINK_FLAGS) -@@ -419,7 +420,8 @@ endif() - install(TARGETS x265-static - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) --install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) -+install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" -+ DESTINATION "${INCLUDE_INSTALL_DIR}") - - if(CMAKE_RC_COMPILER) - # The resource compiler does not need CFLAGS or macro defines. It --- -2.2.2 - - -From 524b178975d953535acb23fcc9f240b3c5742ce0 Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Sun, 28 Dec 2014 07:14:34 +0000 -Subject: Add Haiku version of adjusting thread priority - - -diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp -index 6cb815f..a4b138d 100644 ---- a/source/common/threadpool.cpp -+++ b/source/common/threadpool.cpp -@@ -52,6 +52,9 @@ - - #endif - -+#if defined(__HAIKU__) -+#include -+#endif - #if MACOS - #include - #include -@@ -91,7 +94,10 @@ void WorkerThread::threadMain() - - #if _WIN32 - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); --#else -+#elif defined(__HAIKU__) -+ __attribute__((unused)) status_t -+ val = set_thread_priority(find_thread(NULL), B_LOW_PRIORITY); -+ #else - __attribute__((unused)) int val = nice(10); - #endif - --- -2.2.2 diff --git a/media-libs/x265/patches/x265-2.8.patchset b/media-libs/x265/patches/x265-3.0.patchset similarity index 86% rename from media-libs/x265/patches/x265-2.8.patchset rename to media-libs/x265/patches/x265-3.0.patchset index 121152865..1ca4c4766 100644 --- a/media-libs/x265/patches/x265-2.8.patchset +++ b/media-libs/x265/patches/x265-3.0.patchset @@ -40,16 +40,6 @@ index 5ff33da..1febc33 100644 set(EXTRA_LIB "" CACHE STRING "Extra libraries to link against") set(EXTRA_LINK_FLAGS "" CACHE STRING "Extra link flags") if(EXTRA_LINK_FLAGS) -@@ -554,7 +555,8 @@ if(ENABLE_HDR10_PLUS) - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) - endif() --install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) -+install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" -+ DESTINATION "${INCLUDE_INSTALL_DIR}") - if(WIN32) - if(MSVC_IDE) - install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) -- 2.16.4 @@ -90,3 +80,20 @@ index f359d80..55679dd 100644 -- 2.16.4 +From: Ken Mays +Date: Tue, 7 May 2019 12:37:15 +0000 +Subject: Add option to adjust headers installation patch +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index bed6ff5..656c239 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -558,7 +558,8 @@ if(ENABLE_HDR10_PLUS) + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + endif() +-install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) ++install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" ++ DESTINATION "${INCLUDE_INSTALL_DIR}") + if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED)) + if(MSVC_IDE) + install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) diff --git a/media-libs/x265/x265-2.1_hg.recipe b/media-libs/x265/x265-2.1_hg.recipe deleted file mode 100644 index 44803ab22..000000000 --- a/media-libs/x265/x265-2.1_hg.recipe +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY="H.265/HEVC video encoder" -DESCRIPTION="x265 is a full-fledged video encoder for the HEVC video format \ -(also known as High Efficiency Video Coding, ISO/IEC 23008-2, MPEG-H Part 2, \ -and ITU-T H.265). HEVC is a direct successor to the earlier H.264/MPEG-4 AVC \ -video compression standard, aiming to achieve the same video quality at half \ -the bit rate. x265 is a free software project implementing that standard." -HOMEPAGE="http://x265.org/" -COPYRIGHT="2013-2016 x265 Project" -LICENSE="GNU GPL v2" -REVISION="1" -SOURCE_URI="https://bitbucket.org/multicoreware/x265/get/tip.tar.bz2" -CHECKSUM_SHA256="228446ebbbcf3923f1f8b7ef29e954a36ff7689b48f83e3908cd437de1b231d1" -# BitBucket sucks -SOURCE_DIR="multicoreware-x265-2737c6ff5f80" -PATCHES="x265-$portVersion.patchset" - -ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" -SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86" - -PROVIDES=" - x265$secondaryArchSuffix = $portVersion - cmd:x265 = $portVersion - lib:libx265$secondaryArchSuffix = 89 - " -REQUIRES=" - haiku$secondaryArchSuffix - " - -PROVIDES_devel=" - x265${secondaryArchSuffix}_devel = $portVersion - devel:libx265$secondaryArchSuffix = 89 - " -REQUIRES_devel=" - x265$secondaryArchSuffix == $portVersion base - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - " -BUILD_PREREQUIRES=" - cmd:cmake - cmd:gcc$secondaryArchSuffix - cmd:make - cmd:yasm - " - -BUILD() -{ - # Can't put this in SOURCE_DIR as cmake uses a file in the root - # directory to find out the version of x265 - cd source - - cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ - -DLIB_INSTALL_DIR:PATH=$relativeLibDir \ - -DBIN_INSTALL_DIR:PATH=bin \ - -DINCLUDE_INSTALL_DIR:PATH=$relativeIncludeDir - make $jobArgs VERBOSE=1 -} - -INSTALL() -{ - cd source - make install - - prepareInstalledDevelLibs libx265 - fixPkgconfig - - # devel package - packageEntries devel \ - $developDir -} diff --git a/media-libs/x265/x265-2.8.recipe b/media-libs/x265/x265-2.8.recipe deleted file mode 100644 index 449c698a0..000000000 --- a/media-libs/x265/x265-2.8.recipe +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY="H.265/HEVC video encoder" -DESCRIPTION="x265 is a full-fledged video encoder for the HEVC video format \ -(also known as High Efficiency Video Coding, ISO/IEC 23008-2, MPEG-H Part 2, \ -and ITU-T H.265). HEVC is a direct successor to the earlier H.264/MPEG-4 AVC \ -video compression standard, aiming to achieve the same video quality at half \ -the bit rate. x265 is a free software project implementing that standard." -HOMEPAGE="http://x265.org/" -COPYRIGHT="2013-2018 x265 Project" -LICENSE="GNU GPL v2" -REVISION="1" -SOURCE_URI="https://bitbucket.org/multicoreware/x265/downloads/x265_$portVersion.tar.gz" -CHECKSUM_SHA256="6e59f9afc0c2b87a46f98e33b5159d56ffb3558a49d8e3d79cb7fdc6b7aaa863" -SOURCE_DIR="x265_$portVersion" -PATCHES="x265-$portVersion.patchset" - -ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" -SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86" - -PROVIDES=" - x265$secondaryArchSuffix = $portVersion - cmd:x265 = $portVersion - lib:libx265$secondaryArchSuffix = 160 - " -REQUIRES=" - haiku$secondaryArchSuffix - " - -PROVIDES_devel=" - x265${secondaryArchSuffix}_devel = $portVersion - devel:libx265$secondaryArchSuffix = 160 - " -REQUIRES_devel=" - x265$secondaryArchSuffix == $portVersion base - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - " -BUILD_PREREQUIRES=" - cmd:cmake - cmd:gcc$secondaryArchSuffix - cmd:make - cmd:yasm - " - -BUILD() -{ - # Can't put this in SOURCE_DIR as cmake uses a file in the root - # directory to find out the version of x265 - cd source - - cmake \ - -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ - -DLIB_INSTALL_DIR:PATH=$relativeLibDir \ - -DBIN_INSTALL_DIR:PATH=bin \ - -DINCLUDE_INSTALL_DIR:PATH=$relativeIncludeDir - make $jobArgs VERBOSE=1 -} - -INSTALL() -{ - cd source - make install - - prepareInstalledDevelLibs libx265 - fixPkgconfig - - # devel package - packageEntries devel \ - $developDir -} diff --git a/media-libs/x265/x265-2.0.recipe b/media-libs/x265/x265-3.0.recipe similarity index 84% rename from media-libs/x265/x265-2.0.recipe rename to media-libs/x265/x265-3.0.recipe index bbe381e08..3e1204187 100644 --- a/media-libs/x265/x265-2.0.recipe +++ b/media-libs/x265/x265-3.0.recipe @@ -5,13 +5,13 @@ and ITU-T H.265). HEVC is a direct successor to the earlier H.264/MPEG-4 AVC \ video compression standard, aiming to achieve the same video quality at half \ the bit rate. x265 is a free software project implementing that standard." HOMEPAGE="http://x265.org/" -COPYRIGHT="2013-2016 x265 Project" +COPYRIGHT="2013-2019 x265 Project" LICENSE="GNU GPL v2" -REVISION="2" +REVISION="1" SOURCE_URI="https://bitbucket.org/multicoreware/x265/get/$portVersion.tar.bz2" -CHECKSUM_SHA256="67a681ae9907002712075c0ad149f0b4f84333ebc4b37ccee6385804760d2d64" +CHECKSUM_SHA256="6717f35eaec2c5480261e4b924cba198c94e1002688848ba9099dd23695e20ac" # BitBucket sucks -SOURCE_DIR="multicoreware-x265-960c9991d0dc" +SOURCE_DIR="multicoreware-x265-72188bd2f034" PATCHES="x265-$portVersion.patchset" ARCHITECTURES="!x86_gcc2 x86 x86_64" @@ -20,7 +20,7 @@ SECONDARY_ARCHITECTURES="!x86_gcc2 x86" PROVIDES=" x265$secondaryArchSuffix = $portVersion cmd:x265 = $portVersion - lib:libx265$secondaryArchSuffix = 87 + lib:libx265$secondaryArchSuffix = 169 " REQUIRES=" haiku$secondaryArchSuffix @@ -28,7 +28,7 @@ REQUIRES=" PROVIDES_devel=" x265${secondaryArchSuffix}_devel = $portVersion - devel:libx265$secondaryArchSuffix = 87 + devel:libx265$secondaryArchSuffix = 169 " REQUIRES_devel=" x265$secondaryArchSuffix == $portVersion base @@ -62,6 +62,8 @@ INSTALL() cd source make install + rm -f $libDir/libx265.a + prepareInstalledDevelLibs libx265 fixPkgconfig