Gentoo Archives: gentoo-commits

From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-games/ggz-client-libs/files: ggz-client-libs-0.0.14.1-destdir.patch
Date: Sun, 01 Feb 2009 06:23:10
Message-Id: E1LTVjY-0005cz-NO@stork.gentoo.org
1 mr_bones_ 09/02/01 06:23:08
2
3 Added: ggz-client-libs-0.0.14.1-destdir.patch
4 Log:
5 add patch from Michael Edenfield to apply the DESTDIR string correctly (bug #237607)
6 (Portage version: 2.1.6.4/cvs/Linux 2.6.28.1 i686)
7
8 Revision Changes Path
9 1.1 dev-games/ggz-client-libs/files/ggz-client-libs-0.0.14.1-destdir.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-games/ggz-client-libs/files/ggz-client-libs-0.0.14.1-destdir.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-games/ggz-client-libs/files/ggz-client-libs-0.0.14.1-destdir.patch?rev=1.1&content-type=text/plain
13
14 Index: ggz-client-libs-0.0.14.1-destdir.patch
15 ===================================================================
16 --- ggz-client-libs-0.0.14.1/ggz-config/ggz-config.c.orig 2008-01-05 14:02:46.000000000 -0500
17 +++ ggz-client-libs-0.0.14.1/ggz-config/ggz-config.c 2008-11-11 15:48:51.000000000 -0500
18 @@ -452,12 +452,14 @@
19 {
20 char *suffix = ".module.dsc";
21 char global_pathname[(moddest ? strlen(destdir) : 0)
22 - + strlen(copydir)
23 + + strlen(copydir) + 2];
24 + char full_pathname[strlen(global_pathname)
25 + strlen(modname)
26 - + strlen(suffix) + 3];
27 + + strlen(suffix) + 2];
28 char fixedmodname[strlen(modname) + 1];
29 unsigned int i;
30
31 +
32 if(moddest)
33 sprintf(global_pathname, "%s/%s", destdir, copydir);
34 else
35 @@ -473,10 +475,11 @@
36 for(i = 0; i < strlen(fixedmodname); i++) {
37 if(fixedmodname[i] == '/') fixedmodname[i] = '_';
38 }
39 - sprintf(global_pathname, "%s/%s%s", global_pathname, fixedmodname, suffix);
40
41 - printf(_("Preserving %s as %s...\n"), modfile, global_pathname);
42 - return filecopy(modfile, global_pathname);
43 + sprintf(full_pathname, "%s/%s%s", global_pathname, fixedmodname, suffix);
44 +
45 + printf(_("Preserving %s as %s...\n"), modfile, full_pathname);
46 + return filecopy(modfile, full_pathname);
47 }