dev-perl/Convert-UUlib: Add IUSE="system-uulib" and disable unbundling
authorKent Fredric <kentnl@gentoo.org>
Sat, 9 Jul 2016 15:21:31 +0000 (03:21 +1200)
committerKent Fredric <kentnl@gentoo.org>
Fri, 15 Jul 2016 11:15:12 +0000 (23:15 +1200)
Gentoo's uulib implementation and the bundled version differ in some way,
making Gentoo's version less stable, causing mislinked .so files as seen
in bug #559930

This pragmatic solution just defers this problem to the user so those who
care about system purity can do that at their own cost, while making the
default workflow both Work(tm) and Work as Upstream Intended.

R1-bump required as it is expected people who have existing installations
and did not run tests will have a broken installation, which can be
confirmed by running:

  /usr/bin/perl -MConvert::UUlib=:all \
    -e'SetFNameFilter(sub {});FNameFilter(1);SetFNameFilter()'

Bug: https://bugs.gentoo.org/559930

Package-Manager: portage-2.3.0
RepoMan-Options: --ignore-arches --include-arches="alpha amd64 amd64-fbsd arm arm64 hppa ia64 m68k mips nios2 ppc ppc64 riscv s390 sh sparc sparc-fbsd x86 x86-fbsd"

dev-perl/Convert-UUlib/Convert-UUlib-1.500.0-r1.ebuild [new file with mode: 0644]
dev-perl/Convert-UUlib/Convert-UUlib-1.500.0.ebuild [deleted file]
dev-perl/Convert-UUlib/metadata.xml

diff --git a/dev-perl/Convert-UUlib/Convert-UUlib-1.500.0-r1.ebuild b/dev-perl/Convert-UUlib/Convert-UUlib-1.500.0-r1.ebuild
new file mode 100644 (file)
index 0000000..525945a
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MODULE_AUTHOR=MLEHMANN
+MODULE_VERSION=1.5
+inherit perl-module
+
+DESCRIPTION="A Perl interface to the uulib library"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="system-uulib test"
+
+RDEPEND="
+       system-uulib? ( >=dev-libs/uulib-0.5.20-r1 )
+"
+DEPEND="${RDEPEND}
+       >=virtual/perl-ExtUtils-MakeMaker-6.520.0
+       dev-perl/Canary-Stability
+"
+
+SRC_TEST="do parallel"
+
+src_prepare() {
+       if use system-uulib; then
+               epatch "${FILESDIR}/${P}-unbundle.patch"
+               ewarn "Building with USE=system-uulib known to be problematic and cause"
+               ewarn " Convert::UUlib to segfault when used. ( Bug #559930 )"
+               use test || ewarn "use of FEATURES=test strongly recommended";
+       fi
+       perl-module_src_prepare
+}
diff --git a/dev-perl/Convert-UUlib/Convert-UUlib-1.500.0.ebuild b/dev-perl/Convert-UUlib/Convert-UUlib-1.500.0.ebuild
deleted file mode 100644 (file)
index 9b64ae7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MODULE_AUTHOR=MLEHMANN
-MODULE_VERSION=1.5
-inherit perl-module
-
-DESCRIPTION="A Perl interface to the uulib library"
-
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE=""
-
-PATCHES=( "${FILESDIR}/${P}-unbundle.patch" )
-
-RDEPEND="
-       >=dev-libs/uulib-0.5.20-r1
-"
-DEPEND="${RDEPEND}
-       >=virtual/perl-ExtUtils-MakeMaker-6.520.0
-       dev-perl/Canary-Stability
-"
-
-SRC_TEST="do parallel"
index 4741d4661a6c00fe32c85f9db3286e8a3c7915b9..3999a21a82d0d97d6938e4ce456c407e24ca247a 100644 (file)
@@ -9,4 +9,7 @@
     <remote-id type="cpan">Convert-UUlib</remote-id>
     <remote-id type="cpan-module">Convert::UUlib</remote-id>
   </upstream>
+  <use>
+    <flag name="system-uulib">Use <pkg>dev-libs/uulib</pkg> instead of bundled version.</flag>
+  </use>
 </pkgmetadata>