termux-packages/packages/openjpeg/build.sh

27 lines
1.0 KiB
Bash
Raw Normal View History

2015-06-13 01:03:31 +02:00
TERMUX_PKG_HOMEPAGE=http://www.openjpeg.org/
TERMUX_PKG_DESCRIPTION="JPEG 2000 image compression library"
TERMUX_PKG_VERSION=2.1.0
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/openjpeg.mirror/${TERMUX_PKG_VERSION}/openjpeg-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_RM_AFTER_INSTALL="lib/openjpeg-2.1/*.cmake"
termux_step_configure () {
2015-07-15 13:55:38 +02:00
# Force symlinks to be overwritten:
rm -Rf $TERMUX_PREFIX/lib/libopenjp2.so*
2015-06-13 01:03:31 +02:00
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
}