initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

74
lua-socket/PKGBUILD Normal file
View File

@@ -0,0 +1,74 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgbase=luasocket
pkgname=('lua-socket' 'lua51-socket' 'lua52-socket')
pkgver=3.0~rc1+git+ac3201d
_debver=3.0~rc1+git+ac3201d
_debrel=4
pkgrel=1
pkgdesc='Networking support library for the Lua language'
arch=('i686' 'x86_64')
url='https://github.com/diegonehab/luasocket'
license=('Expat')
makedepends=('lua' 'lua51' 'lua52' 'quilt')
source=("https://deb.debian.org/debian/pool/main/l/luasocket/luasocket_${pkgver}.orig.tar.gz"
"https://deb.debian.org/debian/pool/main/l/luasocket/luasocket_${_debver}-${_debrel}.debian.tar.xz"
"fix-library.patch")
sha512sums=('c34848f35c605cea700d67f2ebc4447deb58262090891651ff5793db6278152d6b902d6c1860f747d6380d3ecf365f1df6809f6b0e364257b93decbd3533462c'
'a5c78dd5189086b431bd13f04980fd9e5c39524455b84817c5193a8cc8af0352b468a70912cbfe8998b7b6a8756056675b2fd262a001dcf2443d23a033370b0f'
'b9bc7860dccaf6a5baf47e7b35a15071649c0b103f39ca83664631af4c811e5d381c02cfb3284c1c5619ba420126724609a4317161855381d3d969790bbdf0de')
prepare() {
mv ${pkgbase}-${pkgver} ${pkgbase}
cd ${pkgbase}
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
# additional fixes
patch -Np1 -i ../fix-library.patch
cd ..
cp -a ${pkgbase} ${pkgbase}-51
cp -a ${pkgbase} ${pkgbase}-52
}
build() {
cd "$srcdir"/${pkgbase}-51
MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.1 linux
cd "$srcdir"/${pkgbase}-52
MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.2 linux
cd "$srcdir"/${pkgbase}
MYCFLAGS="$CFLAGS" MYLDFLAGS=$LDFLAGS make LUAV=5.3 linux
}
package_lua51-socket() {
replaces=('luasocket')
conflicts=('luasocket')
cd ${pkgbase}-51
make DESTDIR="$pkgdir" LUAV=5.1 prefix=/usr install-unix
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_lua52-socket() {
cd ${pkgbase}-52
make DESTDIR="$pkgdir" LUAV=5.2 prefix=/usr install-unix
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_lua-socket() {
cd ${pkgbase}
make DESTDIR="$pkgdir" LUAV=5.3 prefix=/usr install-unix
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

View File

@@ -0,0 +1,133 @@
--- a/src/makefile 2016-12-18 22:18:47.000000000 +0100
+++ b/src/makefile 2021-08-28 12:17:53.127463418 +0200
@@ -35,7 +35,7 @@
# LUAINC_macosx:
# /opt/local/include
LUAINC_macosx_base?=/opt/local/include
-LUAINC_macosx?=$(LUAINC_macosx_base)/lua/$(LUAV)
+LUAINC_macosx?=$(LUAINC_macosx_base)/lua/$(LUAV) $(LUAINC_macosx_base)/lua$(LUAV)
# FIXME default should this default to fink or to macports?
# What happens when more than one Lua version is installed?
LUAPREFIX_macosx?=/opt/local
@@ -48,7 +48,7 @@
# /usr/local/include/lua$(LUAV)
# where lua headers are found for linux builds
LUAINC_linux_base?=/usr/include
-LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV)
+LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV) $(LUAINC_linux_base)/lua$(LUAV)
LUAPREFIX_linux?=/usr/local
CDIR_linux?=lib/lua/$(LUAV)
LDIR_linux?=share/lua/$(LUAV)
@@ -57,7 +57,7 @@
# /usr/local/include/lua$(LUAV)
# where lua headers are found for freebsd builds
LUAINC_freebsd_base?=/usr/local/include/
-LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV)
+LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua/$(LUAV) $(LUAINC_freebsd_base)/lua$(LUAV)
LUAPREFIX_freebsd?=/usr/local/
CDIR_freebsd?=lib/lua/$(LUAV)
LDIR_freebsd?=share/lua/$(LUAV)
@@ -66,7 +66,7 @@
# LUAINC_mingw:
# /opt/local/include
LUAINC_mingw_base?=/usr/include
-LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV)
+LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) $(LUAINC_mingw_base)/lua$(LUAV)
LUALIB_mingw_base?=/usr/bin
LUALIB_mingw?=$(LUALIB_mingw_base)/lua/$(LUAV)/lua$(subst .,,$(LUAV)).dll
LUAPREFIX_mingw?=/usr
@@ -78,7 +78,7 @@
# LUALIB_win32:
# where lua headers and libraries are found for win32 builds
LUAPREFIX_win32?=
-LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV)
+LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV) $(LUAPREFIX_win32)/include/lua$(LUAV)
PLATFORM_win32?=Release
CDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)
LDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)/lua
@@ -88,7 +88,7 @@
# LUAINC_solaris:
LUAINC_solaris_base?=/usr/include
-LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV)
+LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV) $(LUAINC_solaris_base)/lua$(LUAV)
LUAPREFIX_solaris?=/usr/local
CDIR_solaris?=lib/lua/$(LUAV)
LDIR_solaris?=share/lua/$(LUAV)
@@ -153,7 +153,7 @@
-DLUASOCKET_API='__attribute__((visibility("default")))' \
-DUNIX_API='__attribute__((visibility("default")))' \
-DMIME_API='__attribute__((visibility("default")))'
-CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
+CFLAGS_macosx=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common \
-fvisibility=hidden
LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o
LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
@@ -169,7 +169,7 @@
-DLUASOCKET_API='__attribute__((visibility("default")))' \
-DUNIX_API='__attribute__((visibility("default")))' \
-DMIME_API='__attribute__((visibility("default")))'
-CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
LDFLAGS_linux=-O -shared -fpic -o
LD_linux=gcc
@@ -181,11 +181,11 @@
SO_freebsd=so
O_freebsd=o
CC_freebsd=gcc
-DEF_freebsd=-DLUASOCKET_$(DEBUG) \
+DEF_freebsd=-DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN \
-DLUASOCKET_API='__attribute__((visibility("default")))' \
-DUNIX_API='__attribute__((visibility("default")))' \
-DMIME_API='__attribute__((visibility("default")))'
-CFLAGS_freebsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+CFLAGS_freebsd=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
LDFLAGS_freebsd=-O -shared -fpic -o
LD_freebsd=gcc
@@ -201,7 +201,7 @@
-DLUASOCKET_API='__attribute__((visibility("default")))' \
-DUNIX_API='__attribute__((visibility("default")))' \
-DMIME_API='__attribute__((visibility("default")))'
-CFLAGS_solaris=-I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+CFLAGS_solaris=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o
LD_solaris=gcc
@@ -216,7 +216,7 @@
DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) \
-DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \
-DMIME_API='__declspec(dllexport)'
-CFLAGS_mingw= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
+CFLAGS_mingw=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common \
-fvisibility=hidden
LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o
LD_mingw=gcc
@@ -233,7 +233,7 @@
//D "LUASOCKET_API=__declspec(dllexport)" //D "_CRT_SECURE_NO_WARNINGS" \
//D "_WINDLL" //D "MIME_API=__declspec(dllexport)" \
//D "LUASOCKET_$(DEBUG)"
-CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo
+CFLAGS_win32=$(LUAINC:%=//I "%") $(DEF) //O2 //Ot //MD //W3 //nologo
LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \
//MANIFEST //MANIFESTFILE:"intermediate.manifest" \
//MANIFESTUAC:"level='asInvoker' uiAccess='false'" \
@@ -360,7 +360,7 @@
mingw:
$(MAKE) all PLAT=mingw
-
+
solaris:
$(MAKE) all-unix PLAT=solaris
@@ -386,7 +386,7 @@
$(SERIAL_SO): $(SERIAL_OBJS)
$(LD) $(SERIAL_OBJS) $(LDFLAGS)$@
-install:
+install:
$(INSTALL_DIR) $(INSTALL_TOP_LDIR)
$(INSTALL_DATA) $(TO_TOP_LDIR) $(INSTALL_TOP_LDIR)
$(INSTALL_DIR) $(INSTALL_SOCKET_LDIR)