Merge pull request #186 from vaites/tesseract
[termux-packages] / packages / leptonica / build.sh
1 TERMUX_PKG_HOMEPAGE=http://www.leptonica.com/
2 TERMUX_PKG_DESCRIPTION="Leptonica is a pedagogically-oriented open source site containing software that is broadly useful for image processing and image analysis applications"
3 TERMUX_PKG_VERSION=1.73
4 TERMUX_PKG_BUILD_REVISION=1
5 TERMUX_PKG_DEPENDS="libjpeg-turbo, libpng, libtiff"
6 TERMUX_PKG_SRCURL=http://www.leptonica.com/source/leptonica-${TERMUX_PKG_VERSION}.tar.gz
7 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-giflib --without-libwebp"
8
9 termux_step_pre_configure() {
10 export ac_cv_func_fmemopen=yes
11 }
12
13 termux_step_post_configure() {
14 # add fmemopen support from https://github.com/j-jorge/android-stdioext
15 cd $TERMUX_PKG_SRCDIR/src
16
17 wget --quiet https://raw.githubusercontent.com/j-jorge/android-stdioext/master/include/stdioext.h
18 wget --quiet https://github.com/j-jorge/android-stdioext/raw/master/src/fmemopen.c
19 wget --quiet https://github.com/j-jorge/android-stdioext/raw/master/src/fopencookie.c
20 wget --quiet https://raw.githubusercontent.com/j-jorge/android-stdioext/master/src/open_memstream.c
21
22 echo '#include "stdioext.h"' >> alltypes.h
23 }