flatbuffers-1.6.0.ebuild 757 B

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils flag-o-matic
  5. DESCRIPTION="Memory efficient serialization library"
  6. HOMEPAGE="https://google.github.io/flatbuffers/"
  7. SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="Apache-2.0"
  9. SLOT="0"
  10. KEYWORDS="~amd64"
  11. IUSE="static-libs test"
  12. src_prepare() {
  13. sed -i -e "s/DESTINATION lib/DESTINATION $(get_libdir)/" CMakeLists.txt || die
  14. cmake-utils_src_prepare
  15. }
  16. src_configure() {
  17. append-cppflags -std=c++11
  18. local mycmakeargs=(
  19. -DFLATBUFFERS_BUILD_FLATLIB=$(usex static-libs)
  20. -DFLATBUFFERS_BUILD_SHAREDLIB=ON
  21. -DFLATBUFFERS_BUILD_TESTS=$(usex test)
  22. )
  23. cmake-utils_src_configure
  24. }