summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2020-12-05 19:30:56 -0600
committerWilliam Hubbs <williamh@gentoo.org>2020-12-05 19:33:36 -0600
commit1c73c534632603d64377940b996b8c34937969fe (patch)
treeb55da9ed0560f83bad858d0af8dc713ad71b70b4 /dev-lang/lua
parentapp-text/calibre: PYTHON_COMPAT+=(python3_9) (diff)
downloadgentoo-1c73c534632603d64377940b996b8c34937969fe.tar.gz
gentoo-1c73c534632603d64377940b996b8c34937969fe.tar.bz2
gentoo-1c73c534632603d64377940b996b8c34937969fe.zip
dev-lang/lua: migrate 5.2.4 to eapi 7
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'dev-lang/lua')
-rw-r--r--dev-lang/lua/files/lua-5.2-make-r1.patch4
-rw-r--r--dev-lang/lua/lua-5.2.4-r2.ebuild36
2 files changed, 23 insertions, 17 deletions
diff --git a/dev-lang/lua/files/lua-5.2-make-r1.patch b/dev-lang/lua/files/lua-5.2-make-r1.patch
index a0624af9cc33..c65f799c0dcc 100644
--- a/dev-lang/lua/files/lua-5.2-make-r1.patch
+++ b/dev-lang/lua/files/lua-5.2-make-r1.patch
@@ -17,7 +17,7 @@
+# Use libtool for binary installs, etc.
+
+export V
-+export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = libtool --quiet --tag=CC
+# See libtool manual about how to set this
+
+gentoo_clean:
@@ -47,7 +47,7 @@
lzio.h
+
-+export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = libtool --quiet --tag=CC
+export LIB_VERSION = 6:1:1
+
+# The following rules use libtool for compiling and linking in order to
diff --git a/dev-lang/lua/lua-5.2.4-r2.ebuild b/dev-lang/lua/lua-5.2.4-r2.ebuild
index af89f22a59cb..e9de80efdfb9 100644
--- a/dev-lang/lua/lua-5.2.4-r2.ebuild
+++ b/dev-lang/lua/lua-5.2.4-r2.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator
+inherit autotools multilib multilib-minimal portability toolchain-funcs
DESCRIPTION="A powerful light-weight programming language designed for extending applications"
HOMEPAGE="http://www.lua.org/"
@@ -17,7 +17,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="5.2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+deprecated emacs readline static test test-complete"
+IUSE="+deprecated readline static test test-complete"
RESTRICT="!test? ( test )"
RDEPEND="readline? ( sys-libs/readline:0= )
@@ -25,16 +25,17 @@ RDEPEND="readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
DEPEND="${RDEPEND}
sys-devel/libtool"
-PDEPEND="emacs? ( app-emacs/lua-mode )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
)
-src_prepare() {
- local PATCH_PV=$(get_version_component_range 1-2)
+PATCHES=(
+ "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r1.patch"
+)
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+src_prepare() {
+ default
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
@@ -42,9 +43,6 @@ src_prepare() {
Makefile src/Makefile || die
fi
- [ -d "${FILESDIR}/${PV}" ] && \
- EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
-
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
@@ -108,7 +106,7 @@ multilib_src_compile() {
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
- V=$(get_version_component_range 1-2) \
+ V=$(ver_cut 1-2) \
gentoo_all
}
@@ -129,7 +127,7 @@ multilib_src_install() {
# We want packages to find our things...
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
- local PATCH_PV=$(get_version_component_range 1-2)
+ local PATCH_PV=$(ver_cut 1-2)
cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
@@ -152,9 +150,9 @@ multilib_src_install() {
}
multilib_src_install_all() {
- dodoc README
- dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
+ DOCS="README"
+ HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
+ einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
}
@@ -192,3 +190,11 @@ src_test() {
die "Tests failed"
fi
}
+
+pkg_postinst() {
+ if has_version "app-editor/emacs"; then
+ if ! has_version "app-emacs/lua-mode"; then
+ einfo "Install app-emacs/lua-mode for lua support for emacs"
+ fi
+ fi
+}