net-libs/http-parser: Add live ebuild.
authorJeroen Roovers <jer@gentoo.org>
Sun, 15 Apr 2018 19:19:39 +0000 (21:19 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sun, 15 Apr 2018 19:19:39 +0000 (21:19 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

net-libs/http-parser/http-parser-99999.ebuild [new file with mode: 0644]

diff --git a/net-libs/http-parser/http-parser-99999.ebuild b/net-libs/http-parser/http-parser-99999.ebuild
new file mode 100644 (file)
index 0000000..06a3f2f
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit git-r3 toolchain-funcs multilib-minimal
+
+DESCRIPTION="HTTP request/response parser for C"
+HOMEPAGE="https://github.com/nodejs/http-parser"
+EGIT_REPO_URI="https://github.com/nodejs/http-parser/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="static-libs"
+
+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
+}