- improved perl dependency extraction (#198033, #249135) by Ville Skyttä

and John Owens
- make find-lang --with-gnome pick up .omf files (#251400) by Matthias
    Clasen
This commit is contained in:
Panu Matilainen 2007-08-15 09:36:37 +00:00
parent 15931be6ed
commit a836ad166a
3 changed files with 153 additions and 1 deletions

View File

@ -0,0 +1,29 @@
changeset: 6304:03206d67072c
tag: tip
user: Panu Matilainen <pmatilai@redhat.com>
date: Wed Aug 15 12:07:31 2007 +0300
files: scripts/find-lang.sh
description:
Make find-lang.sh --with-gnome pick up omf files (rhbz#251400)
Patch from Matthias Clasen.
diff -r 7f45c685a512 -r 03206d67072c scripts/find-lang.sh
--- a/scripts/find-lang.sh Wed Aug 15 09:12:25 2007 +0200
+++ b/scripts/find-lang.sh Wed Aug 15 12:07:31 2007 +0300
@@ -106,6 +106,14 @@ s:%lang(C) ::
s:%lang(C) ::
/^$/d' >> $MO_NAME
+find $TOP_DIR -type f|sed '
+s:'"$TOP_DIR"'::
+'"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\).omf\):%lang(\2) \1:
+'"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\).omf\):%lang(\2) \1:
+s:^[^%].*::
+s:%lang(C) ::
+/^$/d' >> $MO_NAME
+
find $TOP_DIR -type d|sed '
s:'"$TOP_DIR"'::
'"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\)::

View File

@ -0,0 +1,112 @@
diff -r 9f1a7ebe1223 -r 9f0012fffce1 scripts/perl.req
--- a/scripts/perl.req Fri Aug 10 10:02:25 2007 +0200
+++ b/scripts/perl.req Fri Aug 10 11:41:24 2007 +0300
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# RPM (and it's source code) is covered under two separate licenses.
+# RPM (and its source code) is covered under two separate licenses.
# The entire code base may be distributed under the terms of the GNU
# General Public License (GPL), which appears immediately below.
@@ -17,7 +17,7 @@
# Any questions regarding the licensing of RPM should be addressed to
# Erik Troan <ewt@redhat.com>.
-# a simple makedepends like script for perl.
+# a simple makedepend like script for perl.
# To save development time I do not parse the perl grammmar but
# instead just lex it looking for what I want. I take special care to
@@ -59,9 +59,9 @@ foreach $module (sort keys %require) {
print "perl($module)\n";
} else {
- # I am not using rpm3.0 so I do not want spaces arround my
+ # I am not using rpm3.0 so I do not want spaces around my
# operators. Also I will need to change the processing of the
- # $RPM_* vairable when I upgrage.
+ # $RPM_* variable when I upgrade.
print "perl($module) >= $require{$module}\n";
}
@@ -82,11 +82,22 @@ sub process_file {
# skip the "= <<" block
- if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/i) ||
- ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/i) ) {
+ if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/) ||
+ ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/) ) {
$tag = $2;
while (<FILE>) {
( $_ =~ /^$tag/) && last;
+ }
+ }
+
+ # skip q{} quoted sections - just hope we don't have curly brackets
+ # within the quote, nor an escaped hash mark that isn't a comment
+ # marker, such as occurs right here. Draw the line somewhere.
+ if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
+ $tag = $1;
+ $tag =~ tr/{\(\[\#|\//})]#|\//;
+ while (<FILE>) {
+ ( $_ =~ m/\}/ ) && last;
}
}
@@ -153,7 +164,7 @@ sub process_file {
($module =~ m/\$/) && next;
- # skip if the phrase was "use of" -- shows up in gimp-perl, et al
+ # skip if the phrase was "use of" -- shows up in gimp-perl, et al.
next if $module eq 'of';
# if the module ends in a comma we probaly caught some
@@ -175,7 +186,7 @@ sub process_file {
next;
}
- # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc
+ # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc.
# we can strip qw.*$, as well as (.*$:
$module =~ s/qw.*$//;
$module =~ s/\(.*$//;
@@ -187,7 +198,7 @@ sub process_file {
$module =~ s/\//::/;
- # trim off trailing parenthesis if any. Sometimes people pass
+ # trim off trailing parentheses if any. Sometimes people pass
# the module an empty list.
$module =~ s/\(\s*\)$//;
@@ -208,7 +219,7 @@ sub process_file {
};
# ph files do not use the package name inside the file.
- # perlmodlib documentation says:
+ # perlmodlib documentation says:
# the .ph files made by h2ph will probably end up as
# extension modules made by h2xs.
diff -r fb37e4dccbf3 -r 0408b648de46 scripts/perl.prov
--- a/scripts/perl.prov Sat Jul 21 15:05:19 2007 +0300
+++ b/scripts/perl.prov Sat Jul 21 15:48:03 2007 +0300
@@ -144,11 +144,12 @@ sub process_file {
#ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.9 $, 10;
#CGI/Apache.pm:$VERSION = (qw$Revision: 1.9 $)[1];
#DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
+ #General.pm:$Config::General::VERSION = 2.33;
#
# or with the new "our" pragma you could (read will) see:
#
# our $VERSION = '1.00'
- if (($package) && (m/^\s*(our\s+)?\$VERSION\s*=\s+/)) {
+ if (($package) && (m/^\s*(our\s+)?\$(\Q$package\E::)?VERSION\s*=\s+/)) {
# first see if the version string contains the string
# '$Revision' this often causes bizzare strings and is the most

View File

@ -14,7 +14,7 @@ Summary: The RPM package management system
Name: rpm
Version: 4.4.2.1
%{expand: %%define rpm_version %{version}}
Release: 7%{?dist}
Release: 8%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source: rpm-%{rpm_version}.tar.gz
@ -37,6 +37,8 @@ Patch16: rpm-4.4.2.1-strict-docdir.patch
Patch17: rpm-4.4.2.1-buildid-thinko.patch
Patch18: rpm-4.4.2.1-estale.patch
Patch19: rpm-4.4.2.1-debuginfo-names.patch
Patch20: rpm-4.4.2.1-perl-reqprov.patch
Patch21: rpm-4.4.2.1-findlang-omf.patch
# XXX Beware, this is one murky license, partially GPL/LGPL dual-licensed
# and several different components with their own licenses included...
License: (GPLv2 and LGPLv2 with exceptions) and BSD and MIT and Sleepycat
@ -59,6 +61,8 @@ BuildRequires: readline-devel zlib-devel
BuildRequires: beecrypt-devel >= 4.1.2
Requires: beecrypt >= 4.1.2
# XXX not yet...
# BuildRequires: popt-devel
BuildConflicts: neon-devel
BuildRequires: sqlite-devel
BuildRequires: gettext-devel
@ -168,6 +172,8 @@ shell-like rules.
%patch17 -p1 -b .buildid-thinko
%patch18 -p1 -b .estale
%patch19 -p1 -b .debugedit-names
%patch20 -p1 -b .perl-reqprov
%patch21 -p1 -b .findlang-omf
cp -f %{SOURCE2} scripts/find-debuginfo.sh
@ -473,6 +479,11 @@ exit 0
%{__includedir}/popt.h
%changelog
* Wed Aug 15 2007 Panu Matilainen <pmatilai@redhat.com> - 4.4.2.1-8
- improved perl dependency extraction (#198033, #249135) by Ville Skyttä
and John Owens
- make find-lang --with-gnome pick up .omf files (#251400) by Matthias Clasen
* Mon Aug 13 2007 Panu Matilainen <pmatilai@redhat.com> - 4.4.2.1-7
- another debugedit fix and updated find-debuginfo script from Roland McGrath
- make popt provide popt-devel to further ease split-off transition