Commit 7d9f604e authored by Natanael Copa's avatar Natanael Copa

main/lua-posix: upgrade to 33.3.1 and add lua 5.3

issue with _POSIX_PRIORITY_SCHEDULING reported upstream:
https://github.com/luaposix/luaposix/issues/223
parent 853398b5
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2"
_luaversions="5.1 5.2 5.3"
pkgname=lua-posix
_name=luaposix
pkgver=32
pkgrel=2
pkgver=33.3.1
pkgrel=0
pkgdesc="POSIX library for Lua $_luaver"
url="https://github.com/luaposix/luaposix"
arch="all"
license="MIT"
depends=""
makedepends="perl ncurses-dev automake autoconf lua5.1-bitlib"
subpackages="$pkgname-doc"
subpackages="$pkgname-doc lua-curses:_curses"
for _i in $_luaversions; do
depends="$depends lua$_i-posix"
makedepends="$makedepends lua$_i-dev"
subpackages="$subpackages lua$_i-posix:_posix_${_i/./_}
lua$_i-curses:_curses_${_i/./_}"
done
source="luaposix-$pkgver.tar.gz::https://github.com/luaposix/luaposix/archive/release-v$pkgver.tar.gz
lua-version.patch
fix-sched-header.patch
"
_sdir="$srcdir"/$_name-release-v$pkgver
prepare() {
......@@ -60,14 +57,19 @@ package() {
make DESTDIR="$pkgdir" luadir="/usr/share/lua/$_i" install \
|| return 1
done
rm "$pkgdir"/usr/lib/lua/*/*.la || return 1
}
_curses() {
depends=
pkgdesc="ncurses binding for Lua - meta package"
mkdir -p "$subpkgdir"
}
_split() {
depends=
local d= _ver=$1 _f=$2
if [ "$_ver" = "5.1" ]; then
depends="lua5.1-bitlib"
if [ "$_ver" != "5.2" ]; then
depends="lua$_ver-bitlib"
fi
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
......@@ -82,13 +84,14 @@ _split() {
_split_curses() {
local _ver=$1
pkgdesc="ncurses binding for Lua $_ver"
install_if="lua$_ver lua-curses=$pkgver-r$pkgrel"
_split $_ver curses
}
_split_posix() {
local _ver=$1
pkgdesc="POSIX library for Lua $_ver"
replaces="lua-posix"
install_if="lua$_ver lua-posix=$pkgver-r$pkgrel"
_split $_ver posix
}
......@@ -97,9 +100,9 @@ for _i in $_luaversions; do
eval "_posix_${_i/./_}() { _split_posix $_i; }"
done
md5sums="2bfede7b7cee96c5d0f6c0354e17498c luaposix-32.tar.gz
ee005f27a774ac78e877a9484ec46cb3 lua-version.patch"
sha256sums="09dbbde825fd9b76a8a1f6a80920434f8629a392cd1840021ed4b95b21fcf073 luaposix-32.tar.gz
7a9470ff830a563f8a51b434fee637ba03fefd6405a4960ee9023713f75f457e lua-version.patch"
sha512sums="cd0cb4a0c8eb291e11526fd1a110ed41a92ae05a656c1e5fca9fd296a5f766c04390ad9399ae2eb5d6d8f28cad1c099ffae01e8d8ea94e1e8ce4f639dc822957 luaposix-32.tar.gz
fcbd081c46910ff15ba66c76ce3d130224aa363c3e1265158f77fa244c7e16156970703ab4e57d70cb1cd4f2b2228043a2f5e1affad6bf601e0ee8ca81e2504a lua-version.patch"
md5sums="1d07112a5582b539930066d7c834643f luaposix-33.3.1.tar.gz
d4165a01aa0d606315a35cbb956ed763 fix-sched-header.patch"
sha256sums="49e1eda64d0c03d0f2977fc1e04ce8c620dc3bb9a5c54c342904751d21b1b3cf luaposix-33.3.1.tar.gz
b49102e3c08418c6298f4ce4cea1856082e17e016551c16633851e35de115128 fix-sched-header.patch"
sha512sums="76d4d9feb44f857a98dd3ad76d8ca4e4f917a4f75b04e72fdce70b092aa825a91a51cb19cf8046cbe551a92e281008664ef103301543756a646e7bab31538e33 luaposix-33.3.1.tar.gz
2b80759b1803059c1424ad7564ff8ec70aeff85faf817db1f2fc09b7bab3deac2fd5f98de78657039b39b9817d8978c9a382fb687975e381e95c369389b76b2a fix-sched-header.patch"
diff --git a/ext/posix/sched.c b/ext/posix/sched.c
index 13b196b..6901589 100644
--- a/ext/posix/sched.c
+++ b/ext/posix/sched.c
@@ -21,9 +21,7 @@
#include <config.h>
-#include <unistd.h> /* for _POSIX_PRIORITY_SCHEDULING */
-
-#ifdef _POSIX_PRIORITY_SCHEDULING
+#if HAVE_SCHED_GETSCHEDULER || HAVE_SCHED_SETSCHEDULER
#include <sched.h>
#endif
--- ./m4/ax_lua.m4.orig
+++ ./m4/ax_lua.m4
@@ -481,7 +481,7 @@
],
[ ax_cv_lua_header_version=`./conftest$EXEEXT p | \
sed "s|^Lua \(.*\)|\1|" | \
- grep -o "^@<:@0-9@:>@\+\\.@<:@0-9@:>@\+"`
+ grep -E -o "^@<:@0-9@:>@+\\.@<:@0-9@:>@+"`
],
[ax_cv_lua_header_version='unknown'])
CPPFLAGS=$_ax_lua_saved_cppflags
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment