1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 inherit lua-single eutils toolchain-funcs
9 DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
10 HOMEPAGE="http://ipe.otfried.org"
11 SRC_URI="https://github.com/otfried/ipe/releases/download/v${PV}/${PN}-${PV}-src.tar.gz"
17 KEYWORDS="~amd64 ~x86"
20 REQUIRED_USE="${LUA_REQUIRED_USE}"
29 media-libs/libjpeg-turbo
37 BDEPEND="virtual/pkgconfig"
39 S="${WORKDIR}/${P}/src"
40 COMMONDIR=/usr/share/ipe/common
43 # colon-separated list of paths
44 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
45 # according to TeX directory structure
46 local urwdir=fonts/type1/urw
47 # add colon as field separator
48 local IFS="${IFS}:" dir
49 for dir in ${texmfdist}; do
50 if [[ -d ${dir}/${urwdir} ]]; then
51 URWFONTDIR="${dir}/${urwdir}"
61 -e 's_moc_/usr/lib64/qt5/bin/moc_' \
62 -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
64 sed -i -e 's/install -s/install/' common.mak || die
67 eapply "${FILESDIR}"/${PN}-outputprecision.patch
75 if search_urw_fonts; then
76 einfo "URW fonts found in ${URWFONTDIR}"
78 ewarn "Could not find directory containing URW fonts"
79 ewarn "Ipe will not function properly without them."
86 IPEPREFIX="${EPREFIX}/usr" \
87 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html"
92 IPEPREFIX="${EPREFIX}/usr" \
93 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
94 INSTALL_ROOT="${ED}" \
95 LUA_VERSION="$(lua_get_version)"
96 dodoc ../{news,readme}.txt
97 doicon ipe/icons/ipe.png
98 make_desktop_entry ipe Ipe ipe
100 if [ -d $COMMONDIR/styles ]; then
101 einfo "Linking common style sheets from $COMMONDIR"
102 for f in $COMMONDIR/styles/*; do
103 einfo " Linking ${f##*/}"
104 dosym $f usr/share/ipe/${PV}/styles/${f##*/}
107 elog "Style sheets from $COMMONDIR/styles have been symlinked to"
108 elog "the style sheet directory of ${P}. If you add additional"
109 elog "style sheets later to $COMMONDIR/styles you may symlink"
110 elog "them by hand to '/usr/share/ipe/${PV}/styles/'."