2023-04-01 20:38:49 +03:00
|
|
|
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
|
|
|
|
tea.xyz/gx/cc: c99
|
|
|
|
tea.xyz/gx/make: '*'
|
|
|
|
|
2023-08-23 17:28:14 +03:00
|
|
|
script:
|
|
|
|
- |
|
2023-04-01 20:38:49 +03:00
|
|
|
cmake -S . -B build \
|
|
|
|
-DCMAKE_CXX_STANDARD=17 \
|
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
2023-05-25 07:11:59 +03:00
|
|
|
-DCMAKE_INSTALL_RPATH={{ prefix }}/lib \
|
2023-04-01 20:38:49 +03:00
|
|
|
-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
|
2023-08-23 17:28:14 +03:00
|
|
|
- cmake --build build
|
|
|
|
- cmake --install build
|
2023-04-01 20:38:49 +03:00
|
|
|
# Remove bad flags in .pc files.
|
|
|
|
# https://github.com/abseil/abseil-cpp/issues/1408
|
2023-08-23 17:28:14 +03:00
|
|
|
- run: |
|
2023-04-01 20:38:49 +03:00
|
|
|
sed -i '' 's/-Xarch_x86_64 -Xarch_x86_64 -Xarch_arm64 //g' {{ prefix }}/lib/pkgconfig/absl_random_internal_randen_hwaes{_impl,}.pc
|
2023-08-23 17:28:14 +03:00
|
|
|
if: darwin
|
2023-04-01 20:38:49 +03:00
|
|
|
|
2023-08-23 17:28:14 +03:00
|
|
|
- working-directory: "{{prefix}}/lib/cmake/absl"
|
|
|
|
run: |
|
|
|
|
sed -i.bak \
|
|
|
|
-e "s:{{ tea.prefix }}:\$\{CMAKE_CURRENT_LIST_DIR\}/../../../../..:g" \
|
2023-05-08 23:41:50 +03:00
|
|
|
abslTargets{,-release}.cmake
|
2023-08-23 17:28:14 +03:00
|
|
|
rm abslTargets{,-release}.cmake.bak
|
2023-05-08 23:41:50 +03:00
|
|
|
|
2023-04-01 20:38:49 +03:00
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
tea.xyz/gx/cc: c99
|
|
|
|
script: |
|
|
|
|
ls -l
|
2023-08-23 17:28:14 +03:00
|
|
|
c++ -std=c++17 -I{{ prefix }}/include -L{{ prefix }}/lib -labsl_strings test.cc
|
2023-04-01 20:38:49 +03:00
|
|
|
test "$(./a.out)" = "Joined string: foo-bar-baz\n"
|