gl2ps-1.3.9.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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
  5. DESCRIPTION="OpenGL to PostScript printing library"
  6. HOMEPAGE="http://www.geuz.org/gl2ps/"
  7. SRC_URI="http://geuz.org/${PN}/src/${P}.tgz"
  8. LICENSE="LGPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
  11. IUSE="doc png zlib"
  12. RDEPEND="
  13. media-libs/freeglut
  14. x11-libs/libXmu
  15. png? ( media-libs/libpng:0= )
  16. zlib? ( sys-libs/zlib )"
  17. DEPEND="${RDEPEND}
  18. doc? (
  19. dev-tex/tth
  20. dev-texlive/texlive-latex
  21. dev-texlive/texlive-latexrecommended )"
  22. S=${WORKDIR}/${P}-source
  23. PATCHES=( "${FILESDIR}"/${PN}-1.3.8-cmake.patch )
  24. src_prepare() {
  25. cmake-utils_src_prepare
  26. sed '/^install.*TODO\.txt/d' -i "${S}"/CMakeLists.txt || die
  27. }
  28. src_configure() {
  29. local mycmakeargs=(
  30. -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
  31. -DUSE_ENABLE_DOC="$(usex doc)"
  32. -DUSE_ENABLE_PNG="$(usex png)"
  33. -DUSE_ENABLE_ZLIB="$(usex zlib)"
  34. )
  35. cmake-utils_src_configure
  36. }
  37. src_install() {
  38. cmake-utils_src_install
  39. if [[ ${CHOST} == *-darwin* ]] ; then
  40. install_name_tool \
  41. -id "${EPREFIX}"/usr/$(get_libdir)/libgl2ps.dylib \
  42. "${D%/}${EPREFIX}"/usr/$(get_libdir)/libgl2ps.dylib || die
  43. fi
  44. }