summaryrefslogtreecommitdiff
path: root/x265/Pkgfile
diff options
context:
space:
mode:
authorTim Biermann <tbier@posteo.de>2020-11-08 13:41:02 +0000
committerTim Biermann <tbier@posteo.de>2020-11-08 13:41:15 +0000
commit5fe297e4cf4034631950deedded84c75812cd204 (patch)
treea06df6569f02d2df0413439b23acf347a77adac8 /x265/Pkgfile
parent9d0de99089242c66ccddbac0a9f791f19bdb0743 (diff)
downloadcontrib-5fe297e4cf4034631950deedded84c75812cd204.tar.gz
contrib-5fe297e4cf4034631950deedded84c75812cd204.tar.xz
x265: updated cmake syntax
Diffstat (limited to 'x265/Pkgfile')
-rw-r--r--x265/Pkgfile89
1 files changed, 47 insertions, 42 deletions
diff --git a/x265/Pkgfile b/x265/Pkgfile
index e0d18e4f6..f517e03f9 100644
--- a/x265/Pkgfile
+++ b/x265/Pkgfile
@@ -9,46 +9,51 @@ release=1
source=(https://bitbucket.org/multicoreware/$name/downloads/${name}_$version.tar.gz)
build() {
- cd ${name}_$version
-
- install -d build-{12,10,8}
- cd build-12
-
- cmake ../source \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release \
- -DHIGH_BIT_DEPTH='TRUE' \
- -DMAIN12='TRUE' \
- -DEXPORT_C_API='FALSE' \
- -DENABLE_CLI='FALSE' \
- -DENABLE_SHARED='FALSE'
-
- make
-
- cd ../build-10
-
- cmake ../source \
- -DCMAKE_INSTALL_PREFIX='/usr' \
- -DHIGH_BIT_DEPTH='TRUE' \
- -DEXPORT_C_API='FALSE' \
- -DENABLE_CLI='FALSE' \
- -DENABLE_SHARED='FALSE'
-
- make
-
- cd ../build-8
-
- ln -s ../build-12/libx265.a libx265_main12.a
- ln -s ../build-10/libx265.a libx265_main10.a
-
- cmake ../source \
- -DCMAKE_INSTALL_PREFIX='/usr' \
- -DENABLE_SHARED='TRUE' \
- -DEXTRA_LIB='x265_main10.a;x265_main12.a' \
- -DEXTRA_LINK_FLAGS='-L.' \
- -DLINKED_10BIT='TRUE' \
- -DLINKED_12BIT='TRUE'
-
- make
- make DESTDIR=$PKG install
+ [[ -e /usr/bin/ninja ]] && PKGMK_X265+=' -G Ninja'
+
+ # build 12
+ cmake -S $SRC/${name}_$version/source -B build-12 $PKGMK_X265 \
+ -D CMAKE_INSTALL_PREFIX=/usr \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG -Wno-deprecated" \
+ -D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG -Wno-deprecated" \
+ -D HIGH_BIT_DEPTH=TRUE \
+ -D MAIN12=TRUE \
+ -D EXPORT_C_API=FALSE \
+ -D ENABLE_CLI=FALSE \
+ -D ENABLE_SHARED=FALSE \
+ -Wno-dev
+ cmake --build build-12
+
+ # build 10
+ cmake -S $SRC/${name}_$version/source -B build-10 $PKGMK_X265 \
+ -D CMAKE_INSTALL_PREFIX=/usr \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
+ -D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
+ -D HIGH_BIT_DEPTH=TRUE \
+ -D EXPORT_C_API=FALSE \
+ -D ENABLE_CLI=FALSE \
+ -D ENABLE_SHARED=FALSE \
+ -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
+
+ cmake -S $SRC/${name}_$version/source -B build-8 $PKGMK_X265 \
+ -D CMAKE_INSTALL_PREFIX=/usr \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
+ -D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
+ -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 \
+ -Wno-dev
+ cmake --build build-8
+ DESTDIR=$PKG cmake --install build-8
}

Generated by cgit