onion-0.8.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. SCM=""
  5. if [ "${PV#9999}" != "${PV}" ] ; then
  6. SCM="git-r3"
  7. EGIT_REPO_URI="https://github.com/davidmoreno/onion"
  8. fi
  9. inherit ${SCM} cmake-utils
  10. DESCRIPTION="C library to create simple HTTP servers and Web Applications"
  11. HOMEPAGE="http://www.coralbits.com/libonion/ https://github.com/davidmoreno/onion"
  12. if [ "${PV#9999}" != "${PV}" ] ; then
  13. KEYWORDS=""
  14. SRC_URI=""
  15. else
  16. KEYWORDS="~amd64"
  17. SRC_URI="https://github.com/davidmoreno/onion/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  18. fi
  19. LICENSE="|| ( GPL-2+ Apache-2.0 ) AGPL-3"
  20. SLOT="0"
  21. IUSE="
  22. gnutls pam png jpeg xml systemd sqlite boehm-gc
  23. test examples cxx -libev -libevent
  24. redis
  25. "
  26. RDEPEND="
  27. gnutls? ( net-libs/gnutls dev-libs/libgcrypt:0= )
  28. pam? ( virtual/pam )
  29. png? ( media-libs/libpng:0= x11-libs/cairo )
  30. jpeg? ( virtual/jpeg:0 )
  31. xml? ( dev-libs/libxml2:2 sys-libs/zlib )
  32. systemd? ( sys-apps/systemd )
  33. sqlite? ( dev-db/sqlite:3 )
  34. boehm-gc? ( dev-libs/boehm-gc )
  35. libev? ( dev-libs/libev )
  36. !libev? ( libevent? ( dev-libs/libevent ) )
  37. redis? ( dev-libs/hiredis )
  38. "
  39. DEPEND="${RDEPEND}
  40. test? ( net-misc/curl )
  41. "
  42. REQUIRED_USE="test? ( examples )"
  43. src_configure() {
  44. use test || echo '' > tests/CMakeLists.txt
  45. local mycmakeargs=(
  46. "-DONION_USE_SSL=$(usex gnutls)"
  47. "-DONION_USE_PAM=$(usex pam)"
  48. "-DONION_USE_PNG=$(usex png)"
  49. "-DONION_USE_JPEG=$(usex jpeg)"
  50. "-DONION_USE_XML2=$(usex xml)"
  51. "-DONION_USE_SYSTEMD=$(usex systemd)"
  52. "-DONION_USE_SQLITE3=$(usex sqlite)"
  53. "-DONION_USE_GC=$(usex boehm-gc)"
  54. "-DONION_USE_TESTS=$(usex test)"
  55. "-DONION_EXAMPLES=$(usex examples)"
  56. "-DONION_USE_BINDINGS_CPP=$(usex cxx)"
  57. "-DONION_USE_REDIS=$(usex redis)"
  58. "-DONION_POLLER=$(usex libev libev "$(usex libevent libevent default)")"
  59. )
  60. cmake-utils_src_configure
  61. }