opencc-1.0.5.ebuild 943 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 multilib eutils vcs-snapshot
  5. DESCRIPTION="Libraries for conversion between Traditional and Simplified Chinese"
  6. HOMEPAGE="https://github.com/BYVoid/OpenCC"
  7. SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="Apache-2.0"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
  11. IUSE="doc static-libs"
  12. DEPEND="doc? ( app-doc/doxygen )"
  13. RDEPEND=""
  14. DOCS="AUTHORS NEWS.md README.md"
  15. #PATCHES=(
  16. # "${FILESDIR}"/${PN}-1.0.4-cmake-libdir.patch
  17. #)
  18. src_configure() {
  19. local mycmakeargs=(
  20. -DBUILD_DOCUMENTATION=$(usex doc)
  21. -DBUILD_SHARED_LIBS=ON
  22. -DENABLE_GTEST=OFF
  23. -DCMAKE_INSTALL_LIBDIR="${EPREFIX}"/usr/$(get_libdir)
  24. )
  25. cmake-utils_src_configure
  26. }
  27. src_install() {
  28. cmake-utils_src_install
  29. use static-libs || find "${ED}" -name '*.la' -o -name '*.a' -exec rm {} +
  30. }