logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

serf-1.3.9.ebuild (2006B)


  1. # Copyright 2008-2018 Arfrever Frehtes Taifersar Arahesis and others
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils scons-utils toolchain-funcs flag-o-matic
  5. DESCRIPTION="HTTP client library"
  6. HOMEPAGE="https://serf.apache.org/"
  7. SRC_URI="mirror://apache/${PN}/${P}.tar.bz2"
  8. LICENSE="Apache-2.0"
  9. SLOT="1"
  10. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
  11. IUSE="kerberos static-libs"
  12. RESTRICT="test"
  13. RDEPEND="dev-libs/apr:1=
  14. dev-libs/apr-util:1=
  15. dev-libs/openssl:0=
  16. sys-libs/zlib:0=
  17. kerberos? ( virtual/krb5 )"
  18. DEPEND="${RDEPEND}
  19. >=dev-util/scons-2.3.0"
  20. src_prepare() {
  21. epatch "${FILESDIR}/${PN}-1.3.8-static-lib.patch"
  22. epatch "${FILESDIR}/${PN}-1.3.8-openssl.patch"
  23. # https://code.google.com/p/serf/issues/detail?id=133
  24. sed -e "/env.Append(CCFLAGS=\['-O2'\])/d" -i SConstruct || die
  25. sed 's/OPENSSL_malloc_init/CRYPTO_malloc_init/' -i test/server/test_sslserver.c buckets/ssl_buckets.c || die
  26. # need limits.h for PATH_MAX (only when EXTENSIONS is enabled)
  27. [[ ${CHOST} == *-solaris* ]] && append-cppflags -D__EXTENSIONS__
  28. }
  29. src_compile() {
  30. myesconsargs=(
  31. PREFIX="${EPREFIX}/usr"
  32. LIBDIR="${EPREFIX}/usr/$(get_libdir)"
  33. # These config scripts are sent through a shell with an empty env
  34. # which breaks the SYSROOT usage in them. Set the vars inline to
  35. # avoid that.
  36. APR="SYSROOT='${SYSROOT}' ${SYSROOT}${EPREFIX}/usr/bin/apr-1-config"
  37. APU="SYSROOT='${SYSROOT}' ${SYSROOT}${EPREFIX}/usr/bin/apu-1-config"
  38. BUILD_STATIC=$(usex static-libs)
  39. AR="$(tc-getAR)"
  40. RANLIB="$(tc-getRANLIB)"
  41. CC="$(tc-getCC)"
  42. CPPFLAGS="${CPPFLAGS}"
  43. CFLAGS="${CFLAGS}"
  44. LINKFLAGS="${LDFLAGS}"
  45. )
  46. if use kerberos; then
  47. myesconsargs+=( GSSAPI="${SYSROOT}${EPREFIX}/usr/bin/krb5-config" )
  48. fi
  49. escons
  50. }
  51. src_test() {
  52. escons check
  53. }
  54. src_install() {
  55. escons install --install-sandbox="${D}"
  56. }