Gentoo Archives: gentoo-commits

From: "Matti Bickel (mabi)" <mabi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/lua: lua-5.2.0.ebuild ChangeLog
Date: Sun, 04 Mar 2012 22:58:41
Message-Id: 20120304225829.31E1E2004B@flycatcher.gentoo.org
1 mabi 12/03/04 22:58:29
2
3 Modified: ChangeLog
4 Added: lua-5.2.0.ebuild
5 Log:
6 version bump (bug #395057). also now uses local libtool (bug #336167)
7
8 (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.154 dev-lang/lua/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/lua/ChangeLog?rev=1.154&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/lua/ChangeLog?rev=1.154&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/lua/ChangeLog?r1=1.153&r2=1.154
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v
20 retrieving revision 1.153
21 retrieving revision 1.154
22 diff -u -r1.153 -r1.154
23 --- ChangeLog 24 Jan 2012 21:44:53 -0000 1.153
24 +++ ChangeLog 4 Mar 2012 22:58:29 -0000 1.154
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-lang/lua
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.153 2012/01/24 21:44:53 mabi Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.154 2012/03/04 22:58:29 mabi Exp $
30 +
31 +*lua-5.2.0 (04 Mar 2012)
32 +
33 + 04 Mar 2012; Matti Bickel <mabi@g.o> +files/configure.in,
34 + +files/lua-5.2-make.patch, +files/lua.pc, +lua-5.2.0.ebuild:
35 + version bump (bug #395057). also now uses local libtool (bug #336167)
36
37 *lua-5.1.4-r8 (24 Jan 2012)
38
39
40
41
42 1.1 dev-lang/lua/lua-5.2.0.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/lua/lua-5.2.0.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/lua/lua-5.2.0.ebuild?rev=1.1&content-type=text/plain
46
47 Index: lua-5.2.0.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.2.0.ebuild,v 1.1 2012/03/04 22:58:29 mabi Exp $
52
53 EAPI=4
54
55 inherit eutils autotools multilib portability toolchain-funcs versionator
56
57 DESCRIPTION="A powerful light-weight programming language designed for extending applications"
58 HOMEPAGE="http://www.lua.org/"
59 SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
60
61 LICENSE="MIT"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
64 IUSE="+deprecated emacs readline static"
65
66 RDEPEND="readline? ( sys-libs/readline )"
67 DEPEND="${RDEPEND}
68 sys-devel/libtool"
69 PDEPEND="emacs? ( app-emacs/lua-mode )"
70
71 src_prepare() {
72 local PATCH_PV=$(get_version_component_range 1-2)
73
74 epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch
75
76 sed -i \
77 -e 's:\(LUA_ROOT\s*\).*:\1"/usr/":' \
78 -e "s:\(LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
79 src/luaconf.h \
80 || die "failed patching luaconf.h"
81
82 # correct lua versioning
83 sed -i -e 's/\(LIB_VERSION = \)6:1:1/\17:0:2/' src/Makefile
84
85 sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
86
87 if ! use readline ; then
88 sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h
89 fi
90
91 # Using dynamic linked lua is not recommended for performance
92 # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
93 # Mainly, this is of concern if your arch is poor with GPRs, like x86
94 # Note that this only affects the interpreter binary (named lua), not the lua
95 # compiler (built statically) nor the lua libraries (both shared and static
96 # are installed)
97 if use static ; then
98 sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile
99 fi
100
101 # upstream does not use libtool, but we do (see bug #336167)
102 cp "${FILESDIR}/configure.in" "${S}"
103 eautoreconf
104 }
105
106 src_compile() {
107 tc-export CC
108 myflags=
109 # what to link to liblua
110 liblibs="-lm"
111 liblibs="${liblibs} $(dlopen_lib)"
112
113 # what to link to the executables
114 mylibs=
115 if use readline; then
116 mylibs="-lreadline"
117 fi
118
119 cd src
120
121 local legacy=""
122 use deprecated && legacy="-DLUA_COMPAT_ALL"
123
124 emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${legacy} ${CFLAGS}" \
125 RPATH="${EPREFIX}/usr/$(get_libdir)/" \
126 LUA_LIBS="${mylibs}" \
127 LIB_LIBS="${liblibs}" \
128 V=${PV} \
129 gentoo_all || die "emake failed"
130 }
131
132 src_install() {
133 local PATCH_PV=$(get_version_component_range 1-2)
134
135 emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
136 V=${PV} gentoo_install \
137 || die "emake install gentoo_install failed"
138
139 dodoc README
140 dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
141
142 doman doc/lua.1 doc/luac.1
143
144 # We want packages to find our things...
145 cp "${FILESDIR}/lua.pc" "${WORKDIR}"
146 sed -i \
147 -e "s:^V=.*:V= ${PATCH_PV}:" \
148 -e "s:^R=.*:R= ${PV}:" \
149 -e "s:/,lib,:/$(get_libdir):g" \
150 "${WORKDIR}/lua.pc"
151
152 insinto "/usr/$(get_libdir)/pkgconfig"
153 doins "${WORKDIR}/lua.pc"
154 }