aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Polański <michal@polanski.me>2020-10-11 21:55:50 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-10-11 23:16:09 +0000
commit02ac5a21dec5c060c13e87e7bdf80b9003367e4a (patch)
tree2691f04354698ce63d3ebbf2be8677f0871ebd2d
parentcd305991001b994ee174040ab5f7751f3175e1d8 (diff)
downloadalpine_aports-02ac5a21dec5c060c13e87e7bdf80b9003367e4a.tar.bz2
alpine_aports-02ac5a21dec5c060c13e87e7bdf80b9003367e4a.tar.xz
alpine_aports-02ac5a21dec5c060c13e87e7bdf80b9003367e4a.zip
testing/pegtl: new aport
Parsing Expression Grammar Template Library https://github.com/taocpp/PEGTL
-rw-r--r--testing/pegtl/APKBUILD38
-rw-r--r--testing/pegtl/ignore-type-limits-error.patch19
2 files changed, 57 insertions, 0 deletions
diff --git a/testing/pegtl/APKBUILD b/testing/pegtl/APKBUILD
new file mode 100644
index 0000000000..198f76131c
--- /dev/null
+++ b/testing/pegtl/APKBUILD
@@ -0,0 +1,38 @@
1# Contributor: Michał Polański <michal@polanski.me>
2# Maintainer: Michał Polański <michal@polanski.me>
3pkgname=pegtl
4_pkgname=PEGTL
5pkgver=2.8.3
6pkgrel=0
7pkgdesc="Parsing Expression Grammar Template Library"
8url="https://github.com/taocpp/PEGTL"
9license="MIT"
10arch="noarch"
11makedepends="cmake"
12subpackages="$pkgname-doc"
13source="$_pkgname-$pkgver.tar.gz::https://github.com/taocpp/PEGTL/archive/$pkgver.tar.gz
14 ignore-type-limits-error.patch"
15builddir="$srcdir/$_pkgname-$pkgver"
16
17build() {
18 cmake -B build \
19 -DCMAKE_BUILD_TYPE=None \
20 -DCMAKE_INSTALL_PREFIX=/usr \
21 -DPEGTL_INSTALL_DOC_DIR=share/doc/$pkgname \
22 -DPEGTL_INSTALL_CMAKE_DIR=lib/cmake/$pkgname \
23 -DPEGTL_BUILD_TESTS=ON \
24 -DPEGTL_BUILD_EXAMPLES=OFF
25 cmake --build build
26}
27
28check() {
29 cd build
30 ctest
31}
32
33package() {
34 DESTDIR="$pkgdir" cmake --build build --target install
35}
36
37sha512sums="9f7644b86741dfe61716bbc43b2ea0a02cfc21eaf229c47cc71a49e2f08bf2c1ff37d2b2242a1bcf518b1893be6b82c27b0e9010a1b47ef8df87ffd90d280f71 PEGTL-2.8.3.tar.gz
3884676550e7b9e3ccb193cbe37843c6c4a5e9164ea1146d8e1cb9301b567dff255271b9ffcfacc60988bb887b13a63ba4e1b0919162da11f91724e8056671b42e ignore-type-limits-error.patch"
diff --git a/testing/pegtl/ignore-type-limits-error.patch b/testing/pegtl/ignore-type-limits-error.patch
new file mode 100644
index 0000000000..5407c932c5
--- /dev/null
+++ b/testing/pegtl/ignore-type-limits-error.patch
@@ -0,0 +1,19 @@
1Reason: Ignore type-limits error
2Upstream: No
3
4This issue is fixed by upstream in https://github.com/taocpp/PEGTL/commit/a3a292c2ba66bf09b4adc4cee8fcdfb1b1386067,
5but the patch does not apply to current codebase (version 2.8.3).
6
7diff --git a/CMakeLists.txt b/CMakeLists.txt
8index 0fe7e8e7..a3fedc20 100644
9--- a/CMakeLists.txt
10+++ b/CMakeLists.txt
11@@ -7,6 +7,8 @@ set(PEGTL_VERSION "${CMAKE_MATCH_1}")
12
13 project(pegtl VERSION ${PEGTL_VERSION} LANGUAGES CXX)
14
15+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=type-limits")
16+
17 if(${PROJECT_NAME}_FOUND)
18 # Multiple versions of PEGTL can't co-exist
19 if(NOT ${PROJECT_NAME}_VERSION STREQUAL ${PROJECT_VERSION})