summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Martins <rafaelmartins@gentoo.org>2017-01-23 04:38:52 +0100
committerRafael Martins <rafaelmartins@gentoo.org>2017-01-23 04:39:20 +0100
commitfe7d52f325f78a08e74d66883bf29624e9181c8e (patch)
treef20f6cd44affba9e1ba53ffe84ed1fa2429087c9 /dev-lang/lua
parentdev-python/urllib3: Removed old. (diff)
downloadgentoo-fe7d52f325f78a08e74d66883bf29624e9181c8e.tar.gz
gentoo-fe7d52f325f78a08e74d66883bf29624e9181c8e.tar.bz2
gentoo-fe7d52f325f78a08e74d66883bf29624e9181c8e.zip
dev-lang/lua: cleanup wrt bug #520480
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-lang/lua')
-rw-r--r--dev-lang/lua/Manifest1
-rw-r--r--dev-lang/lua/lua-5.1.4-r8.ebuild124
-rw-r--r--dev-lang/lua/lua-5.1.5-r1.ebuild119
-rw-r--r--dev-lang/lua/lua-5.1.5-r2.ebuild124
-rw-r--r--dev-lang/lua/lua-5.1.5-r3.ebuild133
-rw-r--r--dev-lang/lua/lua-5.1.5.ebuild119
6 files changed, 0 insertions, 620 deletions
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
index 52b662140c5c..e73f574022a6 100644
--- a/dev-lang/lua/Manifest
+++ b/dev-lang/lua/Manifest
@@ -1,4 +1,3 @@
-DIST lua-5.1.4.tar.gz 216679 SHA256 b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a SHA512 bc542fe8535826ac1e49b03a8f238cf049724b02c14718f8162cfeaf735a5e6c58412ff18dbe7a38e4cc4433f3d1e702554e9b24b5f021634b4280880980f40f WHIRLPOOL 2d8fdf77e31314eed68d8ace368a62a608a58114bea5c8797a2e2d327ca870dd4450ede494733d49c97bb447c97adf08610027df3206999a35fb49cde77448fd
DIST lua-5.1.5.tar.gz 221213 SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9 WHIRLPOOL 9dac93b73b9ad1ef6c69e0aa11fb53d5efe89274b65c55a1ac30bab23e8a255851b0e44306db54212b1d481e658cecd38e5ff22a25e1fa974858b7b03fb45b75
DIST lua-5.2.3.tar.gz 251195 SHA256 13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d SHA512 264bb7c8db2f190ef0ca38584ec81999ab588f54e03119c5214c40bb8925b0eb407fac483a03e40cc8a220f6748ddff7d3a7392da3803418276b0d263b866449 WHIRLPOOL d278a1e38416bcf7f82eb3e7fd5fb423e60ccb69e9d57a937070516ff8be2d19a98bbfdaf37ec6fd6fb3ef2d625900977ca0cb47e46cb0ede5ebd5d37a9454ef
DIST lua-5.3.3.tar.gz 294290 SHA256 5113c06884f7de453ce57702abaac1d618307f33f6789fa870e87a59d772aca2 SHA512 7b8122ed48ea2a9faa47d1b69b4a5b1523bb7be67e78f252bb4339bf75e957a88c5405156e22b4b63ccf607a5407bf017a4cee1ce12b1aa5262047655960a3cc WHIRLPOOL e9d58093327e3c67e167dad9952796f1f2f0dbfa4f165c0ec5a8808a6a73d3b25e564797a2804d408bdaeb7229e7684f907491137d4521119ba918ce87c781bc
diff --git a/dev-lang/lua/lua-5.1.4-r8.ebuild b/dev-lang/lua/lua-5.1.4-r8.ebuild
deleted file mode 100644
index 3a4bbf15caf4..000000000000
--- a/dev-lang/lua/lua-5.1.4-r8.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-inherit eutils multilib 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="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-aix ~x64-freebsd ~ia64-hpux ~x86-interix ~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 )"
-DEPEND="${RDEPEND}
- sys-devel/libtool"
-PDEPEND="emacs? ( app-emacs/lua-mode )"
-
-src_prepare() {
- local PATCH_PV=$(get_version_component_range 1-2)
-
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.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:4:1/' src/Makefile
-
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
-
- if ! use deprecated ; then
- epatch "${FILESDIR}"/${P}-deprecated.patch
- epatch "${FILESDIR}"/${P}-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
-
- # We want packages to find our things...
- sed -i \
- -e "s:/usr/local:${EPREFIX}/usr:" \
- -e "s:/\<lib\>:/$(get_libdir):g" \
- etc/lua.pc src/luaconf.h
-}
-
-# no need for a configure phase
-src_configure() { true; }
-
-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=${PV} \
- gentoo_all || die "emake failed"
-
- mv lua_test ../test/lua.static
-}
-
-src_install() {
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
- V=${PV} gentoo_install \
- || die "emake install gentoo_install failed"
-
- dodoc HISTORY README
- dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
- doicon etc/lua.ico
- insinto /usr/$(get_libdir)/pkgconfig
- doins etc/lua.pc
-
- doman doc/lua.1 doc/luac.1
-}
-
-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 "${S}"
- 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.1.5-r1.ebuild b/dev-lang/lua/lua-5.1.5-r1.ebuild
deleted file mode 100644
index 2a4265993eb4..000000000000
--- a/dev-lang/lua/lua-5.1.5-r1.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-inherit eutils multilib 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="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
-IUSE="+deprecated emacs readline static"
-
-RDEPEND="readline? ( sys-libs/readline )"
-DEPEND="${RDEPEND}
- sys-devel/libtool"
-PDEPEND="emacs? ( app-emacs/lua-mode )"
-
-src_prepare() {
- local PATCH_PV=$(get_version_component_range 1-2)
-
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
-
- #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
-
- # 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
-}
-
-# no need for a configure phase
-src_configure() { true; }
-
-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=${PV} \
- gentoo_all || die "emake failed"
-
- mv lua_test ../test/lua.static
-}
-
-src_install() {
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
- V=${PV} gentoo_install \
- || die "emake install gentoo_install failed"
-
- dodoc HISTORY README
- dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
- doicon etc/lua.ico
- insinto /usr/$(get_libdir)/pkgconfig
- doins etc/lua.pc
-
- doman doc/lua.1 doc/luac.1
-}
-
-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 "${S}"
- 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.1.5-r2.ebuild b/dev-lang/lua/lua-5.1.5-r2.ebuild
deleted file mode 100644
index 2d6213559c7b..000000000000
--- a/dev-lang/lua/lua-5.1.5-r2.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils multilib 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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
-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 )"
-
-SAN_SLOT="${SLOT//.}"
-
-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
-
- #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
-
- # 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
-}
-
-# no need for a configure phase
-src_configure() { true; }
-
-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 || die "emake failed"
-
- mv lua_test ../test/lua.static
-}
-
-src_install() {
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
- V=${SLOT} gentoo_install \
- || die "emake install gentoo_install failed"
-
- dodoc HISTORY README
- dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
- doicon etc/lua.ico
- insinto /usr/$(get_libdir)/pkgconfig
- newins etc/lua.pc lua${SLOT}.pc
-
- newman doc/lua.1 lua${SLOT}.1
- newman doc/luac.1 luac${SLOT}.1
-}
-
-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 "${S}"
- 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.1.5-r3.ebuild b/dev-lang/lua/lua-5.1.5-r3.ebuild
deleted file mode 100644
index 6f21869ce4e8..000000000000
--- a/dev-lang/lua/lua-5.1.5-r3.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux ~ppc-aix ~x64-freebsd ~ia64-hpux ~x86-interix ~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}] )"
-DEPEND="${RDEPEND}
- sys-devel/libtool"
-PDEPEND="emacs? ( app-emacs/lua-mode )"
-
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/luaconf.h
-)
-
-src_prepare() {
- local PATCH_PV=$(get_version_component_range 1-2)
-
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.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 || die
-
- sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
-
- 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
-
- # 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=${PV} \
- gentoo_all
-
- mv lua_test ../test/lua.static
-}
-
-multilib_src_install() {
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
- V=${PV} gentoo_install
-
- insinto /usr/$(get_libdir)/pkgconfig
- doins etc/lua.pc
-}
-
-multilib_src_install_all() {
- dodoc HISTORY README
- dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
- doicon etc/lua.ico
-
- doman doc/lua.1 doc/luac.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.1.5.ebuild b/dev-lang/lua/lua-5.1.5.ebuild
deleted file mode 100644
index 79a05acceabc..000000000000
--- a/dev-lang/lua/lua-5.1.5.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-inherit eutils multilib 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="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
-IUSE="+deprecated emacs readline static"
-
-RDEPEND="readline? ( sys-libs/readline )"
-DEPEND="${RDEPEND}
- sys-devel/libtool"
-PDEPEND="emacs? ( app-emacs/lua-mode )"
-
-src_prepare() {
- local PATCH_PV=$(get_version_component_range 1-2)
-
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
- epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
-
- #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
-
- # We want packages to find our things...
- sed -i \
- -e 's:/usr/local:'${EPREFIX}'/usr:' \
- -e "s:/\<lib\>:/$(get_libdir):g" \
- etc/lua.pc src/luaconf.h || die
-}
-
-# no need for a configure phase
-src_configure() { true; }
-
-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=${PV} \
- gentoo_all || die "emake failed"
-
- mv lua_test ../test/lua.static
-}
-
-src_install() {
- emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
- V=${PV} gentoo_install \
- || die "emake install gentoo_install failed"
-
- dodoc HISTORY README
- dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
- doicon etc/lua.ico
- insinto /usr/$(get_libdir)/pkgconfig
- doins etc/lua.pc
-
- doman doc/lua.1 doc/luac.1
-}
-
-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 "${S}"
- 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
-}