Merge pull request #65 from thewtex/build-cmake-with-ssl

Build cmake with ssl
This commit is contained in:
Matt McCormick 2016-11-06 15:20:25 -05:00 committed by GitHub
commit 46e4b18ebf
3 changed files with 22 additions and 15 deletions

View File

@ -5,22 +5,32 @@ RUN git clone "https://github.com/nojhan/liquidprompt.git" && \
COPY imagefiles/.bashrc /root/ COPY imagefiles/.bashrc /root/
WORKDIR /usr/src WORKDIR /usr/src
RUN git clone git://cmake.org/cmake.git CMake && \ RUN wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz && \
tar -xzvf openssl-1.0.2j.tar.gz && \
cd openssl-1.0.2j && \
WRAPPER=$( [ $DEFAULT_DOCKCROSS_IMAGE = "dockcross/manylinux-x86" ] && echo "linux32" || echo "") && \
CONFIG_FLAG=$( [ $DEFAULT_DOCKCROSS_IMAGE = "dockcross/manylinux-x86" ] && echo "-m32" || echo "") && \
${WRAPPER} ./config $CONFIG_FLAG && \
${WRAPPER} make && \
cd .. && \
git clone git://cmake.org/cmake.git CMake && \
cd CMake && \ cd CMake && \
git checkout ab2ae4823c3b60347825da4b851cd4e676f8bed1 && \ git checkout ab2ae4823c3b60347825da4b851cd4e676f8bed1 && \
mkdir /usr/src/CMake-build && \ mkdir /usr/src/CMake-build && \
cd /usr/src/CMake-build && \ cd /usr/src/CMake-build && \
/usr/src/CMake/bootstrap \ ${WRAPPER} /usr/src/CMake/bootstrap \
--parallel=$(grep -c processor /proc/cpuinfo) \ --parallel=$(grep -c processor /proc/cpuinfo) \
--prefix=/usr && \ --prefix=/usr && \
make -j$(grep -c processor /proc/cpuinfo) && \ ${WRAPPER} make -j$(grep -c processor /proc/cpuinfo) && \
./bin/cmake \ ${WRAPPER} ./bin/cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_USE_OPENSSL:BOOL=ON . && \ -DCMAKE_USE_OPENSSL:BOOL=ON \
make install && \ -DOPENSSL_ROOT_DIR:PATH=/usr/src/openssl-1.0.2j \
cd .. && rm -rf CMake* . && \
${WRAPPER} make install && \
cd .. && rm -rf CMake* && rm -rf /usr/src/openssl-1.0.2j
RUN git clone "https://github.com/martine/ninja.git" && \ RUN git clone "https://github.com/ninja-build/ninja.git" && \
cd ninja && \ cd ninja && \
git checkout v1.7.1 && \ git checkout v1.7.1 && \
([ -e /opt/python/cp35-cp35m/bin/python ] && /opt/python/cp35-cp35m/bin/python ./configure.py --bootstrap) || python ./configure.py --bootstrap && \ ([ -e /opt/python/cp35-cp35m/bin/python ] && /opt/python/cp35-cp35m/bin/python ./configure.py --bootstrap) || python ./configure.py --bootstrap && \

View File

@ -1,6 +1,8 @@
FROM quay.io/pypa/manylinux1_x86_64:latest FROM quay.io/pypa/manylinux1_x86_64:latest
MAINTAINER Matt McCormick "matt.mccormick@kitware.com" MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux-x64
#include "common.docker" #include "common.docker"
#include "common.manylinux" #include "common.manylinux"
@ -18,7 +20,6 @@ COPY linux-x64/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop
COPY manylinux-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/ COPY manylinux-x64/Toolchain.cmake ${CROSS_ROOT}/../lib/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux-x64
# Build-time metadata as defined at http://label-schema.org # Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE ARG BUILD_DATE

View File

@ -1,6 +1,8 @@
FROM quay.io/pypa/manylinux1_i686:latest FROM quay.io/pypa/manylinux1_i686:latest
MAINTAINER Matt McCormick "matt.mccormick@kitware.com" MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux-x86
#include "common.docker" #include "common.docker"
#include "common.manylinux" #include "common.manylinux"
@ -18,12 +20,6 @@ COPY linux-x86/${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop
COPY manylinux-x86/Toolchain.cmake ${CROSS_ROOT}/../lib/ COPY manylinux-x86/Toolchain.cmake ${CROSS_ROOT}/../lib/
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/../lib/Toolchain.cmake
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux-x86
RUN curl -O https://cmake.org/files/v3.6/cmake-3.6.2-Linux-i386.tar.gz && \
tar xzf cmake-3.6.2-Linux-i386.tar.gz && \
cp -a cmake-3.6.2-Linux-i386/* /usr/ && \
rm -rf cmake-3.6.2-Linux-i386
COPY linux-x86/linux32-entrypoint.sh /dockcross/ COPY linux-x86/linux32-entrypoint.sh /dockcross/
ENTRYPOINT ["/dockcross/linux32-entrypoint.sh"] ENTRYPOINT ["/dockcross/linux32-entrypoint.sh"]