summaryrefslogtreecommitdiff
blob: 82dc37389170446031584ebaf8416aa6ded61765 (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
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit perl-functions flag-o-matic readme.gentoo-r1

MY_GITV="${PV}"

DESCRIPTION="Generated .ph equivalents of system headers"
HOMEPAGE="https://github.com/gentoo-perl/perl-headers"
SRC_URI="https://github.com/gentoo-perl/${PN}/archive/${MY_GITV}.tar.gz -> ${PN}-${MY_GITV}.tar.gz"

LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+debug +sizeof-warning"

RDEPEND="dev-lang/perl:="
BDEPEND="${RDEPEND}
	sys-kernel/linux-headers
"

S="${WORKDIR}/${PN}-${MY_GITV}"

src_compile() {
	use sizeof-warning && append-cppflags "-DSIZEOF_WARNING=1"
	emake H2PHARGS="$(usex debug " -h" "")"
}

src_install() {
	readme.gentoo_create_doc
	perl_set_version
	insinto "${ARCH_LIB}"
	doins -r "${S}/headers/"*
	doins -r "${S}/appended/"*

}

pkg_postinst() {
	readme.gentoo_print_elog
}