summaryrefslogtreecommitdiff
path: root/dev-lang/lua
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /dev-lang/lua
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'dev-lang/lua')
-rw-r--r--dev-lang/lua/Manifest3
-rw-r--r--dev-lang/lua/lua-5.1.5-r102.ebuild144
-rw-r--r--dev-lang/lua/lua-5.2.3-r3.ebuild143
-rw-r--r--dev-lang/lua/lua-5.3.3-r2.ebuild143
4 files changed, 433 insertions, 0 deletions
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
index cf0090bf5fa7..0a07d86da321 100644
--- a/dev-lang/lua/Manifest
+++ b/dev-lang/lua/Manifest
@@ -26,10 +26,13 @@ DIST lua-5.2.3.tar.gz 251195 BLAKE2B f3d11e180fe070cb5be98f0694081d26067e21eddeb
DIST lua-5.3.3.tar.gz 294290 BLAKE2B 8052d3fa5f34636df314886a62d63e46fc76ada765679da9352e751f484a458404ac55e5b32ad63ced9d2b16d629d62a52240b1b1a509bcdf5d5df85e405646d SHA512 7b8122ed48ea2a9faa47d1b69b4a5b1523bb7be67e78f252bb4339bf75e957a88c5405156e22b4b63ccf607a5407bf017a4cee1ce12b1aa5262047655960a3cc
EBUILD lua-5.1.5-r100.ebuild 3759 BLAKE2B 191eb7aef48ba9b8e08254e1e7717e47a48ddbc21810274b3063c8d0d98790dd0da1bfe52128e1da5472285dc89c3f9770cb5b02a0121316c16121df5f1161dd SHA512 7191cf605f57063dabeb201f9fb747d0df1c4b7b9ede34bec21d8e0f0eeb8edebc4be82f7157a8b23b18f352f5b07bb03a83cd645856e6a019fcd5c2bd0c990a
EBUILD lua-5.1.5-r101.ebuild 4020 BLAKE2B 9c151be5dd2bcbd340280f647e55d3db580b3e56367b3a18924e35223f9ccb9d4f9f2e05bd41ec8dd43e984bb28afd12bfe02a569776216d9dc78e518c32ba06 SHA512 16ef9fa4f9036aa7ab9683d3cf25cd3015fafbea13248b51d65ea47ceddd2c5ed378d5b5df36fd87398c5220389ae08c08103aa4ae789a03412ec7f4b6501a02
+EBUILD lua-5.1.5-r102.ebuild 4020 BLAKE2B b357a5e5f7831d6c98d716f651c4bfa2ebb8e2377a9e1c5be64f4eb0da6e818e2146feacd0e38328cf5ee9b66827b25795a70cb273a8a32ccb576abada6f0bdb SHA512 ace218026ab6fef8b758d6c9a2a6ab5126fbedf5a1bf6a8d3402c2e5c4423f56613bfd71226d7423e8e457d68eda03fb653226812399bbad45ccd1cc146489d3
EBUILD lua-5.1.5-r4.ebuild 3654 BLAKE2B 128f6ef3404aa231626dd7ee14e777a4b67a78ad2133db0f50269636b87e876f433cf526398ab4520c46e1c3d31787185a53515b16c69cddf7bd6fd0ef860ead SHA512 1f2f70d49cbb1934442812d8f1cbab485e097585118aaf41500041832681dc4cf54a7ecdb4ac18c9403444842dfb5484e20e7716d68f1f54d97b2b5454543283
EBUILD lua-5.2.3-r1.ebuild 3782 BLAKE2B e600a525fa3762916ce36307969d15e97155df36aff7d4ef9f9e540811d7fbdbfe82b40252bc7681e11350613c933e7d1c2c37796a2f21157e8996aa44b43826 SHA512 1f682778d613ed1bb9f56122d156e616a8e03e6de647d52362263f37f459e7ce785e9d7491bf2139cdedf60a6466699e6562ae394a6a9e11a1ba4fbcfa157659
EBUILD lua-5.2.3-r2.ebuild 4043 BLAKE2B a257fca93afc3dfda9e41e2222c40eb6cfb9f7cd221ab6b499c72273f90bdb5ae5e1a11e0b75c2b097c110565817124093b23da6ae5702552e6be43ac924da80 SHA512 2e7604989198e659d96fc807e820a118639a870f78bcacc18c8e87446252d8cb9d3fae4edc04f57448efbc92edaac104f296fd61321ded4c8fd7b1a983c63047
+EBUILD lua-5.2.3-r3.ebuild 4043 BLAKE2B 06127a7c35a4dc1ec47b0fb447fd1dd265625ef92da2427b8f09f82dec9aab0726c36b88f254b7a6aff6a2916c723c49f800db64b6b74859c01346dcbd2a1a4c SHA512 4bf9770781c348e3a71203a341c39a37b2a32804b2ce1304ed41fb39ff25a916d0729183bce49f994d8ca44c9c79dfb9c72501ad3d0ba2dc9ee21dad48c814e5
EBUILD lua-5.2.3.ebuild 3268 BLAKE2B dc5a23765550709bb876b200c7ca6e33aa51ca79c5599344a6a111429b0e5ad9d785184bac372fa4e4db440cfdefe100d5abdfff59084e5143323b5d79afebd5 SHA512 1fac24f9f6526a9c75fa35796dbbd87cd0906d7913184301045ba184d259612316f1a7fe21d92c1f562fef1fdf7c59c9c20da8a6f62bbfa1fc93bcffcd99fb2c
EBUILD lua-5.3.3-r1.ebuild 4055 BLAKE2B cb840b44fada44b133f0db32a2dab08cebe08a501da6d0ca7979a24b52cd6aaae5e02d7e9dfa6f87e216bbecc3c72aa893457a8c0c7146e62147c2eca1e88b1b SHA512 6a5f0a20d7c684853e5be8a7460771b5329c70af57d4ebf199b7812b4d7bd21d625f20536c4f7d234d3cc2467ff29e724e619afdaa2bef9c29d575d527d993bc
+EBUILD lua-5.3.3-r2.ebuild 4055 BLAKE2B 61ba1948449a7e44f57df783975106fce12ab5e9bb9fa761b6f49a8fef8fd95447856b7a1a84e2a0367259018bd41a96e4f3ad5a4d09198a0a177934cda031c2 SHA512 e210a7577bc6090d53cbb0c3863841bc4d649f6d592cdd2a2ce4944b1db1f54c30f5cb71a5603468dac1fe94ab7f0bceed3c668797c469adb6ecc3fe984124e6
EBUILD lua-5.3.3.ebuild 3794 BLAKE2B 6b3222352e83d569651051474a184d4825db92aa4e6c0722c727e660b9c2d748a8354956b7f3baf9bb09b64968110c8ad061e194b766a4cece15692210dac5d0 SHA512 f7c487b9f6be32b49bc8bd71ac2ef601579a20d9936749829d0ca39a5bba8b465b406d6045f15c33dc1d18590ec58791dd92d1d9d9729095f03f187bf96bef92
MISC metadata.xml 451 BLAKE2B 97895c97f22d1d17e8e888a311f8b01b345fb296189016efdd4da71384f2adcae47bfe30b4da92499fbeaa5f1257ddb9e3116aa31167e62366127b578a753b08 SHA512 ee674307c2a1daeeba3e9da078e440648ed379422801989007c15c4c8233e905b14f8e4fae66ae2804a5b39b0676e4cca9ff21fb8985874bccfef15b9dd918a9
diff --git a/dev-lang/lua/lua-5.1.5-r102.ebuild b/dev-lang/lua/lua-5.1.5-r102.ebuild
new file mode 100644
index 000000000000..cfd1cdfe50e5
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r102.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+SAN_SLOT="${SLOT//.}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/lua${SLOT}/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r2.patch
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ #EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
+
+ if ! use deprecated ; then
+ # patches from 5.1.4 still apply
+ epatch "${FILESDIR}"/${PN}-5.1.4-deprecated.patch
+ epatch "${FILESDIR}"/${PN}-5.1.4-test.patch
+ fi
+
+ if ! use readline ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
+ fi
+
+ # A slotted Lua uses different directories for headers & names for
+ # libraries, and pkgconfig should reflect that.
+ sed -r -i \
+ -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
+ -e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \
+ "${S}"/etc/lua.pc
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We want packages to find our things...
+ sed -i \
+ -e 's:/usr/local:'${EPREFIX}'/usr:' \
+ -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \
+ etc/lua.pc src/luaconf.h || die
+}
+
+multilib_src_compile() {
+ tc-export CC
+ myflags=
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ if use readline; then
+ mylibs="-lreadline"
+ fi
+
+ cd src
+ emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+
+ mv lua_test ../test/lua.static
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ newins etc/lua.pc lua${SLOT}.pc
+}
+
+multilib_src_install_all() {
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+multilib_src_test() {
+ local positive="bisect cf echo env factorial fib fibfor hello printf sieve
+ sort trace-calls trace-globals"
+ local negative="readonly"
+ local test
+
+ cd "${BUILD_DIR}" || die
+ for test in ${positive}; do
+ test/lua.static test/${test}.lua || die "test $test failed"
+ done
+
+ for test in ${negative}; do
+ test/lua.static test/${test}.lua && die "test $test failed"
+ done
+}
diff --git a/dev-lang/lua/lua-5.2.3-r3.ebuild b/dev-lang/lua/lua-5.2.3-r3.ebuild
new file mode 100644
index 000000000000..4096b356b1c9
--- /dev/null
+++ b/dev-lang/lua/lua-5.2.3-r3.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline:0= )
+ app-eselect/eselect-lua
+ !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)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
+ 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
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}"/ || die
+ eautoreconf
+
+ # A slotted Lua uses different directories for headers & names for
+ # libraries, and pkgconfig should reflect that.
+ sed -r -i \
+ -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
+ -e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \
+ "${S}"/etc/lua.pc
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ sed -i \
+ -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
+ -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ econf
+}
+
+multilib_src_compile() {
+ tc-export CC
+
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ use readline && mylibs="-lreadline"
+
+ cd src
+
+ local myCFLAGS=""
+ use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
+
+ case "${CHOST}" in
+ *-mingw*) : ;;
+ *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
+ esac
+
+ emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -e "s:^prefix= :prefix= ${EPREFIX}:" \
+ -e "s:^V=.*:V= ${PATCH_PV}:" \
+ -e "s:^R=.*:R= ${PV}:" \
+ -e "s:/,lib,:/$(get_libdir):g" \
+ "${WORKDIR}/lua.pc"
+
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
+}
+
+multilib_src_install_all() {
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+# Makefile contains a dummy target that doesn't do tests
+# but causes issues with slotted lua (bug #510360)
+src_test() { :; }
diff --git a/dev-lang/lua/lua-5.3.3-r2.ebuild b/dev-lang/lua/lua-5.3.3-r2.ebuild
new file mode 100644
index 000000000000..b813a414cb9d
--- /dev/null
+++ b/dev-lang/lua/lua-5.3.3-r2.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline:0= )
+ app-eselect/eselect-lua
+ !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)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
+ 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
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
+ eautoreconf
+
+ # A slotted Lua uses different directories for headers & names for
+ # libraries, and pkgconfig should reflect that.
+ sed -r -i \
+ -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
+ -e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \
+ "${S}"/etc/lua.pc
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ sed -i \
+ -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
+ -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ econf
+}
+
+multilib_src_compile() {
+ tc-export CC
+
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ use readline && mylibs="-lreadline"
+
+ cd src
+
+ local myCFLAGS=""
+ use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
+
+ case "${CHOST}" in
+ *-mingw*) : ;;
+ *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
+ esac
+
+ emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -e "s:^prefix= :prefix= ${EPREFIX}:" \
+ -e "s:^V=.*:V= ${PATCH_PV}:" \
+ -e "s:^R=.*:R= ${PV}:" \
+ -e "s:/,lib,:/$(get_libdir):g" \
+ "${WORKDIR}/lua.pc"
+
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
+}
+
+multilib_src_install_all() {
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+# Makefile contains a dummy target that doesn't do tests
+# but causes issues with slotted lua (bug #510360)
+src_test() { :; }