diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2001-12-31 14:57:36 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2001-12-31 14:57:36 +0800 |
commit | 495100ea2b78a94f37ca3eaa70a7cd27dc39d750 (patch) | |
tree | 22a9d0293d0cb5f6517f56e57aaa5f713bc671d2 /textproc | |
parent | ce870676a4f60a5f30ad1f3d9ad8472d7667cb09 (diff) | |
download | freebsd-ports-gnome-495100ea2b78a94f37ca3eaa70a7cd27dc39d750.tar.gz freebsd-ports-gnome-495100ea2b78a94f37ca3eaa70a7cd27dc39d750.tar.zst freebsd-ports-gnome-495100ea2b78a94f37ca3eaa70a7cd27dc39d750.zip |
Add knobs to enable "euc-jp" and "shift_jis" encodings.
Encoding mappings between euc-jp and Shift_JIS and other encoding (such
as Unicode) is not determined as exactly one to one.
This knobs are off by default because author of encoding mappings thought
that any of mappings should not be used by default until final mapping
will be determined (by foo organization?).
Define $XMLPARSER_EUCJP and/or $XMLPARSER_SJIS in /etc/make.conf to
x-euc-jp-(jisx0221|unicode) and/or x-sjis(cp932|jdk117|jisx0221|unicode)
to use these encodings in XML files by p5-XML-Parser (and it's dependents).
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/p5-XML-Parser/Makefile | 24 | ||||
-rw-r--r-- | textproc/p5-XML-Parser/pkg-plist | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/textproc/p5-XML-Parser/Makefile b/textproc/p5-XML-Parser/Makefile index 481fe31296f2..06523f4a4628 100644 --- a/textproc/p5-XML-Parser/Makefile +++ b/textproc/p5-XML-Parser/Makefile @@ -7,6 +7,7 @@ PORTNAME= XML-Parser PORTVERSION= 2.30 +PORTREVISION= 1 CATEGORIES= textproc perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} \ http://wwwx.netheaven.com/~coopercc/xmlparser/ @@ -23,6 +24,29 @@ CONFIGURE_ARGS= EXPATLIBPATH=${LOCALBASE}/lib EXPATINCPATH=${LOCALBASE}/include MAN3= XML::Parser.3 XML::Parser::Expat.3 MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} +PLIST_SUB= EUCJP=${EUCJP} SJIS=${SJIS} + +# XMLPARSER_EUCJP= x-euc-jp-(jisx0221|unicode) +# XMLPARSER_SJIS= x-sjis-(cp932|jdk117|jisx0221|unicode) +CONV_ENC= perl -e '$$e=shift @ARGV; undef $$/; $$_=<>; substr($$_,4,40)=pack("a40","$$e"); print' +.if !defined(XMLPARSER_EUCJP) +EUCJP= "@comment " +.endif +.if !defined(XMLPARSER_SJIS) +SJIS= "@comment " +.endif + +post-patch: +.if defined(XMLPARSER_EUCJP) + @cd ${WRKSRC}/Parser/Encodings; \ + ${CONV_ENC} euc-jp ${XMLPARSER_EUCJP}.enc > euc-jp.enc + @${ECHO} Parser/Encodings/euc-jp.enc >> ${WRKSRC}/MANIFEST +.endif +.if defined(XMLPARSER_SJIS) + @cd ${WRKSRC}/Parser/Encodings; \ + ${CONV_ENC} shift_jis ${XMLPARSER_SJIS}.enc > shift_jis.enc + @${ECHO} Parser/Encodings/Shift_JIS.enc >> ${WRKSRC}/MANIFEST +.endif post-configure: @${PERL} -i -pe 's/^(CC = ).*/$$1 ${CC}/;' \ diff --git a/textproc/p5-XML-Parser/pkg-plist b/textproc/p5-XML-Parser/pkg-plist index bcddffbeeece..a1eb0c76930c 100644 --- a/textproc/p5-XML-Parser/pkg-plist +++ b/textproc/p5-XML-Parser/pkg-plist @@ -3,8 +3,10 @@ lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/XML/Parser/Expat/Expat.so lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/XML/Parser/.packlist lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/Japanese_Encodings.msg lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/README +%%SJIS%%lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/Shift_JIS.enc lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/big5.enc lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/euc-kr.enc +%%EUCJP%%lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/euc-jp.enc lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/iso-8859-2.enc lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/iso-8859-3.enc lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/XML/Parser/Encodings/iso-8859-4.enc |