From 513ae1bcbd8b972a94793e6251a1f6cb7080dbd6 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Sat, 25 Feb 2017 19:32:30 +0100 Subject: multimedia/x265: Add also Main-10 and Main-12 color profiles. Signed-off-by: Matteo Bernardini --- multimedia/x265/x265.SlackBuild | 71 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 4 deletions(-) (limited to 'multimedia/x265') 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 -- cgit v1.2.3