diff --git a/Compiler/gtest/build b/Compiler/gtest/build index 5f5362f..41fcd97 100755 --- a/Compiler/gtest/build +++ b/Compiler/gtest/build @@ -1,44 +1,32 @@ #!/usr/bin/env modbuild -pbuild::set_download_url "https://github.com/google/googletest/archive/release-1.7.0.tar.gz" - -declare -a config_args=() - -case "${OS}" in -Darwin ) - #config_args+=( '-DCMAKE_OSX_SYSROOT=/' ) - #config_args+=( "-DCMAKE_OSX_DEPLOYMENT_TARGET=''" ) - ;; -esac - -pbuild::install_docfiles \ - CHANGES \ - CONTRIBUTORS \ - LICENSE \ - README - -pbuild::configure() { - cmake \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ - -DCMAKE_BUILD_TYPE=RELEASE \ - "${config_args[@]}" \ - "${SRC_DIR}" -} - -pbuild::install() { - local -r _include_srcdir="${SRC_DIR}/include/gtest" - local -r _include_dstdir="${PREFIX}/include/gtest" - if [[ -e "${_include_dstdir}" ]]; then - chmod -R u+w "${_include_dstdir}" - fi - mkdir -p "${_include_dstdir}" - cp -rv "${_include_srcdir}"/* "${_include_dstdir}" - - local -r _lib_dstdir="${PREFIX}/lib" - mkdir -p "${_lib_dstdir}" - cp -v *.a "${_lib_dstdir}" -} - +pbuild::set_download_url "https://github.com/google/googletest/archive/release-1.8.1.tar.gz" pbuild::add_to_group 'Compiler' -pbuild::make_all + +if (( V_MAJOR == 1 )) && (( V_MINOR <= 7 )); then + pbuild::install_docfiles \ + CHANGES \ + CONTRIBUTORS \ + LICENSE \ + README + + pbuild::install() { + local -r _include_srcdir="${SRC_DIR}/include/gtest" + local -r _include_dstdir="${PREFIX}/include/gtest" + if [[ -e "${_include_dstdir}" ]]; then + chmod -R u+w "${_include_dstdir}" + fi + mkdir -p "${_include_dstdir}" + cp -rv "${_include_srcdir}"/* "${_include_dstdir}" + + local -r _lib_dstdir="${PREFIX}/lib" + mkdir -p "${_lib_dstdir}" + cp -v *.a "${_lib_dstdir}" + } +else + pbuild::install_docfiles \ + CONTRIBUTING.md \ + LICENSE \ + README.md +fi diff --git a/Compiler/gtest/files/variants.macos10.14 b/Compiler/gtest/files/variants.macos10.14 new file mode 100644 index 0000000..abd8d56 --- /dev/null +++ b/Compiler/gtest/files/variants.macos10.14 @@ -0,0 +1,2 @@ +gtest/1.7.0 stable gcc/{5.4.0,5.5.0,6.4.0,7.3.0,7.4.0} b:cmake/3.10.3 +gtest/1.7.0 stable clang-macos/9.0.0 b:cmake/3.10.3 diff --git a/Compiler/gtest/files/variants.rhel6 b/Compiler/gtest/files/variants.rhel6 index f90a728..639fb93 100644 --- a/Compiler/gtest/files/variants.rhel6 +++ b/Compiler/gtest/files/variants.rhel6 @@ -1,5 +1,2 @@ -gtest/1.7.0 stable b:cmake b:gcc/5.4.0 -gtest/1.7.0 stable b:cmake b:gcc/5.5.0 -gtest/1.7.0 stable b:cmake b:gcc/6.4.0 -gtest/1.7.0 stable b:cmake b:gcc/7.3.0 -gtest/1.7.0 stable b:cmake b:clang-macos/9.0.0 +gtest/1.7.0 stable gcc/{5.4.0,6.4.0,7.3.0,7.4.0} b:cmake/3.10.3 +gtest/1.8.1 stable gcc/{5.5.0,6.4.0,7.4.0,8.3.0,9.2.0} b:cmake/3.10.3