commit:     33a41dddfc782c86b34b0272aef2541e45a46a1f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun May 25 07:46:08 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 25 08:21:24 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33a41ddd

dev-libs/pegtl: conditionally build tests, add USE=examples

With tests and examples off, there's nothing to build at all.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/pegtl/pegtl-3.2.8-r1.ebuild | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/dev-libs/pegtl/pegtl-3.2.8-r1.ebuild 
b/dev-libs/pegtl/pegtl-3.2.8-r1.ebuild
new file mode 100644
index 000000000000..ca730d96941b
--- /dev/null
+++ b/dev-libs/pegtl/pegtl-3.2.8-r1.ebuild
@@ -0,0 +1,31 @@
+# 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 )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.2.1-werror.patch
+)
+
+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
+}

Reply via email to