summaryrefslogtreecommitdiff
blob: 5f25adf3029b1021e35182ed5383510c278e8616 (plain)
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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

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"

LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~riscv ~x86"
IUSE="test"

RESTRICT="!test? ( test )"

S="${WORKDIR}/PEGTL-${PV}"

PATCHES=(
	"${FILESDIR}/${P}-cmake.patch"
	"${FILESDIR}/${P}-gcc-10.patch" # bug 733678
)

src_configure() {
	local mycmakeargs=(
		-DPEGTL_INSTALL_CMAKE_DIR="$(get_libdir)/cmake/${PN}"
		-DPEGTL_INSTALL_DOC_DIR="share/doc/${PF}"
	)
	cmake_src_configure
}