Skip to content

Commit

Permalink
Merge pull request #743 from mapbox/cmake-3.21.2
Browse files Browse the repository at this point in the history
Cmake 3.21.2
  • Loading branch information
artemp authored Sep 3, 2021
2 parents 704f706 + a8085e4 commit c1d8adf
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 4 deletions.
15 changes: 15 additions & 0 deletions scripts/cmake/3.21.2/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: generic

matrix:
include:
- os: osx
osx_image: xcode11.6
- os: linux
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'libstdc++-6-dev' ]

script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
55 changes: 55 additions & 0 deletions scripts/cmake/3.21.2/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash

MASON_NAME=cmake
MASON_VERSION=3.21.2
MASON_LIB_FILE=bin/cmake

. ${MASON_DIR}/mason.sh

function mason_load_source {
mason_download \
https://github.com/Kitware/CMake/releases/download/v${MASON_VERSION}/cmake-${MASON_VERSION}.tar.gz \
e41de8fab437ea46c8c8668a2920a5cf53f2915d

mason_extract_tar_gz

export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION}
}

function mason_prepare_compile {
${MASON_DIR}/mason install ccache 3.7.2
export PATH=$(${MASON_DIR}/mason prefix ccache 3.7.2)/bin:${PATH}
}
function mason_compile {
# Add optimization flags since CFLAGS overrides the default (-g -O2)
export CFLAGS="${CFLAGS} -O3 -DNDEBUG"
export CXXFLAGS="${CXXFLAGS} -O3 -DNDEBUG"
# TODO - use mason deps
./configure --prefix=${MASON_PREFIX} \
--no-system-libs \
--parallel=${MASON_CONCURRENCY} \
--enable-ccache
make -j${MASON_CONCURRENCY} VERBOSE=1
make install
# remove non-essential things to save on package size
rm -f ${MASON_PREFIX}/bin/ccmake
rm -f ${MASON_PREFIX}/bin/cmakexbuild
rm -f ${MASON_PREFIX}/bin/cpack
rm -f ${MASON_PREFIX}/bin/ctest
rm -rf ${MASON_PREFIX}/share/cmake-*/Help
ls -lh ${MASON_PREFIX}/bin/
}

function mason_cflags {
:
}

function mason_ldflags {
:
}

function mason_clean {
make clean
}

mason_run "$@"
2 changes: 1 addition & 1 deletion scripts/freetype/2.5.4/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MASON_PKGCONFIG_FILE=lib/pkgconfig/freetype2.pc

function mason_load_source {
mason_download \
https://nongnu.askapache.com/freetype/freetype-${MASON_VERSION}.tar.bz2 \
https://nongnu.askapache.com/freetype/freetype-old/freetype-${MASON_VERSION}.tar.bz2 \
0646f7e62a6191affe92270e2544e6011f5227e8

mason_extract_tar_bz2
Expand Down
2 changes: 1 addition & 1 deletion scripts/freetype/2.5.5/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MASON_PKGCONFIG_FILE=lib/pkgconfig/freetype2.pc

function mason_load_source {
mason_download \
https://nongnu.askapache.com/freetype/freetype-${MASON_VERSION}.tar.bz2 \
https://nongnu.askapache.com/freetype/freetype-old/freetype-${MASON_VERSION}.tar.bz2 \
c857bfa638b9c71e48baacd1cb12be446b62c333

mason_extract_tar_bz2
Expand Down
2 changes: 1 addition & 1 deletion scripts/freetype/2.6.5/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MASON_PKGCONFIG_FILE=lib/pkgconfig/freetype2.pc

function mason_load_source {
mason_download \
https://nongnu.askapache.com/freetype/freetype-${MASON_VERSION}.tar.bz2 \
https://nongnu.askapache.com/freetype/freetype-old/freetype-${MASON_VERSION}.tar.bz2 \
24dd30c95d3795cb3d82a760b9858992de262630

mason_extract_tar_bz2
Expand Down
2 changes: 1 addition & 1 deletion scripts/freetype/2.6/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MASON_PKGCONFIG_FILE=lib/pkgconfig/freetype2.pc

function mason_load_source {
mason_download \
https://nongnu.askapache.com/freetype/freetype-${MASON_VERSION}.tar.bz2 \
https://nongnu.askapache.com/freetype/freetype-old/freetype-${MASON_VERSION}.tar.bz2 \
3cdf364b5db1c1adba670b188d76035ecba2d77c

mason_extract_tar_bz2
Expand Down

0 comments on commit c1d8adf

Please sign in to comment.