mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
fix(re2.versions)
This commit is contained in:
parent
a83a5d6a6a
commit
2c05904bf0
1 changed files with 36 additions and 22 deletions
|
@ -1,26 +1,36 @@
|
||||||
distributable:
|
distributable:
|
||||||
url: https://github.com/google/re2/archive/refs/tags/{{version.major}}-0{{version.minor}}-0{{version.patch}}.tar.gz
|
url: https://github.com/google/re2/archive/refs/tags/{{version.tag}}.tar.gz
|
||||||
strip-components: 1
|
strip-components: 1
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
- 2023.3.1 # FIXME: the versions are "yyyy-mm-dd" but no idea how I can parse this without regex
|
github: google/re2
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
abseil.io: ^20240116
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
cmake.org: '*'
|
cmake.org: '*'
|
||||||
script: |
|
script:
|
||||||
|
# escaping. sigh
|
||||||
|
- sed -i
|
||||||
|
-e 's/\$(includedir)#/$(subst +brewing,,$(includedir))#/'
|
||||||
|
-e 's/\$(libdir)#/$(subst +brewing,,\$(libdir))#/'
|
||||||
|
-e "s/sed -i ''/sed -i/g"
|
||||||
|
Makefile
|
||||||
|
|
||||||
# Run this for pkg-config files
|
# Run this for pkg-config files
|
||||||
make common-install prefix={{prefix}}
|
- make common-install prefix={{prefix}}
|
||||||
|
|
||||||
# Build and install static library
|
# Build and install static library
|
||||||
cmake -B build-static $ARGS
|
- cmake -B build-static $ARGS
|
||||||
make --jobs={{ hw.concurrency }} -C build-static
|
- make --jobs={{ hw.concurrency }} -C build-static
|
||||||
make -C build-static install
|
- make -C build-static install
|
||||||
|
|
||||||
# Build and install shared library
|
# Build and install shared library
|
||||||
cmake -B build-shared -DBUILD_SHARED_LIBS=ON $ARGS
|
- cmake -B build-shared -DBUILD_SHARED_LIBS=ON $ARGS
|
||||||
make --jobs={{ hw.concurrency }} -C build-shared
|
- make --jobs={{ hw.concurrency }} -C build-shared
|
||||||
make -C build-shared install
|
- make -C build-shared install
|
||||||
env:
|
env:
|
||||||
ARGS:
|
ARGS:
|
||||||
- -DCMAKE_BUILD_TYPE=Release
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@ -28,7 +38,14 @@ build:
|
||||||
- -DRE2_BUILD_TESTING=OFF
|
- -DRE2_BUILD_TESTING=OFF
|
||||||
|
|
||||||
test:
|
test:
|
||||||
fixture: |
|
dependencies:
|
||||||
|
linux:
|
||||||
|
gnu.org/gcc: '*' # version.h
|
||||||
|
script:
|
||||||
|
- run: c++ -std=c++20 $FIXTURE -lre2 -o test
|
||||||
|
fixture:
|
||||||
|
extname: cpp
|
||||||
|
content: |
|
||||||
#include <re2/re2.h>
|
#include <re2/re2.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
int main() {
|
int main() {
|
||||||
|
@ -36,7 +53,4 @@ test:
|
||||||
assert(RE2::PartialMatch("hello", "e"));
|
assert(RE2::PartialMatch("hello", "e"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
script: |
|
- ./test
|
||||||
mv $FIXTURE test.cpp
|
|
||||||
c++ -std=c++11 test.cpp -lre2 -o test
|
|
||||||
./test
|
|
||||||
|
|
Loading…
Reference in a new issue