Browse Source

libx265: Add as disabled package

android-5
Fredrik Fornwall 8 years ago
parent
commit
bc97f0d816
  1. 24
      disabled-packages/libx265/build.sh
  2. 15
      disabled-packages/libx265/source-CMakeLists.txt.patch
  3. 3
      disabled-packages/libx265/x265.subpackage.sh

24
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
}

15
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)

3
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"
Loading…
Cancel
Save