Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/ulm:patchsets commit in: skey/1.1.5/
Date: Thu, 25 Jun 2015 21:41:34
Message-Id: 1435266013.1af659d9eee755ce3baa801f5d99d649e828207f.ulm@gentoo
1 commit: 1af659d9eee755ce3baa801f5d99d649e828207f
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 25 21:00:13 2015 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 25 21:00:13 2015 +0000
6 URL: https://gitweb.gentoo.org/dev/ulm.git/commit/?id=1af659d9
7
8 Replace broken perl script by sed, bug 553148.
9
10 skey/1.1.5/12_all_fixpathscmd.patch | 73 +++++++++++++++++++++++++++++++++++++
11 1 file changed, 73 insertions(+)
12
13 diff --git a/skey/1.1.5/12_all_fixpathscmd.patch b/skey/1.1.5/12_all_fixpathscmd.patch
14 new file mode 100644
15 index 0000000..d4bd421
16 --- /dev/null
17 +++ b/skey/1.1.5/12_all_fixpathscmd.patch
18 @@ -0,0 +1,73 @@
19 +https://bugs.gentoo.org/553148
20 +Replace broken perl script by sed.
21 +
22 +--- skey-1.1.5-orig/Makefile.in
23 ++++ skey-1.1.5/Makefile.in
24 +@@ -40,13 +40,11 @@
25 + CATMAN = skey.0 skeyinit.0 skeyinfo.0 skeyaudit.0 skeyprune.0
26 + MANPAGES = @MANTYPE@
27 +
28 +-PATHSUBS = -D/etc/skeykeys=${sysconfdir}/skeykeys -D/usr/bin/perl=${PERL}
29 +-
30 +-FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
31 ++FIXPATHSCMD = sed -i -e 's:/etc/skey/skeykeys:${sysconfdir}/skeykeys:g;s:/usr/bin/perl:${PERL}:g'
32 +
33 + HDRS= skey.h sha1.h
34 +
35 +-all: ${TARGETS} ${MANPAGES}
36 ++all: ${TARGETS} ${SCRIPTS} ${MANPAGES}
37 +
38 + ${LIBOBJS}: config.h
39 +
40 +--- skey-1.1.5-orig/fixpaths 2001-05-10 16:10:49.000000000 +0000
41 ++++ skey-1.1.5/fixpaths 1970-01-01 00:00:00.000000000 +0000
42 +@@ -1,49 +0,0 @@
43 +-#!/usr/bin/perl -w
44 +-#
45 +-# fixpaths - substitute makefile variables into text files
46 +-
47 +-
48 +-$usage = "Usage: $0 [-x<file dot-suffix>] [-Dstring=replacement] [[infile] ...]\n";
49 +-
50 +-$ext="out";
51 +-
52 +-if (!defined(@ARGV)) { die ("$usage"); }
53 +-
54 +-# read in the command line and get some definitions
55 +-while ($_=$ARGV[0], /^-/) {
56 +- if (/^-[Dx]/) {
57 +- # definition
58 +- shift(@ARGV);
59 +- if ( /-D(.*)=(.*)/ ) {
60 +- $def{"$1"}=$2;
61 +- } elsif ( /-x\s*(\w+)/ ) {
62 +- $ext=$1;
63 +- } else {
64 +- die ("$usage$0: error in command line arguments.\n");
65 +- }
66 +- } else {
67 +- die ("$usage$0: unknown option '-".$ARGV[0][1]."'\n");
68 +- }
69 +-} # while parsing arguments
70 +-
71 +-if (!defined(%def)) {
72 +- die ("$0: nothing to do - no substitutions listed!\n");
73 +-}
74 +-
75 +-for $f (@ARGV) {
76 +-
77 +- $f =~ /(.*\/)*(.*)$/;
78 +- $of = $2.".$ext";
79 +-
80 +- open(IN, "<$f") || die ("$0: input file $f missing!\n");
81 +- if (open(OUT, ">$of")) {
82 +- while (<IN>) {
83 +- for $s (keys(%def)) {
84 +- s#$s#$def{$s}#;
85 +- } # for $s
86 +- print OUT;
87 +- } # while <IN>
88 +- } # if (outfile open)
89 +-} # for $f
90 +-
91 +-exit 0;