New version 5.2.3

This commit is contained in:
Andrey Bondrov 2014-06-26 19:53:17 +11:00
parent 3cc0d72021
commit f746643385
9 changed files with 156 additions and 307 deletions

View file

@ -1,2 +1,2 @@
sources:
"lua-5.1.4.tar.gz": 2b11c8e60306efb7f0734b747588f57995493db7
lua-5.2.3.tar.gz: 926b7907bc8d274e063d42804666b40a3f3c124c

View file

@ -1,31 +0,0 @@
--- lua-5.1.4/src/Makefile.dynlib 2008-12-29 00:21:56.000000000 +0100
+++ lua-5.1.4/src/Makefile 2008-12-29 00:21:52.000000000 +0100
@@ -22,6 +22,7 @@
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+LUA_SO= liblua.so.$(V)
LUA_A= liblua.a
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
@@ -36,7 +37,7 @@
LUAC_O= luac.o print.o
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
default: $(PLAT)
@@ -51,6 +52,11 @@
$(AR) $@ $?
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ gcc -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LIBS) $(LUA_O)
+ rm -f liblua.so
+ ln -s $@ liblua.so
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)

View file

@ -1,20 +0,0 @@
--- trunk~/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500
+++ trunk/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500
@@ -83,13 +83,17 @@
#else
#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT2 "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
+#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/"
#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+#define LUA_CDIR2 LUA_ROOT2 "lib64/lua/5.1/"
#define LUA_PATH_DEFAULT \
"./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
+ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
+ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua"
#define LUA_CPATH_DEFAULT \
- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
+ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so"
#endif

View file

@ -1,19 +0,0 @@
diff -p -up lua-5.1.4/etc/lua.pc.pkgconfig lua-5.1.4/etc/lua.pc
--- lua-5.1.4/etc/lua.pc.pkgconfig 2008-08-08 08:46:11.000000000 -0400
+++ lua-5.1.4/etc/lua.pc 2009-01-22 14:37:42.916872594 -0500
@@ -18,14 +18,13 @@ 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
+Libs: -llua -lm
Cflags: -I${includedir}
# (end of lua.pc)

View file

@ -0,0 +1,23 @@
--- lua-5.2.0/src/luaconf.h 2011-12-06 17:58:36.000000000 +0100
+++ lua-5.2.0/src/luaconf.h.modules 2012-06-02 13:27:58.554648459 +0200
@@ -100,14 +100,17 @@
#else /* }{ */
#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
+#define LUA_CDIR64 LUA_ROOT "lib64/lua/" LUA_VDIR
#define LUA_PATH_DEFAULT \
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua"
+ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
+ LUA_CDIR64"?.lua;" LUA_CDIR64"?/init.lua;" "./?.lua"
#define LUA_CPATH_DEFAULT \
- LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
+ LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" \
+ LUA_CDIR64"?.so;" LUA_CDIR64"loadall.so;" "./?.so"
#endif /* } */

31
lua-5.2.1-dynlib.patch Normal file
View file

@ -0,0 +1,31 @@
--- lua-5.2.0/src/Makefile 2011-09-19 14:45:14.000000000 +0200
+++ lua-5.2.0/src/Makefile.dynlib 2012-06-02 12:36:54.854704843 +0200
@@ -28,6 +28,7 @@
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+LUA_SO= liblua.so.$(V)
LUA_A= liblua.a
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
@@ -43,7 +44,7 @@
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
# Targets start here.
@@ -59,6 +60,11 @@
$(AR) $@ $(BASE_O)
$(RANLIB) $@
+$(LUA_SO): $(BASE_O)
+ gcc -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $^ $(LIBS)
+ rm -f liblua.so
+ ln -s $@ liblua.so
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)

30
lua.pc Normal file
View file

@ -0,0 +1,30 @@
# lua.pc -- pkg-config data for Lua
# vars from install Makefile
# grep '^V=' ../Makefile
V= @MAJOR_VERSION@
# grep '^R=' ../Makefile
R= @FULL_VERSION@
# 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}
includedir=${prefix}/include
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -llua -lm
Cflags: -I${includedir}
# (end of lua.pc)

290
lua.spec
View file

@ -1,21 +1,22 @@
%define major 5.1
%define major 5.2
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d
%define devname %mklibname %{name} -d
%define staticname %mklibname %{name} -d -s
%define alt_priority %(echo %{major} | sed -e 's/[^0-9]//g')
Summary: Powerful, light-weight programming language
Name: lua
Version: 5.1.4
Release: 13
Version: 5.2.3
Release: 4
License: MIT
URL: http://www.lua.org/
Group: Development/Other
Url: http://www.lua.org/
Source0: http://www.lua.org/ftp/%{name}-%{version}.tar.gz
Patch0: lua-5.1-dynlib.patch
Patch1: lua-5.1-pkgconfig_libdir.patch
Patch2: lua-5.1-modules_path.patch
Provides: lua%{major}
Source1: lua.pc
Patch0: lua-5.2.1-dynlib.patch
Patch1: lua-5.2.0-modules_path.patch
Patch2: lua52-compat-old-versions.patch
Provides: lua%{major} = %{EVRD}
BuildRequires: readline-devel
BuildRequires: pkgconfig(ncurses)
@ -30,6 +31,20 @@ prototyping. Lua is implemented as a small library of C functions, written in
ANSI C, and compiles unmodified in all known platforms. The implementation
goals are simplicity, efficiency, portability, and low embedding cost.
%files
%doc doc/*{.html,.css,.gif,.png}
%doc README
%{_bindir}/*
%{_mandir}/man1/*
%post
/usr/sbin/update-alternatives --install %{_bindir}/lua lua %{_bindir}/lua%{major} %{alt_priority} --slave %{_bindir}/luac luac %{_bindir}/luac%{major}
%postun
[[ -f %{_bindir}/lua%{major} ]] || /usr/sbin/update-alternatives --remove lua %{_bindir}/lua%{major}
#----------------------------------------------------------------------------
%package -n %{libname}
Summary: Powerful, light-weight programming language
Group: Development/Other
@ -45,34 +60,52 @@ prototyping. Lua is implemented as a small library of C functions, written in
ANSI C, and compiles unmodified in all known platforms. The implementation
goals are simplicity, efficiency, portability, and low embedding cost.
%package -n %{develname}
%files -n %{libname}
%{_libdir}/liblua.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: Headers and development files for Lua
Group: Development/Other
Requires: %{libname} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Provides: liblua%{major}-devel = %{version}-%{release}
Provides: lua-devel = %{version}-%{release}
Provides: lua%{major}-devel = %{version}-%{release}
Obsoletes: %{_lib}lua5-devel < %{version}
Requires: %{libname} = %{EVRD}
Requires: %{name} = %{EVRD}
Provides: liblua%{major}-devel = %{EVRD}
Provides: lua-devel = %{EVRD}
Provides: lua%{major}-devel = %{EVRD}
%description -n %{develname}
%description -n %{devname}
This package contains the headers and development files for Lua.
%files -n %{devname}
%{_includedir}/*
%{_libdir}/pkgconfig/*
%{_libdir}/liblua.so
#----------------------------------------------------------------------------
%package -n %{staticname}
Summary: Static development files for Lua
Group: Development/Other
Provides: lua-devel-static = %{version}-%{release}
Provides: lua-static-devel = %{version}-%{release}
Requires: %{develname} = %{version}-%{release}
Provides: lua-devel-static = %{EVRD}
Provides: lua-static-devel = %{EVRD}
Requires: %{devname} = %{EVRD}
%description -n %{staticname}
This package contains the static development files for Lua.
%files -n %{staticname}
%{_libdir}/*.a
#----------------------------------------------------------------------------
%prep
%setup -q
%patch0 -p1 -b .dynlib
%patch1 -p1 -b .pkgconfig
%patch2 -p1 -b .modules
%apply_patches
mkdir -p etc
cp %{SOURCE1} ./etc/
sed -i -e 's/@MAJOR_VERSION@/%{major}/g' ./etc/lua.pc
sed -i -e 's/@FULL_VERSION@/%{version}/g' ./etc/lua.pc
sed -i -e "s|/usr/local|%{_prefix}|g" Makefile
sed -i -e "s|/lib|/%{_lib}|g" Makefile
@ -83,16 +116,11 @@ sed -i -e "s|\$(V)|%{major}|g" src/Makefile
%build
%make linux CFLAGS="%{optflags} -fPIC -DLUA_USE_LINUX"
sed -i -e "s#/usr/local#%{_prefix}#" etc/lua.pc
sed -i -e 's/-lreadline -lncurses //g' etc/lua.pc
%install
rm -rf %{buildroot}
%makeinstall_std INSTALL_TOP=%{buildroot}%{_prefix} INSTALL_LIB=%{buildroot}%{_libdir} INSTALL_MAN=%{buildroot}%{_mandir}/man1
install -d %{buildroot}%{_libdir}/lua/%{major}/
install -d %{buildroot}%{_datadir}/lua/%{major}/
install -m 644 test/*.lua %{buildroot}%{_datadir}/lua/%{major}/
install -m 755 src/liblua.so.%{major}* %{buildroot}%{_libdir}
ln -s liblua.so.%{major} %{buildroot}%{_libdir}/liblua.so
@ -104,209 +132,3 @@ install -m 644 etc/lua.pc %{buildroot}%{_libdir}/pkgconfig/
mv %{buildroot}%{_bindir}/lua %{buildroot}%{_bindir}/lua%{major}
mv %{buildroot}%{_bindir}/luac %{buildroot}%{_bindir}/luac%{major}
%post
/usr/sbin/update-alternatives --install %{_bindir}/lua lua %{_bindir}/lua%{major} %{alt_priority} --slave %{_bindir}/luac luac %{_bindir}/luac%{major}
%postun
[[ -f %{_bindir}/lua%{major} ]] || /usr/sbin/update-alternatives --remove lua %{_bindir}/lua%{major}
%files
%doc doc/*.html doc/*.gif
%doc COPYRIGHT HISTORY INSTALL README
%{_bindir}/*
%{_mandir}/man1/*
%dir %{_datadir}/lua
%{_datadir}/lua/%{major}/*.lua
%files -n %{libname}
%{_libdir}/liblua.so.%{major}*
%files -n %{develname}
%{_includedir}/*
%{_libdir}/pkgconfig/*
%{_libdir}/liblua.so
%files -n %{staticname}
%{_libdir}/*.a
%changelog
* Wed May 04 2011 Oden Eriksson <oeriksson@mandriva.com> 5.1.4-10mdv2011.0
+ Revision: 666103
- mass rebuild
* Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 5.1.4-9mdv2011.0
+ Revision: 606426
- rebuild
* Mon Mar 15 2010 Rémy Clouard <shikamaru@mandriva.org> 5.1.4-8mdv2010.1
+ Revision: 520626
- rebuild
* Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 5.1.4-7mdv2010.0
+ Revision: 426015
- rebuild
* Wed Feb 25 2009 Thierry Vignaud <tv@mandriva.org> 5.1.4-6mdv2009.1
+ Revision: 344654
- rebuild for new libreadline in order to unbreak cooker
* Sat Jan 24 2009 Per Øyvind Karlsen <peroyvind@mandriva.org> 5.1.4-5mdv2009.1
+ Revision: 333184
- previous patch was broken, remove libdir completely since library resides in
standard location and doesn't need to get passed to linker anyways..
* Mon Dec 29 2008 Jérôme Soyer <saispo@mandriva.org> 5.1.4-4mdv2009.1
+ Revision: 320762
- Bump Release
- Add patch for fixing 64bit issue
+ Per Øyvind Karlsen <peroyvind@mandriva.org>
- remove -L{libdir} from lua.pc so that -L/usr/lib won't be passed to ldflags
(very annoying on x86_64 which will give a lot of warnings about skipping
32 bit libraries under /ur/lib..)
* Fri Sep 19 2008 Guillaume Rousse <guillomovitch@mandriva.org> 5.1.4-2mdv2009.0
+ Revision: 285916
- ensure devel package requires main package
* Tue Sep 09 2008 Emmanuel Andry <eandry@mandriva.org> 5.1.4-1mdv2009.0
+ Revision: 283044
- New version
- drop P1 (merged upstream)
* Wed Aug 06 2008 Thierry Vignaud <tv@mandriva.org> 5.1.3-5mdv2009.0
+ Revision: 265034
- rebuild early 2009.0 package (before pixel changes)
+ Pixel <pixel@mandriva.com>
- do not call ldconfig in %%post/%%postun, it is now handled by filetriggers
* Thu Jun 05 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1.3-4mdv2009.0
+ Revision: 215155
- Patch1: add upstream patch
* Thu Jun 05 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1.3-3mdv2009.0
+ Revision: 215152
- rebuild for new gcc-4.3
* Mon Feb 18 2008 Thierry Vignaud <tv@mandriva.org> 5.1.3-2mdv2008.1
+ Revision: 170970
- rebuild
- fix "foobar is blabla" summary (=> "blabla") so that it looks nice in rpmdrake
* Mon Feb 11 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1.3-1mdv2008.1
+ Revision: 165019
- fix summaries and descriptions
- fix lua.pc
- new version
* Tue Jan 15 2008 Thierry Vignaud <tv@mandriva.org> 5.1.2-6mdv2008.1
+ Revision: 152880
- rebuild
- rebuild
- kill re-definition of %%buildroot on Pixel's request
+ Olivier Blin <oblin@mandriva.com>
- restore BuildRoot
* Sun Aug 05 2007 Anssi Hannula <anssi@mandriva.org> 5.1.2-4mdv2008.0
+ Revision: 59119
- make liblua.so a proper devel symlink instead of a copy
* Mon Jul 16 2007 Funda Wang <fwang@mandriva.org> 5.1.2-3mdv2008.0
+ Revision: 52568
- Obsoletes old static devel name
* Wed Jun 20 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1.2-2mdv2008.0
+ Revision: 41814
- new devel library policy
- spec file clean
* Sat May 19 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 5.1.2-1mdv2008.0
+ Revision: 28430
- new version
- drop P1
- make use of %%{major}
- spec file clean
* Tue Mar 06 2007 Olivier Thauvin <nanardon@mandriva.org> 5.1.1-9mdv2007.0
+ Revision: 133768
- obsoletes liblua5 to avoid files conflicts
* Mon Nov 13 2006 Pascal Terjan <pterjan@mandriva.org> 5.1.1-8mdv2007.0
+ Revision: 83555
- ship lua.pc
* Fri Aug 25 2006 Nicolas Lécureuil <neoclust@mandriva.org> 5.1.1-7mdv2007.0
+ Revision: 57833
- Increase release
- Fix group
+ Gaëtan Lehmann <glehmann@mandriva.org>
- add alternative for lua and luac
- small spec cleanup
* Sun Aug 20 2006 Olivier Thauvin <nanardon@mandriva.org> 5.1.1-5mdv2007.0
+ Revision: 56856
- replace major from 5 to 5.1 for lua5.0 cohabitation
* Sat Aug 19 2006 Thierry Vignaud <tvignaud@mandriva.com> 5.1.1-4mdv2007.0
+ Revision: 56793
- fix build on x86_64
* Fri Aug 18 2006 Olivier Thauvin <nanardon@mandriva.org> 5.1.1-3mdv2007.0
+ Revision: 56554
- reprovide liblua and its -devel
- add patch to enable .so building
+ Götz Waschk <waschk@mandriva.org>
- fix buildrequires
* Sun Aug 13 2006 Olivier Thauvin <nanardon@mandriva.org> 5.1.1-2mdv2007.0
+ Revision: 55708
- release package
- provide also liblua-devel
- handle the name change -devel to -devel-static
+ Götz Waschk <waschk@mandriva.org>
- fix buildrequires
* Fri Aug 11 2006 Helio Chissini de Castro <helio@mandriva.com> 5.1.1-1mdv2007.0
+ Revision: 55509
- New upstream version 5.1.1
- Lua now is just static, as decided by developers. This package will solve the
conflicts with old lua on main and new wrong package on contrib
- import lua-5.0.2-9mdk
* Fri Oct 07 2005 Götz Waschk <waschk@mandriva.org> 5.0.2-9mdk
- fix packaging bugs 16461 and 19006
* Mon Oct 03 2005 Pascal Terjan <pterjan@mandriva.org> 5.0.2-8mdk
- add SONAME to the libs so that other package don't want -devel (P3)
* Sat Jul 09 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.0.2-7mdk
- fix provides for x86_64
* Wed Apr 13 2005 Olivier Thauvin <nanardon@mandrake.org> 5.0.2-6mdk
- avoid postun exit 1 (thanks Eskild Hustvedt && Daniel Le Berre)
* Tue Apr 12 2005 Olivier Thauvin <nanardon@mandrake.org> 5.0.2-5mdk
- add -fPIC on x86_64
- fix lib location
* Sat Mar 12 2005 Gaetan Lehmann <gaetan.lehmann@jouy.inra.fr> 5.0.2-4mdk
- fix update-alternatives (#14460)
* Thu Mar 10 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 5.0.2-3mdk
- fix ownership of files (fixes #14458)
- fix libuse- cosmetics
- compile with optimizations
* Mon Aug 30 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.0.2-2mdk
- fix .so links
* Wed May 05 2004 Lenny Cartier <lenny@mandrakesoft.com> 5.0.2-1mdk
- from Andre Nathan <andre@digirati.com.br>

View file

@ -0,0 +1,13 @@
diff --git a/src/luaconf.h b/src/luaconf.h
index b7988ef..da78791 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -242,6 +242,8 @@
** ===================================================================
*/
+#define LUA_COMPAT_ALL
+
/*
@@ LUA_COMPAT_ALL controls all compatibility options.
** You can define it to get all options, or change specific options