base: Clean up CMake and ninja source trees.

This commit is contained in:
Matt McCormick 2016-03-02 13:15:41 -05:00
parent ad06c037dd
commit c5cc02a2d8

View File

@ -7,6 +7,7 @@ RUN apt-get update && apt-get -y install \
bash \ bash \
build-essential \ build-essential \
bzip2 \ bzip2 \
ca-certificates \
curl \ curl \
file \ file \
git \ git \
@ -22,24 +23,25 @@ RUN apt-get update && apt-get -y install \
tar \ tar \
vim \ vim \
wget \ wget \
xz-utils xz-utils && \
apt-get -y clean
# Build and install CMake from source. # Build and install CMake from source.
WORKDIR /usr/src WORKDIR /usr/src
RUN git clone git://cmake.org/cmake.git CMake && \ RUN git clone git://cmake.org/cmake.git CMake && \
cd CMake && \ cd CMake && \
git checkout v3.4.3 git checkout v3.4.3 && \
RUN mkdir CMake-build cd .. && mkdir CMake-build && \
WORKDIR /usr/src/CMake-build /usr/src/CMake/bootstrap \
RUN /usr/src/CMake/bootstrap \
--parallel=$(nproc) \ --parallel=$(nproc) \
--prefix=/usr && \ --prefix=/usr && \
make -j$(nproc) && \ make -j$(nproc) && \
./bin/cmake -DCMAKE_USE_SYSTEM_CURL:BOOL=ON \ ./bin/cmake -DCMAKE_USE_SYSTEM_CURL:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_USE_OPENSSL:BOOL=ON . && \ -DCMAKE_USE_OPENSSL:BOOL=ON . && \
make install && \ make install && \
rm -rf * cd .. && \
WORKDIR /usr/src rm -rf CMake*
# Build and install Ninja from source # Build and install Ninja from source
RUN git clone https://github.com/martine/ninja.git && \ RUN git clone https://github.com/martine/ninja.git && \
@ -47,4 +49,5 @@ RUN git clone https://github.com/martine/ninja.git && \
git checkout v1.6.0 && \ git checkout v1.6.0 && \
python ./configure.py --bootstrap && \ python ./configure.py --bootstrap && \
./ninja && \ ./ninja && \
cp ./ninja /usr/bin/ cp ./ninja /usr/bin/ && \
cd .. && rm -rf ninja