forked from ports/contrib
x265: adopted port
This commit is contained in:
parent
6aeb42d23a
commit
30e0906de8
@ -1,6 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3/YKO8gk38rppTVgsa7x0f1+Z/UkYCZozg4KTVeucE5UqR7QlqAiFpqVOpIpTTf2cL5oCUEdesLAmWo4l7yzDQI=
|
||||
SHA256 (Pkgfile) = 999fc8c7fee8608727cee087b386581ac42edfc5bd8147bf4f7493d7f450d811
|
||||
RWSagIOpLGJF3yJQmvyFfQLIStNF1y9yqhwX7ys25xmApD7ZdO++7GuedYHI4hz5nZwkBBHi/GEqeixLHQlxlYrLL/0xwPUUxA8=
|
||||
SHA256 (Pkgfile) = 37634be030a1206b3deed5c4169bac46a2da601b500db62aa3130f697c15c3bd
|
||||
SHA256 (.footprint) = eea3c11438faed1f1b9a4836c3d9dcd99b23205820d77838df158fdee12a0d9f
|
||||
SHA256 (x265_3.5.tar.gz) = e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8
|
||||
SHA256 (Version.cmake) = 5e07454b6b0e68f9157d546ad796855542b6e98fcc5815362773dce27fd20b94
|
||||
|
89
x265/Pkgfile
89
x265/Pkgfile
@ -1,7 +1,7 @@
|
||||
# Description: Open Source H265/HEVC video encoder.
|
||||
# Description: Open Source H265/HEVC video encoder
|
||||
# URL: https://bitbucket.org/multicoreware/x265_git/wiki/Home
|
||||
# Maintainer: Danny Rawlins, crux at romster dot me
|
||||
# Depends on: cmake
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on:
|
||||
|
||||
name=x265
|
||||
version=3.5
|
||||
@ -10,51 +10,50 @@ source=(https://bitbucket.org/multicoreware/${name}_git/downloads/${name}_$versi
|
||||
Version.cmake)
|
||||
|
||||
build() {
|
||||
# https://bitbucket.org/multicoreware/x265_git/src/ce882936d5f62ea94c13972fa42cab6192864a7d/source/CMakeLists.txt#lines-676
|
||||
# we don't depend on git to figure out which version we are building, do we?
|
||||
sed "s!@@VERSION@@!$version!g" -i Version.cmake && mv Version.cmake ${name}_$version/source/cmake/Version.cmake
|
||||
# https://bitbucket.org/multicoreware/x265_git/src/ce882936d5f62ea94c13972fa42cab6192864a7d/source/CMakeLists.txt#lines-676
|
||||
# we don't depend on git to figure out which version we are building, do we?
|
||||
sed "s!@@VERSION@@!$version!g" -i Version.cmake && mv Version.cmake ${name}_$version/source/cmake/Version.cmake
|
||||
|
||||
[[ -e '/usr/bin/ninja' ]] && PKGMK_X265+=' -G Ninja'
|
||||
# common args
|
||||
local common_args=(
|
||||
-G Ninja
|
||||
-D CMAKE_INSTALL_PREFIX=/usr
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -Wno-restrict -Wno-format-overflow"
|
||||
-D CMAKE_ASM_NASM_FLAGS_RELEASE=' -wno-macro-params-legacy'
|
||||
-D HIGH_BIT_DEPTH=TRUE
|
||||
-D EXPORT_C_API=FALSE
|
||||
-D ENABLE_CLI=FALSE
|
||||
-D ENABLE_SHARED=FALSE
|
||||
)
|
||||
|
||||
# common args
|
||||
local common_args=(
|
||||
-D CMAKE_INSTALL_PREFIX=/usr
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -Wno-restrict -Wno-format-overflow"
|
||||
-D CMAKE_ASM_NASM_FLAGS_RELEASE=' -wno-macro-params-legacy'
|
||||
-D HIGH_BIT_DEPTH=TRUE
|
||||
-D EXPORT_C_API=FALSE
|
||||
-D ENABLE_CLI=FALSE
|
||||
-D ENABLE_SHARED=FALSE
|
||||
)
|
||||
# build 12
|
||||
cmake -S $SRC/${name}_$version/source -B build-12 \
|
||||
-D MAIN12=TRUE \
|
||||
"${common_args[@]}" \
|
||||
-Wno-dev
|
||||
cmake --build build-12
|
||||
|
||||
# build 12
|
||||
cmake -S $SRC/${name}_$version/source -B build-12 $PKGMK_X265 \
|
||||
-D MAIN12=TRUE \
|
||||
"${common_args[@]}" \
|
||||
-Wno-dev
|
||||
cmake --build build-12
|
||||
# build 10
|
||||
cmake -S $SRC/${name}_$version/source -B build-10 \
|
||||
"${common_args[@]}" \
|
||||
-Wno-dev
|
||||
cmake --build build-10
|
||||
|
||||
# build 10
|
||||
cmake -S $SRC/${name}_$version/source -B build-10 $PKGMK_X265 \
|
||||
"${common_args[@]}" \
|
||||
-Wno-dev
|
||||
cmake --build build-10
|
||||
# build 8
|
||||
mkdir build-8
|
||||
ln -s $SRC/build-12/libx265.a $SRC/build-8/libx265_main12.a
|
||||
ln -s $SRC/build-10/libx265.a $SRC/build-8/libx265_main10.a
|
||||
|
||||
# build 8
|
||||
mkdir build-8
|
||||
ln -s $SRC/build-12/libx265.a $SRC/build-8/libx265_main12.a
|
||||
ln -s $SRC/build-10/libx265.a $SRC/build-8/libx265_main10.a
|
||||
|
||||
cmake -S $SRC/${name}_$version/source -B build-8 $PKGMK_X265 \
|
||||
"${common_args[@]:0:10}" \
|
||||
-D ENABLE_SHARED=TRUE \
|
||||
-D EXTRA_LIB='x265_main10.a;x265_main12.a' \
|
||||
-D EXTRA_LINK_FLAGS='-L.' \
|
||||
-D LINKED_10BIT=TRUE \
|
||||
-D LINKED_12BIT=TRUE \
|
||||
-D ENABLE_HDR10_PLUS=TRUE \
|
||||
-Wno-dev
|
||||
cmake --build build-8
|
||||
DESTDIR=$PKG cmake --install build-8
|
||||
cmake -S $SRC/${name}_$version/source -B build-8 \
|
||||
"${common_args[@]:0:12}" \
|
||||
-D ENABLE_SHARED=TRUE \
|
||||
-D EXTRA_LIB='x265_main10.a;x265_main12.a' \
|
||||
-D EXTRA_LINK_FLAGS='-L.' \
|
||||
-D LINKED_10BIT=TRUE \
|
||||
-D LINKED_12BIT=TRUE \
|
||||
-D ENABLE_HDR10_PLUS=TRUE \
|
||||
-Wno-dev
|
||||
cmake --build build-8
|
||||
DESTDIR=$PKG cmake --install build-8
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user