pantry/projects/abseil.io/package.yml

43 lines
1.3 KiB
YAML
Raw Normal View History

distributable:
url: https://github.com/abseil/abseil-cpp/archive/refs/tags/{{version.raw}}.tar.gz
strip-components: 1
versions:
github: abseil/abseil-cpp/releases/tags
build:
dependencies:
cmake.org: ^3
script:
- |
cmake -S . -B build \
-DCMAKE_CXX_STANDARD=17 \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_RPATH={{ prefix }}/lib \
-DCMAKE_BINARY_DIR={{ prefix }}/bin \
-DABSL_PROPAGATE_CXX_STD=ON \
-DCMAKE_INSTALL_PREFIX={{ prefix }} \
-DCMAKE_INSTALL_LIBDIR={{ prefix }}/lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-Wno-dev \
-DBUILD_TESTING=OFF
- cmake --build build
- cmake --install build
2024-01-23 00:46:34 +03:00
# Remove bad flags in .pc files.
# https://github.com/abseil/abseil-cpp/issues/1408
2024-01-23 00:46:34 +03:00
- run: sed -i 's/-Xarch_x86_64 -Xarch_x86_64 -Xarch_arm64 //g' *.pc
working-directory: ${{ prefix }}/lib/pkgconfig
if: darwin
2024-01-23 00:46:34 +03:00
- run: sed -i -e "s:{{ pkgx.prefix }}:\$\{CMAKE_CURRENT_LIST_DIR\}/../../../../..:g" abslTargets{,-release}.cmake
working-directory: '{{prefix}}/lib/cmake/absl'
2023-05-08 23:41:50 +03:00
test:
script: |
c++ -std=c++17 -I{{ prefix }}/include -L{{ prefix }}/lib -labsl_strings test.cc
test "$(./a.out)" = "Joined string: foo-bar-baz\n"