netpbm: Update from r2831 to r2901
[termux-packages] / packages / netpbm / build.sh
CommitLineData
59f0d218
FF
1TERMUX_PKG_HOMEPAGE=http://netpbm.sourceforge.net/
2TERMUX_PKG_DESCRIPTION="Toolkit for manipulation of graphic images, including conversion of images between a variety of different formats"
3# The netpbm releases are described at http://netpbm.sourceforge.net/release.html
4# and are divided among (1) Development, (2) Advanced, (3) Stable and (4) Super Stable.
5# Only Super Stable is distributed as a tar ball, but is outdated and does not compile with modern libpng.
6# So use revisions from http://svn.code.sf.net/p/netpbm/code/advanced for packages.
c197515d
FF
7TERMUX_PKG_VERSION=2901
8TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/netpbm-advanced-r${TERMUX_PKG_VERSION}.tar.gz
9TERMUX_PKG_SHA256=0fded2dd3dd311ed08ab73fa50ed0bd61adf80783f9033e9b5f4f7395d3266b1
59f0d218
FF
10TERMUX_PKG_DEPENDS="libpng, libxml2"
11TERMUX_PKG_BUILD_IN_SRC=yes
59f0d218
FF
12
13termux_step_configure () {
14 # Put the android libpng-config script in the path (before the host one):
15 TERMUX_PKG_LIBPNG_CONFIG_DIR=$TERMUX_PKG_TMPDIR/libpng-config
16 mkdir -p $TERMUX_PKG_LIBPNG_CONFIG_DIR
17 cp $TERMUX_PREFIX/bin/libpng-config $TERMUX_PKG_LIBPNG_CONFIG_DIR/
18 export PATH=$TERMUX_PKG_LIBPNG_CONFIG_DIR:$PATH
19
59f0d218
FF
20 # See $SRC/doc/INSTALL about netpbm build system. For automatic builds it recommends just copying config.mk.in
21 cd $TERMUX_PKG_SRCDIR
22 cp config.mk.in config.mk
23 echo "AR = $AR" >> config.mk
24 echo "RANLIB = $RANLIB" >> config.mk
25 echo "CC = $CC" >> config.mk
26 echo "CFLAGS = $CFLAGS" >> config.mk
27 echo "LDFLAGS = $LDFLAGS" >> config.mk
28 echo "STATICLIB_TOO = n" >> config.mk
29 echo "INTTYPES_H = <inttypes.h>" >> config.mk
30 export STRIPPROG=$STRIP
31
32 echo "CC_FOR_BUILD = cc" >> config.mk
33 echo "LD_FOR_BUILD = cc" >> config.mk
34 echo "CFLAGS_FOR_BUILD = " >> config.mk
35 echo "LDFLAGS_FOR_BUILD = " >> config.mk
c197515d
FF
36
37 cp $TERMUX_PKG_BUILDER_DIR/standardppmdfont.c lib/
59f0d218
FF
38}
39
40termux_step_make_install () {
41 rm -Rf /tmp/netpbm
42 make -j 1 package pkgdir=/tmp/netpbm
43 ./installnetpbm
44}