summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Bickel <mabi@gentoo.org>2012-07-04 19:34:20 +0000
committerMatti Bickel <mabi@gentoo.org>2012-07-04 19:34:20 +0000
commit3709b5cadc42630dceecf9f9068ff103b81e0629 (patch)
tree5780418e6e5279f18230aaf7db336b671ba5b621 /dev-lang
parentkeyword amd64-linux, x86-linux, x64-darwin, added prefix stuff for darwin (diff)
downloadgentoo-2-3709b5cadc42630dceecf9f9068ff103b81e0629.tar.gz
gentoo-2-3709b5cadc42630dceecf9f9068ff103b81e0629.tar.bz2
gentoo-2-3709b5cadc42630dceecf9f9068ff103b81e0629.zip
version bump (fixes bug #422369)
(Portage version: 2.2.0_alpha115/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/lua/ChangeLog7
-rw-r--r--dev-lang/lua/lua-5.2.1.ebuild108
2 files changed, 114 insertions, 1 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog
index 4bae76d6f1bc..8f7916612ecb 100644
--- a/dev-lang/lua/ChangeLog
+++ b/dev-lang/lua/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-lang/lua
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.161 2012/05/29 15:04:25 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.162 2012/07/04 19:34:20 mabi Exp $
+
+*lua-5.2.1 (04 Jul 2012)
+
+ 04 Jul 2012; Matti Bickel <mabi@gentoo.org> +lua-5.2.1.ebuild:
+ version bump (fixes bug #422369)
29 May 2012; Alexis Ballier <aballier@gentoo.org> lua-5.1.5.ebuild,
lua-5.2.0.ebuild, lua-5.2.0-r1.ebuild:
diff --git a/dev-lang/lua/lua-5.2.1.ebuild b/dev-lang/lua/lua-5.2.1.ebuild
new file mode 100644
index 000000000000..50023d1c0eaa
--- /dev/null
+++ b/dev-lang/lua/lua-5.2.1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.2.1.ebuild,v 1.1 2012/07/04 19:34:20 mabi Exp $
+
+EAPI=4
+
+inherit eutils autotools 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"
+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.patch
+
+ [ -d "${FILESDIR}/${PV}" ] && \
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ sed -i \
+ -e 's:\(LUA_ROOT\s*\).*:\1"/usr/":' \
+ -e "s:\(LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\17:0:2/' src/Makefile
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h
+ 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
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}"
+ eautoreconf
+}
+
+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 legacy=""
+ use deprecated && legacy="-DLUA_COMPAT_ALL"
+
+ emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${legacy} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=${PV} \
+ gentoo_all || die "emake failed"
+}
+
+src_install() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${PV} gentoo_install \
+ || die "emake install gentoo_install failed"
+
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doman doc/lua.1 doc/luac.1
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -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"
+ doins "${WORKDIR}/lua.pc"
+}