aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2018-02-27 15:15:54 +0800
committerpi <pi@FreeBSD.org>2018-02-27 15:15:54 +0800
commit5ef8b8ece2beb7fff1eef3af432f130dd5983448 (patch)
treeead8f6275931ee554cb3ddf9f61373c92e610fdd /textproc
parentdb7bc01ae1af7cad9fba2c97ab01062f31bd4014 (diff)
downloadfreebsd-ports-gnome-5ef8b8ece2beb7fff1eef3af432f130dd5983448.tar.gz
freebsd-ports-gnome-5ef8b8ece2beb7fff1eef3af432f130dd5983448.tar.zst
freebsd-ports-gnome-5ef8b8ece2beb7fff1eef3af432f130dd5983448.zip
textproc/p5-XML-SAX: fix checksum mismatch for ParserDetails.ini
- The file %%SITE_PERL%%/XML/SAX/ParserDetails.ini is updated by ports that depending textproc/p5-XML-SAX. - For example, textproc/p5-XML-SAX-Expat, textproc/p5-XML-Simple and textproc/p5-XML-LibXML append something to the .ini file. - This causes checksum mismatch when executing `pkg check -s textproc/p5-XML-SAX` The fix provides a pkg-install program to handle the file in post-install. PR: 197011 Submitted by: Tatsuki Makino <tatsuki_makino@hotmail.com> Reviewed by: John Hein, mat, Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
Diffstat (limited to 'textproc')
-rw-r--r--textproc/p5-XML-SAX/Makefile3
-rw-r--r--textproc/p5-XML-SAX/files/patch-Makefile.PL2
-rw-r--r--textproc/p5-XML-SAX/files/pkg-install.in19
-rw-r--r--textproc/p5-XML-SAX/pkg-plist2
4 files changed, 24 insertions, 2 deletions
diff --git a/textproc/p5-XML-SAX/Makefile b/textproc/p5-XML-SAX/Makefile
index 2d87ea09d3fb..624a87a4213c 100644
--- a/textproc/p5-XML-SAX/Makefile
+++ b/textproc/p5-XML-SAX/Makefile
@@ -20,5 +20,8 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
NO_ARCH= yes
USES= perl5
USE_PERL5= configure
+SUB_FILES= pkg-install
+SUB_LIST= PERL=${PERL}
+PKGDEINSTALL= ${PKGINSTALL}
.include <bsd.port.mk>
diff --git a/textproc/p5-XML-SAX/files/patch-Makefile.PL b/textproc/p5-XML-SAX/files/patch-Makefile.PL
index fa6ac04728ad..418da31993d8 100644
--- a/textproc/p5-XML-SAX/files/patch-Makefile.PL
+++ b/textproc/p5-XML-SAX/files/patch-Makefile.PL
@@ -22,7 +22,7 @@
install_sax_pureperl : pure_install
-\t\@\$(PERL) -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
-+\t\@\$(PERL) -I\$(DESTDIR)\$(INSTALLSITELIB) -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
++#\t\@\$(PERL) -I\$(DESTDIR)\$(INSTALLSITELIB) -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
INSTALL
diff --git a/textproc/p5-XML-SAX/files/pkg-install.in b/textproc/p5-XML-SAX/files/pkg-install.in
new file mode 100644
index 000000000000..5dd23d39b24b
--- /dev/null
+++ b/textproc/p5-XML-SAX/files/pkg-install.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PERL="%%PERL%%"
+
+case $2 in
+ POST-INSTALL)
+ $PERL -MXML::SAX -e 'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers();'
+ ;;
+ DEINSTALL)
+ $PERL -MFile::Basename=dirname -MFile::Spec -MXML::SAX << 'PERLSCRIPT'
+XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers();
+unless (@{XML::SAX->parsers()} > 0) {
+ $dir = $INC{q(XML/SAX.pm)}; $dir = dirname($dir);
+ $file = File::Spec->catfile($dir, q(SAX), XML::SAX::PARSER_DETAILS);
+ unlink($file);
+}
+PERLSCRIPT
+ ;;
+esac
diff --git a/textproc/p5-XML-SAX/pkg-plist b/textproc/p5-XML-SAX/pkg-plist
index bfa90b84129e..dcdd6898f65e 100644
--- a/textproc/p5-XML-SAX/pkg-plist
+++ b/textproc/p5-XML-SAX/pkg-plist
@@ -7,7 +7,7 @@
%%SITE_PERL%%/XML/SAX.pm
%%SITE_PERL%%/XML/SAX/DocumentLocator.pm
%%SITE_PERL%%/XML/SAX/Intro.pod
-%%SITE_PERL%%/XML/SAX/ParserDetails.ini
+@comment %%SITE_PERL%%/XML/SAX/ParserDetails.ini
%%SITE_PERL%%/XML/SAX/ParserFactory.pm
%%SITE_PERL%%/XML/SAX/PurePerl.pm
%%SITE_PERL%%/XML/SAX/PurePerl/DTDDecls.pm