summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2020-12-05 18:36:27 -0600
committerWilliam Hubbs <williamh@gentoo.org>2020-12-05 18:41:01 -0600
commit05bcdda098aace6c3507b14b5b956d373ad40c36 (patch)
tree1baa4c10e3bde21ba4d2bb998d2dcb31ecf50ac9 /dev-lang
parentdev-python/mechanize: PYTHON_COMPAT+=(python3_9) (diff)
downloadgentoo-05bcdda098aace6c3507b14b5b956d373ad40c36.tar.gz
gentoo-05bcdda098aace6c3507b14b5b956d373ad40c36.tar.bz2
gentoo-05bcdda098aace6c3507b14b5b956d373ad40c36.zip
dev-lang/lua: migrate 5.3 to eapi 7
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/lua/files/lua-5.3-make-r1.patch4
-rw-r--r--dev-lang/lua/lua-5.3.6-r1.ebuild38
2 files changed, 24 insertions, 18 deletions
diff --git a/dev-lang/lua/files/lua-5.3-make-r1.patch b/dev-lang/lua/files/lua-5.3-make-r1.patch
index b9e9051462c4..d27eb9938ea0 100644
--- a/dev-lang/lua/files/lua-5.3-make-r1.patch
+++ b/dev-lang/lua/files/lua-5.3-make-r1.patch
@@ -18,7 +18,7 @@ diff -uNr lua-5.3.3.orig/Makefile lua-5.3.3/Makefile
+# 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:
@@ -63,7 +63,7 @@ diff -uNr lua-5.3.3.orig/src/Makefile lua-5.3.3/src/Makefile
# (end of Makefile)
+
-+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.3.6-r1.ebuild b/dev-lang/lua/lua-5.3.6-r1.ebuild
index 1e7b58d91b67..a65d701dcd53 100644
--- a/dev-lang/lua/lua-5.3.6-r1.ebuild
+++ b/dev-lang/lua/lua-5.3.6-r1.ebuild
@@ -1,13 +1,13 @@
# 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/"
-TEST_PV="5.3.4" # no 5.3.5-specific release yet
+TEST_PV="5.3.4"
TEST_A="${PN}-${TEST_PV}-tests.tar.gz"
PKG_A="${P}.tar.gz"
SRC_URI="
@@ -17,7 +17,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="5.3"
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
+}