public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Kent Fredric" <kentfredric@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/perl-overlay:master commit in: eclass/
Date: Sun, 28 Apr 2013 16:53:23 +0000 (UTC)	[thread overview]
Message-ID: <1367167816.02042ae27d49efefe1aad683748b6a90d635221c.kent@gentoo> (raw)

commit:     02042ae27d49efefe1aad683748b6a90d635221c
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Sun Apr 28 16:50:16 2013 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Sun Apr 28 16:50:16 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=02042ae2

[eclass] add perl-mb-tiny.eclass : Only EAPI5 + Module::Build::Tiny supported

---
 eclass/perl-mb-tiny.eclass |  177 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 177 insertions(+), 0 deletions(-)

diff --git a/eclass/perl-mb-tiny.eclass b/eclass/perl-mb-tiny.eclass
new file mode 100644
index 0000000..35d87c1
--- /dev/null
+++ b/eclass/perl-mb-tiny.eclass
@@ -0,0 +1,177 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.134 2012/09/15 16:16:53 zmedico Exp $
+
+# @ECLASS: perl-mb-tiny.eclass
+# @MAINTAINER:
+# perl@gentoo.org
+# @AUTHOR:
+# Kent Fredric <kentnl@cpan.org>
+# Seemant Kulleen <seemant@gentoo.org>
+# @BLURB: eclass for perl modules
+# @DESCRIPTION:
+# The perl-module eclass is designed to allow easier installation of perl
+# modules, and their incorporation into the Gentoo Linux system.
+
+inherit perl-module
+
+PERLMB_EXPF="src_unpack src_compile src_test src_install src_prepare src_configure"
+
+case "${EAPI:-0}" in
+	5)
+		;;
+	*)
+		die "EAPI=${EAPI} is not supported by perl-mb-tiny.eclass"
+		;;
+esac
+
+EXPORT_FUNCTIONS ${PERLMB_EXPF};
+
+
+perl-mb-tiny_src_unpack() {
+	debug-print-function $FUNCNAME "$@"
+	base_src_unpack
+}
+
+perl-mb-tiny_src_prepare() {
+	debug-print-function $FUNCNAME "$@"
+	base_src_prepare
+	perl_fix_osx_extra
+	esvn_clean
+}
+
+perl-mb-tiny_src_configure() {
+	debug-print-function $FUNCNAME "$@"
+
+	perl_set_version
+	perl_set_eprefix
+
+	# Disable ExtUtils::AutoInstall from prompting
+	export PERL_EXTUTILS_AUTOINSTALL="--skipdeps"
+
+	if [[ $(declare -p myconf 2>&-) != "declare -a myconf="* ]]; then
+		local myconf_local=(${myconf})
+	else
+		local myconf_local=("${myconf[@]}")
+	fi
+
+	if [[ ! -f Build.PL ]] ; then
+		die "Not Build.PL, is not a Module::Build::Tiny dist";
+	fi
+	if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} !=	Module-Build-Tiny ]]; then
+		die "Package MUST depend on Module::Build::Tiny";
+	fi
+	einfo "Using Module::Build::Tiny"
+	set -- \
+		--installdirs=vendor \
+		--destdir="${D}" \
+		"${myconf_local[@]}"
+	einfo "perl Build.PL" "$@"
+	perl Build.PL "$@" <<< "${pm_echovar}" \
+		|| die "Unable to build!"
+}
+
+perl-mb-tiny_src_compile() {
+	debug-print-function $FUNCNAME "$@"
+	perl_set_version
+
+	if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then
+		local mymake_local=(${mymake})
+	else
+		local mymake_local=("${mymake[@]}")
+	fi
+
+	if [[ ! -f Build.PL ]] ; then
+		die "Not Build.PL, is not a Module::Build::Tiny dist";
+	fi
+
+	./Build build || die "Compilation failed"
+}
+
+# For testers:
+#  This code attempts to work out your threadingness from MAKEOPTS
+#  and apply them to Test::Harness.
+#
+#  If you want more verbose testing, set TEST_VERBOSE=1
+#  in your bashrc | /etc/make.conf | ENV
+#
+# Additionally, you can add support for a few additional situations:
+#
+#   1. GENTOO_PERL_TESTS="network" will enable running tests that require
+#   network connectivity.
+#
+#   2. GENTOO_PERL_TESTS="broken" will enable running tests that we have marked
+#   as broken.
+#
+#   3. GENTOO_PERL_TESTS="undefined" will make all packages using the
+#   perl-module eclass to behave as if somebody had put a SRC_TEST stanza in it.
+#
+# For ebuild writers:
+#  If you wish to enable default tests w/ 'make test' ,
+#
+#   SRC_TEST="do"
+#
+#  If you wish to have threads run in parallel ( using the users makeopts )
+#  all of the following have been tested to work.
+#
+#   SRC_TEST="do parallel"
+#   SRC_TEST="parallel"
+#   SRC_TEST="parallel do"
+#   SRC_TEST=parallel
+#
+#  If your ebuild has tests, but they require networking to work, you can
+#  disable tests by adding "network" in your SRC_TEST string.
+#
+#  If your ebuild has tests, but they are broken, you can disable them
+#  with SRC_TEST="broken"
+#
+
+perl-mb-tiny_src_test() {
+	debug-print-function $FUNCNAME "$@"
+	if has 'do' ${SRC_TEST} || has 'parallel' ${SRC_TEST} ; then
+		if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' ${SRC_TEST} ; then
+			export HARNESS_OPTIONS=j$(makeopts_jobs)
+			einfo "Test::Harness Jobs=$(makeopts_jobs)"
+		fi
+		${perlinfo_done} || perl_set_version
+		
+		./Build test verbose=${TEST_VERBOSE:-0} || die "test failed"
+	fi
+}
+
+perl-mb-tiny_src_install() {
+	debug-print-function $FUNCNAME "$@"
+
+	perl_set_version
+	perl_set_eprefix
+
+	local f
+
+	if [[ -z ${mytargets} ]] ; then
+		case "${CATEGORY}" in
+			dev-perl|perl-core) mytargets="install" ;;
+			*)                  mytargets="install" ;;
+		esac
+	fi
+
+	if [[ $(declare -p myinst 2>&-) != "declare -a myinst="* ]]; then
+		local myinst_local=(${myinst})
+	else
+		local myinst_local=("${myinst[@]}")
+	fi
+
+	./Build ${mytargets} || die "./Build ${mytargets} failed"
+
+	perl_delete_module_manpages
+	perl_delete_localpod
+	perl_delete_packlist
+	perl_remove_temppath
+
+	for f in Change* CHANGES README* TODO FAQ ${mydoc}; do
+		[[ -s ${f} ]] && dodoc ${f}
+	done
+
+	perl_link_duallife_scripts
+}
+
+


             reply	other threads:[~2013-04-28 16:53 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28 16:53 Kent Fredric [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-09-17  0:51 [gentoo-commits] proj/perl-overlay:master commit in: eclass/ Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2017-09-17  0:51 Kent Fredric
2015-06-25  1:26 Kent Fredric
2015-06-21  0:39 Kent Fredric
2015-06-21  0:39 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-03-26 12:14 Kent Fredric
2015-03-15 17:06 Kent Fredric
2015-03-15  5:10 Kent Fredric
2015-03-15  5:10 Kent Fredric
2014-12-23 18:19 Kent Fredric
2014-12-23 18:19 Kent Fredric
2014-12-23 14:43 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-08-26 19:06 Kent Fredric
2014-08-24 13:56 Kent Fredric
2014-08-20 13:24 Kent Fredric
2014-04-04 23:09 Kent Fredric
2013-09-17  4:35 Kent Fredric
2013-09-17  4:28 Kent Fredric
2012-09-15 16:58 Torsten Veller
2012-06-07  6:06 Torsten Veller
2012-06-05 18:22 Torsten Veller
2012-06-05 18:22 Torsten Veller
2012-04-23 13:04 Torsten Veller
2012-04-23 13:04 Torsten Veller
2012-04-23 13:04 Torsten Veller
2011-08-16 17:02 Torsten Veller
2011-04-24  8:37 Torsten Veller
2011-02-04  8:15 tove

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1367167816.02042ae27d49efefe1aad683748b6a90d635221c.kent@gentoo \
    --to=kentfredric@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox