Skip to content

Commit

Permalink
* Build LibTIFF after WebP to make sure they link correctly in prese…
Browse files Browse the repository at this point in the history
…ts for Leptonica
  • Loading branch information
saudet committed Jul 16, 2020
1 parent 0ed7959 commit 7bb3ed0
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 72 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Build LibTIFF after WebP to make sure they link correctly in presets for Leptonica
* Virtualize `IInt8Calibrator` plus subclasses from TensorRT to allow customization ([issue #902](https://github.com/bytedeco/javacpp-presets/issues/902))
* Replace `requires` with `requires static` in JPMS `.platform` modules ([pull #900](https://github.com/bytedeco/javacpp-presets/pull/900))
* Add presets for OpenPose 1.6.0 ([pull #898](https://github.com/bytedeco/javacpp-presets/pull/898))
Expand Down
144 changes: 72 additions & 72 deletions leptonica/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=arm-linux --with-sysroot="$ANDROID_ROOT" --disable-arm-neon
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=arm-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../$LIBWEBP
patch -Np1 < ../../../libwebp-arm.patch
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=arm-linux-androideabi --with-sysroot="$ANDROID_ROOT" --disable-neon
cd src
make -j $MAKEJ
make install
cd ../../leptonica-$LEPTONICA_VERSION
cd ../../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=arm-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
patch -Np1 < ../../../leptonica-android.patch
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=arm-linux-androideabi --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=arm-linux-androideabi --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
Expand All @@ -109,19 +109,19 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=aarch64-linux --with-sysroot="$ANDROID_ROOT" --disable-arm-neon
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=arm-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../$LIBWEBP
patch -Np1 < ../../../libwebp-arm.patch
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=aarch64-linux-android --with-sysroot="$ANDROID_ROOT" --disable-neon
cd src
make -j $MAKEJ
make install
cd ../../leptonica-$LEPTONICA_VERSION
cd ../../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=arm-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
patch -Np1 < ../../../leptonica-android.patch
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=aarch64-linux-android --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=aarch64-linux-android --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
Expand All @@ -148,18 +148,18 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux --with-sysroot="$ANDROID_ROOT"
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux-android --with-sysroot="$ANDROID_ROOT"
cd src
make -j $MAKEJ
make install
cd ../../leptonica-$LEPTONICA_VERSION
cd ../../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
patch -Np1 < ../../../leptonica-android.patch
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=i686-linux-android --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=i686-linux-android --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
Expand All @@ -186,23 +186,23 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux --with-sysroot="$ANDROID_ROOT"
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux-android --with-sysroot="$ANDROID_ROOT"
cd src
make -j $MAKEJ
make install
cd ../../leptonica-$LEPTONICA_VERSION
cd ../../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux --with-sysroot="$ANDROID_ROOT" --disable-lzma --disable-zstd --without-x
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
patch -Np1 < ../../../leptonica-android.patch
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=x86_64-linux-android --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH --host=x86_64-linux-android --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
linux-x86)
export CFLAGS="-I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand All @@ -223,21 +223,21 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=i686-linux --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
linux-x86_64)
export CFLAGS="-I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand All @@ -258,21 +258,21 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=x86_64-linux --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
linux-armhf)
export CFLAGS="-march=armv6 -marm -mfpu=vfp -mfloat-abi=hard -I$INSTALL_PATH/include/"
export CFLAGS="-pthread -march=armv6 -marm -mfpu=vfp -mfloat-abi=hard -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand All @@ -295,22 +295,22 @@ case $PLATFORM in
CC="arm-linux-gnueabihf-gcc -fPIC" ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-shared --with-pic --host=arm-linux-gnueabihf --disable-arm-neon
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --disable-lzma --disable-zstd --host=arm-linux-gnueabihf
make -j $MAKEJ
make install
cd ../$LIBWEBP
patch -Np1 < ../../../libwebp-arm.patch
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=arm-linux-gnueabihf --disable-neon
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --disable-lzma --disable-zstd --host=arm-linux-gnueabihf
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ CC="arm-linux-gnueabihf-gcc -fPIC" ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --host=arm-linux-gnueabihf --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ CC="arm-linux-gnueabihf-gcc -fPIC" ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --host=arm-linux-gnueabihf --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
linux-arm64)
export CFLAGS="-I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand All @@ -332,21 +332,21 @@ case $PLATFORM in
CC="aarch64-linux-gnu-gcc -fPIC" ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-shared --with-pic --host=aarch64-linux-gnu
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --disable-lzma --disable-zstd --host=aarch64-linux-gnu
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --host=aarch64-linux-gnu
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --disable-lzma --disable-zstd --host=aarch64-linux-gnu
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ CC="aarch64-linux-gnu-gcc -fPIC" ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --host=aarch64-linux-gnu --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ CC="aarch64-linux-gnu-gcc -fPIC" ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --host=aarch64-linux-gnu --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
linux-ppc64le)
export CFLAGS="-I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand Down Expand Up @@ -376,22 +376,22 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic $BFLAGS
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic $BFLAGS --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic $BFLAGS
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic $BFLAGS --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
sed -i s/elf64ppc/elf64lppc/ configure
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" $BFLAGS --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" $BFLAGS --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
macosx-*)
export CFLAGS="-I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand All @@ -411,22 +411,22 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
patch -Np1 < ../../../leptonica-macosx.patch
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/" --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
windows-x86)
export CFLAGS="-I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand All @@ -445,21 +445,21 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=i686-w64-mingw32
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=i686-w64-mingw32 --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=i686-w64-mingw32
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=i686-w64-mingw32 --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/ -Wl,$INSTALL_PATH/lib/*.a" --build=i686-w64-mingw32 --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/ -Wl,$INSTALL_PATH/lib/*.a" --build=i686-w64-mingw32 --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
windows-x86_64)
export CFLAGS="-I$INSTALL_PATH/include/"
export CFLAGS="-pthread -I$INSTALL_PATH/include/"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-L$INSTALL_PATH/lib/"
Expand All @@ -478,16 +478,16 @@ case $PLATFORM in
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=x86_64-w64-mingw32
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=x86_64-w64-mingw32 --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../$LIBWEBP
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=x86_64-w64-mingw32
make -j $MAKEJ
make install
cd ../$LIBTIFF
./configure --prefix=$INSTALL_PATH --disable-shared --with-pic --build=x86_64-w64-mingw32 --disable-lzma --disable-zstd
make -j $MAKEJ
make install
cd ../leptonica-$LEPTONICA_VERSION
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/ -Wl,$INSTALL_PATH/lib/*.a" --build=x86_64-w64-mingw32 --disable-programs
PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/ ./configure --prefix=$INSTALL_PATH CFLAGS="-pthread -I$INSTALL_PATH/include/" LDFLAGS="-L$INSTALL_PATH/lib/ -Wl,$INSTALL_PATH/lib/*.a" --build=x86_64-w64-mingw32 --disable-programs --without-libopenjpeg
make -j $MAKEJ
make install-strip
;;
Expand Down

0 comments on commit 7bb3ed0

Please sign in to comment.