]> Netolish git repositories - gentoo-repo.git/commitdiff
Bum new version of pegtl library.
authorJiří Netolický <netolicky@epos.cd.cz>
Mon, 8 Jun 2026 07:17:44 +0000 (09:17 +0200)
committerJiří Netolický <netolicky@epos.cd.cz>
Mon, 8 Jun 2026 07:17:44 +0000 (09:17 +0200)
dev-libs/pegtl/Manifest [new file with mode: 0644]
dev-libs/pegtl/files/pegtl-3.2.1-werror.patch [new file with mode: 0644]
dev-libs/pegtl/metadata.xml [new file with mode: 0644]
dev-libs/pegtl/pegtl-4.0.0.ebuild [new file with mode: 0644]

diff --git a/dev-libs/pegtl/Manifest b/dev-libs/pegtl/Manifest
new file mode 100644 (file)
index 0000000..b22fbb4
--- /dev/null
@@ -0,0 +1 @@
+DIST pegtl-4.0.0.tar.gz 384315 BLAKE2B 5f37b86b0ea6836acca23c4d72200d25df7fcd69b04056fc2144da66b782234eb67acbcbd147a13fc87ce0bcbff8bd55b04d50ccc391dc015e42e33d44bc1e1c SHA512 cb232dd823c74526ef4e9cd13cdb78fc924ae0e14c4378eb00f39b35f441919ed849386162f17a27783fc4ac3605163590aef64e15edb1f2d37247f05f5c58d8
diff --git a/dev-libs/pegtl/files/pegtl-3.2.1-werror.patch b/dev-libs/pegtl/files/pegtl-3.2.1-werror.patch
new file mode 100644 (file)
index 0000000..776936b
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@ endif
+ # changed if desired.
+ CPPFLAGS ?= -pedantic
+-CXXFLAGS ?= -Wall -Wextra -Wshadow -Werror -O3 $(MINGW_CXXFLAGS)
++CXXFLAGS ?= -Wall -Wextra -Wshadow $(MINGW_CXXFLAGS)
+ HEADERS := $(shell find include -name '*.hpp')
+ SOURCES := $(shell find src -name '*.cpp')
+--- a/src/example/pegtl/CMakeLists.txt
++++ b/src/example/pegtl/CMakeLists.txt
+@@ -60,7 +60,7 @@ foreach(examplesourcefile ${example_sources})
+   if(MSVC)
+     target_compile_options(${exename} PRIVATE /W4 /WX /utf-8)
+   else()
+-    target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow -Werror)
++    target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow )
+   endif()
+ endforeach()
+--- a/src/test/pegtl/CMakeLists.txt
++++ b/src/test/pegtl/CMakeLists.txt
+@@ -150,7 +150,7 @@ foreach(testsourcefile ${test_sources})
+   if(MSVC)
+     target_compile_options(${exename} PRIVATE /W4 /WX /utf-8)
+   else()
+-    target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow -Werror)
++    target_compile_options(${exename} PRIVATE -pedantic -Wall -Wextra -Wshadow )
+   endif()
+   if(ANDROID)
+     add_test(NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} "-DANDROID_NDK=${ANDROID_NDK}" "-DTEST_RESOURCES_DIR=${CMAKE_SOURCE_DIR}" "-DTEST_RESOURCES=src/test/pegtl/data;src/test/pegtl/file_data.txt;Makefile" "-DUNITTEST=${exename}" -P ${CMAKE_CURRENT_SOURCE_DIR}/ExecuteOnAndroid.cmake)
diff --git a/dev-libs/pegtl/metadata.xml b/dev-libs/pegtl/metadata.xml
new file mode 100644 (file)
index 0000000..ec7e0b2
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="project">
+               <email>sci@gentoo.org</email>
+               <name>Gentoo Science Project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">taocpp/PEGTL</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/dev-libs/pegtl/pegtl-4.0.0.ebuild b/dev-libs/pegtl/pegtl-4.0.0.ebuild
new file mode 100644 (file)
index 0000000..64da5a9
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Header-only library for creating parsers according to Parsing Expression Grammar"
+HOMEPAGE="https://github.com/taocpp/PEGTL"
+SRC_URI="https://github.com/taocpp/PEGTL/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${P^^}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~riscv ~x86"
+IUSE="examples test"
+RESTRICT="!test? ( test )"
+
+src_configure() {
+       local mycmakeargs=(
+               -DPEGTL_BUILD_EXAMPLES=$(usex examples)
+               -DPEGTL_BUILD_TESTS=$(usex test)
+               -DPEGTL_INSTALL_CMAKE_DIR="$(get_libdir)/cmake/${PN}"
+               -DPEGTL_INSTALL_DOC_DIR="share/doc/${PF}"
+       )
+       cmake_src_configure
+}