Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/lua/files/, dev-lang/lua/
Date: Mon, 04 Jan 2016 20:16:28
Message-Id: 1451937866.f39c63c49dda6e5ce7b74ae36af82a192130f437.grobian@gentoo
1 commit: f39c63c49dda6e5ce7b74ae36af82a192130f437
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 4 20:04:26 2016 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 4 20:04:26 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f39c63c4
7
8 dev-lang/lua: align versions more with gx86
9
10 Package-Manager: portage-2.2.20-prefix
11
12 dev-lang/lua/Manifest | 3 +-
13 dev-lang/lua/files/lua-5.2-make-r1.patch | 75 +++++++++++
14 dev-lang/lua/lua-5.1.4-r4.ebuild | 139 ---------------------
15 dev-lang/lua/lua-5.1.4-r8.ebuild | 46 +++----
16 dev-lang/lua/lua-5.2.0-r1.ebuild | 128 -------------------
17 .../lua/{lua-5.2.1.ebuild => lua-5.2.3-r1.ebuild} | 98 +++++++++------
18 6 files changed, 154 insertions(+), 335 deletions(-)
19
20 diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
21 index 3a96f90..a1c8527 100644
22 --- a/dev-lang/lua/Manifest
23 +++ b/dev-lang/lua/Manifest
24 @@ -1,3 +1,2 @@
25 DIST lua-5.1.4.tar.gz 216679 SHA256 b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a SHA512 bc542fe8535826ac1e49b03a8f238cf049724b02c14718f8162cfeaf735a5e6c58412ff18dbe7a38e4cc4433f3d1e702554e9b24b5f021634b4280880980f40f WHIRLPOOL 2d8fdf77e31314eed68d8ace368a62a608a58114bea5c8797a2e2d327ca870dd4450ede494733d49c97bb447c97adf08610027df3206999a35fb49cde77448fd
26 -DIST lua-5.2.0.tar.gz 246377 SHA256 cabe379465aa8e388988073d59b69e76ba0025429d2c1da80821a252cdf6be0d SHA512 48c4a35323309c983a785a320b9a5058401c8b6cc0a4296ace66ab13ecb435d5274fdbaa28498f232619bda3bdee6eae9d264421406a83e55a418e2a6e95388a WHIRLPOOL d14eeaa0322b611a65d698faf94e00611e3c4942363e2db068891838f6f7abab9b2ca509b6e3791b0f734ee69e41e07ac63a372d0bee60c9e8ffcc5a0f693909
27 -DIST lua-5.2.1.tar.gz 249882 SHA256 64304da87976133196f9e4c15250b70f444467b6ed80d7cfd7b3b982b5177be5 SHA512 d0548d2cc2aa4fb4b5ae19d0ff675027370e3ee22d6e1ba448651c6f1f6f5e6b6214c81b760a23954f1e270936248bc021b9594a75191de4c1921e73d1ae48fb WHIRLPOOL 2a8d3d3c6ae37307bd667ab0619f7992f12ad4fb6c2709c2b4ee797b33d6eebee2d0298b7cb1b1a62d6140d3f9563ed7479c508da55234148981e57fe159e842
28 +DIST lua-5.2.3.tar.gz 251195 SHA256 13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d SHA512 264bb7c8db2f190ef0ca38584ec81999ab588f54e03119c5214c40bb8925b0eb407fac483a03e40cc8a220f6748ddff7d3a7392da3803418276b0d263b866449 WHIRLPOOL d278a1e38416bcf7f82eb3e7fd5fb423e60ccb69e9d57a937070516ff8be2d19a98bbfdaf37ec6fd6fb3ef2d625900977ca0cb47e46cb0ede5ebd5d37a9454ef
29
30 diff --git a/dev-lang/lua/files/lua-5.2-make-r1.patch b/dev-lang/lua/files/lua-5.2-make-r1.patch
31 new file mode 100644
32 index 0000000..a0624af
33 --- /dev/null
34 +++ b/dev-lang/lua/files/lua-5.2-make-r1.patch
35 @@ -0,0 +1,75 @@
36 +--- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200
37 ++++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100
38 +@@ -11,7 +11,7 @@
39 + # so take care if INSTALL_TOP is not an absolute path.
40 + INSTALL_TOP= /usr/local
41 + INSTALL_BIN= $(INSTALL_TOP)/bin
42 +-INSTALL_INC= $(INSTALL_TOP)/include
43 ++INSTALL_INC= $(INSTALL_TOP)/include/lua$V
44 + INSTALL_LIB= $(INSTALL_TOP)/lib
45 + INSTALL_MAN= $(INSTALL_TOP)/man/man1
46 + #
47 +@@ -127,3 +127,18 @@
48 + .PHONY: all $(PLATS) clean install local none dummy echo pecho lecho newer
49 +
50 + # (end of Makefile)
51 ++
52 ++# Use libtool for binary installs, etc.
53 ++
54 ++export V
55 ++export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
56 ++# See libtool manual about how to set this
57 ++
58 ++gentoo_clean:
59 ++ cd src; $(MAKE) $@
60 ++
61 ++gentoo_install:
62 ++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
63 ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V $(INSTALL_BIN)
64 ++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
65 ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la $(INSTALL_LIB)
66 +--- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100
67 ++++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100
68 +@@ -39,1 +39,1 @@
69 +-LUA_T= lua
70 ++LUA_T= lua$V
71 +@@ -42,1 +42,1 @@
72 +-LUAC_T= luac
73 ++LUAC_T= luac$V
74 +@@ -54,1 +54,1 @@
75 +-$(LUA_T): $(LUA_O) $(LUA_A)
76 ++origin$(LUA_T): $(LUA_O) $(LUA_A)
77 +@@ -57,1 +57,1 @@
78 +-$(LUAC_T): $(LUAC_O) $(LUA_A)
79 ++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
80 +@@ -185,3 +185,30 @@
81 + lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
82 + lzio.h
83 +
84 ++
85 ++export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
86 ++export LIB_VERSION = 6:1:1
87 ++
88 ++# The following rules use libtool for compiling and linking in order to
89 ++# provide shared library support.
90 ++
91 ++LIB_NAME = liblua$V.la
92 ++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
93 ++
94 ++%.lo %.o: %.c
95 ++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
96 ++
97 ++$(LIB_NAME): $(LIB_OBJS)
98 ++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \
99 ++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
100 ++
101 ++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
102 ++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
103 ++
104 ++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
105 ++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
106 ++
107 ++gentoo_clean:
108 ++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V
109 ++
110 ++gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)
111
112 diff --git a/dev-lang/lua/lua-5.1.4-r4.ebuild b/dev-lang/lua/lua-5.1.4-r4.ebuild
113 deleted file mode 100644
114 index 54fc21f..0000000
115 --- a/dev-lang/lua/lua-5.1.4-r4.ebuild
116 +++ /dev/null
117 @@ -1,139 +0,0 @@
118 -# Copyright 1999-2012 Gentoo Foundation
119 -# Distributed under the terms of the GNU General Public License v2
120 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.1.4-r4.ebuild,v 1.12 2012/09/05 09:28:49 jlec Exp $
121 -
122 -EAPI=1
123 -
124 -inherit eutils multilib portability toolchain-funcs versionator
125 -
126 -DESCRIPTION="A powerful light-weight programming language designed for extending applications"
127 -HOMEPAGE="http://www.lua.org/"
128 -SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
129 -
130 -LICENSE="MIT"
131 -SLOT="0"
132 -KEYWORDS="~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 ~x86-winnt"
133 -IUSE="+deprecated emacs readline static"
134 -
135 -RDEPEND="readline? ( sys-libs/readline )"
136 -DEPEND="${RDEPEND}
137 - sys-devel/libtool"
138 -PDEPEND="emacs? ( app-emacs/lua-mode )"
139 -
140 -src_unpack() {
141 - local PATCH_PV=$(get_version_component_range 1-2)
142 - unpack ${A}
143 - cd "${S}"
144 -
145 - if [[ ${CHOST} == *-winnt* ]]; then
146 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-no-libtool.patch
147 - else
148 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
149 -
150 - # Using dynamic linked lua is not recommended upstream for performance
151 - # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
152 - # Mainly, this is of concern if your arch is poor with GPRs, like x86
153 - # Not that this only affects the interpreter binary (named lua), not the lua
154 - # compiler (built statically) nor the lua libraries (both shared and static
155 - # are installed)
156 - if use static ; then
157 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
158 - fi
159 - fi
160 -
161 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
162 -
163 - # fix libtool and ld usage on OSX
164 - if [[ ${CHOST} == *-darwin* ]] ; then
165 - sed -i \
166 - -e 's/libtool/glibtool/g' \
167 - -e 's/-Wl,-E//g' \
168 - Makefile src/Makefile
169 - fi
170 -
171 - EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
172 -
173 - # correct lua versioning
174 - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:4:1/' src/Makefile
175 -
176 - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
177 -
178 - if ! use deprecated ; then
179 - epatch "${FILESDIR}"/${P}-deprecated.patch
180 - epatch "${FILESDIR}"/${P}-test.patch
181 - fi
182 -
183 - if ! use readline ; then
184 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch
185 - fi
186 -
187 - # We want packages to find our things...
188 - sed -i \
189 - -e "s:/usr/local:${EPREFIX}/usr:" \
190 - -e "s:/\<lib\>:/$(get_libdir):g" \
191 - etc/lua.pc
192 -}
193 -
194 -src_compile() {
195 - tc-export CC
196 - myflags=
197 - # what to link to liblua
198 - liblibs="-lm"
199 - if [[ $CHOST == *-darwin* ]]; then
200 - mycflags="${mycflags} -DLUA_USE_MACOSX"
201 - elif [[ ${CHOST} == *-winnt* ]]; then
202 - : # nothing for now...
203 - elif [[ ${CHOST} == *-interix* ]]; then
204 - : # nothing here too...
205 - else # building for standard linux (and bsd too)
206 - mycflags="${mycflags} -DLUA_USE_LINUX"
207 - fi
208 - liblibs="${liblibs} $(dlopen_lib)"
209 -
210 - # what to link to the executables
211 - mylibs=
212 - if use readline; then
213 - mylibs="-lreadline"
214 - fi
215 -
216 - cd src
217 - emake CC="${CC}" CFLAGS="${mycflags} ${CFLAGS}" \
218 - RPATH="${EROOT}/usr/$(get_libdir)/" \
219 - LUA_LIBS="${mylibs}" \
220 - LIB_LIBS="${liblibs}" \
221 - V=${PV} \
222 - gentoo_all || die "emake failed"
223 -
224 - mv lua_test ../test/lua.static
225 -}
226 -
227 -src_install() {
228 - emake INSTALL_TOP="${ED}/usr/" INSTALL_LIB="${ED}/usr/$(get_libdir)/" \
229 - V=${PV} gentoo_install \
230 - || die "emake install gentoo_install failed"
231 -
232 - dodoc HISTORY README
233 - dohtml doc/*.html doc/*.gif
234 -
235 - doicon etc/lua.ico
236 - insinto /usr/$(get_libdir)/pkgconfig
237 - doins etc/lua.pc
238 -
239 - doman doc/lua.1 doc/luac.1
240 -}
241 -
242 -src_test() {
243 - local positive="bisect cf echo env factorial fib fibfor hello printf sieve
244 - sort trace-calls trace-globals"
245 - local negative="readonly"
246 - local test
247 -
248 - cd "${S}"
249 - for test in ${positive}; do
250 - test/lua.static test/${test}.lua || die "test $test failed"
251 - done
252 -
253 - for test in ${negative}; do
254 - test/lua.static test/${test}.lua && die "test $test failed"
255 - done
256 -}
257
258 diff --git a/dev-lang/lua/lua-5.1.4-r8.ebuild b/dev-lang/lua/lua-5.1.4-r8.ebuild
259 index 2b410d0..20e21f1 100644
260 --- a/dev-lang/lua/lua-5.1.4-r8.ebuild
261 +++ b/dev-lang/lua/lua-5.1.4-r8.ebuild
262 @@ -23,30 +23,13 @@ PDEPEND="emacs? ( app-emacs/lua-mode )"
263 src_prepare() {
264 local PATCH_PV=$(get_version_component_range 1-2)
265
266 - if [[ ${CHOST} == *-winnt* ]]; then
267 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-no-libtool.patch
268 - else
269 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
270 -
271 - # Using dynamic linked lua is not recommended for performance
272 - # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
273 - # Mainly, this is of concern if your arch is poor with GPRs, like x86
274 - # Note that this only affects the interpreter binary (named lua), not the lua
275 - # compiler (built statically) nor the lua libraries (both shared and static
276 - # are installed)
277 - if use static ; then
278 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
279 - fi
280 - fi
281 -
282 + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
283 epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
284
285 - # fix libtool and ld usage on OSX
286 + # use glibtool on Darwin (versus Apple libtool)
287 if [[ ${CHOST} == *-darwin* ]] ; then
288 - sed -i \
289 - -e 's/libtool/glibtool/g' \
290 - -e 's/-Wl,-E//g' \
291 - Makefile src/Makefile
292 + sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \
293 + Makefile src/Makefile || die
294 fi
295
296 EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
297 @@ -65,6 +48,16 @@ src_prepare() {
298 epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch
299 fi
300
301 + # Using dynamic linked lua is not recommended for performance
302 + # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
303 + # Mainly, this is of concern if your arch is poor with GPRs, like x86
304 + # Note that this only affects the interpreter binary (named lua), not the lua
305 + # compiler (built statically) nor the lua libraries (both shared and static
306 + # are installed)
307 + if use static ; then
308 + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
309 + fi
310 +
311 # We want packages to find our things...
312 sed -i \
313 -e "s:/usr/local:${EPREFIX}/usr:" \
314 @@ -80,15 +73,6 @@ src_compile() {
315 myflags=
316 # what to link to liblua
317 liblibs="-lm"
318 - if [[ $CHOST == *-darwin* ]]; then
319 - mycflags="${mycflags} -DLUA_USE_MACOSX"
320 - elif [[ ${CHOST} == *-winnt* ]]; then
321 - : # nothing for now...
322 - elif [[ ${CHOST} == *-interix* ]]; then
323 - : # nothing here too...
324 - else # building for standard linux (and bsd too)
325 - mycflags="${mycflags} -DLUA_USE_LINUX"
326 - fi
327 liblibs="${liblibs} $(dlopen_lib)"
328
329 # what to link to the executables
330 @@ -98,7 +82,7 @@ src_compile() {
331 fi
332
333 cd src
334 - emake CC="${CC}" CFLAGS="${mycflags} ${CFLAGS}" \
335 + emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
336 RPATH="${EPREFIX}/usr/$(get_libdir)/" \
337 LUA_LIBS="${mylibs}" \
338 LIB_LIBS="${liblibs}" \
339
340 diff --git a/dev-lang/lua/lua-5.2.0-r1.ebuild b/dev-lang/lua/lua-5.2.0-r1.ebuild
341 deleted file mode 100644
342 index 3cadc2b..0000000
343 --- a/dev-lang/lua/lua-5.2.0-r1.ebuild
344 +++ /dev/null
345 @@ -1,128 +0,0 @@
346 -# Copyright 1999-2012 Gentoo Foundation
347 -# Distributed under the terms of the GNU General Public License v2
348 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.2.0-r1.ebuild,v 1.2 2012/05/29 15:04:25 aballier Exp $
349 -
350 -EAPI=4
351 -
352 -inherit eutils autotools multilib portability toolchain-funcs versionator
353 -
354 -DESCRIPTION="A powerful light-weight programming language designed for extending applications"
355 -HOMEPAGE="http://www.lua.org/"
356 -SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
357 -
358 -LICENSE="MIT"
359 -SLOT="0"
360 -KEYWORDS="~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 ~x86-winnt"
361 -IUSE="+deprecated emacs readline static"
362 -
363 -RDEPEND="readline? ( sys-libs/readline )"
364 -DEPEND="${RDEPEND}
365 - sys-devel/libtool"
366 -PDEPEND="emacs? ( app-emacs/lua-mode )"
367 -
368 -src_prepare() {
369 - local PATCH_PV=$(get_version_component_range 1-2)
370 -
371 - if [[ ${CHOST} == *-winnt* ]]; then
372 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-no-libtool.patch
373 - else
374 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch
375 -
376 - # Using dynamic linked lua is not recommended for performance
377 - # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
378 - # Mainly, this is of concern if your arch is poor with GPRs, like x86
379 - # Note that this only affects the interpreter binary (named lua), not the lua
380 - # compiler (built statically) nor the lua libraries (both shared and static
381 - # are installed)
382 - if use static ; then
383 - sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile
384 - fi
385 - fi
386 -
387 - # fix libtool and ld usage on OSX
388 - if [[ ${CHOST} == *-darwin* ]] ; then
389 - sed -i \
390 - -e 's/libtool/glibtool/g' \
391 - -e 's/-Wl,-E//g' \
392 - Makefile src/Makefile
393 - fi
394 -
395 - EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
396 -
397 - sed -i \
398 - -e 's:\(LUA_ROOT\s*\).*:\1"/usr/":' \
399 - -e "s:\(LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
400 - src/luaconf.h \
401 - || die "failed patching luaconf.h"
402 -
403 - # correct lua versioning
404 - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\17:0:2/' src/Makefile
405 -
406 - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
407 -
408 - if ! use readline ; then
409 - sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h
410 - fi
411 -
412 - # upstream does not use libtool, but we do (see bug #336167)
413 - cp "${FILESDIR}/configure.in" "${S}"
414 - eautoreconf
415 -}
416 -
417 -src_compile() {
418 - tc-export CC
419 -
420 - # what to link to liblua
421 - liblibs="-lm"
422 - if [[ $CHOST == *-darwin* ]]; then
423 - mycflags="${mycflags} -DLUA_USE_MACOSX"
424 - elif [[ ${CHOST} == *-winnt* ]]; then
425 - : # nothing for now...
426 - elif [[ ${CHOST} == *-interix* ]]; then
427 - : # nothing here too...
428 - else # building for standard linux (and bsd too)
429 - mycflags="${mycflags} -DLUA_USE_LINUX"
430 - fi
431 - liblibs="${liblibs} $(dlopen_lib)"
432 -
433 - # what to link to the executables
434 - mylibs=
435 - use readline && mylibs="-lreadline"
436 -
437 - cd src
438 -
439 - local legacy=""
440 - use deprecated && legacy="-DLUA_COMPAT_ALL"
441 -
442 - emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${legacy} ${CFLAGS}" \
443 - SYSLDFLAGS="${LDFLAGS}" \
444 - RPATH="${EPREFIX}/usr/$(get_libdir)/" \
445 - LUA_LIBS="${mylibs}" \
446 - LIB_LIBS="${liblibs}" \
447 - V=${PV} \
448 - gentoo_all || die "emake failed"
449 -}
450 -
451 -src_install() {
452 - local PATCH_PV=$(get_version_component_range 1-2)
453 -
454 - emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
455 - V=${PV} gentoo_install \
456 - || die "emake install gentoo_install failed"
457 -
458 - dodoc README
459 - dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
460 -
461 - doman doc/lua.1 doc/luac.1
462 -
463 - # We want packages to find our things...
464 - cp "${FILESDIR}/lua.pc" "${WORKDIR}"
465 - sed -i \
466 - -e "s:^V=.*:V= ${PATCH_PV}:" \
467 - -e "s:^R=.*:R= ${PV}:" \
468 - -e "s:/,lib,:/$(get_libdir):g" \
469 - "${WORKDIR}/lua.pc"
470 -
471 - insinto "/usr/$(get_libdir)/pkgconfig"
472 - doins "${WORKDIR}/lua.pc"
473 -}
474
475 diff --git a/dev-lang/lua/lua-5.2.1.ebuild b/dev-lang/lua/lua-5.2.3-r1.ebuild
476 similarity index 58%
477 rename from dev-lang/lua/lua-5.2.1.ebuild
478 rename to dev-lang/lua/lua-5.2.3-r1.ebuild
479 index 3d01ece..d01807c 100644
480 --- a/dev-lang/lua/lua-5.2.1.ebuild
481 +++ b/dev-lang/lua/lua-5.2.3-r1.ebuild
482 @@ -1,46 +1,52 @@
483 -# Copyright 1999-2013 Gentoo Foundation
484 +# Copyright 1999-2015 Gentoo Foundation
485 # Distributed under the terms of the GNU General Public License v2
486 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/Attic/lua-5.2.1.ebuild,v 1.4 2014/07/04 21:21:21 mabi dead $
487 +# $Id$
488
489 -EAPI=4
490 +EAPI=5
491
492 -inherit eutils autotools multilib portability toolchain-funcs versionator
493 +inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator
494
495 DESCRIPTION="A powerful light-weight programming language designed for extending applications"
496 HOMEPAGE="http://www.lua.org/"
497 SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
498
499 LICENSE="MIT"
500 -SLOT="0"
501 +SLOT="5.2"
502 KEYWORDS="~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 ~x86-winnt"
503 IUSE="+deprecated emacs readline static"
504
505 -RDEPEND="readline? ( sys-libs/readline )"
506 +RDEPEND="readline? ( sys-libs/readline )
507 + app-eselect/eselect-lua
508 + !dev-lang/lua:0"
509 DEPEND="${RDEPEND}
510 sys-devel/libtool"
511 PDEPEND="emacs? ( app-emacs/lua-mode )"
512
513 +MULTILIB_WRAPPED_HEADERS=(
514 + /usr/include/lua${SLOT}/luaconf.h
515 +)
516 +
517 src_prepare() {
518 local PATCH_PV=$(get_version_component_range 1-2)
519
520 - epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make.patch
521 + epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
522 +
523 + # use glibtool on Darwin (versus Apple libtool)
524 + if [[ ${CHOST} == *-darwin* ]] ; then
525 + sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
526 + Makefile src/Makefile || die
527 + fi
528
529 [ -d "${FILESDIR}/${PV}" ] && \
530 EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
531
532 - sed -i \
533 - -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
534 - -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
535 - src/luaconf.h \
536 - || die "failed patching luaconf.h"
537 -
538 # correct lua versioning
539 - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\17:0:2/' src/Makefile
540 + sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
541
542 - sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
543 + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
544
545 if ! use readline ; then
546 - sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h
547 + sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
548 fi
549
550 # Using dynamic linked lua is not recommended for performance
551 @@ -50,15 +56,28 @@ src_prepare() {
552 # compiler (built statically) nor the lua libraries (both shared and static
553 # are installed)
554 if use static ; then
555 - sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile
556 + sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die
557 fi
558
559 # upstream does not use libtool, but we do (see bug #336167)
560 - cp "${FILESDIR}/configure.in" "${S}"
561 + cp "${FILESDIR}/configure.in" "${S}"/ || die
562 eautoreconf
563 +
564 + # custom Makefiles
565 + multilib_copy_sources
566 }
567
568 -src_compile() {
569 +multilib_src_configure() {
570 + sed -i \
571 + -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
572 + -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
573 + src/luaconf.h \
574 + || die "failed patching luaconf.h"
575 +
576 + econf
577 +}
578 +
579 +multilib_src_compile() {
580 tc-export CC
581
582 # what to link to liblua
583 @@ -71,29 +90,26 @@ src_compile() {
584
585 cd src
586
587 - local legacy=""
588 - use deprecated && legacy="-DLUA_COMPAT_ALL"
589 + local myCFLAGS=""
590 + use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
591
592 - emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${legacy} ${CFLAGS}" \
593 + case "${CHOST}" in
594 + *-mingw*) : ;;
595 + *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
596 + esac
597 +
598 + emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
599 SYSLDFLAGS="${LDFLAGS}" \
600 RPATH="${EPREFIX}/usr/$(get_libdir)/" \
601 LUA_LIBS="${mylibs}" \
602 LIB_LIBS="${liblibs}" \
603 - V=${PV} \
604 - gentoo_all || die "emake failed"
605 + V=$(get_version_component_range 1-2) \
606 + gentoo_all
607 }
608
609 -src_install() {
610 - local PATCH_PV=$(get_version_component_range 1-2)
611 -
612 +multilib_src_install() {
613 emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
614 - V=${PV} gentoo_install \
615 - || die "emake install gentoo_install failed"
616 -
617 - dodoc README
618 - dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
619 -
620 - doman doc/lua.1 doc/luac.1
621 + V=${SLOT} gentoo_install
622
623 # We want packages to find our things...
624 cp "${FILESDIR}/lua.pc" "${WORKDIR}"
625 @@ -104,5 +120,17 @@ src_install() {
626 "${WORKDIR}/lua.pc"
627
628 insinto "/usr/$(get_libdir)/pkgconfig"
629 - doins "${WORKDIR}/lua.pc"
630 + newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
631 }
632 +
633 +multilib_src_install_all() {
634 + dodoc README
635 + dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
636 +
637 + newman doc/lua.1 lua${SLOT}.1
638 + newman doc/luac.1 luac${SLOT}.1
639 +}
640 +
641 +# Makefile contains a dummy target that doesn't do tests
642 +# but causes issues with slotted lua (bug #510360)
643 +src_test() { :; }