termux-packages/packages/openjpeg/build.sh
2016-08-12 22:05:29 -04:00

28 lines
1.0 KiB
Bash

TERMUX_PKG_HOMEPAGE=http://www.openjpeg.org/
TERMUX_PKG_DESCRIPTION="JPEG 2000 image compression library"
TERMUX_PKG_VERSION=2.1.1
TERMUX_PKG_SRCURL=https://github.com/uclouvain/openjpeg/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_FOLDERNAME=openjpeg-$TERMUX_PKG_VERSION
TERMUX_PKG_RM_AFTER_INSTALL="lib/openjpeg-2.1/*.cmake"
termux_step_configure () {
# Force symlinks to be overwritten:
rm -Rf $TERMUX_PREFIX/lib/libopenjp2.so*
cd $TERMUX_PKG_BUILDDIR
cmake -G "Unix Makefiles" .. \
-DCMAKE_AR=`which ${TERMUX_HOST_PLATFORM}-ar` \
-DCMAKE_CROSSCOMPILING=True \
-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=Linux \
-DC_INCLUDE_DIRS=$TERMUX_PREFIX/include \
$TERMUX_PKG_SRCDIR
}