lasi-1.1.2.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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
  5. MY_PN=libLASi
  6. MY_P=${MY_PN}-${PV}
  7. DESCRIPTION="C++ library for postscript stream output"
  8. HOMEPAGE="http://www.unifont.org/lasi/"
  9. SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
  13. IUSE="doc examples"
  14. RDEPEND="
  15. dev-libs/glib:2
  16. media-libs/freetype:2
  17. x11-libs/pango"
  18. DEPEND="${RDEPEND}
  19. virtual/pkgconfig
  20. doc? ( app-doc/doxygen )"
  21. S=${WORKDIR}/${MY_P}
  22. PATCHES=(
  23. "${FILESDIR}"/${PN}-1.1.0-cmake.patch
  24. "${FILESDIR}"/${PN}-1.1.0-pkgconfig.patch
  25. )
  26. src_prepare() {
  27. cmake-utils_src_prepare
  28. sed -i \
  29. -e "s:\/lib$:\/$(get_libdir):" \
  30. -e "s/libLASi-\${VERSION}/${PF}/" \
  31. cmake/modules/instdirs.cmake \
  32. || die "Failed to fix cmake module"
  33. sed -i \
  34. -e "s:\${DATA_DIR}/examples:/usr/share/doc/${PF}/examples:" \
  35. examples/CMakeLists.txt || die
  36. use examples || sed -i -e '/add_subdirectory(examples)/d' CMakeLists.txt
  37. }
  38. src_configure() {
  39. CMAKE_BUILD_TYPE=None
  40. local mycmakeargs=(
  41. -DCMAKE_INSTALL_LIBDIR="${EPREFIX}"/usr/$(get_libdir)
  42. )
  43. use doc || mycmakeargs+=( -DDOXYGEN_EXECUTABLE= )
  44. cmake-utils_src_configure
  45. }