Skip to content

Commit

Permalink
Updates NDK version for tiff and leptonica
Browse files Browse the repository at this point in the history
This moves from r10e / android-21, to r18b / android-23 by default for
both libtiff and libleptonica.

Unfortunately tesseract 3.05.01, cannot compile in that configuration
due to missing fseeko, ftello apparently, so that is left on r10e /
android-21.
  • Loading branch information
rhardih committed Jan 7, 2019
1 parent 8f79de7 commit 94e4b54
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
13 changes: 9 additions & 4 deletions leptonica/leptonica.Dockerfile
@@ -1,10 +1,15 @@
ARG STAND_TAG=r10e--android-21--arm-linux-androideabi-4.9
ARG PLATFORM=android-23
ARG STAND_TAG=r18b--$PLATFORM--arm-linux-androideabi-4.9
ARG ARCH=armv7-a

FROM bad-tiff:4.0.9-$ARCH AS tiff-dep
FROM bad-tiff:4.0.10-$ARCH AS tiff-dep

FROM rhardih/stand:$STAND_TAG

# Copy value of platform into final environment
ARG PLATFORM
ENV PLATFORM $PLATFORM

ARG VERSION=1.74.4
ARG HOST=arm-linux-androideabi

Expand All @@ -23,7 +28,7 @@ RUN wget -O $VERSION.tar.gz \

WORKDIR /leptonica-$VERSION

ENV PATH $PATH:/android-21-toolchain/bin
ENV PATH $PATH:/$PLATFORM-toolchain/bin
ENV PKG_CONFIG_PATH /tiff-build/lib/pkgconfig

RUN ./autobuild
Expand All @@ -39,4 +44,4 @@ RUN ./configure \
--without-libopenjpeg \
--prefix=/leptonica-build/

RUN make -j2 && make install
RUN make -j8 && make install
2 changes: 1 addition & 1 deletion leptonica/leptonica.mk
Expand Up @@ -6,7 +6,7 @@ leptonica-x86/%: tiff-x86/4.0.9
-t bad-leptonica:${@F}-x86 \
-f leptonica/leptonica.Dockerfile ${BUILD_ARGS} .

leptonica-armv7-a/%: tiff-armv7-a/4.0.9
leptonica-armv7-a/%: tiff-armv7-a/4.0.10
docker build --build-arg VERSION=${@F} \
-t bad-leptonica:${@F}-armv7-a \
-f leptonica/leptonica.Dockerfile ${BUILD_ARGS} .
Expand Down
12 changes: 8 additions & 4 deletions tesseract/tesseract-3.05.01.Dockerfile
@@ -1,11 +1,15 @@
ARG STAND_TAG=r10e--android-21--arm-linux-androideabi-4.9
ARG PLATFORM=android-21
ARG STAND_TAG=r10e--$PLATFORM--arm-linux-androideabi-4.9
ARG ARCH=armv7-a

FROM bad-tiff:4.0.9-$ARCH AS tiff-dep
FROM bad-tiff:4.0.10-$ARCH AS tiff-dep
FROM bad-leptonica:1.74.4-$ARCH AS leptonica-dep

FROM rhardih/stand:$STAND_TAG

ARG PLATFORM
ENV PLATFORM $PLATFORM

ARG HOST=arm-linux-androideabi

COPY --from=tiff-dep /tiff-build /tiff-build
Expand All @@ -30,7 +34,7 @@ COPY tesseract/patches/3.05.01/Makefile.am.patch api/Makefile.am.patch
RUN patch < configure.ac.patch
RUN cd api && patch < Makefile.am.patch

ENV PATH $PATH:/android-21-toolchain/bin
ENV PATH $PATH:/$PLATFORM-toolchain/bin
ENV PKG_CONFIG_PATH /leptonica-build/lib/pkgconfig/

RUN ./autogen.sh
Expand All @@ -40,4 +44,4 @@ RUN ./configure \
--with-extra-libraries=/leptonica-build/lib \
--prefix=/tesseract-build/

RUN make -j2 && make install
RUN make -j8 && make install
2 changes: 1 addition & 1 deletion tesseract/tesseract.mk
Expand Up @@ -21,7 +21,7 @@ tesseract-x86/3.05.01: tiff-x86/4.0.9 leptonica-x86/1.74.4
-t bad-tesseract:3.05.01-x86 \
-f tesseract/tesseract-3.05.01.Dockerfile ${BUILD_ARGS} .

tesseract-armv7-a/3.05.01: tiff-armv7-a/4.0.9 leptonica-armv7-a/1.74.4
tesseract-armv7-a/3.05.01: tiff-armv7-a/4.0.10 leptonica-armv7-a/1.74.4
docker build -t bad-tesseract:3.05.01-armv7-a \
-f tesseract/tesseract-3.05.01.Dockerfile ${BUILD_ARGS} .

Expand Down
11 changes: 8 additions & 3 deletions tiff/tiff.Dockerfile
@@ -1,11 +1,16 @@
ARG STAND_TAG=r10e--android-21--arm-linux-androideabi-4.9
ARG PLATFORM=android-23
ARG STAND_TAG=r18b--$PLATFORM--arm-linux-androideabi-4.9

FROM rhardih/stand:$STAND_TAG

# Copy value of platform into final environment
ARG PLATFORM
ENV PLATFORM $PLATFORM

# List of available versions can be found at
# https://download.osgeo.org/libtiff
# https://download.osgeo.org/libtiff/old
ARG VERSION=4.0.9
ARG VERSION=4.0.10
ARG HOST=arm-linux-androideabi

RUN apt-get update && apt-get -y install \
Expand All @@ -19,7 +24,7 @@ RUN wget -O tiff-$VERSION.tar.gz \

WORKDIR /tiff-$VERSION

ENV PATH $PATH:/android-21-toolchain/bin
ENV PATH $PATH:/$PLATFORM-toolchain/bin

# Acquire newer versions of .guess and .sub files for configure

Expand Down

0 comments on commit 94e4b54

Please sign in to comment.