mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
+abseil.io (#1005)
* +abseil.io * Add tea.xyz/gx/cc: c99 to linux * Added tea.xyz/gx/make --------- Co-authored-by: James Reynolds <magnsuviri@me.com>
This commit is contained in:
parent
cf71174804
commit
4e4d51ed22
2 changed files with 52 additions and 0 deletions
42
projects/abseil.io/package.yml
Normal file
42
projects/abseil.io/package.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
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: '*'
|
||||||
|
|
||||||
|
script: |
|
||||||
|
cmake -S . -B build \
|
||||||
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
|
-DCMAKE_INSTALL_RPATH={{ prefix }}/bla \
|
||||||
|
-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
|
||||||
|
# Remove bad flags in .pc files.
|
||||||
|
# https://github.com/abseil/abseil-cpp/issues/1408
|
||||||
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
|
sed -i '' 's/-Xarch_x86_64 -Xarch_x86_64 -Xarch_arm64 //g' {{ prefix }}/lib/pkgconfig/absl_random_internal_randen_hwaes{_impl,}.pc
|
||||||
|
fi
|
||||||
|
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
script: |
|
||||||
|
ls -l
|
||||||
|
c++ -std=c++17 -I{{ prefix }}/include -L{{ prefix }}/lib -labsl_strings test.cc
|
||||||
|
test "$(./a.out)" = "Joined string: foo-bar-baz\n"
|
10
projects/abseil.io/test.cc
Normal file
10
projects/abseil.io/test.cc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include "absl/strings/str_join.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::vector<std::string> v = {"foo","bar","baz"};
|
||||||
|
std::string s = absl::StrJoin(v, "-");
|
||||||
|
std::cout << "Joined string: " << s << "\\n";
|
||||||
|
}
|
Loading…
Reference in a new issue