aboutsummaryrefslogtreecommitdiff
path: root/textproc/p5-XML-SAX
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2012-05-27 19:46:54 +0000
committerChris Rees <crees@FreeBSD.org>2012-05-27 19:46:54 +0000
commitc585f3b100527b4f310833e75477118b4aa39043 (patch)
tree223c2ac2abeab74cc80703c118fd6665f04b92f1 /textproc/p5-XML-SAX
parentc36dec03733276a21e2b31adfa36143f98aa969a (diff)
Notes
Diffstat (limited to 'textproc/p5-XML-SAX')
-rw-r--r--textproc/p5-XML-SAX/Makefile15
-rw-r--r--textproc/p5-XML-SAX/files/patch-Makefile.PL16
2 files changed, 31 insertions, 0 deletions
diff --git a/textproc/p5-XML-SAX/Makefile b/textproc/p5-XML-SAX/Makefile
index c15da34ee832..b676b948c4d0 100644
--- a/textproc/p5-XML-SAX/Makefile
+++ b/textproc/p5-XML-SAX/Makefile
@@ -25,6 +25,21 @@ MAN3= XML::SAX.3 XML::SAX::DocumentLocator.3 XML::SAX::Intro.3 \
XML::SAX::ParserFactory.3 XML::SAX::PurePerl.3 \
XML::SAX::PurePerl::Reader.3
+OPTIONS= WRITE_INI_OK "Alter ParserDetails.ini with relevant information" on
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_WRITE_INI_OK)
+WRITE_INI_OK= 1
+.else
+WRITE_INI_OK= 0
+.endif
+
+post-patch:
+# dirty hack to stop asking for confirmation to alter ParserDetails.ini
+ @${REINPLACE_CMD} -e 's/%%WRITE_INI_OK%%/${WRITE_INI_OK}/' \
+ ${WRKSRC}/Makefile.PL
+
post-configure:
# dirty hack to deceive irritable pod2man
@${PERL} -e 's/^(POD2MAN_EXE.*)$$/\1 --lax/;' ${WRKSRC}/Makefile
diff --git a/textproc/p5-XML-SAX/files/patch-Makefile.PL b/textproc/p5-XML-SAX/files/patch-Makefile.PL
new file mode 100644
index 000000000000..c08929ce9dac
--- /dev/null
+++ b/textproc/p5-XML-SAX/files/patch-Makefile.PL
@@ -0,0 +1,16 @@
+Used in conjuntion with a REINPLACE_CMD in post-patch
+
+--- Makefile.PL.orig 2012-05-27 20:36:08.188491094 +0100
++++ Makefile.PL 2012-05-27 20:37:51.088491081 +0100
+@@ -28,10 +28,7 @@
+ 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;
++ $write_ini_ok = %%WRITE_INI_OK%%;
+ }
+ else {
+ $write_ini_ok = 1;