proj/gentoo: Initial commit
[gentoo.git] / net-libs / http-parser / http-parser-2.3.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 SONAMEVER="2.3"
8 SONAME="libhttp_parser.so.${SONAMEVER}"
9
10 inherit eutils toolchain-funcs multilib multilib-minimal
11
12 DESCRIPTION="A parser for HTTP messages written in C. It parses both requests and responses"
13 HOMEPAGE="https://github.com/joyent/http-parser"
14 SRC_URI="https://github.com/joyent/http-parser/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="MIT"
17 SLOT="0/${SONAMEVER}"
18 KEYWORDS="amd64 ~arm ppc x86"
19 IUSE="static-libs"
20
21 src_prepare() {
22         tc-export CC AR
23         epatch "${FILESDIR}"/${P}-flags.patch
24         multilib_copy_sources
25 }
26
27 multilib_src_compile() {
28         emake library
29         use static-libs && emake package
30 }
31
32 multilib_src_install() {
33         doheader http_parser.h
34         dolib.so ${SONAME}
35         dosym ${SONAME} /usr/$(get_libdir)/libhttp_parser.so
36         use static-libs && dolib.a libhttp_parser.a
37 }
38
39 multilib_src_install_all() {
40         dodoc README.md
41 }