mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
x265: fixed source for 3.5-release (#8662)
* Delete x265_3.4-3.4.recipe * Delete x265-3.4.patchset * x265: fixed src to offical 3.5 release
This commit is contained in:
@@ -1,117 +0,0 @@
|
||||
From 8402f16821af64a25e5ef322acfd96a73b045316 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Gu <timothygu99@gmail.com>
|
||||
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 1d1a613..847acff 100644
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -85,7 +85,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.28.0
|
||||
|
||||
|
||||
From e091dc16b41c3116dbf7c68087b8f7ab6a505f17 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Gu <timothygu99@gmail.com>
|
||||
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 847acff..6a7ff99 100644
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -373,6 +373,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)
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
From af8cd14ec41104bc896acf26ce336ae295bf3b6d Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Gu <timothygu99@gmail.com>
|
||||
Date: Sun, 28 Dec 2014 07:14:34 +0000
|
||||
Subject: Add Haiku version of adjusting thread priority
|
||||
|
||||
|
||||
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
index 6a7ff99..2db73a3 100644
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -600,7 +600,8 @@ if(SVTHEVC_FOUND)
|
||||
install(FILES "${SVT_HEVC_LIBRARY}" 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)
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
From da3bdfd81ff1b5506ada6a9a3c83ed6a882afa4a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 25 Oct 2019 21:18:33 +0200
|
||||
Subject: avoid using nice.
|
||||
|
||||
|
||||
diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp
|
||||
index 2db7a14..0df90c8 100644
|
||||
--- a/source/common/threadpool.cpp
|
||||
+++ b/source/common/threadpool.cpp
|
||||
@@ -118,7 +118,9 @@ void WorkerThread::threadMain()
|
||||
#if _WIN32
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
|
||||
#else
|
||||
+#ifndef __HAIKU__
|
||||
__attribute__((unused)) int val = nice(10);
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
m_pool.setCurrentThreadAffinity();
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
|
||||
From f2377573876ff155dc7b04d7f05a92a414589b94 Mon Sep 17 00:00:00 2001
|
||||
From: Elio Blanca <eblanca76@users.sourceforge.net>
|
||||
Date: Mon, 28 Feb 2022 23:29:47 +0000
|
||||
Subject: fix detection of cpu cores
|
||||
|
||||
|
||||
diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp
|
||||
index 0df90c8..e07fa91 100644
|
||||
--- a/source/common/threadpool.cpp
|
||||
+++ b/source/common/threadpool.cpp
|
||||
@@ -636,7 +636,7 @@ int ThreadPool::getCpuCount()
|
||||
/* Return the number of processors configured by OS. Because, most embedded linux distributions
|
||||
* uses only one processor as the scheduler doesn't have enough work to utilize all processors */
|
||||
return sysconf(_SC_NPROCESSORS_CONF);
|
||||
-#elif __unix__
|
||||
+#elif defined(__unix__) || defined(__HAIKU__)
|
||||
return sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#elif MACOS && __MACH__
|
||||
int nm[2];
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -5,17 +5,17 @@ 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-2021 x265 Project"
|
||||
COPYRIGHT="2013-2023 x265 Project"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="4"
|
||||
SOURCE_URI="https://bitbucket.org/multicoreware/x265_git/get/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5ca3403c08de4716719575ec56c686b1eb55b078c0fe50a064dcf1ac20af1618"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://bitbucket.org/multicoreware/x265_git/downloads/x265_$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8"
|
||||
# BitBucket sucks
|
||||
SOURCE_DIR="multicoreware-x265_git-f0c1022b6be1"
|
||||
SOURCE_DIR="x265_$portVersion"
|
||||
PATCHES="x265-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="199"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion}"
|
||||
|
||||
@@ -1,63 +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-2020 x265 Project"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://bitbucket.org/multicoreware/x265_git/get/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="7f2771799bea0f53b5ab47603d5bea46ea2a221e047a7ff398115e9976fd5f86"
|
||||
# BitBucket sucks
|
||||
SOURCE_DIR="multicoreware-x265_git-a4f320054d67"
|
||||
PATCHES="x265-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
x265_3.4$secondaryArchSuffix = $portVersion
|
||||
lib:libx265$secondaryArchSuffix = 192
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:nasm
|
||||
"
|
||||
|
||||
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_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
|
||||
-DLIB_INSTALL_DIR:PATH=$relativeLibDir \
|
||||
-DBIN_INSTALL_DIR:PATH=bin \
|
||||
-DINCLUDE_INSTALL_DIR:PATH=$relativeIncludeDir
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd source
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs libx265
|
||||
fixPkgconfig
|
||||
|
||||
rm -rf $prefix/bin $developDir
|
||||
}
|
||||
Reference in New Issue
Block a user