dev-perl/PortageXS: Fix build, bug 529246; further cleanups, standardize numbering
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Sat, 12 Dec 2015 12:07:34 +0000 (13:07 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sat, 12 Dec 2015 12:10:21 +0000 (13:10 +0100)
Package-Manager: portage-2.2.26

dev-perl/PortageXS/PortageXS-0.2.10-r5.ebuild [new file with mode: 0644]
dev-perl/PortageXS/PortageXS-0.2.12-r1.ebuild [moved from dev-perl/PortageXS/PortageXS-0.02.12.ebuild with 87% similarity]

diff --git a/dev-perl/PortageXS/PortageXS-0.2.10-r5.ebuild b/dev-perl/PortageXS/PortageXS-0.2.10-r5.ebuild
new file mode 100644 (file)
index 0000000..a9fe919
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+MODULE_VERSION=0.02.10
+inherit perl-module eutils prefix
+
+DESCRIPTION="Portage abstraction layer for perl"
+HOMEPAGE="http://download.mpsna.de/opensource/PortageXS/"
+SRC_URI="http://download.mpsna.de/opensource/PortageXS/${PN}-${MODULE_VERSION}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="minimal"
+SRC_TEST="do"
+
+DEPEND="
+       virtual/perl-Term-ANSIColor
+       dev-perl/Shell-EnvImporter
+       !minimal? (
+               dev-perl/IO-Socket-SSL
+               virtual/perl-Sys-Syslog
+       )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-0.02.10-portage_path_fix.patch
+       epatch "${FILESDIR}"/${PN}-0.02.10-prefix.patch
+
+       eprefixify \
+               lib/PortageXS/Core.pm \
+               lib/PortageXS.pm \
+               usr/bin/portagexs_client \
+               usr/sbin/portagexsd
+
+       if use minimal ; then
+               rm -r "${S}"/usr || die
+               rm -r "${S}"/etc/init.d || die
+               rm -r "${S}"/etc/pxs/certs || die
+               rm "${S}"/etc/pxs/portagexsd.conf || die
+               rm -r "${S}"/lib/PortageXS/examples || die
+       fi
+}
+
+src_install() {
+       perl-module_src_install
+       if use !minimal ; then
+               cp -r "${S}"/usr "${D}${EPREFIX}" || die
+       fi
+       cp -r "${S}"/etc "${D}${EPREFIX}" || die
+}
+
+pkg_postinst() {
+       if [ -d "${EPREFIX}"/etc/portagexs ]; then
+               elog "${EPREFIX}/etc/portagexs has been moved to ${EPREFIX}/etc/pxs for convenience.  It is safe"
+               elog "to delete old ${EPREFIX}/etc/portagexs directories."
+       fi
+}
similarity index 87%
rename from dev-perl/PortageXS/PortageXS-0.02.12.ebuild
rename to dev-perl/PortageXS/PortageXS-0.2.12-r1.ebuild
index 0e4b60f3d953166a4c919c20cedbfb82ae75590d..a881665a4dc20634822a5e2bfb48fbe9d589f094 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
+
 EAPI=5
 
 MODULE_AUTHOR=KENTNL
@@ -15,14 +16,18 @@ LICENSE="GPL-2"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
 IUSE="minimal"
 
-DEPEND="dev-perl/Module-Build
+DEPEND="
+       dev-perl/Module-Build
        virtual/perl-Term-ANSIColor
        dev-perl/Shell-EnvImporter
-       !minimal? ( dev-perl/IO-Socket-SSL
-                   virtual/perl-Sys-Syslog )"
+       !minimal? (
+               dev-perl/IO-Socket-SSL
+               virtual/perl-Sys-Syslog
+       )
+"
 
 src_prepare() {
-       epatch "${FILESDIR}"/${PV}/${P}-prefix.patch
+       epatch "${FILESDIR}"/0.02.12/${PN}-0.02.12-prefix.patch
 
        eprefixify \
                lib/PortageXS/examples/getParamFromFile.pl \
@@ -41,7 +46,8 @@ src_prepare() {
        fi
 }
 
-pkg_preinst() {
+src_install() {
+       perl-module_src_install
        if use !minimal ; then
                cp -r "${S}"/usr "${D}${EPREFIX}" || die
        fi