libjson-rpc-cpp-0.7.0.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils
  5. DESCRIPTION="JSON-RPC (1.0 & 2.0) framework for C++"
  6. HOMEPAGE="https://github.com/cinemast/libjson-rpc-cpp"
  7. SRC_URI="https://github.com/cinemast/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="doc +http-client +http-server +stubgen test"
  12. RDEPEND="
  13. dev-libs/jsoncpp:=
  14. http-client? ( net-misc/curl:= )
  15. http-server? ( net-libs/libmicrohttpd:= )
  16. stubgen? ( dev-libs/argtable:= )"
  17. DEPEND="${RDEPEND}
  18. doc? ( app-doc/doxygen )
  19. test? ( dev-cpp/catch )"
  20. RESTRICT="!test? ( test )"
  21. src_configure() {
  22. local mycmakeargs=(
  23. -DHTTP_CLIENT=$(usex http-client)
  24. -DHTTP_SERVER=$(usex http-server)
  25. # they are not installed
  26. -DCOMPILE_EXAMPLES=OFF
  27. -DCOMPILE_STUBGEN=$(usex stubgen)
  28. -DCOMPILE_TESTS=$(usex test)
  29. -DCATCH_INCLUDE_DIR="${EPREFIX}/usr/include/catch"
  30. )
  31. cmake-utils_src_configure
  32. }
  33. src_compile() {
  34. cmake-utils_src_compile
  35. use doc && emake -C "${BUILD_DIR}" doc
  36. }
  37. src_install() {
  38. cmake-utils_src_install
  39. use doc && dodoc -r "${BUILD_DIR}"/doc/html
  40. }