1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 inherit lua-single 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/archive/refs/tags/v${PV}.tar.gz"
17 KEYWORDS="~amd64 ~x86"
20 REQUIRED_USE="${LUA_REQUIRED_USE}"
24 dev-qt/qtbase:6[widgets,gui]
27 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_/usr/lib/qt6/libexec/moc_/usr/lib64/qt6/libexec/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 make_desktop_entry ipe Ipe ipe
98 if [ -d $COMMONDIR/styles ]; then
99 einfo "Linking common style sheets from $COMMONDIR"
100 for f in $COMMONDIR/styles/*; do
101 einfo " Linking ${f##*/}"
102 dosym $f usr/share/ipe/${PV}/styles/${f##*/}
105 elog "Style sheets from $COMMONDIR/styles have been symlinked to"
106 elog "the style sheet directory of ${P}. If you add additional"
107 elog "style sheets later to $COMMONDIR/styles you may symlink"
108 elog "them by hand to '/usr/share/ipe/${PV}/styles/'."