lua*: convert for xbps-alternatives

First try to make use of the xbps-alternatives for the three versions
of lua we have now. As an example how this simplifies packages the
xmoto package patches for detecting lua52 were removed.

Also revbump or update the packages depending on lua53 to cope
for the soname change (liblua.so.5.3 to liblua5.3.so.5.3)
+ imapfilter (rev 3)
+ vim (rev 2)
+ mame (rev 2)
+ xmoto (rev 6)
+ glu (rev 6) - rebuild for musl
This commit is contained in:
jbu 2015-11-02 18:18:30 +01:00 committed by Jürgen Buchmüller
parent 78b76639fc
commit 9b451b19c6
12 changed files with 123 additions and 82 deletions

View file

@ -807,7 +807,7 @@ libgslcblas.so.0 gsl-1.15_1
libgsl.so.0 gsl-1.15_1
liblua5.1.so.5.1 lua51-5.1.5_1
liblua5.2.so.5.2 lua52-5.2.4_2
liblua.so.5.3 lua-5.3.1_1
liblua5.3.so.5.3 lua-5.3.1_2
libburn.so.4 libburn-0.7.2_1
libgdkmm-2.4.so.1 gtkmm2-2.24.0_1
libgtkmm-2.4.so.1 gtkmm2-2.24.0_1

View file

@ -1,7 +1,7 @@
# Template file for 'glu'
pkgname=glu
version=9.0.0
revision=5
revision=6
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="pkg-config"

View file

@ -1,8 +1,9 @@
# Template file for 'imapfilter'
pkgname=imapfilter
version=2.6.3
revision=2
revision=3
build_style=gnu-makefile
hostmakedepends="lua-devel"
makedepends="pcre-devel lua-devel libressl-devel"
short_desc="Mail filtering utility"
maintainer="lemmi <lemmi@nerd2nerd.org>"

View file

@ -1,7 +1,7 @@
# Template file for 'lua'
pkgname=lua
version=5.3.1
revision=1
revision=2
wrksrc=lua-${version}
build_pie=yes
makedepends="ncurses-devel readline-devel"
@ -12,24 +12,57 @@ license="MIT"
distfiles="http://www.lua.org/ftp/lua-$version.tar.gz"
checksum=072767aad6cc2e62044a66e8562f51770d941e972dc1e4068ba719cd8bffac17
alternatives="
lua:lua:/usr/bin/lua5.3
lua:luac:/usr/bin/luac5.3
lua:lua.1:/usr/share/man/man1/lua5.3.1
lua:luac.1:/usr/share/man/man1/luac5.3.1
lua:lua:/usr/include/lua5.3
lua:/usr/include/lua.h:/usr/include/lua5.3/lua.h
lua:/usr/include/luaconf.h:/usr/include/lua5.3/luaconf.h
lua:/usr/include/lua.hpp:/usr/include/lua5.3/lua.hpp
lua:/usr/include/lualib.h:/usr/include/lua5.3/lualib.h
lua:/usr/include/lauxlib.h:/usr/include/lua5.3/lauxlib.h
lua:lua.pc:/usr/lib/pkgconfig/lua5.3.pc
lua:liblua.a:/usr/lib/liblua5.3.a
lua:liblua.so:/usr/lib/liblua5.3.so
lua:lua:/usr/share/doc/lua5.3
"
do_build() {
sed "s/%VER%/${version%.*}/g;s/%REL%/${version}/g" ${FILESDIR}/lua.pc > lua.pc
sed -i src/Makefile -r \
-e '/^LUA_(SO|A|T)=/ s;lua;lua5.3;' \
-e '/^LUAC_T=/ s;luac;luac5.3;'
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
CC="$CC" RANLIB="$RANLIB" \
INSTALL_DATA="cp -d" LUA_SO=liblua.so ${makejobs} linux
INSTALL_DATA="cp -d" LUA_SO=liblua5.3.so ${makejobs} linux
}
do_install() {
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
TO_LIB="liblua.a liblua.so liblua.so.${version%.*} liblua.so.${version}" \
TO_BIN="lua5.3 luac5.3" \
TO_LIB="liblua5.3.a liblua5.3.so liblua5.3.so.${version%.*} liblua5.3.so.${version}" \
INSTALL_INC="${DESTDIR}/usr/include/lua5.3" \
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
vinstall lua.pc 644 usr/lib/pkgconfig
sed ${FILESDIR}/lua.pc \
-e "s;%VER%;${version%.*};g;s;%REL%;${version};g" \
-e "s;llua;llua5.3;" \
-e "s;/include;/include/lua5.3;" \
> lua5.3.pc
vinstall lua5.3.pc 644 usr/lib/pkgconfig
# Install the documentation
vmkdir usr/share/doc/lua
cp -R doc/* ${DESTDIR}/usr/share/doc/lua
rm -f doc/*.1
vmkdir usr/share/doc/lua5.3
cp -R doc/* ${DESTDIR}/usr/share/doc/lua5.3
vlicense doc/readme.html
# Rename man pages
mv ${DESTDIR}/usr/share/man/man1/lua{,5.3}.1
mv ${DESTDIR}/usr/share/man/man1/luac{,5.3}.1
}
lua-devel_package() {

View file

@ -1,7 +1,7 @@
# Template file for 'lua51'
pkgname=lua51
version=5.1.5
revision=5
revision=6
wrksrc="lua-${version}"
makedepends="ncurses-devel readline-devel"
short_desc="Powerful, fast, lightweight, embeddable scripting language (5.1.x)"
@ -11,6 +11,23 @@ license="MIT"
distfiles="http://www.lua.org/ftp/lua-$version.tar.gz"
checksum=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
alternatives="
lua:lua:/usr/bin/lua5.1
lua:luac:/usr/bin/luac5.1
lua:lua.1:/usr/share/man/man1/lua5.1.1
lua:luac.1:/usr/share/man/man1/luac5.1.1
lua:lua:/usr/include/lua5.1
lua:/usr/include/lua.h:/usr/include/lua5.1/lua.h
lua:/usr/include/luaconf.h:/usr/include/lua5.1/luaconf.h
lua:/usr/include/lua.hpp:/usr/include/lua5.1/lua.hpp
lua:/usr/include/lualib.h:/usr/include/lua5.1/lualib.h
lua:/usr/include/lauxlib.h:/usr/include/lua5.1/lauxlib.h
lua:lua.pc:/usr/lib/pkgconfig/lua5.1.pc
lua:liblua.a:/usr/lib/liblua5.1.a
lua:liblua.so:/usr/lib/liblua5.1.so
lua:lua:/usr/share/doc/lua5.1
"
do_build() {
export CFLAGS="$CFLAGS -fPIC"
sed -e 's:llua:llua5.1:' -e 's:/include:/include/lua5.1:' -i etc/lua.pc
@ -27,18 +44,18 @@ do_install() {
INSTALL_INC="${DESTDIR}/usr/include/lua5.1" \
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
install -Dm644 etc/lua.pc ${DESTDIR}/usr/lib/pkgconfig/lua5.1.pc
vinstall etc/lua.pc 644 usr/lib/pkgconfig lua5.1.pc
# Install the documentation
vmkdir usr/share/doc/lua51
cp -R doc/* ${DESTDIR}/usr/share/doc/lua51
rm -f doc/*.1
vmkdir usr/share/doc/lua5.1
cp -R doc/* ${DESTDIR}/usr/share/doc/lua5.1
ln -s liblua5.1.so ${DESTDIR}/usr/lib/liblua.so.5.1
ln -s liblua5.1.so ${DESTDIR}/usr/lib/liblua.so.${version}
cd ${DESTDIR}/usr/share/man/man1
mv lua.1 lua5.1.1
mv luac.1 luac5.1.1
rm -f ${DESTDIR}/usr/lib/liblua.so.*
vlicense doc/readme.html
# Rename man pages
mv ${DESTDIR}/usr/share/man/man1/lua{,5.1}.1
mv ${DESTDIR}/usr/share/man/man1/luac{,5.1}.1
}
lua51-devel_package() {

View file

@ -1,7 +1,7 @@
# Template file for 'lua52'
pkgname=lua52
version=5.2.4
revision=3
revision=4
wrksrc=lua-${version}
build_pie=yes
makedepends="ncurses-devel readline-devel"
@ -12,6 +12,23 @@ license="MIT"
distfiles="http://www.lua.org/ftp/lua-$version.tar.gz"
checksum=b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b
alternatives="
lua:lua:/usr/bin/lua5.2
lua:luac:/usr/bin/luac5.2
lua:lua.1:/usr/share/man/man1/lua5.2.1
lua:luac.1:/usr/share/man/man1/luac5.2.1
lua:lua:/usr/include/lua5.2
lua:/usr/include/lua.h:/usr/include/lua5.2/lua.h
lua:/usr/include/luaconf.h:/usr/include/lua5.2/luaconf.h
lua:/usr/include/lua.hpp:/usr/include/lua5.2/lua.hpp
lua:/usr/include/lualib.h:/usr/include/lua5.2/lualib.h
lua:/usr/include/lauxlib.h:/usr/include/lua5.2/lauxlib.h
lua:lua.pc:/usr/lib/pkgconfig/lua5.2.pc
lua:liblua.a:/usr/lib/liblua5.2.a
lua:liblua.so:/usr/lib/liblua5.2.so
lua:lua:/usr/share/doc/lua5.2
"
do_build() {
sed -i src/Makefile -r \
-e '/^LUA_(SO|A|T)=/ s;lua;lua5.2;' \
@ -37,8 +54,8 @@ do_install() {
# Install the documentation
rm -f doc/*.1
vmkdir usr/share/doc/lua52
cp -R doc/* ${DESTDIR}/usr/share/doc/lua52
vmkdir usr/share/doc/lua5.2
cp -R doc/* ${DESTDIR}/usr/share/doc/lua5.2
vlicense doc/readme.html

View file

@ -1,7 +1,7 @@
# Template file for 'mame'
pkgname=mame
version=0167
revision=1
revision=2
wrksrc="mame-mame${version}"
homepage="http://mamedev.org"
distfiles="https://github.com/mamedev/mame/archive/mame${version}.tar.gz"
@ -18,6 +18,7 @@ nocross=yes
repository="nonfree"
replaces="sdlmame>=0 sdlmess>=0"
CXXFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.3"
do_build() {
local opts="REGENIE=1"
opts+=" NOWERROR=1"
@ -32,7 +33,7 @@ do_build() {
opts+=" USE_SYSTEM_LIB_SQLITE3=1"
opts+=" USE_SYSTEM_LIB_PORTMIDI=1"
opts+=" USE_SYSTEM_LIB_PORTAUDIO=1"
if [ "${CROSS_BUILD}" ]; then
if [ "${CROSS_BUILD}" ]; then
# Doesn't work yet because of qt (which can't be cross compiled)
opts+=" CROSS_BUILD=1 OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=${CC}"
fi

View file

@ -1,7 +1,7 @@
# Template file for 'vim'
pkgname=vim
version=7.4.909
revision=1
revision=2
hostmakedepends="pkg-config"
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel perl
ruby-devel python-devel python3.4-devel lua-devel"

View file

@ -1,32 +0,0 @@
--- configure 2015-10-02 11:37:59.277559809 +0200
+++ configure 2015-10-02 11:41:32.042543210 +0200
@@ -7637,7 +7637,7 @@
return 0;
}
_ACEOF
-for ac_lib in '' lua lua5.1 lua50; do
+for ac_lib in '' lua lua5.2 lua5.1 lua50; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -7767,6 +7767,20 @@
fi
+ac_fn_c_check_header_mongrel "$LINENO" "lua52/lua.h" "ac_cv_header_lua52_lua_h" "$ac_includes_default"
+if test "x$ac_cv_header_lua52_lua_h" = xyes; then :
+ $as_echo "#define HAVE_LUA52_LUA_H 1" >>confdefs.h
+ USE_LUA_VERSION="5.2"
+fi
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "lua5.2/lua.h" "ac_cv_header_lua5_2_lua_h" "$ac_includes_default"
+if test "x$ac_cv_header_lua5_2_lua_h" = xyes; then :
+ $as_echo "#define HAVE_LUA5_2_LUA_H 1" >>confdefs.h
+USE_LUA_VERSION="5.2"
+fi
+
+
$as_echo "#define LUA_COMPAT_MODULE 1" >>confdefs.h

View file

@ -1,19 +0,0 @@
--- src/include/xm_lua.h 2011-10-11 22:18:17.000000000 +0200
+++ src/include/xm_lua.h 2015-10-02 11:44:15.981530419 +0200
@@ -4,7 +4,15 @@
#include "lauxlib.h"
#include "lualib.h"
#else
- #if defined(HAVE_LUA5_1_LUA_H)
+ #if defined(HAVE_LUA5_2_LUA_H)
+ #include <lua5.2/lua.h>
+ #include <lua5.2/lauxlib.h>
+ #include <lua5.2/lualib.h>
+ #elif defined(HAVE_LUA52_LUA_H)
+ #include <lua52/lua.h>
+ #include <lua52/lauxlib.h>
+ #include <lua52/lualib.h>
+ #elif defined(HAVE_LUA5_1_LUA_H)
#include <lua5.1/lua.h>
#include <lua5.1/lauxlib.h>
#include <lua5.1/lualib.h>

View file

@ -0,0 +1,16 @@
--- configure.in 2014-03-29 11:35:24.000000000 +0100
+++ configure.in 2015-11-03 13:02:49.686607352 +0100
@@ -1,8 +1,8 @@
-AC_INIT(src/GameInit.cpp)
-
-AC_CANONICAL_TARGET()
-AM_INIT_AUTOMAKE(xmoto,0.5.11)
-AC_GNU_SOURCE
+AC_PREREQ([2.69])
+AC_INIT([xmoto],[0.5.11])
+AC_CONFIG_SRCDIR(src/GameInit.cpp)
+AM_INIT_AUTOMAKE([1.15 foreign gnu subdir-objects])
+LT_INIT
AC_PROG_CXX
AC_PROG_CPP

View file

@ -1,26 +1,33 @@
# Template build file for 'xmoto'
pkgname=xmoto
version=0.5.11
revision=5
revision=6
build_style=gnu-configure
short_desc="2D motocross platform game"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="GPL-2"
makedepends="sqlite-devel zlib-devel libjpeg-turbo-devel libpng-devel
libxml2-devel libxdg-basedir-devel glu-devel SDL-devel SDL_mixer-devel
SDL_net-devel SDL_ttf-devel lua52-devel libcurl-devel libode-devel
bzip2-devel"
hostmakedepends="libxml2-devel SDL-devel desktop-file-utils"
SDL_net-devel SDL_ttf-devel lua52-devel libcurl-devel libode-devel bzip2-devel"
hostmakedepends="automake libtool gettext-devel intltool SDL-devel libxml2-devel desktop-file-utils"
homepage="http://xmoto.tuxfamily.org/"
distfiles="http://download.tuxfamily.org/xmoto/xmoto/$version/$pkgname-$version-src.tar.gz"
checksum=a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2
configure_args="--disable-sdltest CPPFLAGS=-DdDOUBLE"
CXXFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.2"
CXXFLAGS="-Wno-deprecated"
LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib"
if [ "$CROSS_BUILD" ]; then
# configure can't test this when cross compiling
export ac_cv_lib_GLU_gluBuild2DMipmaps=yes
fi
pre_configure() {
# remove old ode version
rm -r src/ode
mv configure.{in,ac}
libtoolize
./bootstrap
}
post_install() {