Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/pegtl/, dev-libs/pegtl/files/
Date: Mon, 08 Feb 2021 13:39:06
Message-Id: 1612791513.993785709e60121bbd41f2265f3413d2037aaba6.sping@gentoo
1 commit: 993785709e60121bbd41f2265f3413d2037aaba6
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 8 13:29:05 2021 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 8 13:38:33 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99378570
7
8 dev-libs/pegtl: Undelete pegtl-2.8.3-r1 for sys-apps/usbguard
9
10 Bug: https://bugs.gentoo.org/767469
11 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
12 Package-Manager: Portage-3.0.14, Repoman-3.0.2
13
14 dev-libs/pegtl/Manifest | 1 +
15 dev-libs/pegtl/files/pegtl-2.8.3-cmake.patch | 29 ++++++++++++++++++
16 dev-libs/pegtl/files/pegtl-2.8.3-gcc-10.patch | 43 +++++++++++++++++++++++++++
17 dev-libs/pegtl/pegtl-2.8.3-r1.ebuild | 32 ++++++++++++++++++++
18 4 files changed, 105 insertions(+)
19
20 diff --git a/dev-libs/pegtl/Manifest b/dev-libs/pegtl/Manifest
21 index a37630ae7dd..11b322f3689 100644
22 --- a/dev-libs/pegtl/Manifest
23 +++ b/dev-libs/pegtl/Manifest
24 @@ -1 +1,2 @@
25 +DIST pegtl-2.8.3.tar.gz 201531 BLAKE2B 093d1b5f7d1f95fa00abdae9c24d24ba9ffd8510d6512c3460374f19b12d50403c19301645c5f6fc4d697cc687079c5b0d23c32b5775b30fbf05a154aeec2c19 SHA512 9f7644b86741dfe61716bbc43b2ea0a02cfc21eaf229c47cc71a49e2f08bf2c1ff37d2b2242a1bcf518b1893be6b82c27b0e9010a1b47ef8df87ffd90d280f71
26 DIST pegtl-3.2.0.tar.gz 233138 BLAKE2B 9be2cfcd90249fd57e08944533cb336f0617957c5571ef3d5371aa6da756a350ccb192b6e4e35da22b7b4e88b07e42f54eb5296c496a6b0feb544269a490f928 SHA512 3ec457e37d87d95f3a89c550abbf611a1ce094c2f05f6d23086e70079a9cabddb4c75e9121e764ad1768845a39e62ab49ca658ffed0f09d0e9a0e36501a162ae
27
28 diff --git a/dev-libs/pegtl/files/pegtl-2.8.3-cmake.patch b/dev-libs/pegtl/files/pegtl-2.8.3-cmake.patch
29 new file mode 100644
30 index 00000000000..140e1f5cfbb
31 --- /dev/null
32 +++ b/dev-libs/pegtl/files/pegtl-2.8.3-cmake.patch
33 @@ -0,0 +1,29 @@
34 +--- a/CMakeLists.txt 2020-04-22 19:43:00.000000000 +0200
35 ++++ b/CMakeLists.txt 2020-12-27 00:00:15.886046938 +0100
36 +@@ -78,4 +78,3 @@
37 +
38 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pegtl-config-version.cmake DESTINATION ${PEGTL_INSTALL_CMAKE_DIR})
39 + install(DIRECTORY include/ DESTINATION ${PEGTL_INSTALL_INCLUDE_DIR})
40 +-install(FILES LICENSE DESTINATION ${PEGTL_INSTALL_DOC_DIR})
41 +--- a/src/test/pegtl/CMakeLists.txt 2020-04-22 19:43:00.000000000 +0200
42 ++++ b/src/test/pegtl/CMakeLists.txt 2020-12-27 00:07:19.122766830 +0100
43 +@@ -123,7 +123,7 @@
44 + if(MSVC)
45 + target_compile_options(${exename} PRIVATE /W4 /WX /utf-8)
46 + else()
47 +- target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow -Werror)
48 ++ target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow)
49 + endif()
50 + if(ANDROID)
51 + add_test(NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../.. COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} "-DTEST_RESOURCES=src/test/pegtl/data;src/test/pegtl/file_data.txt;Makefile" -DTEST_RESOURCES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/../../.. -DUNITTEST=${CMAKE_CURRENT_BINARY_DIR}/${exename} -DTEST_PARAMETER=-all -P ${CMAKE_CURRENT_SOURCE_DIR}/ExecuteOnAndroid.cmake)
52 +--- a/src/example/pegtl/CMakeLists.txt 2020-04-22 19:43:00.000000000 +0200
53 ++++ b/src/example/pegtl/CMakeLists.txt 2020-12-27 00:07:32.970832890 +0100
54 +@@ -48,7 +48,7 @@
55 + if(MSVC)
56 + target_compile_options(${exename} PRIVATE /W4 /WX /utf-8)
57 + else()
58 +- target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow -Werror)
59 ++ target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow)
60 + endif()
61 + endforeach(examplesourcefile)
62 +
63
64 diff --git a/dev-libs/pegtl/files/pegtl-2.8.3-gcc-10.patch b/dev-libs/pegtl/files/pegtl-2.8.3-gcc-10.patch
65 new file mode 100644
66 index 00000000000..ef418e44254
67 --- /dev/null
68 +++ b/dev-libs/pegtl/files/pegtl-2.8.3-gcc-10.patch
69 @@ -0,0 +1,43 @@
70 +From a3a292c2ba66bf09b4adc4cee8fcdfb1b1386067 Mon Sep 17 00:00:00 2001
71 +From: Daniel Frey <d.frey@×××.de>
72 +Date: Mon, 11 May 2020 22:19:31 +0200
73 +Subject: [PATCH] Repair warning from GCC 10
74 +
75 +* Backported patch thx to Fedora.
76 +
77 +---
78 + include/tao/pegtl/contrib/rep_one_min_max.hpp | 21 +++++++++++++++++++
79 + 1 file changed, 21 insertions(+)
80 +
81 +diff --git a/include/tao/pegtl/contrib/rep_one_min_max.hpp b/include/tao/pegtl/contrib/rep_one_min_max.hpp
82 +index 7ec4639e..ee0a3782 100644
83 +--- a/include/tao/pegtl/contrib/rep_one_min_max.hpp
84 ++++ b/include/tao/pegtl/contrib/rep_one_min_max.hpp
85 +@@ -45,6 +45,27 @@ namespace tao
86 + }
87 + };
88 +
89 ++ template< unsigned Max, char C >
90 ++ struct rep_one_min_max< 0, Max, C >
91 ++ {
92 ++ using analyze_t = analysis::counted< analysis::rule_type::any, 0 >;
93 ++
94 ++ template< typename Input >
95 ++ static bool match( Input& in )
96 ++ {
97 ++ const auto size = in.size( Max + 1 );
98 ++ std::size_t i = 0;
99 ++ while( ( i < size ) && ( in.peek_char( i ) == C ) ) {
100 ++ ++i;
101 ++ }
102 ++ if( i <= Max ) {
103 ++ bump_help< result_on_found::success, Input, char, C >( in, i );
104 ++ return true;
105 ++ }
106 ++ return false;
107 ++ }
108 ++ };
109 ++
110 + template< unsigned Min, unsigned Max, char C >
111 + inline constexpr bool enable_control< rep_one_min_max< Min, Max, C > > = false;
112 +
113
114 diff --git a/dev-libs/pegtl/pegtl-2.8.3-r1.ebuild b/dev-libs/pegtl/pegtl-2.8.3-r1.ebuild
115 new file mode 100644
116 index 00000000000..207b474188a
117 --- /dev/null
118 +++ b/dev-libs/pegtl/pegtl-2.8.3-r1.ebuild
119 @@ -0,0 +1,32 @@
120 +# Copyright 1999-2021 Gentoo Authors
121 +# Distributed under the terms of the GNU General Public License v2
122 +
123 +EAPI=7
124 +
125 +inherit cmake
126 +
127 +DESCRIPTION="Header-only library for creating parsers according to Parsing Expression Grammar"
128 +HOMEPAGE="https://github.com/taocpp/PEGTL"
129 +SRC_URI="https://github.com/taocpp/PEGTL/archive/${PV}.tar.gz -> ${P}.tar.gz"
130 +
131 +LICENSE="MIT"
132 +SLOT="0"
133 +KEYWORDS="~amd64 ~arm ~x86"
134 +IUSE="test"
135 +
136 +RESTRICT="!test? ( test )"
137 +
138 +S="${WORKDIR}/PEGTL-${PV}"
139 +
140 +PATCHES=(
141 + "${FILESDIR}/${P}-cmake.patch"
142 + "${FILESDIR}/${P}-gcc-10.patch" # bug 733678
143 +)
144 +
145 +src_configure() {
146 + local mycmakeargs=(
147 + -DPEGTL_INSTALL_CMAKE_DIR="$(get_libdir)/cmake/${PN}"
148 + -DPEGTL_INSTALL_DOC_DIR="share/doc/${PF}"
149 + )
150 + cmake_src_configure
151 +}