diff options
Diffstat (limited to 'net-libs/http-parser')
10 files changed, 346 insertions, 0 deletions
diff --git a/net-libs/http-parser/Manifest b/net-libs/http-parser/Manifest new file mode 100644 index 000000000000..b0d1efda4d3b --- /dev/null +++ b/net-libs/http-parser/Manifest @@ -0,0 +1,13 @@ +AUX 0001-makefile-fix-DESTDIR-usage.patch 2216 SHA256 785012d9e0efb70c4dcc137f354ab57afabdcb0fb7c8cb2580c3c4a7e9add330 SHA512 ebb481df21cb312824ed65e7d6a3e7b237451071235566595da97c09b165767693ec3c47c27c451bfbdc2d62cc45c7d5d9f996b80789dc7fedaa2543c94c9065 WHIRLPOOL 8d6ddfaaf636d3360a42bc12917d972b520723d8fc05db2d87bf71ea5c3f850d45f65da85b34f8f2243ffe31acaa2d0364f3b15432e507447e6d40151a4ba40a +AUX 0002-makefile-quote-variables.patch 1848 SHA256 80fdf673731f27f328d45f4da7daa613613d8db40f1dc84d2ce65fad0130c054 SHA512 3637abedbf330af0f4a9721081db99fe0f6400322f21f77ab16d580546a9d200d40bc584e8dbb51adec249c2d468730c6e2487ccda3786626909d988b7f8856a WHIRLPOOL e946f75eb854f7ae81d79bdfced973b43bacdb4227c806b706287b59fef81ccd849f952e950332336681da8d1bbaeab9401a864f83a95937cdc9d5797471ebbe +AUX 0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch 1286 SHA256 9854f5f205ec0959cc10cab80d16ff54f33a9979e5fd310ba9a4624b60c84ee9 SHA512 8202d665963234ce6dd84439f281921cb959424024c2fec8a27b65693b3466cab8674a3549d22fdb2fc07edf69f94440368ef77738ae4be2a5d94c13e3c814bb WHIRLPOOL 041200f8fa60bb8a0a24ed2bb5c8bae72d45c796c124613053c32c61f81ab2ee7ffb75f6d5a42b7623da6ff2afaeed436a2e74275d79dad7768d05735562cd02 +AUX 0004-makefile-add-CFLAGS-to-linking-command.patch 1038 SHA256 e69fa304327dbb0626edaf147b73dc9fb4718b656b225794a04937206929c0df SHA512 e18c163f2069795fb6b744ad9f6e44eb9efca7f560460a6759bc0121a404bfe8109031c0f43d36d4987bda3411e0a433dbab6d0eabb2dbb5c79f1ce878251aae WHIRLPOOL e9196da8b6544a30258c3ae9bcdceda318317b97b14adb4fc7d7f2636f0ac664e7d0ef024be61aca9d5e0d45e85792d90b3bd9507076a73d266f11733053bc7c +AUX 0005-makefile-fix-install-rule-dependency.patch 1090 SHA256 04898654adef3f3dbf1e29e66f8e9fc4467f68389e224beb03387d33ee263212 SHA512 4cd120f406eeeb1e5a60c7d8955cdfead50d99b60f91a0fcdb2ae19403d08e5ed5619885c9e434ce40ffb442b317ee8c32ef636960429036f9bff92492f03968 WHIRLPOOL e522fd3eaab1f94c13f33900b37755776c5c48910fa87ccc875b3b08198a21f983bf2728b81b1f2cd64263d1a22940e3daef2d9f97acf708a437584328498ebb +AUX http-parser-2.6.2-darwin.patch 452 SHA256 293d5852e3fba89fa9280ba80f0a8fbb321abbc43e9d5f9dd60120c4744743d1 SHA512 32b6e637597d57ae511dd421f300f74c9f12c72746989d61455ea00cd0585ed96e2787e0ca0d965f66bc4b7875bd157e90e20f6f6682b20a8d95ae7ccbccdeb1 WHIRLPOOL 5ffd0e71b3f1f72c2d9c3d8982c7d6c0a0a8229d60354a0dfa63320ae8d6ada445587beb0ad8c0d92b52bfbc2c3b2a063a5e864f01f33cd265d3b07306a7f4e1 +DIST http-parser-2.6.2.tar.gz 48292 SHA256 80fffc3b64ef6968cecdd4b299a96986007dff4bd12ae6c58cbcb506959b90ad SHA512 e19e5377b3eb7f149c428196826fb878564fdfa3716ff6df5a3845c51586aee0582e252e09d1f8ebad1163b3e66632ff0c6e78f6acb2f0da20d7a06e734406c1 WHIRLPOOL 25e5f3ff8bc37d8a06d1929e31683326bb4d3a13f1e899e4f357787973be56fc007dd4ad16567067a9bce587ddc81360f777332a097fbb6dcf22cbad26872962 +DIST http-parser-2.7.1.tar.gz 48578 SHA256 70409ad324e5de2da6a0f39e859e566d497c1ff0a249c0c38a5012df91b386b3 SHA512 c0fe86455db1a563a5c668f118dfa9a27b9a637ee1c0e2f2f18a5b816352436ed90435ea978e3f3d85b037d3c630234e47d609dc3b7086b898286c4e54d9f031 WHIRLPOOL be51ed5aed8a01d8d544a21a87f3d1c928c1e2bdca95c71f42ff291a9381381e9fa6d437e52b5818526e59ea81fdf3d92792b6c4f32af62ff169582d57d7ee1d +EBUILD http-parser-2.6.2.ebuild 1395 SHA256 16a3ff3d919f5d2db9a691e838b6aaddcf842b46acb6719dfc28a002b7369f34 SHA512 ff59a0b6f3b7aef3ca79483384df88eafaf7ad80f05ea809288c6798ce0234f83a9dd41b5b2c80a865c70cb449574b0f2100c87bec2a5c2fecf432874b5a07f3 WHIRLPOOL 291e960e0e308c4d0adf5136a2b997e9de629e5060a8560e3305d7b697ff6f43bb4d9280cd9fb31132973cf0b9b01484dc6734d0e436e9384cabb420f2934fa4 +EBUILD http-parser-2.7.1.ebuild 1353 SHA256 f8e27451128c6a61cd43ec0e430c79400fd7f7e41f9f317d67aa4b505c2acc38 SHA512 0a7730443f49ec26ea9b0c146adbc1a86902446a04a4ee927017ca6c89af193d760758277656204d5f26562dba41dd70c26fae6d2f562d3a07b4fd074b1e8464 WHIRLPOOL 17afb9ef655dcfd1a66b5744584a6004a156795469a0099847a8f4993f75ee573435d3545009d80a0e05426f20604c7da988b7bb9e69cd00a860f8016f641b0e +MISC ChangeLog 5050 SHA256 f0a226799e7a51377005b1e91012fa66a202af5e902e344594301d452dc08e80 SHA512 3017ad7480f15e28f2b2f18cb90362020cce0aadf844a608e4bbcb37ec97261e25bcbd5c0ae1a78f485c60ef3e6d5c144e009d44fd43f2d50aae121e1f09b637 WHIRLPOOL e8d64ac62705400f31d85c221380a036ba5203e6946e66ede6433847ef38a21aa420792b6616ed59483445351bc7b8f82325b3f98cd530ba1d72f316c60527c8 +MISC ChangeLog-2015 2207 SHA256 a4e427c1f74e2d4d526f67acb0556015956bb98236bfefba4935f7ff7f6de6ad SHA512 dcd33ae28a0652cbe4ab4b86e84ccec084613bde19cd83e74a1c18a90fde1dd97ed820957128f9e0039772d9bbc724b744836fe117ed83ea89e1c8c8811dea2c WHIRLPOOL 05b8b8baa9221698172d95565fc1f937137e663cb95a76fd1e5dc4fce2d390797e512cc4dc48637f5fbd5683ad4e3388975d75faa963afc0ce28a86828779808 +MISC metadata.xml 450 SHA256 49a13ea0730b767e16e500d6cc7b0f7efba56aebea798c63c510cb5db7c6460f SHA512 6204bade65b7aad07bc628a4c0b24ee4fb14d145356732a43b51d41c3fdc92c2592497ecf5e92fcbd6423a2ae2eaa8a46edacd92e92e0fe99aed3da4499889a3 WHIRLPOOL d6c9600d03c3913a3e598f56fcb7c0e3fd7b9b296fbef70c89cc77ecf83792be94343b24cbd5ccb041d6ba6ea442e197e0c961869a39789cfbf1f47edbf5b39c 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 new file mode 100644 index 000000000000..a819cf441d32 --- /dev/null +++ b/net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch @@ -0,0 +1,64 @@ +From 7fbc87986baa09c342abb21e34613e8bbdc3c9c7 Mon Sep 17 00:00:00 2001 +From: hasufell <hasufell@hasufell.de> +Date: Mon, 2 Nov 2015 16:24:43 +0100 +Subject: [PATCH 1/4] makefile: fix DESTDIR usage + +DESTDIR is not supposed to be set inside other variables. It is +standard to have this variable in install/uninstall rules, so it +can be reliably set separately no matter what other variables are set +to. +This also avoids potential bugs with setting SONAME or seds on +installed files (like pkgconfig) which then might include the +temporary DESTDIR directory. + +DESTDIR is really just for installing into a temporary directory or +a chroot, mostly used by package managers. +--- + Makefile | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/Makefile b/Makefile +index 33c8ba0..76153a0 100644 +--- a/Makefile ++++ b/Makefile +@@ -55,7 +55,7 @@ CFLAGS_LIB = $(CFLAGS_FAST) -fPIC + LDFLAGS_LIB = $(LDFLAGS) -shared + + INSTALL ?= install +-PREFIX ?= $(DESTDIR)/usr/local ++PREFIX ?= /usr/local + LIBDIR = $(PREFIX)/lib + INCLUDEDIR = $(PREFIX)/include + +@@ -123,19 +123,19 @@ tags: http_parser.c http_parser.h test.c + ctags $^ + + install: library +- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h +- $(INSTALL) -D $(SONAME) $(LIBDIR)/$(SONAME) +- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) ++ $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h ++ $(INSTALL) -D $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) ++ ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) + + install-strip: library +- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h +- $(INSTALL) -D -s $(SONAME) $(LIBDIR)/$(SONAME) +- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) ++ $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h ++ $(INSTALL) -D -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) ++ ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) + + uninstall: +- rm $(INCLUDEDIR)/http_parser.h +- rm $(LIBDIR)/$(SONAME) +- rm $(LIBDIR)/libhttp_parser.so ++ rm $(DESTDIR)$(INCLUDEDIR)/http_parser.h ++ rm $(DESTDIR)$(LIBDIR)/$(SONAME) ++ rm $(DESTDIR)$(LIBDIR)/libhttp_parser.so + + clean: + rm -f *.o *.a tags test test_fast test_g \ +-- +2.6.1 + diff --git a/net-libs/http-parser/files/0002-makefile-quote-variables.patch b/net-libs/http-parser/files/0002-makefile-quote-variables.patch new file mode 100644 index 000000000000..096ac6b6bd69 --- /dev/null +++ b/net-libs/http-parser/files/0002-makefile-quote-variables.patch @@ -0,0 +1,50 @@ +From 9bce473ba7417b45bfdb59d4151a8857dcfff4ad Mon Sep 17 00:00:00 2001 +From: hasufell <hasufell@hasufell.de> +Date: Mon, 2 Nov 2015 16:27:06 +0100 +Subject: [PATCH 2/4] makefile: quote variables + +Make does not take care of this in make rules. If any of the variables +DESTDIR, INCLUDEDIR or LIBDIR contain whitespaces, then the related +install command will fail. + +This is even more important for the uninstall rule. +--- + Makefile | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/Makefile b/Makefile +index 76153a0..8c4a9d7 100644 +--- a/Makefile ++++ b/Makefile +@@ -123,19 +123,19 @@ tags: http_parser.c http_parser.h test.c + ctags $^ + + install: library +- $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h +- $(INSTALL) -D $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) +- ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) ++ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" ++ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" ++ ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" + + install-strip: library +- $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h +- $(INSTALL) -D -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME) +- ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT) ++ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" ++ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" ++ ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" + + uninstall: +- rm $(DESTDIR)$(INCLUDEDIR)/http_parser.h +- rm $(DESTDIR)$(LIBDIR)/$(SONAME) +- rm $(DESTDIR)$(LIBDIR)/libhttp_parser.so ++ rm "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" ++ rm "$(DESTDIR)$(LIBDIR)/$(SONAME)" ++ rm "$(DESTDIR)$(LIBDIR)/libhttp_parser.so" + + clean: + rm -f *.o *.a tags test test_fast test_g \ +-- +2.6.1 + 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 new file mode 100644 index 000000000000..cafe68d220c9 --- /dev/null +++ b/net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch @@ -0,0 +1,35 @@ +From f45b38c42e7e92a5d0215c44dcf306616536011e Mon Sep 17 00:00:00 2001 +From: hasufell <hasufell@hasufell.de> +Date: Mon, 2 Nov 2015 16:32:11 +0100 +Subject: [PATCH 3/4] makefile: fix SONAME symlink, it should not be a full + path + +The symlink destination being a full path doesn't give any benefit and +may break a few use cases of copying these files to a different +destination, while preserving the symlink. +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 8c4a9d7..cbe93e8 100644 +--- a/Makefile ++++ b/Makefile +@@ -125,12 +125,12 @@ tags: http_parser.c http_parser.h test.c + install: library + $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" + $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" +- ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" ++ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" + + install-strip: library + $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" + $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" +- ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" ++ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" + + uninstall: + rm "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" +-- +2.6.1 + 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 new file mode 100644 index 000000000000..e21cd715499b --- /dev/null +++ b/net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch @@ -0,0 +1,31 @@ +From 62b1450cfe2e0df2d912279d38edf1b916020101 Mon Sep 17 00:00:00 2001 +From: hasufell <hasufell@hasufell.de> +Date: Mon, 2 Nov 2015 16:39:31 +0100 +Subject: [PATCH 4/4] makefile: add CFLAGS to linking command + +Although we compile the objects explicitly there are some CFLAGS +that may also affect linking, which is not always obvious. + +This can also be a problem for toolchains that support multiple ABIs +and need to set CFLAGS=<abi selector>, which will cause linking +to either fail or produce an unusable executable/library. +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index cbe93e8..ae16f08 100644 +--- a/Makefile ++++ b/Makefile +@@ -102,7 +102,7 @@ libhttp_parser.o: http_parser.c http_parser.h Makefile + $(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o + + library: libhttp_parser.o +- $(CC) $(LDFLAGS_LIB) -o $(SONAME) $< ++ $(CC) $(CFLAGS_LIB) $(LDFLAGS_LIB) -o $(SONAME) $< + + package: http_parser.o + $(AR) rcs libhttp_parser.a http_parser.o +-- +2.6.1 + 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 new file mode 100644 index 000000000000..da966373063f --- /dev/null +++ b/net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch @@ -0,0 +1,33 @@ +From b67bfbe6a07529dd82e2ee83b6848d017e6e422f Mon Sep 17 00:00:00 2001 +From: hasufell <hasufell@hasufell.de> +Date: Mon, 2 Nov 2015 16:51:28 +0100 +Subject: [PATCH 5/5] makefile: fix install rule dependency + +Otherwise the install rule will recompile the library, no matter +if it has already been compiled. +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index ae16f08..df0b59f 100644 +--- a/Makefile ++++ b/Makefile +@@ -122,12 +122,12 @@ parsertrace_g: http_parser_g.o contrib/parsertrace.c + tags: http_parser.c http_parser.h test.c + ctags $^ + +-install: library ++install: $(SONAME) + $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" + $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" + ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" + +-install-strip: library ++install-strip: $(SONAME) + $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h" + $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)" + ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)" +-- +2.6.1 + diff --git a/net-libs/http-parser/files/http-parser-2.6.2-darwin.patch b/net-libs/http-parser/files/http-parser-2.6.2-darwin.patch new file mode 100644 index 000000000000..b04b4a32bb01 --- /dev/null +++ b/net-libs/http-parser/files/http-parser-2.6.2-darwin.patch @@ -0,0 +1,16 @@ +Makefile: set install_name on Darwin + +https://bugs.gentoo.org/show_bug.cgi?id=546098 +https://github.com/nodejs/http-parser/issues/356 + +--- http-parser-2.6.2/Makefile ++++ http-parser-2.6.2/Makefile +@@ -62,6 +62,8 @@ + ifneq (darwin,$(PLATFORM)) + # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname... + LDFLAGS_LIB += -Wl,-soname=$(SONAME) ++else ++LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME) + endif + + test: test_g test_fast diff --git a/net-libs/http-parser/http-parser-2.6.2.ebuild b/net-libs/http-parser/http-parser-2.6.2.ebuild new file mode 100644 index 000000000000..33986a95474a --- /dev/null +++ b/net-libs/http-parser/http-parser-2.6.2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs multilib multilib-minimal + +DESCRIPTION="Http request/response parser for C" +HOMEPAGE="https://github.com/nodejs/http-parser" +SRC_URI="https://github.com/nodejs/http-parser/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="amd64 arm ~arm64 ppc ppc64 x86 ~amd64-linux ~x64-macos ~x64-solaris" +IUSE="static-libs" + +# https://github.com/nodejs/http-parser/pull/272 +PATCHES=( + "${FILESDIR}"/0001-makefile-fix-DESTDIR-usage.patch + "${FILESDIR}"/0002-makefile-quote-variables.patch + "${FILESDIR}"/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch + "${FILESDIR}"/0004-makefile-add-CFLAGS-to-linking-command.patch + "${FILESDIR}"/0005-makefile-fix-install-rule-dependency.patch + "${FILESDIR}"/${PN}-2.6.2-darwin.patch +) + +src_prepare() { + tc-export CC AR + epatch "${PATCHES[@]}" + multilib_copy_sources +} + +multilib_src_compile() { + emake PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" CFLAGS_FAST="${CFLAGS}" library + use static-libs && emake CFLAGS_FAST="${CFLAGS}" package +} + +multilib_src_test() { + emake CFLAGS_DEBUG="${CFLAGS}" test +} + +multilib_src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install + use static-libs && dolib.a libhttp_parser.a +} diff --git a/net-libs/http-parser/http-parser-2.7.1.ebuild b/net-libs/http-parser/http-parser-2.7.1.ebuild new file mode 100644 index 000000000000..94a06a97b5ec --- /dev/null +++ b/net-libs/http-parser/http-parser-2.7.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="Http request/response parser for C" +HOMEPAGE="https://github.com/nodejs/http-parser" +SRC_URI="https://github.com/nodejs/http-parser/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos ~x64-solaris" +IUSE="static-libs" + +# https://github.com/nodejs/http-parser/pull/272 +PATCHES=( + "${FILESDIR}"/0001-makefile-fix-DESTDIR-usage.patch + "${FILESDIR}"/0002-makefile-quote-variables.patch + "${FILESDIR}"/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch + "${FILESDIR}"/0004-makefile-add-CFLAGS-to-linking-command.patch + "${FILESDIR}"/0005-makefile-fix-install-rule-dependency.patch +) + +src_prepare() { + default + tc-export CC AR + multilib_copy_sources +} + +multilib_src_compile() { + emake PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" CFLAGS_FAST="${CFLAGS}" library + use static-libs && emake CFLAGS_FAST="${CFLAGS}" package +} + +multilib_src_test() { + emake CFLAGS_DEBUG="${CFLAGS}" CFLAGS_FAST="${CFLAGS}" test +} + +multilib_src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" install + use static-libs && dolib.a libhttp_parser.a +} diff --git a/net-libs/http-parser/metadata.xml b/net-libs/http-parser/metadata.xml new file mode 100644 index 000000000000..58faa9ffa1f1 --- /dev/null +++ b/net-libs/http-parser/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">nodejs/http-parser</remote-id> + </upstream> +</pkgmetadata> |