new: libnsl, lua, swig

This commit is contained in:
ngn 2024-08-11 02:02:57 +03:00
parent 9bf8afb8d4
commit e32e1866c1
15 changed files with 25721 additions and 13 deletions

3
src/libnsl/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.cache/
dist/
root/

2
src/libnsl/changes.md Normal file
View File

@ -0,0 +1,2 @@
# 2.0.1
First version

23
src/libnsl/pkg.sh Normal file
View File

@ -0,0 +1,23 @@
# general info
NAME="libnsl"
DESC="Public client interface library for NIS(YP)"
VERSION="2.0.1"
# required files
FILES=("https://github.com/thkukuk/libnsl/releases/download/v${VERSION}/libnsl-${VERSION}.tar.xz")
HASHES=("fb178645dfa85ebab0f1e42e219b42ae")
# install and build depends
DEPENDS=("glibc" "libtirpc")
BUILD=()
PACKAGE(){
tar xf "${NAME}-${VERSION}.tar.xz"
cd "${NAME}-${VERSION}"
./configure --sysconfdir=/etc --disable-static
make
make DESTDIR="${ROOTDIR}" install
cd .. && rm -r "${NAME}-${VERSION}"
}

3
src/lua/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.cache/
dist/
root/

2
src/lua/changes.md Normal file
View File

@ -0,0 +1,2 @@
# 5.4.6
First version

View File

@ -0,0 +1,83 @@
Submitted By: Xi Ruoyao <xry111 at xry111 dot site>
Date: 2022-09-16
Initial Package Version: 5.4.4
Upstream Status: Rejected
Origin: Arch Linux, with some modifications
Description: 2020-06-30 renodr:
Creates a shared liblua library, as well as
removes optimization since it causes SIGBUS errors,
and sets the search path to /usr from /usr/local.
The initial version of this patch was created by
Igor Zivkovic, before being rediffed for 5.4.0 by
myself with some modifications made.
2022-09-16 xry111:
Remove an extra newline before $(MYLDFLAGS).
MYLDFLAGS is empty by default so it does not break
BLFS build, but it may break a custom build with
tuning or hardening.
diff -Naurp lua-5.4.0.orig/Makefile lua-5.4.0/Makefile
--- lua-5.4.0.orig/Makefile 2020-04-15 07:55:07.000000000 -0500
+++ lua-5.4.0/Makefile 2020-06-30 13:22:00.997938585 -0500
@@ -52,7 +52,7 @@ R= $V.0
all: $(PLAT)
$(PLATS) help test clean:
- @cd src && $(MAKE) $@
+ @cd src && $(MAKE) $@ V=$(V) R=$(R)
install: dummy
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
diff -Naurp lua-5.4.0.orig/src/luaconf.h lua-5.4.0/src/luaconf.h
--- lua-5.4.0.orig/src/luaconf.h 2020-06-18 09:25:54.000000000 -0500
+++ lua-5.4.0/src/luaconf.h 2020-06-30 13:24:59.294932289 -0500
@@ -227,7 +227,7 @@
#else /* }{ */
-#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 "/"
diff -Naurp lua-5.4.0.orig/src/Makefile lua-5.4.0/src/Makefile
--- lua-5.4.0.orig/src/Makefile 2020-04-15 08:00:29.000000000 -0500
+++ lua-5.4.0/src/Makefile 2020-06-30 13:24:15.746933827 -0500
@@ -7,7 +7,7 @@
PLAT= guess
CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
+CFLAGS= -fPIC -O0 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1 $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
@@ -33,6 +33,7 @@ CMCFLAGS= -Os
PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= liblua.so
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 ltm.o lundump.o lvm.o lzio.o
LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
@@ -44,7 +45,7 @@ LUAC_T= luac
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.
@@ -60,6 +61,11 @@ $(LUA_A): $(BASE_O)
$(AR) $@ $(BASE_O)
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -shared -ldl -Wl,--soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO)
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)

61
src/lua/pkg.sh Normal file
View File

@ -0,0 +1,61 @@
# general info
NAME="lua"
DESC="Powerful and fast programming language"
VERSION="5.4.6"
# required files
FILES=(
"https://www.lua.org/ftp/lua-${VERSION}.tar.gz"
"lua-${VERSION}-shared_library-1.patch"
)
HASHES=(
"25a429319dff20dfbfb9956c2b5be911"
"44324a802822f0a35d095aaad2f5f58fa7b1821ae87ae44dbcfc8a23fcd2e67e"
)
# install and build depends
DEPENDS=("readline")
BUILD=()
PACKAGE(){
tar xf "${NAME}-${VERSION}.tar.gz"
cd "${NAME}-${VERSION}"
cat > lua.pc << EOF
V=${VERSION%.*}
R=${VERSION}
prefix=/usr
INSTALL_BIN=i\${prefix}/bin
INSTALL_INC=\${prefix}/include
INSTALL_LIB=\${prefix}/lib
INSTALL_MAN=\${prefix}/share/man/man1
INSTALL_LMOD=\${prefix}/share/lua/${V}
INSTALL_CMOD=\${prefix}/lib/lua/${V}
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 -ldl
Cflags: -I\${includedir}
EOF
patch -Np1 -i ../lua-${VERSION}-shared_library-1.patch
make linux
make INSTALL_TOP="${ROOTDIR}/usr" \
INSTALL_DATA="cp -d" \
INSTALL_MAN="${ROOTDIR}/usr/share/man/man1" \
TO_LIB="liblua.so liblua.so.${VERSION%.*} liblua.so.${VERSION}" \
install
install -dm755 "${ROOTDIR}/usr/share/doc/lua-${VERSION}"
cp -v doc/*.{html,css,gif,png} "${ROOTDIR}/usr/share/doc/lua-${VERSION}"
install -v -m644 -D lua.pc "${ROOTDIR}/usr/lib/pkgconfig/lua.pc"
cd .. && rm -r "${NAME}-${VERSION}"
}

25492
src/make-ca/certdata.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,11 +6,11 @@ VERSION="1.14"
# required files
FILES=(
"https://github.com/lfs-book/make-ca/archive/refs/tags/v${VERSION}.tar.gz"
"https://anduin.linuxfromscratch.org/BLFS/other/certdata.txt"
"certdata.txt"
)
HASHES=(
"6391698fe6db16eb190da1aba802bc90c09c8baa4c116d9c65647bea87f190db"
"1642deeff826665a04972ea379ff9da0317591dfb584af7ca863537f3634f124"
"04be8855fd4c23a6a34a01a761770012a77e2687476f036f6f3d6be108aae1fb"
)
# install and build depends

View File

@ -11,7 +11,7 @@ FILES=("https://www.cpan.org/src/${_RVERSION}.0/perl-${VERSION}.tar.xz")
HASHES=("d3957d75042918a23ec0abac4a2b7e0a")
# install and build depends
DEPENDS=("gdbm" "glibc" "libxcrypt" "procps")
DEPENDS=("gdbm" "glibc" "libxcrypt" "procps-ng")
BUILD=()
PACKAGE(){

View File

@ -16,10 +16,7 @@ HASHES=(
)
# install and build depends
DEPENDS=(
"acl" "attr" "audit"
"glibc" "libxcrypt" "linux-pam"
)
DEPENDS=("acl" "attr" "glibc" "libxcrypt" "linux-pam")
BUILD=("libxslt")
PACKAGE(){

3
src/swig/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.cache/
dist/
root/

2
src/swig/changes.md Normal file
View File

@ -0,0 +1,2 @@
# 4.2.1
First version

37
src/swig/pkg.sh Normal file
View File

@ -0,0 +1,37 @@
# general info
NAME="swig"
DESC="Software development tool that connects programs written in C and C++"
VERSION="4.2.1"
# required files
FILES=(
"https://github.com/swig/swig/archive/refs/tags/v${VERSION}.tar.gz"
"https://github.com/swig/swig/commit/3d515751.patch"
)
HASHES=(
"5d653333f73356d4d5ba8b615882e49f33f188bc68d8204352116bc4aca7946ec01ce2e02524c5ce805b98c2219ed05e664120485bf18095c5c0785436487074"
"5f205fbcb330f436579471865b8386dec58fb67569f97c9159bce0bcc1ee12924b4d8782f8808fafe5bf43ee6b9d961fb981eb4af0ef60b5cb6baee011745f7d"
)
# install and build depends
DEPENDS=("gcc-libs" "glibc" "pcre2" "zlib")
BUILD=("python3" "lua" "tcl")
PACKAGE(){
tar xf "v${VERSION}.tar.gz"
cd "${NAME}-${VERSION}"
patch -p1 < ../3d515751.patch
./autogen.sh
./configure --prefix=/usr \
--without-javascript \
--without-maximum-compile-warnings
make
make DESTDIR="${ROOTDIR}" install
install -Ddm755 "${ROOTDIR}/usr/share/doc"
cp -v -R Doc -T "${ROOTDIR}/usr/share/doc/swig-${VERSION}"
cd .. && rm -r "${NAME}-${VERSION}"
}

View File

@ -17,12 +17,12 @@ HASHES=(
# install and build depends
DEPENDS=(
"acl" "audit" "bash"
"dbus" "kbd" "kmod"
"libcap" "libelf" "libgcrypt"
"libidn2" "openssl" "libxcrypt"
"libseccomp" "xz" "util-linux"
"pcre2" "linux-pam"
"acl" "bash" "dbus"
"kbd" "kmod" "libcap"
"libelf" "libgcrypt" "libidn2"
"openssl" "libxcrypt" "libseccomp"
"xz" "util-linux" "pcre2"
"linux-pam"
)
BUILD=("shadow" "curl")