media-gfx/ipe: Switch to lua-single eclass
[shuber-gentoo-overlay.git] / media-gfx / ipe / ipe-7.2.18.ebuild
index ecac0eb46a420b1e49af6c6e5bd4124be2f897b8..d0c08daa94396460b63c8c5080c679beaecf8d20 100644 (file)
@@ -2,7 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit eutils toolchain-funcs
+
+LUA_COMPAT=( lua5-{3..4} )
+inherit lua-single eutils toolchain-funcs
 
 DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
 HOMEPAGE="http://ipe.otfried.org"
@@ -15,14 +17,17 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="highprec"
 
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
 RDEPEND="app-text/texlive-core
-       >=dev-lang/lua-5.3
        media-libs/freetype:2
        x11-libs/cairo
        dev-qt/qtcore:5
        dev-qt/qtwidgets:5"
 DEPEND="${RDEPEND}
-       virtual/pkgconfig"
+       ${LUA_DEPS}"
+
+BDEPEND="virtual/pkgconfig"
 
 S="${WORKDIR}/${P}/src"
 COMMONDIR=/usr/share/ipe/common
@@ -59,6 +64,7 @@ src_prepare() {
 }
 
 pkg_setup() {
+       lua-single_pkg_setup
        if search_urw_fonts; then
                einfo "URW fonts found in ${URWFONTDIR}"
        else
@@ -78,7 +84,8 @@ src_install() {
        emake install \
                IPEPREFIX="${EPREFIX}/usr" \
                IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
-               INSTALL_ROOT="${ED}"
+               INSTALL_ROOT="${ED}" \
+               LUA_VERSION="$(lua_get_version)"
        dodoc ../{news,readme}.txt
        doicon ipe/icons/ipe.png
        make_desktop_entry ipe Ipe ipe