pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/po4a
Module Name: pkgsrc
Committed By: schmonz
Date: Wed Jun 21 19:08:07 UTC 2023
Modified Files:
pkgsrc/textproc/po4a: Makefile distinfo options.mk
pkgsrc/textproc/po4a/patches: patch-Po4aBuilder.pm
patch-lib_Locale_Po4a_Po.pm
Added Files:
pkgsrc/textproc/po4a/patches: patch-msguntypot patch-po4a
patch-po4a-updatepo
Log Message:
po4a: fix build on Solarish.
- Conditionally depend on diffutils (borrowed from pkgdiff)
- On "SunOS", resolve /dev/null symlink (if any) during pre-configure
- When invoking gettext-tools, make sure they're the pkgsrc ones
- Add 'sgml' option (also off by default) as suggested by upstream
Fixes build (and passes nearly all tests, with both options enabled) on
Tribblix and Solaris 11, which is exactly as good as things were -- and
are -- on NetBSD.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 pkgsrc/textproc/po4a/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/textproc/po4a/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/po4a/options.mk
cvs rdiff -u -r1.9 -r1.10 pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/po4a/patches/patch-msguntypot \
pkgsrc/textproc/po4a/patches/patch-po4a
cvs rdiff -u -r0 -r1.3 pkgsrc/textproc/po4a/patches/patch-po4a-updatepo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/textproc/po4a/Makefile
diff -u pkgsrc/textproc/po4a/Makefile:1.58 pkgsrc/textproc/po4a/Makefile:1.59
--- pkgsrc/textproc/po4a/Makefile:1.58 Tue Jun 20 15:30:12 2023
+++ pkgsrc/textproc/po4a/Makefile Wed Jun 21 19:08:06 2023
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.58 2023/06/20 15:30:12 schmonz Exp $
+# $NetBSD: Makefile,v 1.59 2023/06/21 19:08:06 schmonz Exp $
DISTNAME= po4a-0.69
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GITHUB:=mquinson/}
GITHUB_RELEASE= v${PKGVERSION_NOREV}
@@ -23,9 +23,23 @@ DEPENDS+= p5-PerlIO-utf8_strict-[0-9]*:.
DEPENDS+= p5-Unicode-LineBreak-[0-9]*:../../textproc/p5-Unicode-LineBreak
DEPENDS+= p5-YAML-Tiny-[0-9]*:../../textproc/p5-YAML-Tiny
+.include "../../mk/bsd.prefs.mk"
+
+# sync with pkgtools/pkgdiff/Makefile
+.if \
+ ${OPSYS} == "SunOS" || \
+ ${OPSYS} == "OSF1" || \
+ ${OPSYS} == "Darwin" && empty(OSX_VERSION:M[0-9].*) && empty(OSX_VERSION:M1[0-2].*)
+DEPENDS+= diffutils-[0-9]*:../../devel/diffutils
+DIFF?= ${PREFIX}/bin/gdiff
+.else
+DIFF?= diff
+.endif
+
.include "options.mk"
-USE_TOOLS+= pkg-config perl:run msgmerge:run msgfmt:run diff:run
+USE_TOOLS+= pkg-config perl:run diff:run
+USE_TOOLS+= msgconv:run msgfmt:run msgmerge:run
PERL5_MODULE_TYPE= Module::Build
PERL5_PACKLIST= auto/po4a/.packlist
@@ -36,17 +50,21 @@ REPLACE_PERL+= lib/Locale/Po4a/*
MAKE_ENV+= COLUMNS=76
-SUBST_CLASSES+= tools
-SUBST_FILES.tools= lib/Locale/Po4a/Po.pm Po4aBuilder.pm
-SUBST_STAGE.tools= pre-configure
-SUBST_VARS.tools= DIFF
-
-# work around not to set PATH to msgmerge, please somebody to fix correctly
-SUBST_CLASSES+= path
-SUBST_FILES.path= po4a
-SUBST_MESSAGE.path= Fix msgmerge command path (not found)
-SUBST_STAGE.path= pre-configure
-SUBST_SED.path= -e 's|"msgmerge"|"${PREFIX}/bin/msgmerge"|;'
+.if ${OPSYS} == "SunOS"
+# If /dev/null is a symlink into /devices/pseudo/, msgfmt won't follow it
+# (maybe because it's in a different filesystem?)
+# So we expand the symlink (if any) before building.
+PO4A_DEVNULL_cmd= readlink -f /dev/null | sed -e 's|@|\\@|'
+PO4A_DEVNULL= ${PO4A_DEVNULL_cmd:sh}
+.else
+PO4A_DEVNULL= /dev/null
+.endif
+
+SUBST_CLASSES+= paths
+SUBST_FILES.paths= lib/Locale/Po4a/Po.pm Po4aBuilder.pm
+SUBST_FILES.paths+= msguntypot po4a po4a-updatepo
+SUBST_STAGE.paths= pre-configure
+SUBST_VARS.paths= PREFIX DIFF SH PO4A_DEVNULL
.include "../../devel/gettext-tools/buildlink3.mk"
.include "../../lang/perl5/module.mk"
Index: pkgsrc/textproc/po4a/distinfo
diff -u pkgsrc/textproc/po4a/distinfo:1.27 pkgsrc/textproc/po4a/distinfo:1.28
--- pkgsrc/textproc/po4a/distinfo:1.27 Tue Jun 20 15:30:12 2023
+++ pkgsrc/textproc/po4a/distinfo Wed Jun 21 19:08:06 2023
@@ -1,8 +1,11 @@
-$NetBSD: distinfo,v 1.27 2023/06/20 15:30:12 schmonz Exp $
+$NetBSD: distinfo,v 1.28 2023/06/21 19:08:06 schmonz Exp $
BLAKE2s (po4a-0.69.tar.gz) = c82a56664a6a9a674b02f1026843d65aea6671c913738f6e1e565d7242dbe96d
SHA512 (po4a-0.69.tar.gz) = 9cb5eec547ab18d1c3ebdda212b909fc4f5489a74641ba2d7e0a3a1d060f245d23667c16e687c678c5ccc3809c9315d20673266dcc3764172a899caa397238e3
Size (po4a-0.69.tar.gz) = 4665710 bytes
-SHA1 (patch-Po4aBuilder.pm) = 4d8a271346f3dae4056f07bb305823a5201da805
-SHA1 (patch-lib_Locale_Po4a_Po.pm) = d6f3bdce23db55b77bfb13a926288636dc248dd7
+SHA1 (patch-Po4aBuilder.pm) = b5a3dae1f53c56e78dbc1034f6313cbede00ce3a
+SHA1 (patch-lib_Locale_Po4a_Po.pm) = 481171dc8f7cbceb0d532f8d3074750d2de82b10
SHA1 (patch-lib_Locale_Po4a_Text.pm) = d019287e6c03671da4433689691b5447a665208e
+SHA1 (patch-msguntypot) = 299b1ee02dfce836980eee3b7d5ae23256b66cd8
+SHA1 (patch-po4a) = 114b1ea9247bdcc17ed125c19d57d10fb3bca805
+SHA1 (patch-po4a-updatepo) = 22c328728180ea3e572717b6ffd394da4ca30b5a
Index: pkgsrc/textproc/po4a/options.mk
diff -u pkgsrc/textproc/po4a/options.mk:1.1 pkgsrc/textproc/po4a/options.mk:1.2
--- pkgsrc/textproc/po4a/options.mk:1.1 Sat Apr 29 14:31:29 2023
+++ pkgsrc/textproc/po4a/options.mk Wed Jun 21 19:08:06 2023
@@ -1,13 +1,16 @@
-# $NetBSD: options.mk,v 1.1 2023/04/29 14:31:29 schmonz Exp $
+# $NetBSD: options.mk,v 1.2 2023/06/21 19:08:06 schmonz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.po4a
-PKG_SUPPORTED_OPTIONS+= latex
+PKG_SUPPORTED_OPTIONS+= latex sgml
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mlatex)
-# kpsewhich
-DEPENDS+= kpathsea-[0-9]*:../../print/kpathsea
-# article.cls
-DEPENDS+= tex-latex-[0-9]*:../../print/tex-latex
+DEPENDS+= kpathsea-[0-9]*:../../print/kpathsea # kpsewhich
+DEPENDS+= tex-latex-[0-9]*:../../print/tex-latex # article.cls
+.endif
+
+.if !empty(PKG_OPTIONS:Msgml)
+DEPENDS+= docbook-[0-9]*:../../textproc/docbook # DTDs
+DEPENDS+= opensp-[0-9]*:../../textproc/opensp # onsgmls
.endif
Index: pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm
diff -u pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm:1.9 pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm:1.10
--- pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm:1.9 Tue Jun 20 15:30:12 2023
+++ pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm Wed Jun 21 19:08:06 2023
@@ -1,10 +1,10 @@
-$NetBSD: patch-Po4aBuilder.pm,v 1.9 2023/06/20 15:30:12 schmonz Exp $
+$NetBSD: patch-Po4aBuilder.pm,v 1.10 2023/06/21 19:08:06 schmonz Exp $
-(1) ryoon: remove gzip at initial import
-(2) mef: Add PerlIO::F_UTF8 () macro
-(3) mef: to avoid --previous option is said unknown to msgmerge
- (but sounds strange)
-(4) schmonz: Use a sufficiently capable diff
+(1) ryoon: remove gzip at initial import.
+(2) mef: Add PerlIO::F_UTF8 () macro.
+(3) schmonz: Use a sufficiently capable diff.
+(4) schmonz: Invoke pkgsrc's gettext-tools.
+(5) schmonz: Write to the full physical null device.
--- Po4aBuilder.pm.orig 2023-01-01 00:30:43.000000000 +0000
+++ Po4aBuilder.pm
@@ -31,7 +31,7 @@ $NetBSD: patch-Po4aBuilder.pm,v 1.9 2023
unless ($self->up_to_date("po/bin/po4a.pot", $_)) {
print "XX Sync $_: ";
- system("msgmerge --previous $_ po/bin/po4a.pot -o $_.new") && die;
-+ system("msgmerge $_ po/bin/po4a.pot -o $_.new") && die;
++ system("@PREFIX@/bin/msgmerge --previous $_ po/bin/po4a.pot -o $_.new") && die;
# Typically all that changes was a date. I'd
# prefer not to commit such changes, so detect
# and ignore them.
@@ -40,6 +40,28 @@ $NetBSD: patch-Po4aBuilder.pm,v 1.9 2023
if ($diff eq "") {
unlink "$_.new" || die;
# touch it
+@@ -101,7 +103,7 @@ sub ACTION_binpo {
+ }
+ unless ($self->up_to_date($_,"blib/po/$lang/LC_MESSAGES/po4a.mo")) {
+ mkpath( File::Spec->catdir( 'blib', 'po', $lang, "LC_MESSAGES" ), 0, oct(755) );
+- system("msgfmt -o blib/po/$lang/LC_MESSAGES/po4a.mo $_") && die;
++ system("@PREFIX@/bin/msgfmt -o blib/po/$lang/LC_MESSAGES/po4a.mo $_") && die;
+ }
+ }
+ }
+@@ -222,9 +224,9 @@ sub ACTION_man {
+ $parser->{release} = $parser->{center} = "Po4a Tools";
+ } else {
+ 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 = "@PREFIX@/bin/msggrep -K -E -e \"Po4a Tools\" po/pod/$lang.po |";
++ $command .= "@PREFIX@/bin/msgconv -t UTF-8 | ";
++ $command .= "@PREFIX@/bin/msgexec @SH@ -c '[ -n \"\$MSGEXEC_MSGID\" ] ";
+ $command .= "&& cat || cat > /dev/null'";
+
+ my $title = `$command 2> /dev/null`;
@@ -234,8 +236,6 @@ sub ACTION_man {
}
$parser->parse_from_file ($file, $out);
@@ -59,3 +81,12 @@ $NetBSD: patch-Po4aBuilder.pm,v 1.9 2023
}
}
}
+@@ -284,7 +282,7 @@ sub postats {
+ foreach (sort @files) {
+ $file = $_;
+ my $lang = fileparse($file, qw{.po});
+- my $stat = `msgfmt -o /dev/null -c --statistics $file 2>&1`;
++ my $stat = `@PREFIX@/bin/msgfmt -o @PO4A_DEVNULL@ -c --statistics $file 2>&1`;
+ my ($trans, $fuzz, $untr) = (0,0,0);
+ if ($stat =~ /(\d+)\D+?(\d+)\D+?(\d+)/) {
+ ($trans, $fuzz, $untr) = ($1,$2,$3);
Index: pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm
diff -u pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm:1.1 pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm:1.2
--- pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm:1.1 Tue Jun 20 15:30:12 2023
+++ pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm Wed Jun 21 19:08:06 2023
@@ -1,9 +1,19 @@
-$NetBSD: patch-lib_Locale_Po4a_Po.pm,v 1.1 2023/06/20 15:30:12 schmonz Exp $
+$NetBSD: patch-lib_Locale_Po4a_Po.pm,v 1.2 2023/06/21 19:08:06 schmonz Exp $
Use a sufficiently capable diff.
+Write to the full physical null device.
--- lib/Locale/Po4a/Po.pm.orig 2023-01-01 00:30:43.000000000 +0000
+++ lib/Locale/Po4a/Po.pm
+@@ -325,7 +325,7 @@ sub read {
+ $lang =~ s/\.po$//;
+ $self->{lang} = $lang;
+
+- my $cmd = "msgfmt" . $Config{_exe} . " --check-format --check-domain -o /dev/null " . $filename;
++ my $cmd = "@PREFIX@/bin/msgfmt" . $Config{_exe} . " --check-format --check-domain -o @PO4A_DEVNULL@ " . $filename;
+
+ my $locale = $ENV{'LC_ALL'};
+ $ENV{'LC_ALL'} = "C";
@@ -621,7 +621,7 @@ sub move_po_if_needed {
my $diff;
Added files:
Index: pkgsrc/textproc/po4a/patches/patch-msguntypot
diff -u /dev/null pkgsrc/textproc/po4a/patches/patch-msguntypot:1.1
--- /dev/null Wed Jun 21 19:08:07 2023
+++ pkgsrc/textproc/po4a/patches/patch-msguntypot Wed Jun 21 19:08:06 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-msguntypot,v 1.1 2023/06/21 19:08:06 schmonz Exp $
+
+Invoke pkgsrc's gettext-tools.
+
+--- msguntypot.orig 2023-01-01 00:30:43.000000000 +0000
++++ msguntypot
+@@ -206,7 +206,7 @@ my $pocount = 0;
+ while (my $poarg = shift) {
+ $pocount ++;
+ print wrap_msg(gettext("Handling %s"),$poarg) if $verbose;
+- if (system("msgmerge $msgmergeOpts -o $pofile $poarg $oldfile 2>/dev/null")) {
++ if (system("@PREFIX@/bin/msgmerge $msgmergeOpts -o $pofile $poarg $oldfile 2>/dev/null")) {
+ my $msg = $!;
+ unlink ($pofile);
+ die wrap_msg(gettext("Could not run msgmerge: %s"), $msg);
Index: pkgsrc/textproc/po4a/patches/patch-po4a
diff -u /dev/null pkgsrc/textproc/po4a/patches/patch-po4a:1.1
--- /dev/null Wed Jun 21 19:08:07 2023
+++ pkgsrc/textproc/po4a/patches/patch-po4a Wed Jun 21 19:08:06 2023
@@ -0,0 +1,95 @@
+$NetBSD: patch-po4a,v 1.1 2023/06/21 19:08:06 schmonz Exp $
+
+Invoke pkgsrc's gettext-tools.
+Write to the full physical null device.
+
+--- po4a.orig 2023-01-01 00:30:43.000000000 +0000
++++ po4a
+@@ -723,7 +723,7 @@ sub show_version {
+ my @ORIGINAL_ARGV = @ARGV;
+
+ # Use /NUL instead of /dev/null on Windows
+-my $devnull = ( $^O =~ /Win/ ) ? '/NUL' : '/dev/null';
++my $devnull = ( $^O =~ /Win/ ) ? '/NUL' : '@PO4A_DEVNULL@';
+
+ # Parse the options provided on the command line, or in argument
+ sub get_options {
+@@ -1615,7 +1615,7 @@ if ( $po4a_opts{"split"} ) {
+ mkdir $dir or die wrap_msg( gettext("Cannot create directory '%s': %s"), $dir, $! );
+ }
+ my $outfile = $po4a_opts{"force"} ? find_output_file($master_pot) : $tmp_file;
+- my $cmd = "msggrep$Config{_exe} $split_pot_files{$master_pot} -o $outfile $pot_filename";
++ my $cmd = "@PREFIX@/bin/msggrep$Config{_exe} $split_pot_files{$master_pot} -o $outfile $pot_filename";
+ run_cmd($cmd);
+
+ die wrap_msg(
+@@ -1658,7 +1658,7 @@ if ( $po4a_opts{"split"} ) {
+ $split_po{$lang}{$master} = $master_po;
+ }
+ if ( length $cmd_cat ) {
+- $cmd_cat = "msgcat" . $Config{_exe} . " -o $tmp_bigpo $cmd_cat";
++ $cmd_cat = "@PREFIX@/bin/msgcat" . $Config{_exe} . " -o $tmp_bigpo $cmd_cat";
+ run_cmd($cmd_cat);
+ }
+
+@@ -1685,7 +1685,7 @@ if ( not $po4a_opts{"no-update"} ) {
+
+ my $msgmerge_opt = $po4a_opts{"msgmerge-opt"};
+ $msgmerge_opt =~ s/\$lang\b/$lang/g if scalar @langs;
+- my $cmd = "msgmerge" . $Config{_exe} . " $infile $updated_potfile " . $msgmerge_opt;
++ my $cmd = "@PREFIX@/bin/msgmerge" . $Config{_exe} . " $infile $updated_potfile " . $msgmerge_opt;
+ if ( $infile eq $outfile ) { # in place
+ $cmd .= " --backup=none --update";
+ } else {
+@@ -1700,7 +1700,7 @@ if ( not $po4a_opts{"no-update"} ) {
+ printf( gettext("Updating %s:"), $po_filename{$lang} );
+ }
+
+- my $stat = qx(msgfmt$Config{_exe} --statistics -v -o $devnull $outfile 2>&1);
++ my $stat = qx(@PREFIX@/bin/msgfmt$Config{_exe} --statistics -v -o $devnull $outfile 2>&1);
+ $stat =~ s/^[^:]*://;
+ print $stat;
+ }
+@@ -1708,7 +1708,7 @@ if ( not $po4a_opts{"no-update"} ) {
+ } else {
+ my $read_pot_filename = find_input_file($pot_filename);
+ my $cmd =
+- "msginit$Config{_exe} -i $read_pot_filename --locale $lang -o $outfile --no-translator >$devnull";
++ "@PREFIX@/bin/msginit$Config{_exe} -i $read_pot_filename --locale $lang -o $outfile --no-translator >$devnull";
+ run_cmd($cmd);
+ }
+ }
+@@ -1741,13 +1741,13 @@ if ( not $po4a_opts{"no-update"} ) {
+
+ $cmd =
+ $env
+- . " msggrep$Config{_exe}"
++ . " @PREFIX@/bin/msggrep$Config{_exe}"
+ . " --force-po --invert-match --msgid --regexp '.'"
+ . " --output $tmp_file "
+ . find_input_file( $split_po{$lang}{$master} );
+ } else {
+ $cmd =
+- "msginit$Config{_exe} "
++ "@PREFIX@/bin/msginit$Config{_exe} "
+ . "--no-translator -l $lang --input "
+ . find_output_file( $split_pot{$master} )
+ . " --output $tmp_file >$devnull";
+@@ -1756,7 +1756,7 @@ if ( not $po4a_opts{"no-update"} ) {
+
+ # Update the PO according to the new POT and to the big PO (compendium).
+ $cmd =
+- "msgmerge$Config{_exe} "
++ "@PREFIX@/bin/msgmerge$Config{_exe} "
+ . " --compendium "
+ . $po_filename{$lang}
+ . " --update --backup=none "
+@@ -1817,7 +1817,7 @@ if ( not $po4a_opts{"no-translations"} )
+ print "Reading PO file $pofile for language $lang: "
+ if ( $po4a_opts{"debug"} );
+ $po->read($pofile);
+- system( "msgfmt" . $Config{_exe} . " --statistics -v -o $devnull $pofile" )
++ system( "@PREFIX@/bin/msgfmt" . $Config{_exe} . " --statistics -v -o $devnull $pofile" )
+ if ( $po4a_opts{"debug"} );
+
+ DOC: foreach my $master (
Index: pkgsrc/textproc/po4a/patches/patch-po4a-updatepo
diff -u /dev/null pkgsrc/textproc/po4a/patches/patch-po4a-updatepo:1.3
--- /dev/null Wed Jun 21 19:08:07 2023
+++ pkgsrc/textproc/po4a/patches/patch-po4a-updatepo Wed Jun 21 19:08:06 2023
@@ -0,0 +1,23 @@
+$NetBSD: patch-po4a-updatepo,v 1.3 2023/06/21 19:08:06 schmonz Exp $
+
+Invoke pkgsrc's gettext-tools.
+Write to the full physical null device.
+
+--- po4a-updatepo.orig 2023-01-01 00:30:43.000000000 +0000
++++ po4a-updatepo
+@@ -308,13 +308,13 @@ while ( my $po_filename = shift @pofiles
+ if ( -e $po_filename ) {
+ print STDERR wrap_msg( gettext("Updating %s:"), $po_filename )
+ if $verbose;
+- my @cmd = ( "msgmerge" . $Config{_exe} );
++ my @cmd = ( "@PREFIX@/bin/msgmerge" . $Config{_exe} );
+ push( @cmd, split( /\s+/, $msgmerge_opt ) ) if length($msgmerge_opt);
+ push @cmd, ( "-U", $po_filename, $pot_filename );
+ print STDERR join( ' ', @cmd ) . "\n" if $debug;
+ system(@cmd) == 0
+ or die wrap_msg( gettext("Could not run msgmerge: %s"), $! );
+- @cmd = ( "msgfmt" . $Config{_exe}, "--statistics", "-v", "-o", File::Spec->devnull(), $po_filename );
++ @cmd = ( "@PREFIX@/bin/msgfmt" . $Config{_exe}, "--statistics", "-v", "-o", "@PO4A_DEVNULL@", $po_filename );
+ print STDERR join( ' ', @cmd ) . "\n" if $debug;
+ system(@cmd)
+ if $verbose;
Home |
Main Index |
Thread Index |
Old Index