-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathleptonica.Dockerfile
49 lines (36 loc) · 1009 Bytes
/
leptonica.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ARG PLATFORM=android-23
ARG TOOLCHAIN=arm-linux-androideabi-4.9
ARG ARCH=armv7-a
FROM bad-tiff:4.0.10-$ARCH AS tiff-dep
FROM rhardih/stand:r18b--$PLATFORM--$TOOLCHAIN
# Copy value of platform into final environment
ARG PLATFORM
ENV PLATFORM $PLATFORM
ARG VERSION
ARG HOST=arm-linux-androideabi
COPY --from=tiff-dep /tiff-build /tiff-build
RUN apt-get update && apt-get -y install \
wget \
automake \
libtool \
pkg-config
RUN wget -O $VERSION.tar.gz \
https://github.com/DanBloomberg/leptonica/archive/$VERSION.tar.gz && \
tar -xzvf $VERSION.tar.gz && \
rm $VERSION.tar.gz
WORKDIR /leptonica-$VERSION
ENV PATH $PATH:/$PLATFORM-toolchain/bin
ENV LIBTIFF_LIBS -L/tiff-build/lib -ltiff
ENV LIBTIFF_CFLAGS -I/tiff-build/include
RUN ./autobuild
RUN ./configure \
--host=$HOST \
--disable-programs \
--without-zlib \
--without-libpng \
--without-jpeg \
--without-giflib \
--without-libwebp \
--without-libopenjpeg \
--prefix=/leptonica-build/
RUN make -j && make install