diff options
author | 2012-03-04 22:58:29 +0000 | |
---|---|---|
committer | 2012-03-04 22:58:29 +0000 | |
commit | 7d09f5395ed2113af79121ac998d57347256ff95 (patch) | |
tree | 1ce5c88aa807a25a6f81ab7ddd3370e43866ea29 /dev-lang | |
parent | Remove old. (diff) | |
download | gentoo-2-7d09f5395ed2113af79121ac998d57347256ff95.tar.gz gentoo-2-7d09f5395ed2113af79121ac998d57347256ff95.tar.bz2 gentoo-2-7d09f5395ed2113af79121ac998d57347256ff95.zip |
version bump (bug #395057). also now uses local libtool (bug #336167)
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/lua/ChangeLog | 8 | ||||
-rw-r--r-- | dev-lang/lua/files/configure.in | 5 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.2-make.patch | 60 | ||||
-rw-r--r-- | dev-lang/lua/files/lua.pc | 31 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.2.0.ebuild | 106 |
5 files changed, 209 insertions, 1 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog index 0fe0f6613b91..bf6570b48176 100644 --- a/dev-lang/lua/ChangeLog +++ b/dev-lang/lua/ChangeLog @@ -1,6 +1,12 @@ # 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.153 2012/01/24 21:44:53 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.154 2012/03/04 22:58:29 mabi Exp $ + +*lua-5.2.0 (04 Mar 2012) + + 04 Mar 2012; Matti Bickel <mabi@gentoo.org> +files/configure.in, + +files/lua-5.2-make.patch, +files/lua.pc, +lua-5.2.0.ebuild: + version bump (bug #395057). also now uses local libtool (bug #336167) *lua-5.1.4-r8 (24 Jan 2012) diff --git a/dev-lang/lua/files/configure.in b/dev-lang/lua/files/configure.in new file mode 100644 index 000000000000..e4ba8164bbb5 --- /dev/null +++ b/dev-lang/lua/files/configure.in @@ -0,0 +1,5 @@ +top_buildir=. + +AC_INIT(src/luaconf.h) +AC_PROG_LIBTOOL +AC_OUTPUT() diff --git a/dev-lang/lua/files/lua-5.2-make.patch b/dev-lang/lua/files/lua-5.2-make.patch new file mode 100644 index 000000000000..431bbde3521e --- /dev/null +++ b/dev-lang/lua/files/lua-5.2-make.patch @@ -0,0 +1,60 @@ +--- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200 ++++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100 +@@ -127,3 +127,18 @@ + .PHONY: all $(PLATS) clean install local none dummy echo pecho lecho newer + + # (end of Makefile) ++ ++# Use libtool for binary installs, etc. ++ ++export V ++export LIBTOOL = ../libtool --quiet --tag=CC ++# See libtool manual about how to set this ++ ++gentoo_clean: ++ cd src; $(MAKE) $@ ++ ++gentoo_install: ++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua luac $(INSTALL_BIN) ++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.la $(INSTALL_LIB) +--- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100 ++++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100 +@@ -54,1 +54,1 @@ +-$(LUA_T): $(LUA_O) $(LUA_A) ++origin$(LUA_T): $(LUA_O) $(LUA_A) +@@ -57,1 +57,1 @@ +-$(LUAC_T): $(LUAC_O) $(LUA_A) ++origin$(LUAC_T): $(LUAC_O) $(LUA_A) +@@ -185,3 +185,30 @@ + lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ + lzio.h + ++ ++export LIBTOOL = ../libtool --quiet --tag=CC ++export LIB_VERSION = 6:1:1 ++ ++# The following rules use libtool for compiling and linking in order to ++# provide shared library support. ++ ++LIB_NAME = liblua.la ++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) ++ ++%.lo %.o: %.c ++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< ++ ++$(LIB_NAME): $(LIB_OBJS) ++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ ++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) ++ ++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS) ++ ++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME) ++ ++gentoo_clean: ++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac ++ ++gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T) diff --git a/dev-lang/lua/files/lua.pc b/dev-lang/lua/files/lua.pc new file mode 100644 index 000000000000..e53971852c10 --- /dev/null +++ b/dev-lang/lua/files/lua.pc @@ -0,0 +1,31 @@ +# lua.pc -- pkg-config data for Lua + +# vars from install Makefile + +# grep '^V=' ../Makefile +V= 5.1 +# grep '^R=' ../Makefile +R= 5.1.4 + +# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +prefix= /usr +INSTALL_BIN= ${prefix}/bin +INSTALL_INC= ${prefix}/include +INSTALL_LIB= ${prefix}/,lib, +INSTALL_MAN= ${prefix}/man/man1 +INSTALL_LMOD= ${prefix}/share/lua/${V} +INSTALL_CMOD= ${prefix}/,lib,/lua/${V} + +# canonical vars +exec_prefix=${prefix} +libdir=${exec_prefix}/,lib, +includedir=${prefix}/include + +Name: Lua +Description: An Extensible Extension Language +Version: ${R} +Requires: +Libs: -L${libdir} -llua -lm +Cflags: -I${includedir} + +# (end of lua.pc) diff --git a/dev-lang/lua/lua-5.2.0.ebuild b/dev-lang/lua/lua-5.2.0.ebuild new file mode 100644 index 000000000000..52b3b621eeda --- /dev/null +++ b/dev-lang/lua/lua-5.2.0.ebuild @@ -0,0 +1,106 @@ +# 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.0.ebuild,v 1.1 2012/03/04 22:58:29 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 ~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 + + 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 + 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 + + local legacy="" + use deprecated && legacy="-DLUA_COMPAT_ALL" + + emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${legacy} ${CFLAGS}" \ + 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" +} |