diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2017-02-25 19:32:30 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-03-04 07:27:03 +0700 |
commit | 513ae1bcbd8b972a94793e6251a1f6cb7080dbd6 (patch) | |
tree | 754aca77ab4262b391678da1378b1027351da314 /multimedia/x265 | |
parent | f69f679aeafac27f0ac60cd3aaef80ad9f887b29 (diff) |
multimedia/x265: Add also Main-10 and Main-12 color profiles.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'multimedia/x265')
-rw-r--r-- | multimedia/x265/x265.SlackBuild | 71 |
1 files changed, 67 insertions, 4 deletions
diff --git a/multimedia/x265/x265.SlackBuild b/multimedia/x265/x265.SlackBuild index ecce47ee6bf4..f41e7b566d87 100644 --- a/multimedia/x265/x265.SlackBuild +++ b/multimedia/x265/x265.SlackBuild @@ -71,17 +71,80 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -cd build/linux +for d in 8 $([ "$ARCH" = "x86_64" ] && echo "10 12"); do + if [[ -d build-$d ]]; then + rm -rf build-$d + fi + mkdir build-$d +done + +if [ "$ARCH" = "x86_64" ]; then + + cd build-12 + cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_INSTALL_DIR=lib${LIBDIRSUFFIX} \ - -DCMAKE_BUILD_TYPE=Release ../../source + -DHIGH_BIT_DEPTH=ON \ + -DMAIN12=ON \ + -DEXPORT_C_API=OFF \ + -DENABLE_CLI=OFF \ + -DENABLE_SHARED=OFF \ + -DCMAKE_BUILD_TYPE=Release ../source make - make install DESTDIR=$PKG -cd ../.. + cd ../build-10 + + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=lib${LIBDIRSUFFIX} \ + -DHIGH_BIT_DEPTH=ON \ + -DEXPORT_C_API=OFF \ + -DENABLE_CLI=OFF \ + -DENABLE_SHARED=OFF \ + -DCMAKE_BUILD_TYPE=Release ../source + make + + cd ../build-8 + + ln -s ../build-10/libx265.a libx265_main10.a + ln -s ../build-12/libx265.a libx265_main12.a + + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=lib${LIBDIRSUFFIX} \ + -DENABLE_SHARED=ON \ + -DEXTRA_LIB="x265_main10.a;x265_main12.a" \ + -DEXTRA_LINK_FLAGS="-L." \ + -DLINKED_10BIT=ON \ + -DLINKED_12BIT=ON \ + -DCMAKE_BUILD_TYPE=Release ../source + make + +else + + cd build-8 + + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=lib${LIBDIRSUFFIX} \ + -DENABLE_SHARED=ON \ + -DCMAKE_BUILD_TYPE=Release ../source + make + +fi + +make install DESTDIR=$PKG + +cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |