ipe-7.1.3.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils qt4-r2 toolchain-funcs
  5. DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
  6. HOMEPAGE="http://ipe7.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/ipe7/${PN}/7.1.0/${P}-src.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE=""
  12. RDEPEND="
  13. app-text/texlive-core
  14. dev-lang/lua
  15. media-libs/freetype:2
  16. x11-libs/cairo
  17. dev-qt/qtcore:4
  18. dev-qt/qtgui:4"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig"
  21. S="${WORKDIR}/${P}/src"
  22. search_urw_fonts() {
  23. # colon-separated list of paths
  24. local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
  25. # according to TeX directory structure
  26. local urwdir=fonts/type1/urw
  27. # add colon as field separator
  28. local IFS="${IFS}:" dir
  29. for dir in ${texmfdist}; do
  30. if [[ -d ${dir}/${urwdir} ]]; then
  31. URWFONTDIR="${dir}/${urwdir}"
  32. return 0
  33. fi
  34. done
  35. return 1
  36. }
  37. pkg_setup() {
  38. if search_urw_fonts; then
  39. einfo "URW fonts found in ${URWFONTDIR}"
  40. else
  41. ewarn "Could not find directory containing URW fonts"
  42. ewarn "Ipe will not function properly without them."
  43. fi
  44. }
  45. src_prepare() {
  46. sed -i \
  47. -e 's/fpic/fPIC/' \
  48. -e 's/moc-qt4/moc/' \
  49. -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
  50. config.mak || die
  51. sed -i -e 's/install -s/install/' common.mak || die
  52. epatch "${FILESDIR}"/${P}-gold.patch
  53. }
  54. src_compile() {
  55. emake \
  56. CXX=$(tc-getCXX) \
  57. IPEPREFIX="${EPREFIX}/usr" \
  58. IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html"
  59. }
  60. src_install() {
  61. emake install \
  62. IPEPREFIX="${EPREFIX}/usr" \
  63. IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
  64. INSTALL_ROOT="${ED}"
  65. dodoc ../{news,readme}.txt
  66. doicon ipe/icons/ipe.png
  67. make_desktop_entry ipe Ipe ipe
  68. }