mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 09:55:06 +03:00
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
distributable:
|
|
url: https://github.com/google/re2/archive/refs/tags/{{version.major}}-0{{version.minor}}-0{{version.patch}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
- 2023.3.1 # FIXME: the versions are "yyyy-mm-dd" but no idea how I can parse this without regex
|
|
|
|
build:
|
|
dependencies:
|
|
cmake.org: '*'
|
|
tea.xyz/gx/cc: c99
|
|
tea.xyz/gx/make: '*'
|
|
script: |
|
|
# Run this for pkg-config files
|
|
make common-install prefix={{prefix}}
|
|
|
|
# Build and install static library
|
|
cmake -B build-static $ARGS
|
|
make --jobs={{ hw.concurrency }} -C build-static
|
|
make -C build-static install
|
|
|
|
# Build and install shared library
|
|
cmake -B build-shared -DBUILD_SHARED_LIBS=ON $ARGS
|
|
make --jobs={{ hw.concurrency }} -C build-shared
|
|
make -C build-shared install
|
|
env:
|
|
ARGS:
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
|
- -DRE2_BUILD_TESTING=OFF
|
|
|
|
test:
|
|
dependencies:
|
|
tea.xyz/gx/cc: c99
|
|
fixture: |
|
|
#include <re2/re2.h>
|
|
#include <assert.h>
|
|
int main() {
|
|
assert(!RE2::FullMatch("hello", "e"));
|
|
assert(RE2::PartialMatch("hello", "e"));
|
|
return 0;
|
|
}
|
|
script: |
|
|
mv $FIXTURE test.cpp
|
|
c++ -std=c++11 test.cpp -lre2 -o test
|
|
./test
|