summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authorheinz <heinz@pkgsrc.org>2007-06-13 23:17:31 +0000
committerheinz <heinz@pkgsrc.org>2007-06-13 23:17:31 +0000
commit62cb0790006e1c9cc23205c6302046c8d6cb9af4 (patch)
treea1fc825c113a84357e4fc500810cf368e54d4fb2 /textproc
parent3043d19cadcebd41669eabf1713bbb3cc3934c6b (diff)
downloadpkgsrc-62cb0790006e1c9cc23205c6302046c8d6cb9af4.tar.gz
- The package supports installation to DESTDIR. The only issue was the
creation of the parser registry (ParserDetails.ini) at installation time which does not work if using DESTDIR. Instead of breaking abstraction barriers (use of _USE_DESTDIR) to make this work, this task was moved to INSTALL/DEINSTALL scripts where it really belongs, which incidentally also solves the problem described above. - In order to move the creation of the parser registry to the pkgsrc scripts, Makefile.PL was changed (through patch-aa) to respect the variable SKIP_SAX_INSTALL (inspired by XML::LibXML). - File::Temp is a part of Perl since 5.6.1 so we do not need an explicit DEPENDS line for this.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/p5-XML-SAX/DEINSTALL11
-rw-r--r--textproc/p5-XML-SAX/INSTALL11
-rw-r--r--textproc/p5-XML-SAX/Makefile19
-rw-r--r--textproc/p5-XML-SAX/distinfo4
-rw-r--r--textproc/p5-XML-SAX/patches/patch-aa43
5 files changed, 65 insertions, 23 deletions
diff --git a/textproc/p5-XML-SAX/DEINSTALL b/textproc/p5-XML-SAX/DEINSTALL
new file mode 100644
index 00000000000..6b310237522
--- /dev/null
+++ b/textproc/p5-XML-SAX/DEINSTALL
@@ -0,0 +1,11 @@
+# $NetBSD: DEINSTALL,v 1.1 2007/06/13 23:17:31 heinz Exp $
+
+case ${STAGE} in
+
+DEINSTALL)
+ ${PERL5} -I@PERL5_INSTALLVENDORLIB@ -MXML::SAX -e "XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()"
+ ${ECHO} "Removed parser from XML::SAX registry."
+ ;;
+
+esac
+
diff --git a/textproc/p5-XML-SAX/INSTALL b/textproc/p5-XML-SAX/INSTALL
new file mode 100644
index 00000000000..25848f3f93e
--- /dev/null
+++ b/textproc/p5-XML-SAX/INSTALL
@@ -0,0 +1,11 @@
+# $NetBSD: INSTALL,v 1.1 2007/06/13 23:17:31 heinz Exp $
+
+case ${STAGE} in
+
+POST-INSTALL)
+ ${PERL5} -I@PERL5_INSTALLVENDORLIB@ -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
+ ${ECHO} "Added parser to XML::SAX registry."
+ ;;
+
+esac
+
diff --git a/textproc/p5-XML-SAX/Makefile b/textproc/p5-XML-SAX/Makefile
index 8e3d5eb8be3..5c14dc53876 100644
--- a/textproc/p5-XML-SAX/Makefile
+++ b/textproc/p5-XML-SAX/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2007/02/27 14:03:58 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2007/06/13 23:17:31 heinz Exp $
DISTNAME= XML-SAX-0.15
PKGNAME= p5-${DISTNAME}
@@ -10,21 +10,20 @@ HOMEPAGE= http://search.cpan.org/dist/XML-SAX/
COMMENT= Perl interface to the SAX2 XML Parser
PKG_DESTDIR_SUPPORT= user-destdir
+PKG_INSTALLATION_TYPES= overwrite pkgviews
DEPENDS+= p5-XML-NamespaceSupport>=0.03:../../textproc/p5-XML-NamespaceSupport
-DEPENDS+= p5-File-Temp-[0-9]*:../../devel/p5-File-Temp
-
-PKG_INSTALLATION_TYPES= overwrite pkgviews
+# included in perl>=5.6.1
+#DEPENDS+= p5-File-Temp-[0-9]*:../../devel/p5-File-Temp
-PERL5_PACKLIST= auto/XML/SAX/.packlist
+MAKE_ENV= SKIP_SAX_INSTALL=yes
-.include "../../mk/bsd.prefs.mk"
+PERL5_PACKLIST= auto/XML/SAX/.packlist
-.if ${_USE_DESTDIR} != "no"
-.include "../../lang/perl5/vars.mk"
+FILES_SUBST+= PERL5_INSTALLVENDORLIB=${PERL5_INSTALLVENDORLIB:Q}
-INSTALL_ENV+= PERL5LIB=${DESTDIR}${PERL5_INSTALLVENDORLIB}
-.endif
+post-install:
+ ${ECHO} > ${DESTDIR:Q}${PERL5_INSTALLVENDORLIB}/XML/SAX/ParserDetails.ini
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/p5-XML-SAX/distinfo b/textproc/p5-XML-SAX/distinfo
index 4ef762bd096..fb0d1dd71e2 100644
--- a/textproc/p5-XML-SAX/distinfo
+++ b/textproc/p5-XML-SAX/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.5 2007/02/27 14:03:58 wiz Exp $
+$NetBSD: distinfo,v 1.6 2007/06/13 23:17:32 heinz Exp $
SHA1 (XML-SAX-0.15.tar.gz) = afd1c30a7f577d6e69f831c4f0e49df68c96eccd
RMD160 (XML-SAX-0.15.tar.gz) = 7fb288043c8328688a8557313c98e37928cb2f3d
Size (XML-SAX-0.15.tar.gz) = 59346 bytes
-SHA1 (patch-aa) = 5f421c20185ffc0889b04cc412139ecd44545c0d
+SHA1 (patch-aa) = d474262178b0a36da51ed0cdfd56e75272f25d71
diff --git a/textproc/p5-XML-SAX/patches/patch-aa b/textproc/p5-XML-SAX/patches/patch-aa
index 8c6d589ec04..afd5db3a779 100644
--- a/textproc/p5-XML-SAX/patches/patch-aa
+++ b/textproc/p5-XML-SAX/patches/patch-aa
@@ -1,18 +1,39 @@
-$NetBSD: patch-aa,v 1.2 2007/02/27 14:03:58 wiz Exp $
+$NetBSD: patch-aa,v 1.3 2007/06/13 23:17:32 heinz Exp $
---- Makefile.PL.orig 2006-04-24 00:14:03.000000000 +0000
+--- Makefile.PL.orig 2006-04-24 02:14:03.000000000 +0200
+++ Makefile.PL
-@@ -28,9 +28,10 @@ sub MY::install {
- my $dir = File::Basename::dirname($INC{'XML/SAX.pm'});
- if (-e File::Spec->catfile($dir, 'SAX', 'ParserDetails.ini')) {
- $write_ini_ok =
+@@ -20,20 +20,22 @@ sub MY::install {
+
+ my $write_ini_ok = 0;
+
+- eval { require XML::SAX };
+- if ($@) {
+- $write_ini_ok = 1;
+- }
+- else {
+- my $dir = File::Basename::dirname($INC{'XML/SAX.pm'});
+- if (-e File::Spec->catfile($dir, 'SAX', 'ParserDetails.ini')) {
+- $write_ini_ok =
- ExtUtils::MakeMaker::prompt(
- "Do you want XML::SAX to alter ParserDetails.ini?", "Y"
- ) =~ /^y/i;
-+ 1;
-+# ExtUtils::MakeMaker::prompt(
-+# "Do you want XML::SAX to alter ParserDetails.ini?", "Y"
-+# ) =~ /^y/i;
++ unless ( defined $ENV{'SKIP_SAX_INSTALL'} ) {
++ eval { require XML::SAX };
++ if ($@) {
++ $write_ini_ok = 1;
}
else {
- $write_ini_ok = 1;
+- $write_ini_ok = 1;
++ my $dir = File::Basename::dirname($INC{'XML/SAX.pm'});
++ if (-e File::Spec->catfile($dir, 'SAX', 'ParserDetails.ini')) {
++ $write_ini_ok =
++ ExtUtils::MakeMaker::prompt(
++ "Do you want XML::SAX to alter ParserDetails.ini?", "Y"
++ ) =~ /^y/i;
++ }
++ else {
++ $write_ini_ok = 1;
++ }
+ }
+ }
+