http-parser-2.3.ebuild 939 B

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