pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/p5-Import-Into Adding new package for CPAN modul...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/832be6932986
branches:  trunk
changeset: 610131:832be6932986
user:      sno <sno%pkgsrc.org@localhost>
date:      Fri Oct 19 07:47:13 2012 +0000

description:
Adding new package for CPAN module Import::Into version 1.001000 into
devel/p5-Import-Into.

Writing exporters is a pain. Some use Exporter, some use Sub::Exporter,
some use Moose::Exporter, some use Exporter::Declare ... and some things
are pragmas.

If you want to re-export other things, you have to know which is which.
Exporter subclasses provide export_to_level, but if they overrode their
import method all bets are off. Sub::Exporter provides an into parameter
but figuring out something used it isn't trivial. Pragmas need to have
their import method called directly since they affect the current unit
of compilation.

It's ... annoying.

However, there is an approach that actually works for all of these types.

diffstat:

 devel/p5-Import-Into/DESCR            |  14 ++++++++++++++
 devel/p5-Import-Into/Makefile         |  20 ++++++++++++++++++++
 devel/p5-Import-Into/distinfo         |   6 ++++++
 devel/p5-Import-Into/patches/patch-aa |  15 +++++++++++++++
 4 files changed, 55 insertions(+), 0 deletions(-)

diffs (71 lines):

diff -r c4baca397727 -r 832be6932986 devel/p5-Import-Into/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-Import-Into/DESCR        Fri Oct 19 07:47:13 2012 +0000
@@ -0,0 +1,14 @@
+Writing exporters is a pain. Some use Exporter, some use Sub::Exporter,
+some use Moose::Exporter, some use Exporter::Declare ... and some things
+are pragmas.
+
+If you want to re-export other things, you have to know which is which.
+Exporter subclasses provide export_to_level, but if they overrode their
+import method all bets are off. Sub::Exporter provides an into parameter
+but figuring out something used it isn't trivial. Pragmas need to have
+their import method called directly since they affect the current unit
+of compilation.
+
+It's ... annoying.
+
+However, there is an approach that actually works for all of these types.
diff -r c4baca397727 -r 832be6932986 devel/p5-Import-Into/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-Import-Into/Makefile     Fri Oct 19 07:47:13 2012 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2012/10/19 07:47:13 sno Exp $
+#
+
+DISTNAME=      Import-Into-1.001000
+PKGNAME=       p5-${DISTNAME}
+CATEGORIES=    devel perl5
+MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:=../../authors/id/M/MS/MSTROUT/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://search.cpan.org/dist/Import-Into/
+COMMENT=       Perl5 module to import packages into other packages
+LICENSE=       ${PERL5_LICENSE}
+
+PKG_INSTALLATION_TYPES=        overwrite pkgviews
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+PERL5_PACKLIST=        auto/Import/Into/.packlist
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r c4baca397727 -r 832be6932986 devel/p5-Import-Into/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-Import-Into/distinfo     Fri Oct 19 07:47:13 2012 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2012/10/19 07:47:13 sno Exp $
+
+SHA1 (Import-Into-1.001000.tar.gz) = 327f195ddc6773497ee282e58546f5cb519dda5f
+RMD160 (Import-Into-1.001000.tar.gz) = 0340a94a5db295ab851346795d1e40abb1c97681
+Size (Import-Into-1.001000.tar.gz) = 4762 bytes
+SHA1 (patch-aa) = 6691d22c594497fadc0ae362f3b4ec67b61f8a2e
diff -r c4baca397727 -r 832be6932986 devel/p5-Import-Into/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/p5-Import-Into/patches/patch-aa     Fri Oct 19 07:47:13 2012 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-aa,v 1.1 2012/10/19 07:47:13 sno Exp $
+
+# Fix irregular module name
+
+--- Makefile.PL.orig   2012-05-03 20:14:06.000000000 +0000
++++ Makefile.PL
+@@ -5,7 +5,7 @@ use ExtUtils::MakeMaker;
+ (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
+ 
+ WriteMakefile(
+-  NAME => 'Import-Into',
++  NAME => 'Import::Into',
+   VERSION_FROM => 'lib/Import/Into.pm',
+   PREREQ_PM => { },
+   LICENSE => 'perl',



Home | Main Index | Thread Index | Old Index