1 |
commit: 2dcfb00c893c3190165f76a9b592fcf25b813809 |
2 |
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 2 16:04:10 2015 +0000 |
4 |
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 2 16:05:41 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dcfb00c |
7 |
|
8 |
net-libs/http-parser: version bump |
9 |
|
10 |
This also fixes the upstream build system instead of working around |
11 |
it. |
12 |
|
13 |
It also fixes missing CFLAGS in linking commands. |
14 |
|
15 |
net-libs/http-parser/Manifest | 1 + |
16 |
.../files/0001-makefile-fix-DESTDIR-usage.patch | 64 ++++++++++++++++++++++ |
17 |
.../files/0002-makefile-quote-variables.patch | 50 +++++++++++++++++ |
18 |
...x-SONAME-symlink-it-should-not-be-a-full-.patch | 35 ++++++++++++ |
19 |
...04-makefile-add-CFLAGS-to-linking-command.patch | 31 +++++++++++ |
20 |
...0005-makefile-fix-install-rule-dependency.patch | 33 +++++++++++ |
21 |
net-libs/http-parser/http-parser-2.6.0.ebuild | 45 +++++++++++++++ |
22 |
7 files changed, 259 insertions(+) |
23 |
|
24 |
diff --git a/net-libs/http-parser/Manifest b/net-libs/http-parser/Manifest |
25 |
index 2d8af53..10f268e 100644 |
26 |
--- a/net-libs/http-parser/Manifest |
27 |
+++ b/net-libs/http-parser/Manifest |
28 |
@@ -2,3 +2,4 @@ DIST http-parser-2.3.tar.gz 42538 SHA256 3bfe6b4ab7656c86e48b4a43a7a08aee7fd72c1 |
29 |
DIST http-parser-2.4.1.tar.gz 44724 SHA256 4a2597c37b874ce46b30764960d158d18cae2b4cd46458ce3cad98aa106427c9 SHA512 f56b84f0af57cefa46daa10ac2e7b3015c185fa4c55615efa33f9131871a980b5c06ffad1699302ebe847c9325b41403520e0ef4d34bf5f6c48c6edabf1f4cb8 WHIRLPOOL 1873e97df046b10ed7a7da9ad3ba43055634af230b0b4391a8a814bb00455f8864ead809ba2555715e63b9a74202287b2a3c68ced884edf152e794bf70a0cfeb |
30 |
DIST http-parser-2.4.2.tar.gz 44814 SHA256 d93d6cd4d587355bc714d6a79f4e5676d7dd2ccd2fafb21606c87268ea440cbf SHA512 fa2ac6a27807252a8e2ca61e307b92fa7004424dbea69d9ffbd2297f47e0c2af740033126aeb6b11ea172e03c2fbf957c0ab0387836647920c3a9304d07f68ab WHIRLPOOL cbf45915f622ad07ee095f3a592c565847f427575ab0a062ce7d8dbfe3b8b92d4ec97787c3dec4710b7dec4f5b4cde49ece80063b29399c2f44acc14816c08ff |
31 |
DIST http-parser-2.5.0.tar.gz 46070 SHA256 e3b4ba58f4e6ee5fbec781df020e5cb74c3a799a07f059e1e125127a0b801481 SHA512 da94b21f313d09f0557e61574e1187d06ef3bc4e8115c6f8120eac8d26ba6db51469ee5ddb6da5a0c05f49279838e5028afff6a15790708cdca147b3bc66e18f WHIRLPOOL 933ab2f8065fd2e7734d61284a042579edea40f0a0dea6b339a1ba07d9e50f2cd5e14f081d9889b728024171f2faeff7aab97b43c531fbd6badd882026261254 |
32 |
+DIST http-parser-2.6.0.tar.gz 47598 SHA256 a11c5ccb9808496f3de66d54ea1f89271919923307e31c75de2a3a77a6754c97 SHA512 e7bd34ed8270192e55f5e7495972afc9fe2adc36d85df4f09be4958bbf7f93872a056bb8db268cdc1068a9eb79ad9aefc2a8502bda92bac8a2490e08435f09e1 WHIRLPOOL 2bef86db5140c04a2d7e2191e5669c905368a1180c357c512a66a65907b23b317bd2466aa9b1a47c1287e9def7aecdab48c151343b1700d99514b47915df7bf5 |
33 |
|
34 |
diff --git a/net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch b/net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch |
35 |
new file mode 100644 |
36 |
index 0000000..a819cf4 |
37 |
--- /dev/null |
38 |
+++ b/net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch |
39 |
@@ -0,0 +1,64 @@ |
40 |
+From 7fbc87986baa09c342abb21e34613e8bbdc3c9c7 Mon Sep 17 00:00:00 2001 |
41 |
+From: hasufell <hasufell@××××××××.de> |
42 |
+Date: Mon, 2 Nov 2015 16:24:43 +0100 |
43 |
+Subject: [PATCH 1/4] makefile: fix DESTDIR usage |
44 |
+ |
45 |
+DESTDIR is not supposed to be set inside other variables. It is |
46 |
+standard to have this variable in install/uninstall rules, so it |
47 |
+can be reliably set separately no matter what other variables are set |
48 |
+to. |
49 |
+This also avoids potential bugs with setting SONAME or seds on |
50 |
+installed files (like pkgconfig) which then might include the |
51 |
+temporary DESTDIR directory. |
52 |
+ |
53 |
+DESTDIR is really just for installing into a temporary directory or |
54 |
+a chroot, mostly used by package managers. |
55 |
+--- |
56 |
+ Makefile | 20 ++++++++++---------- |
57 |
+ 1 file changed, 10 insertions(+), 10 deletions(-) |
58 |
+ |
59 |
+diff --git a/Makefile b/Makefile |
60 |
+index 33c8ba0..76153a0 100644 |
61 |
+--- a/Makefile |
62 |
++++ b/Makefile |
63 |
+@@ -55,7 +55,7 @@ CFLAGS_LIB = $(CFLAGS_FAST) -fPIC |
64 |
+ LDFLAGS_LIB = $(LDFLAGS) -shared |
65 |
+ |
66 |
+ INSTALL ?= install |
67 |
+-PREFIX ?= $(DESTDIR)/usr/local |
68 |
++PREFIX ?= /usr/local |
69 |
+ LIBDIR = $(PREFIX)/lib |
70 |
+ INCLUDEDIR = $(PREFIX)/include |
71 |
+ |
72 |
+@@ -123,19 +123,19 @@ tags: http_parser.c http_parser.h test.c |
73 |
+ ctags $^ |
74 |
+ |
75 |
+ install: library |
76 |
+- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h |
77 |
+- $(INSTALL) -D $(SONAME) $(LIBDIR)/$(SONAME) |
78 |
+- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) |
79 |
++ $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h |
80 |
++ $(INSTALL) -D $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) |
81 |
++ ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) |
82 |
+ |
83 |
+ install-strip: library |
84 |
+- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h |
85 |
+- $(INSTALL) -D -s $(SONAME) $(LIBDIR)/$(SONAME) |
86 |
+- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) |
87 |
++ $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h |
88 |
++ $(INSTALL) -D -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) |
89 |
++ ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) |
90 |
+ |
91 |
+ uninstall: |
92 |
+- rm $(INCLUDEDIR)/http_parser.h |
93 |
+- rm $(LIBDIR)/$(SONAME) |
94 |
+- rm $(LIBDIR)/libhttp_parser.so |
95 |
++ rm $(DESTDIR)$(INCLUDEDIR)/http_parser.h |
96 |
++ rm $(DESTDIR)$(LIBDIR)/$(SONAME) |
97 |
++ rm $(DESTDIR)$(LIBDIR)/libhttp_parser.so |
98 |
+ |
99 |
+ clean: |
100 |
+ rm -f *.o *.a tags test test_fast test_g \ |
101 |
+-- |
102 |
+2.6.1 |
103 |
+ |
104 |
|
105 |
diff --git a/net-libs/http-parser/files/0002-makefile-quote-variables.patch b/net-libs/http-parser/files/0002-makefile-quote-variables.patch |
106 |
new file mode 100644 |
107 |
index 0000000..096ac6b |
108 |
--- /dev/null |
109 |
+++ b/net-libs/http-parser/files/0002-makefile-quote-variables.patch |
110 |
@@ -0,0 +1,50 @@ |
111 |
+From 9bce473ba7417b45bfdb59d4151a8857dcfff4ad Mon Sep 17 00:00:00 2001 |
112 |
+From: hasufell <hasufell@××××××××.de> |
113 |
+Date: Mon, 2 Nov 2015 16:27:06 +0100 |
114 |
+Subject: [PATCH 2/4] makefile: quote variables |
115 |
+ |
116 |
+Make does not take care of this in make rules. If any of the variables |
117 |
+DESTDIR, INCLUDEDIR or LIBDIR contain whitespaces, then the related |
118 |
+install command will fail. |
119 |
+ |
120 |
+This is even more important for the uninstall rule. |
121 |
+--- |
122 |
+ Makefile | 18 +++++++++--------- |
123 |
+ 1 file changed, 9 insertions(+), 9 deletions(-) |
124 |
+ |
125 |
+diff --git a/Makefile b/Makefile |
126 |
+index 76153a0..8c4a9d7 100644 |
127 |
+--- a/Makefile |
128 |
++++ b/Makefile |
129 |
+@@ -123,19 +123,19 @@ tags: http_parser.c http_parser.h test.c |
130 |
+ ctags $^ |
131 |
+ |
132 |
+ install: library |
133 |
+- $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h |
134 |
+- $(INSTALL) -D $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) |
135 |
+- ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) |
136 |
++ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
137 |
++ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" |
138 |
++ ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
139 |
+ |
140 |
+ install-strip: library |
141 |
+- $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h |
142 |
+- $(INSTALL) -D -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) |
143 |
+- ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) |
144 |
++ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
145 |
++ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" |
146 |
++ ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
147 |
+ |
148 |
+ uninstall: |
149 |
+- rm $(DESTDIR)$(INCLUDEDIR)/http_parser.h |
150 |
+- rm $(DESTDIR)$(LIBDIR)/$(SONAME) |
151 |
+- rm $(DESTDIR)$(LIBDIR)/libhttp_parser.so |
152 |
++ rm "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
153 |
++ rm "$(DESTDIR)$(LIBDIR)/$(SONAME)" |
154 |
++ rm "$(DESTDIR)$(LIBDIR)/libhttp_parser.so" |
155 |
+ |
156 |
+ clean: |
157 |
+ rm -f *.o *.a tags test test_fast test_g \ |
158 |
+-- |
159 |
+2.6.1 |
160 |
+ |
161 |
|
162 |
diff --git a/net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch b/net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch |
163 |
new file mode 100644 |
164 |
index 0000000..cafe68d |
165 |
--- /dev/null |
166 |
+++ b/net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch |
167 |
@@ -0,0 +1,35 @@ |
168 |
+From f45b38c42e7e92a5d0215c44dcf306616536011e Mon Sep 17 00:00:00 2001 |
169 |
+From: hasufell <hasufell@××××××××.de> |
170 |
+Date: Mon, 2 Nov 2015 16:32:11 +0100 |
171 |
+Subject: [PATCH 3/4] makefile: fix SONAME symlink, it should not be a full |
172 |
+ path |
173 |
+ |
174 |
+The symlink destination being a full path doesn't give any benefit and |
175 |
+may break a few use cases of copying these files to a different |
176 |
+destination, while preserving the symlink. |
177 |
+--- |
178 |
+ Makefile | 4 ++-- |
179 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
180 |
+ |
181 |
+diff --git a/Makefile b/Makefile |
182 |
+index 8c4a9d7..cbe93e8 100644 |
183 |
+--- a/Makefile |
184 |
++++ b/Makefile |
185 |
+@@ -125,12 +125,12 @@ tags: http_parser.c http_parser.h test.c |
186 |
+ install: library |
187 |
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
188 |
+ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" |
189 |
+- ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
190 |
++ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
191 |
+ |
192 |
+ install-strip: library |
193 |
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
194 |
+ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" |
195 |
+- ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
196 |
++ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
197 |
+ |
198 |
+ uninstall: |
199 |
+ rm "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
200 |
+-- |
201 |
+2.6.1 |
202 |
+ |
203 |
|
204 |
diff --git a/net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch b/net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch |
205 |
new file mode 100644 |
206 |
index 0000000..e21cd71 |
207 |
--- /dev/null |
208 |
+++ b/net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch |
209 |
@@ -0,0 +1,31 @@ |
210 |
+From 62b1450cfe2e0df2d912279d38edf1b916020101 Mon Sep 17 00:00:00 2001 |
211 |
+From: hasufell <hasufell@××××××××.de> |
212 |
+Date: Mon, 2 Nov 2015 16:39:31 +0100 |
213 |
+Subject: [PATCH 4/4] makefile: add CFLAGS to linking command |
214 |
+ |
215 |
+Although we compile the objects explicitly there are some CFLAGS |
216 |
+that may also affect linking, which is not always obvious. |
217 |
+ |
218 |
+This can also be a problem for toolchains that support multiple ABIs |
219 |
+and need to set CFLAGS=<abi selector>, which will cause linking |
220 |
+to either fail or produce an unusable executable/library. |
221 |
+--- |
222 |
+ Makefile | 2 +- |
223 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
224 |
+ |
225 |
+diff --git a/Makefile b/Makefile |
226 |
+index cbe93e8..ae16f08 100644 |
227 |
+--- a/Makefile |
228 |
++++ b/Makefile |
229 |
+@@ -102,7 +102,7 @@ libhttp_parser.o: http_parser.c http_parser.h Makefile |
230 |
+ $(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o |
231 |
+ |
232 |
+ library: libhttp_parser.o |
233 |
+- $(CC) $(LDFLAGS_LIB) -o $(SONAME) $< |
234 |
++ $(CC) $(CFLAGS_LIB) $(LDFLAGS_LIB) -o $(SONAME) $< |
235 |
+ |
236 |
+ package: http_parser.o |
237 |
+ $(AR) rcs libhttp_parser.a http_parser.o |
238 |
+-- |
239 |
+2.6.1 |
240 |
+ |
241 |
|
242 |
diff --git a/net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch b/net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch |
243 |
new file mode 100644 |
244 |
index 0000000..da96637 |
245 |
--- /dev/null |
246 |
+++ b/net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch |
247 |
@@ -0,0 +1,33 @@ |
248 |
+From b67bfbe6a07529dd82e2ee83b6848d017e6e422f Mon Sep 17 00:00:00 2001 |
249 |
+From: hasufell <hasufell@××××××××.de> |
250 |
+Date: Mon, 2 Nov 2015 16:51:28 +0100 |
251 |
+Subject: [PATCH 5/5] makefile: fix install rule dependency |
252 |
+ |
253 |
+Otherwise the install rule will recompile the library, no matter |
254 |
+if it has already been compiled. |
255 |
+--- |
256 |
+ Makefile | 4 ++-- |
257 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
258 |
+ |
259 |
+diff --git a/Makefile b/Makefile |
260 |
+index ae16f08..df0b59f 100644 |
261 |
+--- a/Makefile |
262 |
++++ b/Makefile |
263 |
+@@ -122,12 +122,12 @@ parsertrace_g: http_parser_g.o contrib/parsertrace.c |
264 |
+ tags: http_parser.c http_parser.h test.c |
265 |
+ ctags $^ |
266 |
+ |
267 |
+-install: library |
268 |
++install: $(SONAME) |
269 |
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
270 |
+ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" |
271 |
+ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
272 |
+ |
273 |
+-install-strip: library |
274 |
++install-strip: $(SONAME) |
275 |
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" |
276 |
+ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" |
277 |
+ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" |
278 |
+-- |
279 |
+2.6.1 |
280 |
+ |
281 |
|
282 |
diff --git a/net-libs/http-parser/http-parser-2.6.0.ebuild b/net-libs/http-parser/http-parser-2.6.0.ebuild |
283 |
new file mode 100644 |
284 |
index 0000000..186c880 |
285 |
--- /dev/null |
286 |
+++ b/net-libs/http-parser/http-parser-2.6.0.ebuild |
287 |
@@ -0,0 +1,45 @@ |
288 |
+# Copyright 1999-2015 Gentoo Foundation |
289 |
+# Distributed under the terms of the GNU General Public License v2 |
290 |
+# $Id$ |
291 |
+ |
292 |
+EAPI=5 |
293 |
+ |
294 |
+inherit eutils toolchain-funcs multilib multilib-minimal |
295 |
+ |
296 |
+DESCRIPTION="Http request/response parser for C" |
297 |
+HOMEPAGE="https://github.com/joyent/http-parser" |
298 |
+SRC_URI="https://github.com/joyent/http-parser/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
299 |
+ |
300 |
+LICENSE="MIT" |
301 |
+SLOT="0/${PV}" |
302 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86" |
303 |
+IUSE="static-libs" |
304 |
+ |
305 |
+# https://github.com/nodejs/http-parser/pull/272 |
306 |
+PATCHES=( |
307 |
+ "${FILESDIR}"/0001-makefile-fix-DESTDIR-usage.patch |
308 |
+ "${FILESDIR}"/0002-makefile-quote-variables.patch |
309 |
+ "${FILESDIR}"/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch |
310 |
+ "${FILESDIR}"/0004-makefile-add-CFLAGS-to-linking-command.patch |
311 |
+ "${FILESDIR}"/0005-makefile-fix-install-rule-dependency.patch |
312 |
+) |
313 |
+ |
314 |
+src_prepare() { |
315 |
+ tc-export CC AR |
316 |
+ epatch ${PATCHES[@]} |
317 |
+ multilib_copy_sources |
318 |
+} |
319 |
+ |
320 |
+multilib_src_compile() { |
321 |
+ emake CFLAGS_FAST="${CFLAGS}" library |
322 |
+ use static-libs && emake CFLAGS_FAST="${CFLAGS}" package |
323 |
+} |
324 |
+ |
325 |
+multilib_src_test() { |
326 |
+ emake CFLAGS_DEBUG="${CFLAGS}" test |
327 |
+} |
328 |
+ |
329 |
+multilib_src_install() { |
330 |
+ emake DESTDIR="${D}" PREFIX="/usr" LIBDIR="/usr/$(get_libdir)" install |
331 |
+ use static-libs && dolib.a libhttp_parser.a |
332 |
+} |