View | Details | Raw Unified | Return to bug 198123 | Differences between
and this patch

Collapse All | Expand All

(-)textproc/intltool/Makefile (-12 / +1 lines)
Lines 4-9 Link Here
4
4
5
PORTNAME=	intltool
5
PORTNAME=	intltool
6
PORTVERSION=	0.50.2
6
PORTVERSION=	0.50.2
7
PORTREVISION=	1
7
CATEGORIES=	textproc gnome
8
CATEGORIES=	textproc gnome
8
MASTER_SITES=	http://launchpadlibrarian.net/94524169/
9
MASTER_SITES=	http://launchpadlibrarian.net/94524169/
9
DIST_SUBDIR=	gnome
10
DIST_SUBDIR=	gnome
Lines 16-32 RUN_DEPENDS= p5-XML-Parser>=0:${PORTSDIR Link Here
16
17
17
USES=		iconv gmake perl5
18
USES=		iconv gmake perl5
18
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
19
CONFIGURE_ARGS=	--libdir="${PREFIX}/libdata"
20
21
CONFLICTS=	xml-i18n-tools-[0-9]*
22
23
post-patch:
24
	@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} \
25
		-E -e '/^mkinstalldirs[[:space:]]*=/s^/\.\.^^g'
26
27
post-install:
28
	${MKDIR} ${STAGEDIR}${PREFIX}/share/intltool/XML/Parser/Style
29
	${INSTALL_DATA} ${FILESDIR}/OrigTree.pm \
30
	    	${STAGEDIR}${PREFIX}/share/intltool/XML/Parser/Style
31
20
32
.include <bsd.port.mk>
21
.include <bsd.port.mk>
(-)textproc/intltool/files/OrigTree.pm (-91 lines)
Lines 1-91 Link Here
1
# $Id: OrigTree.pm,v 1.1 2003/11/26 15:18:28 kenneth Exp $
2
3
package XML::Parser::Style::OrigTree;
4
$XML::Parser::Built_In_Styles{OrigTree} = 1;
5
6
sub Init {
7
  my $expat = shift;
8
  $expat->{Lists} = [];
9
  $expat->{Curlist} = $expat->{OrigTree} = [];
10
}
11
12
sub Start {
13
  my $expat = shift;
14
  my $tag = shift;
15
  my $newlist = [ { @_ } ];
16
  push @{ $expat->{Lists} }, $expat->{Curlist};
17
  push @{ $expat->{Curlist} }, $tag => $newlist;
18
  $expat->{Curlist} = $newlist;
19
}
20
21
sub End {
22
  my $expat = shift;
23
  my $tag = shift;
24
  $expat->{Curlist} = pop @{ $expat->{Lists} };
25
}
26
27
sub Char {
28
  my $expat = shift;
29
  my $text = shift;
30
  my $clist = $expat->{Curlist};
31
  my $pos = $#$clist;
32
  
33
  if ($pos > 0 and $clist->[$pos - 1] eq '0') {
34
    $clist->[$pos] .= $expat->original_string();
35
  } else {
36
    push @$clist, 0 => $expat->original_string();
37
  }
38
}
39
40
sub Final {
41
  my $expat = shift;
42
  delete $expat->{Curlist};
43
  delete $expat->{Lists};
44
  $expat->{OrigTree};
45
}
46
47
1;
48
__END__
49
50
=head1 NAME
51
52
XML::Parser::Style::OrigTree
53
54
=head1 SYNOPSIS
55
56
  use XML::Parser;
57
  my $p = XML::Parser->new(Style => 'OrigTree');
58
  my $tree = $p->parsefile('foo.xml');
59
60
=head1 DESCRIPTION
61
62
This module is a variant of the XML::Parser's Tree style parser.  It
63
uses original_string, so that Entities are not converted.
64
65
When parsing a document, C<parse()> will return a parse tree for the
66
document. Each node in the tree
67
takes the form of a tag, content pair. Text nodes are represented with
68
a pseudo-tag of "0" and the string that is their content. For elements,
69
the content is an array reference. The first item in the array is a
70
(possibly empty) hash reference containing attributes. The remainder of
71
the array is a sequence of tag-content pairs representing the content
72
of the element.
73
74
So for example the result of parsing:
75
76
  <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
77
78
would be:
79
             Tag   Content
80
  ==================================================================
81
  [foo, [{}, head, [{id => "a"}, 0, "Hello ",  em, [{}, 0, "there"]],
82
              bar, [         {}, 0, "Howdy",  ref, [{}]],
83
                0, "do"
84
        ]
85
  ]
86
87
The root document "foo", has 3 children: a "head" element, a "bar"
88
element and the text "do". After the empty attribute hash, these are
89
represented in it's contents by 3 tag-content pairs.
90
91
=cut
(-)textproc/intltool/files/patch-intltool.m4 (+12 lines)
Line 0 Link Here
1
--- intltool.m4.orig	2012-02-26 18:31:06 UTC
2
+++ intltool.m4
3
@@ -164,6 +164,9 @@ if test -z "$DATADIRNAME"; then
4
                        return _nl_msg_cat_cntr]])],
5
     [DATADIRNAME=share],
6
     [case $host in
7
+    *-*-dragonfly*|*-*-freebsd*)
8
+    [DATADIRNAME=share]
9
+    ;;
10
     *-*-solaris*)
11
     dnl On Solaris, if bind_textdomain_codeset is in libc,
12
     dnl GNU format message catalog is always supported,
(-)textproc/intltool/files/patch-intltoolize.in (+12 lines)
Line 0 Link Here
1
--- intltoolize.in.orig	2011-10-08 06:16:58 UTC
2
+++ intltoolize.in
3
@@ -233,7 +233,8 @@ exit $status
4
 # will be used to pull in the macro.
5
 m4dir=`cat "$configure" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
6
 if test -n "$m4dir"; then
7
-  rm -f $m4dir/intltool.m4
8
+  $mkdir -p $m4dir
9
+  $rm $m4dir/intltool.m4
10
   if test -n "$ln_s" && $ln_s $intltool_m4 $m4dir/intltool.m4; then :
11
   elif $cp $intltool_m4 $m4dir/intltool.m4; then :
12
   else
(-)textproc/intltool/pkg-plist (-1 lines)
Lines 5-11 bin/intltool-update Link Here
5
bin/intltoolize
5
bin/intltoolize
6
share/aclocal/intltool.m4
6
share/aclocal/intltool.m4
7
%%DATADIR%%/Makefile.in.in
7
%%DATADIR%%/Makefile.in.in
8
%%DATADIR%%/XML/Parser/Style/OrigTree.pm
9
man/man8/intltool-extract.8.gz
8
man/man8/intltool-extract.8.gz
10
man/man8/intltool-merge.8.gz
9
man/man8/intltool-merge.8.gz
11
man/man8/intltool-prepare.8.gz
10
man/man8/intltool-prepare.8.gz

Return to bug 198123