Package init
This commit is contained in:
commit
b28ae628dc
BIN
intltool-0.51.0.tar.gz
Normal file
BIN
intltool-0.51.0.tar.gz
Normal file
Binary file not shown.
38
intltool-merge-Create-cache-file-atomically.patch
Normal file
38
intltool-merge-Create-cache-file-atomically.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From d328542bea50b9445c63cdf2454052392282a1ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: Colin Walters <walters@verbum.org>
|
||||||
|
Date: Thu, 8 Oct 2015 16:25:47 -0400
|
||||||
|
Subject: [PATCH] intltool-merge: Create cache file atomically
|
||||||
|
|
||||||
|
It's going to be relatively common for build systems operating in
|
||||||
|
parallel to run multiple copies of `intltool-merge`, yet the cache
|
||||||
|
file is not created atomically (i.e. with the "open .tmp file and
|
||||||
|
rename()" dance).
|
||||||
|
|
||||||
|
I suspect (but have not yet determined conclusively) this is the cause
|
||||||
|
of some systemd build issues where translations don't appear in the
|
||||||
|
merged file.
|
||||||
|
|
||||||
|
Regardless, this patch can't hurt.
|
||||||
|
---
|
||||||
|
intltool-merge.in | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/intltool-merge.in b/intltool-merge.in
|
||||||
|
index 1afa2a4..d1eba8f 100644
|
||||||
|
--- a/intltool-merge.in
|
||||||
|
+++ b/intltool-merge.in
|
||||||
|
@@ -371,9 +371,10 @@ sub create_cache
|
||||||
|
|
||||||
|
&create_translation_database;
|
||||||
|
|
||||||
|
- open CACHE, ">$cache_file" || die;
|
||||||
|
+ open CACHE, ">$cache_file" . ".tmp" || die;
|
||||||
|
print CACHE join "\x01", %translations;
|
||||||
|
close CACHE;
|
||||||
|
+ rename("$cache_file" . ".tmp", "$cache_file");
|
||||||
|
}
|
||||||
|
|
||||||
|
sub load_cache
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
59
intltool-perl5.26-regex-fixes.patch
Normal file
59
intltool-perl5.26-regex-fixes.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
Description: Escape "{", to prevent complaints from perl 5.22 and 5.26
|
||||||
|
Author: Roderich Schupp <roderich.schupp@gmail.com>
|
||||||
|
Author: gregor herrmann <gregoa@debian.org>
|
||||||
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705
|
||||||
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471
|
||||||
|
Bug-Upstream: https://bugs.launchpad.net/intltool/+bug/1490906
|
||||||
|
|
||||||
|
Index: intltool-0.51.0/intltool-update.in
|
||||||
|
===================================================================
|
||||||
|
--- intltool-0.51.0.orig/intltool-update.in 2017-07-23 17:24:35.113169465 +0200
|
||||||
|
+++ intltool-0.51.0/intltool-update.in 2017-07-23 17:24:35.109169052 +0200
|
||||||
|
@@ -1062,13 +1062,13 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
|
||||||
|
+ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
|
||||||
|
{
|
||||||
|
my $rest = $3;
|
||||||
|
my $untouched = $1;
|
||||||
|
my $sub = "";
|
||||||
|
# Ignore recursive definitions of variables
|
||||||
|
- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
|
||||||
|
+ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\$\{?$2}?/;
|
||||||
|
|
||||||
|
return SubstituteVariable ("$untouched$sub$rest");
|
||||||
|
}
|
||||||
|
@@ -1190,10 +1190,10 @@
|
||||||
|
$name =~ s/\(+$//g;
|
||||||
|
$version =~ s/\(+$//g;
|
||||||
|
|
||||||
|
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
|
||||||
|
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
|
||||||
|
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
|
||||||
|
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
|
||||||
|
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
|
||||||
|
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
|
||||||
|
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
|
||||||
|
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
|
||||||
|
@@ -1219,11 +1219,11 @@
|
||||||
|
$version =~ s/\(+$//g;
|
||||||
|
$bugurl =~ s/\(+$//g if (defined $bugurl);
|
||||||
|
|
||||||
|
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
|
||||||
|
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
|
||||||
|
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
|
||||||
|
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
|
||||||
|
- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
|
||||||
|
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
|
||||||
|
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
|
||||||
|
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
|
||||||
|
+ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
|
||||||
|
+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
|
||||||
|
}
|
||||||
|
|
||||||
|
# \s makes this not work, why?
|
||||||
52
intltool.spec
Normal file
52
intltool.spec
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
Name: intltool
|
||||||
|
Version: 0.51.0
|
||||||
|
Release: 14
|
||||||
|
Summary: Utility scripts for internationalizing XML
|
||||||
|
License: GPLv2
|
||||||
|
URL: https://launchpad.net/intltool
|
||||||
|
Source0: https://launchpad.net/%{name}/trunk/%{version}/+download/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: perl-generators perl(XML::Parser)
|
||||||
|
Requires: automake gettext-devel perl(XML::Parser) perl(Getopt::Long) patch
|
||||||
|
|
||||||
|
Patch1: intltool-perl5.26-regex-fixes.patch
|
||||||
|
# rhbz1249051
|
||||||
|
Patch2: intltool-merge-Create-cache-file-atomically.patch
|
||||||
|
# fix make distcheck fail, rhbz1318674
|
||||||
|
Patch3: intltool_distcheck-fix.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
Intltool can automatically extracts translatable strings from oaf, glade, bonobo ui, nautilus
|
||||||
|
theme and other XML files into the po files.
|
||||||
|
Intltool can also automatically merges translations from po files back into .oaf files (encoding to
|
||||||
|
be 7-bit clean). The merging mechanism can also be extended to support other types of XML files.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README
|
||||||
|
%license COPYING AUTHORS
|
||||||
|
%{_bindir}/%{name}*
|
||||||
|
%{_datadir}/%{name}
|
||||||
|
%{_datadir}/aclocal/%{name}*
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Nov 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.51.0-14
|
||||||
|
- Package init
|
||||||
30
intltool_distcheck-fix.patch
Normal file
30
intltool_distcheck-fix.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
diff -upr intltool-0.51.0-orig/intltool-update.in intltool-0.51.0/intltool-update.in
|
||||||
|
--- intltool-0.51.0-orig/intltool-update.in 2016-07-29 14:08:06.276987000 +0200
|
||||||
|
+++ intltool-0.51.0/intltool-update.in 2016-07-29 14:11:09.562126918 +0200
|
||||||
|
@@ -620,6 +620,14 @@ sub FindLeftoutFiles
|
||||||
|
|
||||||
|
my @result;
|
||||||
|
|
||||||
|
+ # If the builddir is a subdir of srcdir, the list of files found will be prefixed with
|
||||||
|
+ # an additional prefix (e.g. "_build/sub" for automake 1.15 make distcheck). Try to
|
||||||
|
+ # handle that, by removing those matches as well.
|
||||||
|
+ my $absbuilddir = Cwd::abs_path("..\/");
|
||||||
|
+ my $abssrcdir = Cwd::abs_path("$SRCDIR/..");
|
||||||
|
+ # Check if builddir is a subdir of srcdir
|
||||||
|
+ my ($abspath,$relpath) = split /\s*$abssrcdir\/\s*/, $absbuilddir, 2;
|
||||||
|
+
|
||||||
|
foreach (@buf_allfiles_sorted)
|
||||||
|
{
|
||||||
|
my $dummy = $_;
|
||||||
|
@@ -628,7 +636,10 @@ sub FindLeftoutFiles
|
||||||
|
$srcdir =~ s#^../##;
|
||||||
|
$dummy =~ s#^$srcdir/../##;
|
||||||
|
$dummy =~ s#^$srcdir/##;
|
||||||
|
- $dummy =~ s#_build/##;
|
||||||
|
+ if ($relpath)
|
||||||
|
+ {
|
||||||
|
+ $dummy =~ s#^$relpath/##;
|
||||||
|
+ }
|
||||||
|
if (!exists($in2{$dummy}))
|
||||||
|
{
|
||||||
|
push @result, $dummy
|
||||||
Loading…
x
Reference in New Issue
Block a user