<commit_before># THIS DOCKERFILE TRIES TO COMPILE CURL, LIBMICROHTTPD, JSONCPP, ARGTABLE AND LIBJSON-RPC-CPP FOR ANDROID
# Based on Victor Laskin Dockerfile (http://vitiy.info/dockerfile-example-to-compile-libcurl-for-android-inside-docker-container/)

FROM debian:sid

MAINTAINER <NAME> <<EMAIL>>

ENV ANDROID_SDK_PACKAGE android-sdk_r24.2-linux.tgz
ENV ANDROID_NDK_PACKAGE android-ndk-r10e-linux-x86_64.bin

# Install compilation tools

RUN apt-get update && apt-get install -y \
automake \
build-essential \
wget \
p7zip-full \
bash \
cmake \
git \
libjsonrpccpp-dev \
libjsonrpccpp \
libjsonrpccpp-tools


# Download SDK / NDK

RUN mkdir /Android && cd Android && mkdir output
WORKDIR /Android

RUN wget http://dl.google.com/android/$ANDROID_SDK_PACKAGE
RUN wget http://dl.google.com/android/ndk/$ANDROID_NDK_PACKAGE

# Extracting ndk/sdk

RUN tar -xvzf $ANDROID_SDK_PACKAGE && \
chmod a+x $ANDROID_NDK_PACKAGE && \
7z x $ANDROID_NDK_PACKAGE

# Set ENV variables

ENV ANDROID_HOME /Android/android-sdk-linux
ENV NDK_ROOT /Android/android-ndk-r10e

ENV PATH $PATH:$ANDROID_HOME/tools
ENV PATH $PATH:$ANDROID_HOME/platform-tools

# Make stand alone toolchain (Modify platform / arch here)

RUN mkdir=toolchain-arm && \
bash $NDK_ROOT/build/tools/make-standalone-toolchain.sh \
--verbose --platform=android-14 --install-dir=toolchain-arm \
--arch=arm --toolchain=arm-linux-androideabi-4.9 --system=linux-x86_64

ENV TOOLCHAIN /Android/toolchain-arm
ENV SYSROOT $TOOLCHAIN/sysroot
ENV PATH $PATH:$TOOLCHAIN/bin:$SYSROOT/usr/local/bin

# Configure toolchain path

ENV ARCH armv7

ENV CROSS_COMPILE arm-linux-androideabi
ENV CC arm-linux-androideabi-gcc
ENV CXX arm-linux-androideabi-g++
ENV AR arm-linux-androideabi-ar
ENV AS arm-linux-androideabi-as
ENV LD arm-linux-androideabi-ld
ENV RANLIB arm-linux-androideabi-ranlib
ENV NM arm-linux-androideabi-nm
ENV STRIP arm-linux-androideabi-strip
ENV CHOST arm-linux-androideabi

ENV CPPFLAGS -std=c++11

# Download and extract curl

ENV CFLAGS \
-v -DANDROID --sysroot=$SYSROOT -mandroid -march=$ARCH -mfloat-abi=softfp -mfpu=vfp -mthumb 

ENV CPPFLAGS $CPPFLAGS $CFLAGS \
-Wno-psabi -march=armv7-a \
-mfloat-abi=softfp -mfpu=vfp -ffunction-sections \
-funwind-tables -fstack-protector -fno-short-enums \
-DANDROID -Wa,--noexecstack -fno-builtin-memmove \
-std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -std=c++1y -Wall -Wno-psabi -W -D_REENTRANT -fPIE 

ENV LDFLAGS -L${TOOLCHAIN}/include

RUN wget http://curl.haxx.se/download/curl-7.38.0.tar.gz && \
tar -xzf curl-7.38.0.tar.gz
RUN cd curl-7.38.0 && ./configure --host=arm-linux-androideabi \
--enable-shared --disable-static \
--disable-dependency-tracking \
--with-zlib=/Android/zlib --without-ca-bundle --without-ca-path \
--enable-ipv6 --disable-ftp --disable-file --disable-ldap \
--disable-ldaps --disable-rtsp --disable-proxy --disable-dict\
--disable-telnet --disable-tftp --disable-pop3 --disable-imap\
--disable-smtp --disable-gopher --disable-sspi --disable-manual\
--target=arm-linux-androideabi --build=x86_64-unknown-linux-gnu || cat config.log

# Make curl 
<commit_msg>libjsonrpc-cpp-tools added in dockerfile<commit_after># THIS DOCKERFILE TRIES TO COMPILE CURL, LIBMICROHTTPD, JSONCPP, ARGTABLE AND LIBJSON-RPC-CPP FOR ANDROID
# Based on Victor Laskin Dockerfile (http://vitiy.info/dockerfile-example-to-compile-libcurl-for-android-inside-docker-container/)

FROM debian:sid

MAINTAINER <NAME> <<EMAIL>>

ENV ANDROID_SDK_PACKAGE android-sdk_r24.2-linux.tgz
ENV ANDROID_NDK_PACKAGE android-ndk-r10e-linux-x86_64.bin

# Install compilation tools

RUN apt-get update && apt-get install -y \
automake \
build-essential \
wget \
p7zip-full \
bash \
cmake \
git \
libjsonrpccpp-dev \
libjsonrpccpp-tools


# Download SDK / NDK

RUN mkdir /Android && cd Android && mkdir output
WORKDIR /Android

RUN wget http://dl.google.com/android/$ANDROID_SDK_PACKAGE
RUN wget http://dl.google.com/android/ndk/$ANDROID_NDK_PACKAGE

# Extracting ndk/sdk

RUN tar -xvzf $ANDROID_SDK_PACKAGE && \
chmod a+x $ANDROID_NDK_PACKAGE && \
7z x $ANDROID_NDK_PACKAGE

# Set ENV variables

ENV ANDROID_HOME /Android/android-sdk-linux
ENV NDK_ROOT /Android/android-ndk-r10e

ENV PATH $PATH:$ANDROID_HOME/tools
ENV PATH $PATH:$ANDROID_HOME/platform-tools

# Make stand alone toolchain (Modify platform / arch here)

RUN mkdir=toolchain-arm && \
bash $NDK_ROOT/build/tools/make-standalone-toolchain.sh \
--verbose --platform=android-14 --install-dir=toolchain-arm \
--arch=arm --toolchain=arm-linux-androideabi-4.9 --system=linux-x86_64

ENV TOOLCHAIN /Android/toolchain-arm
ENV SYSROOT $TOOLCHAIN/sysroot
ENV PATH $PATH:$TOOLCHAIN/bin:$SYSROOT/usr/local/bin

# Configure toolchain path

ENV ARCH armv7

ENV CROSS_COMPILE arm-linux-androideabi
ENV CC arm-linux-androideabi-gcc
ENV CXX arm-linux-androideabi-g++
ENV AR arm-linux-androideabi-ar
ENV AS arm-linux-androideabi-as
ENV LD arm-linux-androideabi-ld
ENV RANLIB arm-linux-androideabi-ranlib
ENV NM arm-linux-androideabi-nm
ENV STRIP arm-linux-androideabi-strip
ENV CHOST arm-linux-androideabi

ENV CPPFLAGS -std=c++11

# Download and extract curl

ENV CFLAGS \
-v -DANDROID --sysroot=$SYSROOT -mandroid -march=$ARCH -mfloat-abi=softfp -mfpu=vfp -mthumb 

ENV CPPFLAGS $CPPFLAGS $CFLAGS \
-Wno-psabi -march=armv7-a \
-mfloat-abi=softfp -mfpu=vfp -ffunction-sections \
-funwind-tables -fstack-protector -fno-short-enums \
-DANDROID -Wa,--noexecstack -fno-builtin-memmove \
-std=gnu++0x -O2 -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -std=c++1y -Wall -Wno-psabi -W -D_REENTRANT -fPIE 

ENV LDFLAGS -L${TOOLCHAIN}/include

RUN wget http://curl.haxx.se/download/curl-7.38.0.tar.gz && \
tar -xzf curl-7.38.0.tar.gz
RUN cd curl-7.38.0 && ./configure --host=arm-linux-androideabi \
--enable-shared --disable-static \
--disable-dependency-tracking \
--with-zlib=/Android/zlib --without-ca-bundle --without-ca-path \
--enable-ipv6 --disable-ftp --disable-file --disable-ldap \
--disable-ldaps --disable-rtsp --disable-proxy --disable-dict \
--disable-telnet --disable-tftp --disable-pop3 --disable-imap \
--disable-smtp --disable-gopher --disable-sspi --disable-manual \
--target=arm-linux-androideabi --build=x86_64-unknown-linux-gnu

# Make curl 

{'fraction_non_alphanumeric': 0.13476312419974393, 'fraction_numerical': 0.015364916773367477, 'mean_word_length': 3.88203125, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2309602', 'n_tokens_mistral': 2516, 'n_tokens_neox': 2385, 'n_words': 490}