[Po4a-commits] "po4a changelog,1.424,1.425 Build.PL,1.38,1.39"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Mon Feb 9 21:32:40 UTC 2009


Update of /cvsroot/po4a/po4a
In directory alioth:/tmp/cvs-serv9780

Modified Files:
	changelog Build.PL 
Log Message:
	* Build.PL: Another try to fix the installation of manpages and mo
	files.


Index: Build.PL
===================================================================
RCS file: /cvsroot/po4a/po4a/Build.PL,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- Build.PL	20 Jul 2008 15:44:17 -0000	1.38
+++ Build.PL	9 Feb 2009 21:32:38 -0000	1.39
@@ -26,7 +26,17 @@
 	    require ExtUtils::Install;
 #	    $self->depends_on('build');
 
-	    ExtUtils::Install::install($self->install_map, 1, 0, $self->{args}{uninst}||0); 
+	    my %install_map = %{$self->install_map};
+
+	    my $mandir = $self->install_map->{'blib/bindoc'};
+	    $mandir =~ s/\/man1$//;
+	    $install_map{'blib/man'} = $mandir;
+
+	    my $localedir = $mandir;
+	    $localedir =~ s/\/man$/\/locale/;
+	    $install_map{'blib/po'} = $localedir;
+
+	    ExtUtils::Install::install(\%install_map, 1, 0, $self->{args}{uninst}||0); 
 	}
 	sub ACTION_binpo {
 	    my $self = shift;
@@ -121,6 +131,7 @@
 	    system("cp doc/po4a.7.pod blib/man/man7") and die;
 
 	    foreach $file (@{$self->rscan_dir('blib/man',qr{\.pod$})}) {
+		next if $file =~ m/^man7/;
 		my $out = $file;
 		$out =~ s/\.pod$//;
 		$section = $2;
@@ -135,15 +146,17 @@
 		my $lang = $out;
 		$lang =~ s/^blib\/man\/([^\/]*)\/.*$/$1/;
 
-		my $command;
-		$command = "msggrep -K -E -e \"Po4a Tools\" po/pod/$lang.po |";
-		$command .= "msgconv -t UTF-8 | ";
-		$command .= "msgexec /bin/sh -c '[ -n \"\$MSGEXEC_MSGID\" ] ";
-		$command .= "&& cat || cat > /dev/null'";
+		unless ($lang eq "man7") {
+			my $command;
+			$command = "msggrep -K -E -e \"Po4a Tools\" po/pod/$lang.po |";
+			$command .= "msgconv -t UTF-8 | ";
+			$command .= "msgexec /bin/sh -c '[ -n \"\$MSGEXEC_MSGID\" ] ";
+			$command .= "&& cat || cat > /dev/null'";
 
-		my $title = `$command 2> /dev/null`;
-		$title = "Po4a Tools" unless length $title;
-		$parser->{release} = $parser->{center} = $title;
+			my $title = `$command 2> /dev/null`;
+			$title = "Po4a Tools" unless length $title;
+			$parser->{release} = $parser->{center} = $title;
+		}
 		$parser->parse_from_file ($file, $out);
 
 		system("gzip -9 -f $out") and die;
@@ -224,13 +237,5 @@
 	  'Denis Barbier <barbier at linuxfr.org>']
   );
 
-# Tweak the installation path
-#  Retrieve the prefix (There should be a better way)
-my $base = $b->install_destination("bindoc");
-$base =~ s/\/man\/man1//;
-#  Set the paths for the manpages and MO files
-$b->{properties}{install_sets}{$b->installdirs}{man} = $base.'/man';
-$b->{properties}{install_sets}{$b->installdirs}{po} = $base.'/locale';
-
 $b->create_build_script;
 

Index: changelog
===================================================================
RCS file: /cvsroot/po4a/po4a/changelog,v
retrieving revision 1.424
retrieving revision 1.425
diff -u -d -r1.424 -r1.425
--- changelog	31 Jan 2009 21:36:39 -0000	1.424
+++ changelog	9 Feb 2009 21:32:38 -0000	1.425
@@ -1,3 +1,8 @@
+2009-02-09  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* Build.PL: Another try to fix the installation of manpages and mo
+	files.
+
 2009-01-31  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* po/bin/po4a.pot, po/pod/po4a-pod.pot: Regenerated.




More information about the Po4a-commits mailing list