dev-perl/perl-headers: Added at 0.0.1
authorKent Fredric <kentnl@gentoo.org>
Sun, 11 Sep 2016 21:16:07 +0000 (09:16 +1200)
committerKent Fredric <kentnl@gentoo.org>
Sun, 11 Sep 2016 23:21:47 +0000 (11:21 +1200)
This is some work to restore the logic that was previously
shipped with dev-lang/perl before 5.24 and was trimmed
for lack of evidence of use, and the conflating design issues
that manifested from being installed during pkg_postinst

This should be at least as good as that, if not better.

Package-Manager: portage-2.3.0

dev-perl/perl-headers/Manifest [new file with mode: 0644]
dev-perl/perl-headers/files/README.gentoo [new file with mode: 0644]
dev-perl/perl-headers/metadata.xml [new file with mode: 0644]
dev-perl/perl-headers/perl-headers-0.0.1.ebuild [new file with mode: 0644]

diff --git a/dev-perl/perl-headers/Manifest b/dev-perl/perl-headers/Manifest
new file mode 100644 (file)
index 0000000..cc5cd1d
--- /dev/null
@@ -0,0 +1 @@
+DIST perl-headers-0.0.1.tar.gz 2141 SHA256 57ed0b2a90c0ede060e696dd18ad21d03bd36e430b774e02422975d7e5925953 SHA512 a9a44a957d863c6d99c0facb324a32e3fee55ec50e34481dbe37c09f6afe103b0cae234ca83d4d591a01d1e620d262b0e9beae53001db1fdde885f9a57234c7f WHIRLPOOL df5823605dc326ce7880530384d67bbe0a496b629b4618526b5f712be1ceabd65c223618937a080cc15fed0e712cb8e0f2ccccc93bb15bd48b7036e8f6556507
diff --git a/dev-perl/perl-headers/files/README.gentoo b/dev-perl/perl-headers/files/README.gentoo
new file mode 100644 (file)
index 0000000..5bbe5dc
--- /dev/null
@@ -0,0 +1,23 @@
+This package contains .ph files that are mostly generated by the perl h2ph
+command by inspecting existing .h files on your system.
+
+Due to the nature of these files, they are likely to be incomplete, and many
+of them may not even load in Perl, and many things that rely on C intrinsics
+like "sizeof" or macro expansion may be very broken.
+
+It is strongly recommended you build this package with:
+
+  USE="debug sizeof-warning"
+
+As this will give better context when things break, and will at least notify
+you when some constant relies on a missing "sizeof" entry ( and where ).
+
+Missing "sizeof" entries and broken constants need a lot of love, so please
+file bugs at https://github.com/gentoo-perl/perl-headers/issues ( or on
+gentoo bugzilla ) if you find anything that you know how to fix.
+
+However, the logic is kinda broken in a lot of places, and there's not a lot
+that can be done about it as we're reliant on the vernerable quality of h2ph,
+and this package is provided mostly as a kindness to people who need it, and
+were already relying on the equivalent logic that we shipped with perl itself
+prior to 5.24 ( where it was horribly broken and nobody really noticed )
diff --git a/dev-perl/perl-headers/metadata.xml b/dev-perl/perl-headers/metadata.xml
new file mode 100644 (file)
index 0000000..fc800cc
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>perl@gentoo.org</email>
+    <name>Gentoo Perl Project</name>
+  </maintainer>
+  <use>
+         <flag name="debug">Add source locations in generated .ph files to assist with debugging when errors occur</flag>
+         <flag name="sizeof-warning">Include logic to warn when a .ph file tries to use a sizeof() that is unknown</flag>
+  </use>
+</pkgmetadata>
diff --git a/dev-perl/perl-headers/perl-headers-0.0.1.ebuild b/dev-perl/perl-headers/perl-headers-0.0.1.ebuild
new file mode 100644 (file)
index 0000000..f1659c0
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+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/${PN}"
+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:="
+DEPEND="${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
+}