From bc97f0d816fec2fb92b58b060da3565ad964935a Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 3 Jan 2017 18:58:44 -0500 Subject: [PATCH] libx265: Add as disabled package --- disabled-packages/libx265/build.sh | 24 +++++++++++++++++++ .../libx265/source-CMakeLists.txt.patch | 15 ++++++++++++ disabled-packages/libx265/x265.subpackage.sh | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 disabled-packages/libx265/build.sh create mode 100644 disabled-packages/libx265/source-CMakeLists.txt.patch create mode 100644 disabled-packages/libx265/x265.subpackage.sh diff --git a/disabled-packages/libx265/build.sh b/disabled-packages/libx265/build.sh new file mode 100644 index 000000000..bf2e87206 --- /dev/null +++ b/disabled-packages/libx265/build.sh @@ -0,0 +1,24 @@ +TERMUX_PKG_HOMEPAGE=http://x265.org/ +TERMUX_PKG_DESCRIPTION="H.265/HEVC video stream encoder library" +TERMUX_PKG_VERSION=2.2 +TERMUX_PKG_SRCURL=http://ftp.videolan.org/pub/videolan/x265/x265_${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_FOLDERNAME=x265_$TERMUX_PKG_VERSION + +termux_step_configure () { + cd $TERMUX_PKG_BUILDDIR + cmake -G "Unix Makefiles" $TERMUX_PKG_SRCDIR/source \ + -DCMAKE_AR=`which ${TERMUX_HOST_PLATFORM}-ar` \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_CROSSCOMPILING=True \ + -DCMAKE_SYSTEM_PROCESSOR=$TERMUX_ARCH \ + -DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_FIND_ROOT_PATH=$TERMUX_PREFIX \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX \ + -DCMAKE_LINKER=`which ${TERMUX_HOST_PLATFORM}-ld` \ + -DCMAKE_MAKE_PROGRAM=`which make` \ + -DCMAKE_RANLIB=`which ${TERMUX_HOST_PLATFORM}-ranlib` \ + -DCMAKE_SYSTEM_NAME=Android +} diff --git a/disabled-packages/libx265/source-CMakeLists.txt.patch b/disabled-packages/libx265/source-CMakeLists.txt.patch new file mode 100644 index 000000000..7632e1320 --- /dev/null +++ b/disabled-packages/libx265/source-CMakeLists.txt.patch @@ -0,0 +1,15 @@ +diff -u -r ../x265_2.2/source/CMakeLists.txt ./source/CMakeLists.txt +--- ../x265_2.2/source/CMakeLists.txt 2016-12-23 00:57:39.000000000 -0500 ++++ ./source/CMakeLists.txt 2017-01-03 18:42:19.823674722 -0500 +@@ -80,7 +80,10 @@ + endif() + + if(UNIX) +- list(APPEND PLATFORM_LIBS pthread) ++ find_library(LIBPTHREAD pthread) ++ if(LIBPTHREAD) ++ list(APPEND PLATFORM_LIBS pthread) ++ endif() + find_library(LIBRT rt) + if(LIBRT) + list(APPEND PLATFORM_LIBS rt) diff --git a/disabled-packages/libx265/x265.subpackage.sh b/disabled-packages/libx265/x265.subpackage.sh new file mode 100644 index 000000000..c201e985c --- /dev/null +++ b/disabled-packages/libx265/x265.subpackage.sh @@ -0,0 +1,3 @@ +TERMUX_SUBPKG_INCLUDE="bin/x265" +TERMUX_SUBPKG_DESCRIPTION="H.265/HEVC video stream encoder tool" +TERMUX_SUBPKG_DEPENDS="libx265"