~ubuntu-branches/ubuntu/gutsy/kbd/gutsy

« back to all changes in this revision

Viewing changes to debian/patches/main_argc.diff

  • Committer: Package Import Robot
  • Author(s): Denis Barbier
  • Date: 2004-11-23 23:33:08 UTC
  • Revision ID: package-import@ubuntu.com-20041123233308-m0amizalphch2ibu
Tags: 1.12-10
Fix quilt usage in debian/rules which caused FTBFS.
Closes: #282698 Thanks, Kurt Roeckx.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
## 20_main_argc.dpatch by Denis Barbier <barbier@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Description: Fix handling of program arguments.
 
6
## DP: Date: 2004-08-02
 
7
 
 
8
if [ $# -lt 1 ]; then
 
9
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
 
10
    exit 1
 
11
fi
 
12
 
 
13
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
 
14
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
 
15
 
 
16
case "$1" in
 
17
    -patch) patch -p1 ${patch_opts} < $0;;
 
18
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
 
19
    *)
 
20
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
 
21
        exit 1;;
 
22
esac
 
23
 
 
24
exit 0
 
25
 
 
26
@DPATCH@
 
27
diff -urNad /opt/tmp/kbd-1.12/src/getunimap.c kbd-1.12/src/getunimap.c
 
28
--- /opt/tmp/kbd-1.12/src/getunimap.c   2004-08-01 20:33:38.000000000 +0200
 
29
+++ kbd-1.12/src/getunimap.c    2004-08-02 22:45:30.000000000 +0200
 
30
@@ -62,7 +62,7 @@
 
31
                }
 
32
        }
 
33
 
 
34
-       if (argc != 1)
 
35
+       if (optind < argc)
 
36
                usage();
 
37
 
 
38
        fd = getfd(console);
 
39
diff -urNad /opt/tmp/kbd-1.12/src/loadunimap.c kbd-1.12/src/loadunimap.c
 
40
--- /opt/tmp/kbd-1.12/src/loadunimap.c  2004-08-02 22:45:06.000000000 +0200
 
41
+++ kbd-1.12/src/loadunimap.c   2004-08-02 22:46:39.000000000 +0200
 
42
@@ -73,18 +73,18 @@
 
43
                }
 
44
        }
 
45
 
 
46
-       if (argc > 2 || (argc == 1 && !outfnam))
 
47
+       if (argc > optind+1 || (argc == optind && !outfnam))
 
48
                usage();
 
49
 
 
50
        fd = getfd(console);
 
51
 
 
52
        if (outfnam) {
 
53
                saveunicodemap(fd, outfnam);
 
54
-               if (argc == 1)
 
55
+               if (argc == optind)
 
56
                        exit(0);
 
57
        }
 
58
 
 
59
-       if (argc == 2)
 
60
+       if (argc == optind+1)
 
61
                infnam = argv[optind];
 
62
        loadunicodemap(fd, infnam);
 
63
        exit(0);
 
64
diff -urNad /opt/tmp/kbd-1.12/src/showconsolefont.c kbd-1.12/src/showconsolefont.c
 
65
--- /opt/tmp/kbd-1.12/src/showconsolefont.c     2004-08-02 22:44:30.000000000 +0200
 
66
+++ kbd-1.12/src/showconsolefont.c      2004-08-02 22:47:07.000000000 +0200
 
67
@@ -135,7 +135,7 @@
 
68
                }
 
69
        }
 
70
 
 
71
-       if (argc != 1)
 
72
+       if (optind < argc)
 
73
                usage();
 
74
 
 
75
        fd = getfd(console);