Gentoo Archives: gentoo-commits

From: "Jorge Manuel B. S. Vicetto (jmbsvicetto)" <jmbsvicetto@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-libs/libcompizconfig/files: libcompizconfig-0.8.2-allow-system-libiniparser.patch
Date: Thu, 16 Jul 2009 18:12:27
Message-Id: E1MRVRN-0007BA-N3@stork.gentoo.org
1 jmbsvicetto 09/07/16 18:12:21
2
3 Modified:
4 libcompizconfig-0.8.2-allow-system-libiniparser.patch
5 Log:
6 Added libcompizconfig-0.8.2-r2 from the overlay - thanks to John Keeping for the patch.
7 Fixes bug 259715.
8 (Portage version: 2.2_rc33/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.2 x11-libs/libcompizconfig/files/libcompizconfig-0.8.2-allow-system-libiniparser.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/libcompizconfig/files/libcompizconfig-0.8.2-allow-system-libiniparser.patch?rev=1.2&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/libcompizconfig/files/libcompizconfig-0.8.2-allow-system-libiniparser.patch?rev=1.2&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/libcompizconfig/files/libcompizconfig-0.8.2-allow-system-libiniparser.patch?r1=1.1&r2=1.2
16
17 Index: libcompizconfig-0.8.2-allow-system-libiniparser.patch
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/x11-libs/libcompizconfig/files/libcompizconfig-0.8.2-allow-system-libiniparser.patch,v
20 retrieving revision 1.1
21 retrieving revision 1.2
22 diff -u -r1.1 -r1.2
23 --- libcompizconfig-0.8.2-allow-system-libiniparser.patch 27 Apr 2009 02:02:32 -0000 1.1
24 +++ libcompizconfig-0.8.2-allow-system-libiniparser.patch 16 Jul 2009 18:12:21 -0000 1.2
25 @@ -1,6 +1,19 @@
26 -diff -u -r libcompizconfig-0.8.2-old/configure.ac libcompizconfig-0.8.2/configure.ac
27 ---- libcompizconfig-0.8.2-old/configure.ac 2009-04-26 12:15:40.000000000 +0000
28 -+++ libcompizconfig-0.8.2/configure.ac 2009-04-26 23:02:14.000000000 +0000
29 +diff -Naur libcompizconfig-0.8.2.orig/config.h.in libcompizconfig-0.8.2/config.h.in
30 +--- libcompizconfig-0.8.2.orig/config.h.in 2009-03-05 15:29:12.000000000 +0000
31 ++++ libcompizconfig-0.8.2/config.h.in 2009-05-02 14:55:48.000000000 +0100
32 +@@ -30,6 +30,9 @@
33 + /* Define if your <locale.h> file defines LC_MESSAGES. */
34 + #undef HAVE_LC_MESSAGES
35 +
36 ++/* Define to 1 if you have the `iniparser' library (-liniparser). */
37 ++#undef HAVE_LIBINIPARSER
38 ++
39 + /* Define to 1 if you have the `protobuf' library (-lprotobuf). */
40 + #undef HAVE_LIBPROTOBUF
41 +
42 +diff -Naur libcompizconfig-0.8.2.orig/configure.ac libcompizconfig-0.8.2/configure.ac
43 +--- libcompizconfig-0.8.2.orig/configure.ac 2009-03-05 03:22:22.000000000 +0000
44 ++++ libcompizconfig-0.8.2/configure.ac 2009-05-02 14:55:48.000000000 +0100
45 @@ -116,6 +116,16 @@
46 fi
47 AM_CONDITIONAL([USE_PROTOBUF], [test "x$use_protobuf" = "xyes"])
48 @@ -18,9 +31,35 @@
49 AC_CHECK_HEADERS([sys/inotify.h], [have_inotify=yes], [have_inotify=no])
50
51 AC_ARG_ENABLE(debug,
52 -diff -u -r libcompizconfig-0.8.2-old/src/Makefile.am libcompizconfig-0.8.2/src/Makefile.am
53 ---- libcompizconfig-0.8.2-old/src/Makefile.am 2009-04-26 12:15:39.000000000 +0000
54 -+++ libcompizconfig-0.8.2/src/Makefile.am 2009-04-26 23:00:37.000000000 +0000
55 +diff -Naur libcompizconfig-0.8.2.orig/include/ccs.h libcompizconfig-0.8.2/include/ccs.h
56 +--- libcompizconfig-0.8.2.orig/include/ccs.h 2009-03-05 03:22:22.000000000 +0000
57 ++++ libcompizconfig-0.8.2/include/ccs.h 2009-05-02 14:55:48.000000000 +0100
58 +@@ -695,19 +695,9 @@
59 +
60 + /* INI file stuff */
61 +
62 +-typedef struct _dictionary_
63 +-{
64 +- /** Number of entries in dictionary */
65 +- int n;
66 +- /** Storage size */
67 +- int size;
68 +- /** List of string values */
69 +- char **val;
70 +- /** List of string keys */
71 +- char **key ;
72 +- /** List of hash values for keys */
73 +- unsigned *hash;
74 +-} IniDictionary;
75 ++#include <iniparser.h>
76 ++
77 ++typedef dictionary IniDictionary;
78 +
79 + IniDictionary* ccsIniNew (void);
80 + IniDictionary* ccsIniOpen (const char *fileName);
81 +diff -Naur libcompizconfig-0.8.2.orig/src/Makefile.am libcompizconfig-0.8.2/src/Makefile.am
82 +--- libcompizconfig-0.8.2.orig/src/Makefile.am 2009-03-05 15:28:59.000000000 +0000
83 ++++ libcompizconfig-0.8.2/src/Makefile.am 2009-05-02 14:55:48.000000000 +0100
84 @@ -39,14 +39,17 @@
85 lists.c \
86 compiz.cpp \
87 @@ -42,3 +81,159 @@
88 + libcompizconfig_la_SOURCES += iniparser.h iniparser.c
89 +
90 +endif
91 +diff -Naur libcompizconfig-0.8.2.orig/src/ini.c libcompizconfig-0.8.2/src/ini.c
92 +--- libcompizconfig-0.8.2.orig/src/ini.c 2009-03-05 03:22:22.000000000 +0000
93 ++++ libcompizconfig-0.8.2/src/ini.c 2009-05-02 14:56:12.000000000 +0100
94 +@@ -23,9 +23,10 @@
95 + #include <sys/stat.h>
96 + #include <sys/types.h>
97 + #include <errno.h>
98 ++#include <ctype.h>
99 +
100 + #include <ccs.h>
101 +-#include "iniparser.h"
102 ++#include <iniparser.h>
103 +
104 + /**
105 + * Creates the parent directory for @fileName, recursively creating a directory
106 +@@ -77,7 +78,7 @@
107 + if (file)
108 + fclose (file);
109 +
110 +- return iniparser_new ((char*) fileName);
111 ++ return iniparser_load ((char*) fileName);
112 + }
113 +
114 + IniDictionary*
115 +@@ -89,17 +90,22 @@
116 + void
117 + ccsIniClose (IniDictionary *dictionary)
118 + {
119 +- iniparser_free (dictionary);
120 ++ iniparser_freedict (dictionary);
121 + }
122 +
123 + void
124 + ccsIniSave (IniDictionary *dictionary,
125 + const char *fileName)
126 + {
127 ++ FILE *f;
128 + if (!ccsCreateDirFor (fileName))
129 + return;
130 +
131 +- iniparser_dump_ini (dictionary, fileName);
132 ++ f = fopen(fileName, "w");
133 ++ if(!f)
134 ++ return;
135 ++ iniparser_dump_ini (dictionary, f);
136 ++ fclose(f);
137 + }
138 +
139 + static char*
140 +@@ -127,11 +133,11 @@
141 + char *sectionName;
142 +
143 + asprintf (&sectionName, "%s:%s", section, entry);
144 +-
145 ++/*
146 + if (!iniparser_find_entry (dictionary, (char*) section))
147 + iniparser_add_entry (dictionary, (char*) section, NULL, NULL);
148 +-
149 +- iniparser_setstr (dictionary, sectionName, (char*) value);
150 ++*/
151 ++ iniparser_set (dictionary, sectionName, (char*) value);
152 +
153 + free (sectionName);
154 + }
155 +diff -Naur libcompizconfig-0.8.2.orig/src/iniparser.h libcompizconfig-0.8.2/src/iniparser.h
156 +--- libcompizconfig-0.8.2.orig/src/iniparser.h 2009-03-05 03:22:22.000000000 +0000
157 ++++ libcompizconfig-0.8.2/src/iniparser.h 1970-01-01 01:00:00.000000000 +0100
158 +@@ -1,65 +0,0 @@
159 +-/*
160 +- Based upon libiniparser, by Nicolas Devillard
161 +- Hacked into 1 file (m-iniparser) by Freek/2005
162 +- Original terms following:
163 +-
164 +- -- -
165 +-
166 +- Copyright (c) 2000 by Nicolas Devillard (ndevilla AT free DOT fr).
167 +-
168 +- Written by Nicolas Devillard. Not derived from licensed software.
169 +-
170 +- Permission is granted to anyone to use this software for any
171 +- purpose on any computer system, and to redistribute it freely,
172 +- subject to the following restrictions:
173 +-
174 +- 1. The author is not responsible for the consequences of use of
175 +- this software, no matter how awful, even if they arise
176 +- from defects in it.
177 +-
178 +- 2. The origin of this software must not be misrepresented, either
179 +- by explicit claim or by omission.
180 +-
181 +- 3. Altered versions must be plainly marked as such, and must not
182 +- be misrepresented as being the original software.
183 +-
184 +- 4. This notice may not be removed or altered.
185 +-
186 +- */
187 +-
188 +-
189 +-#ifndef _INIPARSER_H_
190 +-#define _INIPARSER_H_
191 +-#include <stdio.h>
192 +-#include <stdlib.h>
193 +-#include <string.h>
194 +-#include <unistd.h>
195 +-#include <ctype.h>
196 +-
197 +-#include <ccs.h>
198 +-
199 +-typedef IniDictionary dictionary;
200 +-
201 +-typedef struct _FileLock
202 +-{
203 +- int fd;
204 +-} FileLock;
205 +-
206 +-/* generated by genproto */
207 +-
208 +-dictionary * iniparser_new(char *ininame);
209 +-dictionary * dictionary_new(int size);
210 +-void iniparser_free(dictionary * d);
211 +-
212 +-
213 +-int iniparser_getnsec(dictionary * d);
214 +-char * iniparser_getsecname(dictionary * d, int n);
215 +-void iniparser_dump_ini(dictionary * d, const char * file_name);
216 +-char * iniparser_getstring(dictionary * d, char * key, char * def);
217 +-void iniparser_add_entry(dictionary * d, char * sec, char * key, char * val);
218 +-int iniparser_find_entry(dictionary * ini, char * entry);
219 +-int iniparser_setstr(dictionary * ini, char * entry, char * val);
220 +-void iniparser_unset(dictionary * ini, char * entry);
221 +-
222 +-#endif
223 +-
224 +diff -Naur libcompizconfig-0.8.2.orig/src/main.c libcompizconfig-0.8.2/src/main.c
225 +--- libcompizconfig-0.8.2.orig/src/main.c 2009-03-05 03:22:22.000000000 +0000
226 ++++ libcompizconfig-0.8.2/src/main.c 2009-05-02 14:56:26.000000000 +0100
227 +@@ -34,9 +34,9 @@
228 + #include <math.h>
229 +
230 + #include <ccs.h>
231 ++#include <iniparser.h>
232 +
233 + #include "ccs-private.h"
234 +-#include "iniparser.h"
235 +
236 + Bool basicMetadata = FALSE;
237 +
238 +@@ -2577,7 +2577,7 @@
239 + return FALSE;
240 + fclose (fp);
241 +
242 +- importFile = iniparser_new ((char *) fileName);
243 ++ importFile = iniparser_load ((char *) fileName);
244 + if (!importFile)
245 + return FALSE;
246 +