1 |
dev-zero 10/04/11 08:18:38 |
2 |
|
3 |
Added: iniparser-3.0b-makefile.patch |
4 |
iniparser-3.0b-cpp.patch |
5 |
Log: |
6 |
Respect CC properly (bug #296050, thanks to Jeroen Roovers). Make headers C++ compatible (bug #264508, thanks to Lei Qing). |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-libs/iniparser/files/iniparser-3.0b-makefile.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/iniparser/files/iniparser-3.0b-makefile.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/iniparser/files/iniparser-3.0b-makefile.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: iniparser-3.0b-makefile.patch |
16 |
=================================================================== |
17 |
diff -Naur iniparser3.0b.orig/Makefile iniparser3.0b/Makefile |
18 |
--- iniparser3.0b.orig/Makefile 2010-04-07 08:02:48.771242264 +0200 |
19 |
+++ iniparser3.0b/Makefile 2010-04-07 08:10:51.403895732 +0200 |
20 |
@@ -3,16 +3,16 @@ |
21 |
# |
22 |
|
23 |
# Compiler settings |
24 |
-CC = gcc |
25 |
-CFLAGS = -O2 -fPIC -Wall -ansi -pedantic |
26 |
+CC ?= gcc |
27 |
+CFLAGS += -fPIC -Wall -ansi -pedantic |
28 |
|
29 |
# Ar settings to build the library |
30 |
-AR = ar |
31 |
+AR ?= ar |
32 |
ARFLAGS = rcv |
33 |
|
34 |
SHLD = ${CC} ${CFLAGS} |
35 |
-LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib |
36 |
-LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib |
37 |
+LDSHFLAGS = -shared -Wl,-Bsymbolic |
38 |
+LDFLAGS += -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib |
39 |
|
40 |
# Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX) |
41 |
# RANLIB = ranlib |
42 |
@@ -28,7 +28,7 @@ |
43 |
COMPILE.c=$(CC) $(CFLAGS) -c |
44 |
.c.o: |
45 |
@(echo "compiling $< ...") |
46 |
- @($(COMPILE.c) -o $@ $<) |
47 |
+ $(COMPILE.c) -o $@ $< |
48 |
|
49 |
|
50 |
SRCS = src/iniparser.c \ |
51 |
@@ -40,11 +40,11 @@ |
52 |
default: libiniparser.a libiniparser.so |
53 |
|
54 |
libiniparser.a: $(OBJS) |
55 |
- @($(AR) $(ARFLAGS) libiniparser.a $(OBJS)) |
56 |
- @($(RANLIB) libiniparser.a) |
57 |
+ $(AR) $(ARFLAGS) libiniparser.a $(OBJS) |
58 |
+ $(RANLIB) libiniparser.a |
59 |
|
60 |
libiniparser.so: $(OBJS) |
61 |
- @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \ |
62 |
+ $(SHLD) $(LDSHFLAGS) $(LDFLAGS) -o $@.0 $(OBJS) \ |
63 |
-Wl,-soname=`basename $@`.0 |
64 |
|
65 |
clean: |
66 |
|
67 |
|
68 |
|
69 |
1.1 dev-libs/iniparser/files/iniparser-3.0b-cpp.patch |
70 |
|
71 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch?rev=1.1&view=markup |
72 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch?rev=1.1&content-type=text/plain |
73 |
|
74 |
Index: iniparser-3.0b-cpp.patch |
75 |
=================================================================== |
76 |
diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c |
77 |
--- iniparser3.0b/src/dictionary.c 2007-11-24 05:39:18.000000000 +0800 |
78 |
+++ iniparser3.0b-patched/src/dictionary.c 2009-04-01 21:38:09.000000000 +0800 |
79 |
@@ -38,6 +38,9 @@ |
80 |
/*--------------------------------------------------------------------------- |
81 |
Private functions |
82 |
---------------------------------------------------------------------------*/ |
83 |
+#ifdef __cplusplus |
84 |
+extern "C" { |
85 |
+#endif |
86 |
|
87 |
/* Doubles the allocated size associated to a pointer */ |
88 |
/* 'size' is the current allocated size. */ |
89 |
@@ -401,5 +404,10 @@ |
90 |
dictionary_del(d); |
91 |
return 0 ; |
92 |
} |
93 |
+ |
94 |
+#ifdef __cplusplus |
95 |
+} |
96 |
+#endif |
97 |
+ |
98 |
#endif |
99 |
/* vim: set ts=4 et sw=4 tw=75 */ |
100 |
diff -ur iniparser3.0b/src/iniparser.h iniparser3.0b-patched/src/iniparser.h |
101 |
--- iniparser3.0b/src/iniparser.h 2007-11-24 05:38:19.000000000 +0800 |
102 |
+++ iniparser3.0b-patched/src/iniparser.h 2009-04-01 21:38:02.000000000 +0800 |
103 |
@@ -41,6 +41,10 @@ |
104 |
#define iniparser_getstr(d, k) iniparser_getstring(d, k, NULL) |
105 |
#define iniparser_setstr iniparser_setstring |
106 |
|
107 |
+#ifdef __cplusplus |
108 |
+extern "C" { |
109 |
+#endif |
110 |
+ |
111 |
/*-------------------------------------------------------------------------*/ |
112 |
/** |
113 |
@brief Get number of sections in a dictionary |
114 |
@@ -277,4 +281,8 @@ |
115 |
/*--------------------------------------------------------------------------*/ |
116 |
void iniparser_freedict(dictionary * d); |
117 |
|
118 |
+#ifdef __cplusplus |
119 |
+} |
120 |
+#endif |
121 |
+ |
122 |
#endif |