Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/netpbm/files: netpbm-10.44.00-fontdir.patch
Date: Wed, 21 Jan 2009 22:56:07
Message-Id: E1LPlzR-0001mO-Hl@stork.gentoo.org
1 vapier 09/01/21 22:56:05
2
3 Added: netpbm-10.44.00-fontdir.patch
4 Log:
5 Apply fix from upstream for fontdir bug #249384.
6 (Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)
7
8 Revision Changes Path
9 1.1 media-libs/netpbm/files/netpbm-10.44.00-fontdir.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/netpbm/files/netpbm-10.44.00-fontdir.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/netpbm/files/netpbm-10.44.00-fontdir.patch?rev=1.1&content-type=text/plain
13
14 Index: netpbm-10.44.00-fontdir.patch
15 ===================================================================
16 fix from upstream
17
18 http://bugs.gentoo.org/249384#c6
19
20 Index: converter/ppm/picttoppm.c
21 ===================================================================
22 --- converter/ppm/picttoppm.c (revision 811)
23 +++ converter/ppm/picttoppm.c (revision 812)
24 @@ -4056,6 +4056,23 @@
25
26
27
28 +static void
29 +loadDefaultFontDir(void) {
30 +/*----------------------------------------------------------------------------
31 + Load the fonts from the font directory file "fontdir" (in the current
32 + directory), if it exists.
33 +-----------------------------------------------------------------------------*/
34 + struct stat statbuf;
35 + int rc;
36 +
37 + rc = stat("fontdir", &statbuf);
38 +
39 + if (rc == 0)
40 + load_fontdir("fontdir");
41 +}
42 +
43 +
44 +
45 int
46 main(int argc, char * argv[]) {
47 int argn;
48 @@ -4092,8 +4109,6 @@
49 ++argn;
50 }
51
52 - load_fontdir("fontdir");
53 -
54 if (argn < argc) {
55 ifp = pm_openr(argv[argn]);
56 ++argn;
57 @@ -4103,6 +4118,8 @@
58 if (argn != argc)
59 pm_usage(usage);
60
61 + loadDefaultFontDir();
62 +
63 if (header) {
64 stage = "Reading 512 byte header";
65 skip(512);