aboutsummaryrefslogtreecommitdiff
path: root/textproc/p5-XML-LibXML
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2012-02-08 19:51:08 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2012-02-08 19:51:08 +0000
commit23393d29fb485043a102056215f871654475ea70 (patch)
tree30f11ce6b9574e78063afaf20e5dc2f6bc633d2c /textproc/p5-XML-LibXML
parentf1ea8338ebf7d69381865a74f3823d71631b0984 (diff)
Notes
Diffstat (limited to 'textproc/p5-XML-LibXML')
-rw-r--r--textproc/p5-XML-LibXML/pkg-install12
1 files changed, 7 insertions, 5 deletions
diff --git a/textproc/p5-XML-LibXML/pkg-install b/textproc/p5-XML-LibXML/pkg-install
index a6e6bdad8455..f3472f152b64 100644
--- a/textproc/p5-XML-LibXML/pkg-install
+++ b/textproc/p5-XML-LibXML/pkg-install
@@ -1,5 +1,7 @@
-#!/usr/bin/perl
-exit unless $ARGV[1]=~ /^(DE|POST\-)INSTALL$/;
-$action=(($1 eq 'DE')?'remove':'add').'_parser';
-eval "use XML::SAX;"; exit(-1) if $@;
-XML::SAX->$action('XML::LibXML::SAX'.$_)->save_parsers() for('::Parser', '');
+#!/bin/sh
+
+if [ "$2" = "XPOST-INSTALL" ]; then
+ perl -MXML::SAX -e "XML::SAX->add_parser('XML::LibXML::SAX'.\$_)->save_parsers()"
+elif [ "X$2" = "XDEINSTALL" ]; then
+ perl -MXML::SAX -e "XML::SAX->remove_parser('XML::LibXML::SAX'.\$_)->save_parsers()"
+fi