-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
meta.yaml
131 lines (117 loc) · 4.09 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{% set version = "2023-06-02" %}
{% set dotversion = version.replace('-', '.') %}
# see https://github.com/google/re2/blob/2023-06-01/CMakeLists.txt#L32-L34
# changes more rarely than version
{% set soversion = "11" %}
package:
name: re2-split
version: {{ dotversion }}
source:
url: http://github.com/google/re2/archive/{{ version }}.tar.gz
sha256: 4ccdd5aafaa1bcc24181e6dd3581c3eee0354734bb9f3cb4306273ffa434b94f
build:
number: 0
detect_binary_files_with_prefix: true
requirements:
build:
- cmake
- ninja
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- libabseil
# only for build testing; these don't have run-exports
- benchmark # [build_platform == target_platform]
- gtest # [build_platform == target_platform]
outputs:
# re2 has a rarely-changing SOVERSION, and it's enough to depend on
# (and run-export) the output that contains the library artefact
- name: re2
script: install.sh # [unix]
script: install.bat # [win]
build:
run_exports:
- {{ pin_subpackage("libre2-" ~ soversion) }}
# by adding this run-export, we avoid that different libre2-{X,Y} builds
# can be co-installed, because they then depend on different re2-versions
# (see below), and each re2 in turn requires a specific soversion.
- re2
requirements:
build:
- cmake
host:
- {{ pin_subpackage("libre2-" ~ soversion, exact=True) }}
run:
- {{ pin_subpackage("libre2-" ~ soversion, exact=True) }}
test:
requires:
- {{ compiler('cxx') }}
- cmake
- ninja
- pkg-config
files:
- cmake_test/
commands:
# presence of shared libs (unix) & import lib (win)
- test -f ${PREFIX}/lib/libre2.so # [linux]
- test -f ${PREFIX}/lib/libre2.dylib # [osx]
- if not exist %LIBRARY_LIB%\re2.lib exit 1 # [win]
# absence of static libs
- test ! -f ${PREFIX}/lib/libre2.a # [unix]
- if exist %LIBRARY_LIB%\re2_static.lib exit 1 # [win]
# presence of header
- test -f ${PREFIX}/include/re2/re2.h # [unix]
- if not exist %LIBRARY_INC%\re2\re2.h exit 1 # [win]
# test correctness of pkg-config metadata
- pkg-config --print-errors --exact-version "{{ soversion }}.0.0" re2
# CMake integration
- cd cmake_test
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 .
- cmake --build .
- ./re2_example # [unix]
- re2_example.exe # [win]
# the versioned library artefact
- name: libre2-{{ soversion }}
script: install.sh # [unix]
script: install.bat # [win]
build:
run_exports:
- {{ pin_subpackage("libre2-" ~ soversion) }}
requirements:
build:
# for strong run-exports
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- libabseil
run_constrained:
# this ensures that libre2-{X,Y} cannot be co-installed, see above
- re2 {{ dotversion }}.*
test:
commands:
# presence of versioned shared lib (unix) & plain dll (win)
- test -f ${PREFIX}/lib/libre2.so.{{ soversion }} # [linux]
- test -f ${PREFIX}/lib/libre2.{{ soversion }}.dylib # [osx]
- if not exist %LIBRARY_BIN%\re2.dll exit 1 # [win]
# absence of unversioned shared lib (unix) & import lib (win)
- test ! -f ${PREFIX}/lib/libre2.so # [linux]
- test ! -f ${PREFIX}/lib/libre2.dylib # [osx]
- if exist %LIBRARY_LIB%\re2.lib exit 1 # [win]
about:
home: https://github.com/google/re2/
license: BSD-3-Clause
license_file: LICENSE
summary: |
RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression
engines like those used in PCRE, Perl, and Python. It is a C++ library.
dev_url: https://github.com/google/re2/
extra:
recipe-maintainers:
- h-vetinari
- scopatz
- isuruf
- wesm
- xhochy
- kszucs
- pitrou
feedstock-name: re2