From e1683c711ca55b9bd3e69910802682a34b303ac6 Mon Sep 17 00:00:00 2001 From: ngn Date: Tue, 9 Jul 2024 16:44:10 +0300 Subject: [PATCH] first commit --- .gitignore | 4 + pool.sh | 4 + src/bash/.gitignore | 3 + src/bash/bash_completion.sh | 24 ++ src/bash/changes.md | 2 + src/bash/i18n.sh | 2 + src/bash/pkg.sh | 60 +++ src/bash/profile | 41 ++ src/bash/readline.sh | 4 + src/bash/shells | 2 + src/bash/skelprof | 2 + src/bash/skelrc | 16 + src/bzip2/.gitignore | 3 + src/bzip2/bzip2-1.0.8-install_docs-1.patch | 42 ++ src/bzip2/changes.md | 2 + src/bzip2/pkg.sh | 50 +++ src/gcc-libs/.gitignore | 3 + src/gcc-libs/changes.md | 2 + src/gcc-libs/pkg.sh | 45 ++ src/gcc/.gitignore | 3 + src/gcc/changes.md | 2 + src/gcc/pkg.sh | 52 +++ src/glibc/.gitignore | 3 + src/glibc/changes.md | 2 + src/glibc/glibc-2.39-fhs-1.patch | 72 ++++ src/glibc/ld.so.conf | 2 + src/glibc/locale-gen | 42 ++ src/glibc/nsswitch.conf | 11 + src/glibc/pkg.sh | 58 +++ src/gmp/.gitignore | 3 + src/gmp/changes.md | 2 + src/gmp/pkg.sh | 29 ++ src/grep/.cache/last | 2 + src/grep/changes.md | 2 + src/grep/pkg.sh | 23 ++ src/mpc/.gitignore | 3 + src/mpc/changes.md | 2 + src/mpc/pkg.sh | 28 ++ src/mpfr/.gitignore | 3 + src/mpfr/changes.md | 2 + src/mpfr/pkg.sh | 29 ++ src/ncurses/.gitignore | 3 + src/ncurses/changes.md | 2 + src/ncurses/pkg.sh | 46 +++ src/pcre2/.gitignore | 3 + src/pcre2/changes.md | 2 + src/pcre2/pkg.sh | 31 ++ src/readline/.gitignore | 3 + src/readline/changes.md | 2 + src/readline/pkg.sh | 39 ++ .../readline-8.2-upstream_fixes-3.patch | 389 ++++++++++++++++++ src/tzdata/.gitignore | 3 + src/tzdata/changes.md | 2 + src/tzdata/pkg.sh | 36 ++ src/which/.gitignore | 3 + src/which/changes.md | 2 + src/which/pkg.sh | 26 ++ src/xz/.gitignore | 3 + src/xz/changes.md | 2 + src/xz/pkg.sh | 25 ++ src/zlib/.gitignore | 3 + src/zlib/changes.md | 2 + src/zlib/pkg.sh | 23 ++ src/zstd/.gitignore | 3 + src/zstd/changes.md | 2 + src/zstd/pkg.sh | 23 ++ 66 files changed, 1364 insertions(+) create mode 100644 .gitignore create mode 100644 pool.sh create mode 100644 src/bash/.gitignore create mode 100644 src/bash/bash_completion.sh create mode 100644 src/bash/changes.md create mode 100644 src/bash/i18n.sh create mode 100644 src/bash/pkg.sh create mode 100644 src/bash/profile create mode 100644 src/bash/readline.sh create mode 100644 src/bash/shells create mode 100644 src/bash/skelprof create mode 100644 src/bash/skelrc create mode 100644 src/bzip2/.gitignore create mode 100644 src/bzip2/bzip2-1.0.8-install_docs-1.patch create mode 100644 src/bzip2/changes.md create mode 100644 src/bzip2/pkg.sh create mode 100644 src/gcc-libs/.gitignore create mode 100644 src/gcc-libs/changes.md create mode 100644 src/gcc-libs/pkg.sh create mode 100644 src/gcc/.gitignore create mode 100644 src/gcc/changes.md create mode 100644 src/gcc/pkg.sh create mode 100644 src/glibc/.gitignore create mode 100644 src/glibc/changes.md create mode 100644 src/glibc/glibc-2.39-fhs-1.patch create mode 100644 src/glibc/ld.so.conf create mode 100644 src/glibc/locale-gen create mode 100644 src/glibc/nsswitch.conf create mode 100644 src/glibc/pkg.sh create mode 100644 src/gmp/.gitignore create mode 100644 src/gmp/changes.md create mode 100644 src/gmp/pkg.sh create mode 100644 src/grep/.cache/last create mode 100644 src/grep/changes.md create mode 100644 src/grep/pkg.sh create mode 100644 src/mpc/.gitignore create mode 100644 src/mpc/changes.md create mode 100644 src/mpc/pkg.sh create mode 100644 src/mpfr/.gitignore create mode 100644 src/mpfr/changes.md create mode 100644 src/mpfr/pkg.sh create mode 100644 src/ncurses/.gitignore create mode 100644 src/ncurses/changes.md create mode 100644 src/ncurses/pkg.sh create mode 100644 src/pcre2/.gitignore create mode 100644 src/pcre2/changes.md create mode 100644 src/pcre2/pkg.sh create mode 100644 src/readline/.gitignore create mode 100644 src/readline/changes.md create mode 100644 src/readline/pkg.sh create mode 100644 src/readline/readline-8.2-upstream_fixes-3.patch create mode 100644 src/tzdata/.gitignore create mode 100644 src/tzdata/changes.md create mode 100644 src/tzdata/pkg.sh create mode 100644 src/which/.gitignore create mode 100644 src/which/changes.md create mode 100644 src/which/pkg.sh create mode 100644 src/xz/.gitignore create mode 100644 src/xz/changes.md create mode 100644 src/xz/pkg.sh create mode 100644 src/zlib/.gitignore create mode 100644 src/zlib/changes.md create mode 100644 src/zlib/pkg.sh create mode 100644 src/zstd/.gitignore create mode 100644 src/zstd/changes.md create mode 100644 src/zstd/pkg.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e482e41 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/*/root +src/*/dist +*.tar.gz +dist diff --git a/pool.sh b/pool.sh new file mode 100644 index 0000000..aa26e77 --- /dev/null +++ b/pool.sh @@ -0,0 +1,4 @@ +NAME="base" +MAINTAINER="ngn" +PUBKEY="F9E70878C2FB389AEC2BA34CA3654DF5AD9F641D" +SRCDIR="src" diff --git a/src/bash/.gitignore b/src/bash/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/bash/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/bash/bash_completion.sh b/src/bash/bash_completion.sh new file mode 100644 index 0000000..491bdc0 --- /dev/null +++ b/src/bash/bash_completion.sh @@ -0,0 +1,24 @@ +if [ -f /usr/share/bash-completion/bash_completion ]; then + + if [ -n "${BASH_VERSION-}" -a -n "${PS1-}" -a -z "${BASH_COMPLETION_VERSINFO-}" ]; then + if [ ${BASH_VERSINFO[0]} -gt 4 ] || \ + [ ${BASH_VERSINFO[0]} -eq 4 -a ${BASH_VERSINFO[1]} -ge 1 ]; then + [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \ + . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" + if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + fi + fi + fi + +else + + if shopt -q progcomp; then + for script in /etc/bash_completion.d/* ; do + if [ -r $script ] ; then + . $script + fi + done + fi + +fi diff --git a/src/bash/changes.md b/src/bash/changes.md new file mode 100644 index 0000000..46d4744 --- /dev/null +++ b/src/bash/changes.md @@ -0,0 +1,2 @@ +# 5.2.21 +First version diff --git a/src/bash/i18n.sh b/src/bash/i18n.sh new file mode 100644 index 0000000..1ecbe62 --- /dev/null +++ b/src/bash/i18n.sh @@ -0,0 +1,2 @@ +. /etc/locale.conf +export LANG diff --git a/src/bash/pkg.sh b/src/bash/pkg.sh new file mode 100644 index 0000000..35744d1 --- /dev/null +++ b/src/bash/pkg.sh @@ -0,0 +1,60 @@ +# general info +NAME="bash" +DESC="Bourne-Again shell" +VERSION="5.2.21" + +# required files +FILES=( + "https://ftp.gnu.org/gnu/bash/bash-${VERSION}.tar.gz" + "skelrc" + "skelprof" + "profile" + "bash_completion.sh" + "i18n.sh" + "readline.sh" + "shells" +) +HASHES=( + "ad5b38410e3bf0e9bcc20e2765f5e3f9" + "21ae7b58947dc168b1fb8a6b21f12632a594aaff6f5472ade79c8ce235c4f960" + "9acd816e6e55af7337ad9c0dfaaf3e09297de7a83e55a5378d2075a7c4862fb2" + "eb0d73e7bce8e4eddcea05511bcb2b6105716d5d715ea9a28b8b9ad59137ec48" + "7dda3e99ed885edb70cb7188283fcb3b7339c0563b0b419cb023b4e6eb504cd8" + "f955496d700e3aeff47ed200ec89f82ba4323b33f9d70555677b1b6196688761" + "07c0e8de91e91e534452c52a8d16b3f282c16a5f5d1818f9f623bf056e800298" + "4cc26708349348ad3520dae0e1046ef3d1b6eb823c9e1361aa24062d785595d8" +) + +# install and build depends +DEPENDS=("glibc" "readline" "ncurses") +BUILD=() + +KEEP=("/etc/shells") + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --without-bash-malloc \ + --with-installed-readline \ + --docdir="/usr/share/doc/bash-${VERSION}" + + make && make DESTDIR="${ROOTDIR}" install + ln -sf bash "${ROOTDIR}/usr/bin/sh" + + install -dm755 "${ROOTDIR}/etc/skel/" + install -m644 "${ROOTDIR}/skelrc" "${ROOTDIR}/etc/skel/.bashrc" + install -m644 "${ROOTDIR}/skelprof" "${ROOTDIR}/etc/skel/.bash_profile" + install -m644 "${ROOTDIR}/profile" "${ROOTDIR}/etc/profile" + install -m644 "${ROOTDIR}/shells" "${ROOTDIR}/etc/shells" + + install --directory --mode=0755 "${ROOTDIR}/etc/profile.d" + install --directory --mode=0755 "${ROOTDIR}/etc/bash_completion.d" + + install -m644 "${ROOTDIR}/bash_completion.sh" "${ROOTDIR}/etc/profile.d/bash_completion.sh" + install -m644 "${ROOTDIR}/i18n.sh" "${ROOTDIR}/etc/profile.d/i18n.sh" + install -m644 "${ROOTDIR}/readline.sh" "${ROOTDIR}/etc/profile.d/readline.sh" + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/bash/profile b/src/bash/profile new file mode 100644 index 0000000..4224032 --- /dev/null +++ b/src/bash/profile @@ -0,0 +1,41 @@ +pathremove () { + local IFS=':' + local NEWPATH + local DIR + local PATHVARIABLE=${2:-PATH} + for DIR in ${!PATHVARIABLE} ; do + if [ "$DIR" != "$1" ] ; then + NEWPATH=${NEWPATH:+$NEWPATH:}$DIR + fi + done + export $PATHVARIABLE="$NEWPATH" +} + +pathprepend () { + pathremove $1 $2 + local PATHVARIABLE=${2:-PATH} + export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}" +} + +pathappend () { + pathremove $1 $2 + local PATHVARIABLE=${2:-PATH} + export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1" +} + +export -f pathremove pathprepend pathappend +export PATH="/usr/bin:/usr/sbin:/usr/local/bin" + +export HISTSIZE=1000 +export HISTIGNORE="&:[bf]g:exit" + +export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/} +export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/} +export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER} + +for script in /etc/profile.d/*.sh ; do + if [ -r $script ] ; then + . $script + fi +done +unset script diff --git a/src/bash/readline.sh b/src/bash/readline.sh new file mode 100644 index 0000000..1359a40 --- /dev/null +++ b/src/bash/readline.sh @@ -0,0 +1,4 @@ +if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then + INPUTRC=/etc/inputrc +fi +export INPUTRC diff --git a/src/bash/shells b/src/bash/shells new file mode 100644 index 0000000..de0249b --- /dev/null +++ b/src/bash/shells @@ -0,0 +1,2 @@ +/bin/sh +/bin/bash diff --git a/src/bash/skelprof b/src/bash/skelprof new file mode 100644 index 0000000..55c957c --- /dev/null +++ b/src/bash/skelprof @@ -0,0 +1,2 @@ +# default ~/.bash_profile +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/src/bash/skelrc b/src/bash/skelrc new file mode 100644 index 0000000..7520858 --- /dev/null +++ b/src/bash/skelrc @@ -0,0 +1,16 @@ +# default ~/.bashrc +[[ $- != *i* ]] && return + +C_BOLD="\[\e[1m\]" +C_RESET="\[\e[0m\]" +C_GREEN="\[\e[1;32m\]" +C_RED="\[\e[1;31m\]" + +alias ls="ls --color" +alias grep="grep --color" + +if [[ $EUID == 0 ]] ; then + PS1="$C_BOLD\u$C_RESET$C_BOLD@\h:\w $C_RED>>> $C_RESET" +else + PS1="$C_BOLD\u$C_RESET$C_BOLD@\h:\w $C_GREEN>>> $C_RESET" +fi diff --git a/src/bzip2/.gitignore b/src/bzip2/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/bzip2/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/bzip2/bzip2-1.0.8-install_docs-1.patch b/src/bzip2/bzip2-1.0.8-install_docs-1.patch new file mode 100644 index 0000000..c3b0230 --- /dev/null +++ b/src/bzip2/bzip2-1.0.8-install_docs-1.patch @@ -0,0 +1,42 @@ +Submitted By: Matthew Burgess +Date: 2007-01-31 +Initial Package Version: 1.0.4 +Upstream Status: Not submitted +Origin: Randy McMurchy & Steve Crosby +Description: Installs pre-formatted documentation + +diff -Naur bzip2-1.0.4.orig/Makefile bzip2-1.0.4/Makefile +--- bzip2-1.0.4.orig/Makefile 2007-01-03 03:49:21.000000000 +0000 ++++ bzip2-1.0.4/Makefile 2007-01-26 20:00:01.000000000 +0000 +@@ -25,7 +25,7 @@ + + # Where you want it installed when you do 'make install' + PREFIX=/usr/local +- ++DOCDIR=share/doc/$(DISTNAME) + + OBJS= blocksort.o \ + huffman.o \ +@@ -74,6 +74,7 @@ + if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi + if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi + if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi ++ if ( test ! -d $(PREFIX)/$(DOCDIR) ) ; then mkdir -p $(PREFIX)/$(DOCDIR); fi + if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi + cp -f bzip2 $(PREFIX)/bin/bzip2 + cp -f bzip2 $(PREFIX)/bin/bunzip2 +@@ -107,6 +108,14 @@ + echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1 + echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1 + echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 ++ cp -f manual.html $(PREFIX)/$(DOCDIR) ++ cp -f manual.pdf $(PREFIX)/$(DOCDIR) ++ cp -f manual.ps $(PREFIX)/$(DOCDIR) ++ cp -f bzip2.txt $(PREFIX)/$(DOCDIR) ++ chmod a+r $(PREFIX)/$(DOCDIR)/manual.html ++ chmod a+r $(PREFIX)/$(DOCDIR)/manual.pdf ++ chmod a+r $(PREFIX)/$(DOCDIR)/manual.ps ++ chmod a+r $(PREFIX)/$(DOCDIR)/bzip2.txt + + clean: + rm -f *.o libbz2.a bzip2 bzip2recover \ diff --git a/src/bzip2/changes.md b/src/bzip2/changes.md new file mode 100644 index 0000000..34a2c79 --- /dev/null +++ b/src/bzip2/changes.md @@ -0,0 +1,2 @@ +# 1.0.8 +First version diff --git a/src/bzip2/pkg.sh b/src/bzip2/pkg.sh new file mode 100644 index 0000000..f359542 --- /dev/null +++ b/src/bzip2/pkg.sh @@ -0,0 +1,50 @@ +# general info +NAME="bzip2" +DESC="Freely available, patent free, high-quality data compressor" +VERSION="1.0.8" + +# required files +FILES=( + "https://www.sourceware.org/pub/bzip2/bzip2-${VERSION}.tar.gz" + "bzip2-${VERSION}-install_docs-1.patch" +) +HASHES=( + "67e051268d0c475ea773822f7500d0e5" + "6a5ac7e89b791aae556de0f745916f7f" +) + +# install and build depends +DEPENDS=("glibc" "bash") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + patch -Np1 -i "../bzip2-${VERSION}-install_docs-1.patch" + sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile + sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile + + make -f Makefile-libbz2_so CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS" + make bzip2 bzip2recover CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS" + + install -dm755 "${ROOTDIR}"/usr/{bin,lib,include,share/man/man1} + + install -m755 bzip2-shared "${ROOTDIR}"/usr/bin/bzip2 + install -m755 bzip2recover bzdiff bzgrep bzmore "${ROOTDIR}"/usr/bin + ln -sf bzip2 "${ROOTDIR}"/usr/bin/bunzip2 + ln -sf bzip2 "${ROOTDIR}"/usr/bin/bzcat + + cp -a libbz2.so* "${ROOTDIR}"/usr/lib + ln -s "libbz2.so.${VERSION}" "${ROOTDIR}"/usr/lib/libbz2.so + ln -s "libbz2.so.${VERSION}" "${ROOTDIR}"/usr/lib/libbz2.so.1 + + install -m644 bzlib.h "${ROOTDIR}"/usr/include/ + + install -m644 bzip2.1 "${ROOTDIR}"/usr/share/man/man1/ + ln -sf bzip2.1 "${ROOTDIR}"/usr/share/man/man1/bunzip2.1 + ln -sf bzip2.1 "${ROOTDIR}"/usr/share/man/man1/bzcat.1 + ln -sf bzip2.1 "${ROOTDIR}"/usr/share/man/man1/bzip2recover.1 + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/gcc-libs/.gitignore b/src/gcc-libs/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/gcc-libs/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/gcc-libs/changes.md b/src/gcc-libs/changes.md new file mode 100644 index 0000000..e0d492a --- /dev/null +++ b/src/gcc-libs/changes.md @@ -0,0 +1,2 @@ +# 14.1.0 +First version diff --git a/src/gcc-libs/pkg.sh b/src/gcc-libs/pkg.sh new file mode 100644 index 0000000..4c0b7dc --- /dev/null +++ b/src/gcc-libs/pkg.sh @@ -0,0 +1,45 @@ +# general info +NAME="gcc-libs" +DESC="Collection of compilers from the GNU Project (only libraries)" +VERSION="14.1.0" + +# required files +FILES=("https://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.xz") +HASHES=("e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840") + +# install and build depends +DEPENDS=("glibc") +BUILD=() + +build(){ + tar xf "gcc-${VERSION}.tar.xz" + cd "gcc-${VERSION}" + + sed -e '/m64=/s/lib64/lib/' \ + -i.orig gcc/config/i386/t-linux64 + + mkdir build && cd build + + ../configure --prefix=/usr \ + LD=ld \ + --enable-languages=c,c++ \ + --enable-default-pie \ + --enable-default-ssp \ + --disable-multilib \ + --disable-bootstrap \ + --disable-fixincludes \ + --with-system-zlib + + make && make DESTDIR="${ROOTDIR}" install + + # strip all the non-library stuff + rm -rf "${ROOTDIR}/usr/bin" + rm -rf "${ROOTDIR}/usr/libexec" + rm -rf "${ROOTDIR}/usr/include" + rm -rf "${ROOTDIR}/usr/lib/gcc" + rm -rf "${ROOTDIR}/usr/share/gcc-${VERSION}" + rm -rf "${ROOTDIR}/usr/share/gdb" + rm -rf "${ROOTDIR}/usr/share/info" + + cd ../.. && rm -r "gcc-${VERSION}" +} diff --git a/src/gcc/.gitignore b/src/gcc/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/gcc/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/gcc/changes.md b/src/gcc/changes.md new file mode 100644 index 0000000..e0d492a --- /dev/null +++ b/src/gcc/changes.md @@ -0,0 +1,2 @@ +# 14.1.0 +First version diff --git a/src/gcc/pkg.sh b/src/gcc/pkg.sh new file mode 100644 index 0000000..a579bb1 --- /dev/null +++ b/src/gcc/pkg.sh @@ -0,0 +1,52 @@ +# general info +NAME="gcc" +DESC="Collection of compilers from the GNU Project" +VERSION="14.1.0" + +# required files +FILES=("https://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.xz") +HASHES=("e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840") + +# install and build depends +DEPENDS=("gcc-libs" "binutils" "mpc" "zstd") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.xz" + cd "${NAME}-${VERSION}" + + sed -e '/m64=/s/lib64/lib/' \ + -i.orig gcc/config/i386/t-linux64 + + mkdir build && cd build + + ../configure --prefix=/usr \ + LD=ld \ + --enable-languages=c,c++ \ + --enable-default-pie \ + --enable-default-ssp \ + --disable-multilib \ + --disable-bootstrap \ + --disable-fixincludes \ + --with-system-zlib + + make && make DESTDIR="${ROOTDIR}" install + + ln -svr "${ROOTDIR}/usr/bin/cpp" "${ROOTDIR}/usr/lib" + ln -sv gcc.1 "${ROOTDIR}/usr/share/man/man1/cc.1" + + mkdir -pv "${ROOTDIR}/usr/lib/bfd-plugins" + ln -sfv "../../libexec/gcc/$(gcc -dumpmachine)/${VERSION}/liblto_plugin.so" \ + "${ROOTDIR}/usr/lib/bfd-plugins/" + + mkdir -pv "${ROOTDIR}/usr/share/gdb/auto-load/usr/lib" + mv -v "${ROOTDIR}/usr/lib/"*gdb.py "${ROOTDIR}/usr/share/gdb/auto-load/usr/lib" + + # these are part of the gcc-libs + rm "${ROOTDIR}/usr/lib/"*.so* + rm "${ROOTDIR}/usr/lib/"*.la* + rm "${ROOTDIR}/usr/lib/"*.a* + rm -r "${ROOTDIR}/usr/share/locale" + + cd ../.. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/glibc/.gitignore b/src/glibc/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/glibc/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/glibc/changes.md b/src/glibc/changes.md new file mode 100644 index 0000000..5cf351c --- /dev/null +++ b/src/glibc/changes.md @@ -0,0 +1,2 @@ +# 2.39 +First version diff --git a/src/glibc/glibc-2.39-fhs-1.patch b/src/glibc/glibc-2.39-fhs-1.patch new file mode 100644 index 0000000..4ac8d10 --- /dev/null +++ b/src/glibc/glibc-2.39-fhs-1.patch @@ -0,0 +1,72 @@ +Submitted By: Armin K. +Date: 2013-02-11 +Initial Package Version: 2.17 +Upstream Status: Not Applicable +Origin: Self +Description: This patch removes references to /var/db directory which is not part + of FHS and replaces them with more suitable directories in /var + hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db. + +--- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100 ++++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100 +@@ -250,7 +250,7 @@ + + # Directory for the database files and Makefile for nss_db. + ifndef vardbdir +-vardbdir = $(localstatedir)/db ++vardbdir = $(localstatedir)/lib/nss_db + endif + inst_vardbdir = $(install_root)$(vardbdir) + +--- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100 ++++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100 +@@ -112,11 +112,11 @@ + + + /* Paths of the file for the persistent storage. */ +-#define _PATH_NSCD_PASSWD_DB "/var/db/nscd/passwd" +-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group" +-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts" +-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services" +-#define _PATH_NSCD_NETGROUP_DB "/var/db/nscd/netgroup" ++#define _PATH_NSCD_PASSWD_DB "/var/cache/nscd/passwd" ++#define _PATH_NSCD_GROUP_DB "/var/cache/nscd/group" ++#define _PATH_NSCD_HOSTS_DB "/var/cache/nscd/hosts" ++#define _PATH_NSCD_SERVICES_DB "/var/cache/nscd/services" ++#define _PATH_NSCD_NETGROUP_DB "/var/cache/nscd/netgroup" + + /* Path used when not using persistent storage. */ + #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX" +--- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100 ++++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100 +@@ -22,7 +22,7 @@ + /etc/rpc /etc/services /etc/shadow /etc/gshadow \ + /etc/netgroup) + +-VAR_DB = /var/db ++VAR_DB = /var/lib/nss_db + + AWK = awk + MAKEDB = makedb --quiet +--- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100 ++++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100 +@@ -68,7 +68,7 @@ + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/nss_db/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + +--- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100 ++++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100 +@@ -68,7 +68,7 @@ + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/nss_db/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + diff --git a/src/glibc/ld.so.conf b/src/glibc/ld.so.conf new file mode 100644 index 0000000..1849f06 --- /dev/null +++ b/src/glibc/ld.so.conf @@ -0,0 +1,2 @@ +/usr/local/lib +/opt/lib diff --git a/src/glibc/locale-gen b/src/glibc/locale-gen new file mode 100644 index 0000000..ee88880 --- /dev/null +++ b/src/glibc/locale-gen @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +LOCALEGEN=/etc/locale.gen +LOCALES=/usr/share/i18n/locales +if [ -n "$POSIXLY_CORRECT" ]; then + unset POSIXLY_CORRECT +fi + + +[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0; + +# Remove all old locale dir and locale-archive before generating new +# locale data. +rm -rf /usr/lib/locale/locale-archive || true + +umask 022 + +is_entry_ok() { + if [ -n "$locale" -a -n "$charset" ] ; then + true + else + echo "error: Bad entry '$locale $charset'" + false + fi +} + +echo "Generating locales..." +while read locale charset; do \ + case $locale in \#*) continue;; "") continue;; esac; \ + is_entry_ok || continue + echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \ + echo -n ".$charset"; \ + echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \ + echo -n '...'; \ + if [ -f $LOCALES/$locale ]; then input=$locale; else \ + input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \ + localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \ + echo ' done'; \ +done < $LOCALEGEN +echo "Generation complete." diff --git a/src/glibc/nsswitch.conf b/src/glibc/nsswitch.conf new file mode 100644 index 0000000..23cd111 --- /dev/null +++ b/src/glibc/nsswitch.conf @@ -0,0 +1,11 @@ +passwd: files +group: files +shadow: files + +hosts: files dns +networks: files + +protocols: files +services: files +ethers: files +rpc: files diff --git a/src/glibc/pkg.sh b/src/glibc/pkg.sh new file mode 100644 index 0000000..ec02443 --- /dev/null +++ b/src/glibc/pkg.sh @@ -0,0 +1,58 @@ +# general info +NAME="glibc" +DESC="The GNU C libary" +VERSION="2.39" + +# required files +FILES=( + "https://ftp.gnu.org/gnu/glibc/glibc-${VERSION}.tar.xz" + "glibc-${VERSION}-fhs-1.patch" + "nsswitch.conf" + "ld.so.conf" + "locale-gen" +) +HASHES=( + "be81e87f72b5ea2c0ffe2bedfeb680c6" + "9a5997c3452909b1769918c759eff8a2" + "23479afd5155e1220866a8ae79bd408739642559c8fd463694dffea1cfa7ad68" + "c324c0577dde4e26c5469bbca0681c111b60c7b693c70ad40be96e36dbe84f04" + "8c5cc09018cbd65e8570430f872e118caa2644e311d6200b7d5f0cba837fbba4" +) + +# install and build depends +DEPENDS=("tzdata") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.xz" + cd "${NAME}-${VERSION}" + + patch -Np1 -i "../glibc-${VERSION}-fhs-1.patch" + + mkdir build && cd build + + echo "rootsbindir=/usr/sbin" > configparms + ../configure --prefix=/usr \ + --disable-werror \ + --enable-kernel=4.14 \ + --enable-stack-protector=strong \ + --with-headers=/usr/include \ + libc_cv_slibdir=/usr/lib && make + + mkdir "${ROOTDIR}/etc" + touch "${ROOTDIR}/etc/ld.so.conf" + + sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile + make DESTDIR="${ROOTDIR}" install + sed '/RTLDLIST=/s@/usr@@g' -i "${ROOTDIR}/usr/bin/ldd" + + cp ../nscd/nscd.conf "${ROOTDIR}/etc/nscd.conf" + mkdir -p "${ROOTDIR}/var/cache/nscd" + + make DESTDIR="${ROOTDIR}" localedata/install-locale + + install -m644 "${ROOTDIR}/nsswitch.conf" "${ROOTDIR}/etc/nsswitch.conf" + install -m644 "${ROOTDIR}/ld.so.conf" "${ROOTDIR}/etc/ld.so.conf" + + cd ../.. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/gmp/.gitignore b/src/gmp/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/gmp/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/gmp/changes.md b/src/gmp/changes.md new file mode 100644 index 0000000..72ab517 --- /dev/null +++ b/src/gmp/changes.md @@ -0,0 +1,2 @@ +# 6.3.0 +First version diff --git a/src/gmp/pkg.sh b/src/gmp/pkg.sh new file mode 100644 index 0000000..30a3625 --- /dev/null +++ b/src/gmp/pkg.sh @@ -0,0 +1,29 @@ +# general info +NAME="gmp" +DESC="The GNU multiple precision arithmetic library" +VERSION="6.3.0" + +# required files +FILES=("https://ftp.gnu.org/gnu/gmp/gmp-${VERSION}.tar.xz") +HASHES=("956dc04e864001a9c22429f761f2c283") + +# install and build depends +DEPENDS=("glibc" "gcc-libs") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.xz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --enable-cxx \ + --disable-static \ + --docdir="/usr/share/doc/gmp-${VERSION}" + + make && make html + + make DESTDIR="${ROOTDIR}" install + make DESTDIR="${ROOTDIR}" install-html + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/grep/.cache/last b/src/grep/.cache/last new file mode 100644 index 0000000..a50041e --- /dev/null +++ b/src/grep/.cache/last @@ -0,0 +1,2 @@ +887a9e7065789d9d1b4dcd6c4f733779 +f1d5924af55a63998ee131fd1f8d1132 diff --git a/src/grep/changes.md b/src/grep/changes.md new file mode 100644 index 0000000..bfde908 --- /dev/null +++ b/src/grep/changes.md @@ -0,0 +1,2 @@ +# 3.11 +No changes specified diff --git a/src/grep/pkg.sh b/src/grep/pkg.sh new file mode 100644 index 0000000..87b58ae --- /dev/null +++ b/src/grep/pkg.sh @@ -0,0 +1,23 @@ +# general info +NAME="grep" +DESC="Programs for searching through the contents of files" +VERSION="3.11" + +# required files +FILES=("https://ftp.gnu.org/gnu/grep/grep-${VERSION}.tar.xz") +HASHES=("7c9bbd74492131245f7cdb291fa142c0") + +# install and build depends +DEPENDS=("glibc" "pcre2") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.xz" + cd "${NAME}-${VERSION}" + + sed -i "s/echo/#echo/" src/egrep.sh + ./configure --prefix=/usr && make + make DESTDIR="${ROOTDIR}" install + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/mpc/.gitignore b/src/mpc/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/mpc/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/mpc/changes.md b/src/mpc/changes.md new file mode 100644 index 0000000..b1840bc --- /dev/null +++ b/src/mpc/changes.md @@ -0,0 +1,2 @@ +# 1.3.1 +First version diff --git a/src/mpc/pkg.sh b/src/mpc/pkg.sh new file mode 100644 index 0000000..52360ef --- /dev/null +++ b/src/mpc/pkg.sh @@ -0,0 +1,28 @@ +# general info +NAME="mpc" +DESC="A library for the arithmetic of complex numbers" +VERSION="1.3.1" + +# required files +FILES=("https://ftp.gnu.org/gnu/mpc/mpc-${VERSION}.tar.gz") +HASHES=("5c9bc658c9fd0f940e8e3e0f09530c62") + +# install and build depends +DEPENDS=("mpfr") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --disable-static \ + --docdir="/usr/share/doc/mpc-${VERSION}" + + make && make html + + make DESTDIR="${ROOTDIR}" install + make DESTDIR="${ROOTDIR}" install-html + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/mpfr/.gitignore b/src/mpfr/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/mpfr/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/mpfr/changes.md b/src/mpfr/changes.md new file mode 100644 index 0000000..966a67b --- /dev/null +++ b/src/mpfr/changes.md @@ -0,0 +1,2 @@ +# 4.2.1 +First version diff --git a/src/mpfr/pkg.sh b/src/mpfr/pkg.sh new file mode 100644 index 0000000..82ff61f --- /dev/null +++ b/src/mpfr/pkg.sh @@ -0,0 +1,29 @@ +# general info +NAME="mpfr" +DESC="Functions for multiple precision math" +VERSION="4.2.1" + +# required files +FILES=("https://ftp.gnu.org/gnu/mpfr/mpfr-${VERSION}.tar.xz") +HASHES=("277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2") + +# install and build depends +DEPENDS=("glibc" "gmp") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.xz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --disable-static \ + --enable-thread-safe \ + --docdir="/usr/share/doc/mpfr-${VERSION}" + + make && make html + + make DESTDIR="${ROOTDIR}" install + make DESTDIR="${ROOTDIR}" install-html + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/ncurses/.gitignore b/src/ncurses/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/ncurses/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/ncurses/changes.md b/src/ncurses/changes.md new file mode 100644 index 0000000..a4d7e34 --- /dev/null +++ b/src/ncurses/changes.md @@ -0,0 +1,2 @@ +# 6.5 +First version diff --git a/src/ncurses/pkg.sh b/src/ncurses/pkg.sh new file mode 100644 index 0000000..439220e --- /dev/null +++ b/src/ncurses/pkg.sh @@ -0,0 +1,46 @@ +# general info +NAME="ncurses" +DESC="Libraries for terminal-independent handling of character screens" +VERSION="6.5" + +# required files +FILES=("https://invisible-mirror.net/archives/ncurses/ncurses-${VERSION}.tar.gz") +HASHES=("136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6") + +# install and build depends +DEPENDS=("glibc" "gcc-libs") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --with-cxx-shared \ + --enable-pc-files \ + --enable-widec \ + --with-pkg-config-libdir=/usr/lib/pkgconfig + + make && make DESTDIR="${PWD}/dest" install + + mkdir -p "${ROOTDIR}/usr/lib" + mkdir -p "${ROOTDIR}/usr/share/doc" + + install -vm755 "dest/usr/lib/libncursesw.so.${VERSION}" "${ROOTDIR}/usr/lib" + rm -v "dest/usr/lib/libncursesw.so.${VERSION}" + cp -av dest/* "${ROOTDIR}/" + + for lib in ncurses form panel menu ; do + rm -vf "${ROOTDIR}/usr/lib/lib${lib}.so" + echo "INPUT(-l${lib}w)" > "${ROOTDIR}/usr/lib/lib${lib}.so" + ln -sfv1 "${lib}w.pc" "${ROOTDIR}/usr/lib/pkgconfig/${lib}.pc" + done + + cp -v -R doc -T "${ROOTDIR}/usr/share/doc/ncurses-${VERSION}" + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/pcre2/.gitignore b/src/pcre2/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/pcre2/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/pcre2/changes.md b/src/pcre2/changes.md new file mode 100644 index 0000000..0a6b41d --- /dev/null +++ b/src/pcre2/changes.md @@ -0,0 +1,2 @@ +# 10.44 +First version diff --git a/src/pcre2/pkg.sh b/src/pcre2/pkg.sh new file mode 100644 index 0000000..560bf15 --- /dev/null +++ b/src/pcre2/pkg.sh @@ -0,0 +1,31 @@ +# general info +NAME="pcre2" +DESC="Perl-Compatible regular expressions" +VERSION="10.44" + +# required files +FILES=("https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${VERSION}/pcre2-${VERSION}.tar.bz2") +HASHES=("d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96") + +# install and build depends +DEPENDS=("glibc" "bzip2" "readline" "zlib" "bash") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.bz2" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --docdir="/usr/share/doc/pcre2-${VERSION}" \ + --enable-unicode \ + --enable-jit \ + --enable-pcre2-16 \ + --enable-pcre2-32 \ + --enable-pcre2grep-libz \ + --enable-pcre2grep-libbz2 \ + --enable-pcre2test-libreadline \ + --disable-static + make && make DESTDIR="${ROOTDIR}" install + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/readline/.gitignore b/src/readline/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/readline/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/readline/changes.md b/src/readline/changes.md new file mode 100644 index 0000000..91f3441 --- /dev/null +++ b/src/readline/changes.md @@ -0,0 +1,2 @@ +# 8.2 +First version diff --git a/src/readline/pkg.sh b/src/readline/pkg.sh new file mode 100644 index 0000000..4a0cb82 --- /dev/null +++ b/src/readline/pkg.sh @@ -0,0 +1,39 @@ +# general info +NAME="readline" +DESC="Set of libraries that offer command-line editing and history capabilities" +VERSION="8.2" + +# required files +FILES=( + "https://ftp.gnu.org/gnu/readline/readline-${VERSION}.tar.gz" + "readline-${VERSION}-upstream_fixes-3.patch" +) +HASHES=( + "4aa1b31be779e6b84f9a96cb66bc50f6" + "9ed497b6cb8adcb8dbda9dee9ebce791" +) + +# install and build depends +DEPENDS=("glibc" "ncurses") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + sed -i '/MV.*old/d' Makefile.in + sed -i '/{OLDSUFF}/c:' support/shlib-install + patch -Np1 -i "../readline-${VERSION}-upstream_fix-1.patch" + + ./configure --prefix=/usr \ + --disable-static \ + --with-curses \ + --docdir="/usr/share/doc/readline-${VERSION}" + + make SHLIB_LIBS="-lncursesw" + make DESTDIR="${ROOTDIR}" SHLIB_LIBS="-lncursesw" install + + install -v -m644 doc/*.{ps,pdf,html,dvi} "${ROOTDIR}/usr/share/doc/readline-${VERSION}" + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/readline/readline-8.2-upstream_fixes-3.patch b/src/readline/readline-8.2-upstream_fixes-3.patch new file mode 100644 index 0000000..4b7e403 --- /dev/null +++ b/src/readline/readline-8.2-upstream_fixes-3.patch @@ -0,0 +1,389 @@ +Submitted By: Xi Ruoyao +Date: 2024-01-24 +Initial Package Version: 8.2 +Upstream Status: Applied +Origin: Upstream release repository + Upstream patches 001-010 + https://ftp.gnu.org/gnu/readline/readline-8.2-patches/ + +diff -Naur readline-8.2/callback.c readline-8.2-new/callback.c +--- readline-8.2/callback.c 2022-04-29 11:02:56.000000000 -0500 ++++ readline-8.2-new/callback.c 2023-11-29 22:42:24.756589994 -0600 +@@ -115,7 +115,10 @@ + #define CALLBACK_READ_RETURN() \ + do { \ + if (rl_persistent_signal_handlers == 0) \ +- rl_clear_signals (); \ ++ { \ ++ rl_clear_signals (); \ ++ if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ ++ } \ + return; \ + } while (0) + #else +diff -Naur readline-8.2/colors.c readline-8.2-new/colors.c +--- readline-8.2/colors.c 2021-12-08 10:38:25.000000000 -0600 ++++ readline-8.2-new/colors.c 2023-11-29 22:42:10.917236651 -0600 +@@ -73,7 +73,7 @@ + static bool is_colored (enum indicator_no type); + static void restore_default_color (void); + +-#define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix" ++#define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix" + + COLOR_EXT_TYPE *_rl_color_ext_list = 0; + +diff -Naur readline-8.2/display.c readline-8.2-new/display.c +--- readline-8.2/display.c 2022-04-05 09:47:31.000000000 -0500 ++++ readline-8.2-new/display.c 2023-11-29 22:42:52.933309382 -0600 +@@ -2683,11 +2683,8 @@ + register char *temp; + + if (visible_line) +- { +- temp = visible_line; +- while (*temp) +- *temp++ = '\0'; +- } ++ memset (visible_line, 0, line_size); ++ + rl_on_new_line (); + forced_display++; + (*rl_redisplay_function) (); +@@ -3341,9 +3338,9 @@ + puts_face (&last_line[_rl_screenwidth - 1 + woff], + &last_face[_rl_screenwidth - 1 + woff], 1); + } +- _rl_vis_botlin = 0; +- if (botline_length > 0 || _rl_last_c_pos > 0) ++ if ((_rl_vis_botlin == 0 && botline_length == 0) || botline_length > 0 || _rl_last_c_pos > 0) + rl_crlf (); ++ _rl_vis_botlin = 0; + fflush (rl_outstream); + rl_display_fixed++; + } +diff -Naur readline-8.2/input.c readline-8.2-new/input.c +--- readline-8.2/input.c 2022-04-08 14:43:24.000000000 -0500 ++++ readline-8.2-new/input.c 2023-11-29 22:42:35.253858003 -0600 +@@ -151,7 +151,9 @@ + + int _rl_timeout_init (void); + int _rl_timeout_sigalrm_handler (void); ++#if defined (RL_TIMEOUT_USE_SELECT) + int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *); ++#endif + + static void _rl_timeout_handle (void); + #if defined (RL_TIMEOUT_USE_SIGALRM) +@@ -248,7 +250,7 @@ + register int tem, result; + int chars_avail, k; + char input; +-#if defined(HAVE_SELECT) ++#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + fd_set readfds, exceptfds; + struct timeval timeout; + #endif +@@ -802,10 +804,10 @@ + int + rl_getc (FILE *stream) + { +- int result; ++ int result, ostate, osig; + unsigned char c; + int fd; +-#if defined (HAVE_PSELECT) ++#if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + sigset_t empty_set; + fd_set readfds; + #endif +@@ -813,8 +815,22 @@ + fd = fileno (stream); + while (1) + { ++ osig = _rl_caught_signal; ++ ostate = rl_readline_state; ++ + RL_CHECK_SIGNALS (); + ++#if defined (READLINE_CALLBACKS) ++ /* Do signal handling post-processing here, but just in callback mode ++ for right now because the signal cleanup can change some of the ++ callback state, and we need to either let the application have a ++ chance to react or abort some current operation that gets cleaned ++ up by rl_callback_sigcleanup(). If not, we'll just run through the ++ loop again. */ ++ if (osig != 0 && (ostate & RL_STATE_CALLBACK)) ++ goto postproc_signal; ++#endif ++ + /* We know at this point that _rl_caught_signal == 0 */ + + #if defined (__MINGW32__) +@@ -878,6 +894,9 @@ + /* fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); */ + + handle_error: ++ osig = _rl_caught_signal; ++ ostate = rl_readline_state; ++ + /* If the error that we received was EINTR, then try again, + this is simply an interrupted system call to read (). We allow + the read to be interrupted if we caught SIGHUP, SIGTERM, or any +@@ -918,8 +937,17 @@ + RL_CHECK_SIGNALS (); + #endif /* SIGALRM */ + ++postproc_signal: ++ /* POSIX says read(2)/pselect(2)/select(2) don't return EINTR for any ++ reason other than being interrupted by a signal, so we can safely ++ call the application's signal event hook. */ + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); ++#if defined (READLINE_CALLBACKS) ++ else if (osig == SIGINT && (ostate & RL_STATE_CALLBACK) && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG))) ++ /* just these cases for now */ ++ _rl_abort_internal (); ++#endif + } + } + +diff -Naur readline-8.2/nls.c readline-8.2-new/nls.c +--- readline-8.2/nls.c 2022-08-15 08:38:51.000000000 -0500 ++++ readline-8.2-new/nls.c 2023-11-29 22:42:00.068959677 -0600 +@@ -141,6 +141,10 @@ + if (lspec == 0) + lspec = ""; + ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */ ++ if (ret == 0 || *ret == 0) ++ ret = setlocale (LC_CTYPE, (char *)NULL); ++ if (ret == 0 || *ret == 0) ++ ret = RL_DEFAULT_LOCALE; + #else + ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec; + #endif +diff -Naur readline-8.2/patchlevel readline-8.2-new/patchlevel +--- readline-8.2/patchlevel 2020-05-21 13:22:40.000000000 -0500 ++++ readline-8.2-new/patchlevel 2023-11-29 22:42:52.933309382 -0600 +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-0 ++7 + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-008 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +Add missing prototypes for several function declarations. + +Patch (apply with `patch -p0'): + +*** readline-8.2-patched/text.c Wed Oct 27 11:03:59 2021 +--- readline/text.c Thu Nov 16 16:24:58 2023 +*************** +*** 1765,1770 **** + #if defined (READLINE_CALLBACKS) + static int +! _rl_char_search_callback (data) +! _rl_callback_generic_arg *data; + { + _rl_callback_func = 0; +--- 1765,1769 ---- + #if defined (READLINE_CALLBACKS) + static int +! _rl_char_search_callback (_rl_callback_generic_arg *data) + { + _rl_callback_func = 0; +*** readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022 +--- readline/bind.c Thu Nov 16 16:25:17 2023 +*************** +*** 1168,1174 **** + + static int +! parse_comparison_op (s, indp) +! const char *s; +! int *indp; + { + int i, peekc, op; +--- 1168,1172 ---- + + static int +! parse_comparison_op (const char *s, int *indp) + { + int i, peekc, op; +*** readline-8.2-patched/rltty.c Fri Feb 18 11:14:22 2022 +--- readline/rltty.c Thu Nov 16 16:25:36 2023 +*************** +*** 81,86 **** + to get the tty settings. */ + static void +! set_winsize (tty) +! int tty; + { + #if defined (TIOCGWINSZ) +--- 81,85 ---- + to get the tty settings. */ + static void +! set_winsize (int tty) + { + #if defined (TIOCGWINSZ) + +*** readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- readline/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 7 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 8 + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-009 + +Bug-Reported-by: Stefan H. Holek +Bug-Reference-ID: <50F8DA45-B7F3-4DE1-AB94-19AE42649CDC@epy.co.at> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00021.html + +Bug-Description: + +Fix issue where the directory name portion of the word to be completed (the +part that is passed to opendir()) requires both tilde expansion and dequoting. +Readline only performed tilde expansion in this case, so filename completion +would fail. + +Patch (apply with `patch -p0'): + +*** readline-8.2-patched/complete.c 2022-04-05 10:47:06.000000000 -0400 +--- readline/complete.c 2022-10-26 15:08:51.000000000 -0400 +*************** +*** 2527,2531 **** + xfree (dirname); + dirname = temp; +! tilde_dirname = 1; + } + +--- 2527,2532 ---- + xfree (dirname); + dirname = temp; +! if (*dirname != '~') +! tilde_dirname = 1; /* indicate successful tilde expansion */ + } + +*************** +*** 2546,2554 **** + users_dirname = savestring (dirname); + } +! else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function) + { +! /* delete single and double quotes */ + xfree (dirname); +! dirname = savestring (users_dirname); + } + directory = opendir (dirname); +--- 2547,2560 ---- + users_dirname = savestring (dirname); + } +! else if (rl_completion_found_quote && rl_filename_dequoting_function) + { +! /* We already ran users_dirname through the dequoting function. +! If tilde_dirname == 1, we successfully performed tilde expansion +! on dirname. Now we need to reconcile those results. We either +! just copy the already-dequoted users_dirname or tilde expand it +! if we tilde-expanded dirname. */ +! temp = tilde_dirname ? tilde_expand (users_dirname) : savestring (users_dirname); + xfree (dirname); +! dirname = temp; + } + directory = opendir (dirname); + +*** readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- readline/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 8 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 9 + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-010 + +Bug-Reported-by: Martin Castillo +Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html + +Bug-Description: + +Fix the case where text to be completed from the line buffer (quoted) is +compared to the common prefix of the possible matches (unquoted) and the +quoting makes the former appear to be longer than the latter. Readline +assumes the match doesn't add any characters to the word and doesn't display +multiple matches. + +Patch (apply with `patch -p0'): + +*** readline-8.2-patched/complete.c Tue Apr 5 10:47:06 2022 +--- readline/complete.c Sat Jan 7 14:19:45 2023 +*************** +*** 2032,2038 **** + text = rl_copy_text (start, end); + matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); + /* nontrivial_lcd is set if the common prefix adds something to the word + being completed. */ +! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0; + if (what_to_do == '!' || what_to_do == '@') + tlen = strlen (text); +--- 2038,2060 ---- + text = rl_copy_text (start, end); + matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); ++ /* If TEXT contains quote characters, it will be dequoted as part of ++ generating the matches, and the matches will not contain any quote ++ characters. We need to dequote TEXT before performing the comparison. ++ Since compare_match performs the dequoting, and we only want to do it ++ once, we don't call compare_matches after dequoting TEXT; we call ++ strcmp directly. */ + /* nontrivial_lcd is set if the common prefix adds something to the word + being completed. */ +! if (rl_filename_completion_desired && rl_filename_quoting_desired && +! rl_completion_found_quote && rl_filename_dequoting_function) +! { +! char *t; +! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character); +! xfree (text); +! text = t; +! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; +! } +! else +! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; + if (what_to_do == '!' || what_to_do == '@') + tlen = strlen (text); + +*** readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- readline/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 9 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 10 diff --git a/src/tzdata/.gitignore b/src/tzdata/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/tzdata/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/tzdata/changes.md b/src/tzdata/changes.md new file mode 100644 index 0000000..c18da05 --- /dev/null +++ b/src/tzdata/changes.md @@ -0,0 +1,2 @@ +# 2024a +First version diff --git a/src/tzdata/pkg.sh b/src/tzdata/pkg.sh new file mode 100644 index 0000000..75c1497 --- /dev/null +++ b/src/tzdata/pkg.sh @@ -0,0 +1,36 @@ +# general info +NAME="tzdata" +DESC="Time zone database" +VERSION="2024a" + +# required files +FILES=("https://www.iana.org/time-zones/repository/releases/tzdata${VERSION}.tar.gz") +HASHES=("2349edd8335245525cc082f2755d5bf4") + +# install and build depends +DEPENDS=() +BUILD=() + +build(){ + mkdir -p tzdata && cd tzdata + mv "../tzdata${VERSION}.tar.gz" . + + tar xf "tzdata${VERSION}.tar.gz" + + ZONEINFO="${ROOTDIR}/usr/share/zoneinfo" + mkdir -p "${ZONEINFO}/"{posix,right} + + for tz in etcetera southamerica northamerica \ + europe africa antarctica \ + asia australasia backward; do + zic -L /dev/null -d "${ZONEINFO}" "${tz}" + zic -L /dev/null -d "${ZONEINFO}/posix" "${tz}" + zic -L leapseconds -d "${ZONEINFO}/right" "${tz}" + done + + cp zone.tab zone1970.tab iso3166.tab "${ZONEINFO}" + zic -d "${ZONEINFO}" -p America/New_York + unset ZONEINFO + + cd .. && rm -rf tzdata +} diff --git a/src/which/.gitignore b/src/which/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/which/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/which/changes.md b/src/which/changes.md new file mode 100644 index 0000000..d6a0a62 --- /dev/null +++ b/src/which/changes.md @@ -0,0 +1,2 @@ +# 2.21 +First version diff --git a/src/which/pkg.sh b/src/which/pkg.sh new file mode 100644 index 0000000..a811edf --- /dev/null +++ b/src/which/pkg.sh @@ -0,0 +1,26 @@ +# general info +NAME="which" +DESC="Shows the full path of (shell) commands" +VERSION="2.21" + +# required files +FILES=("https://ftp.gnu.org/gnu/which/which-${VERSION}.tar.gz") +HASHES=("097ff1a324ae02e0a3b0369f07a7544a") + +# install and build depends +DEPENDS=("glibc" "bash") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr && make + make DESTDIR="${ROOTDIR}" install + + cd .. && rm -r "${NAME}-${VERSION}" +} + +install(){ + echo "Testing the install script" +} diff --git a/src/xz/.gitignore b/src/xz/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/xz/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/xz/changes.md b/src/xz/changes.md new file mode 100644 index 0000000..a21a1b4 --- /dev/null +++ b/src/xz/changes.md @@ -0,0 +1,2 @@ +# 5.6.2 +First version diff --git a/src/xz/pkg.sh b/src/xz/pkg.sh new file mode 100644 index 0000000..59fc04d --- /dev/null +++ b/src/xz/pkg.sh @@ -0,0 +1,25 @@ +# general info +NAME="xz" +DESC="Complete C99 implementation of the .xz file format" +VERSION="5.6.2" + +# required files +FILES=("https://github.com/tukaani-project/xz/archive/refs/tags/v${VERSION}.tar.gz") +HASHES=("92a439948bba24c2bc25bb67a087a19194905209c56b5e600bc94fd2a472e687") + +# install and build depends +DEPENDS=() +BUILD=() + +build(){ + tar xf "v${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --disable-static \ + --docdir="/usr/share/doc/xz-${VERSION}" + + make && make DESTDIR="${ROOTDIR}" install + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/zlib/.gitignore b/src/zlib/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/zlib/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/zlib/changes.md b/src/zlib/changes.md new file mode 100644 index 0000000..b1840bc --- /dev/null +++ b/src/zlib/changes.md @@ -0,0 +1,2 @@ +# 1.3.1 +First version diff --git a/src/zlib/pkg.sh b/src/zlib/pkg.sh new file mode 100644 index 0000000..757c8f9 --- /dev/null +++ b/src/zlib/pkg.sh @@ -0,0 +1,23 @@ +# general info +NAME="zlib" +DESC="Free, general-purpose, legally unencumbered lossless data-compression library" +VERSION="1.3.1" + +# required files +FILES=("https://zlib.net/fossils/zlib-${VERSION}.tar.gz") +HASHES=("9855b6d802d7fe5b7bd5b196a2271655") + +# install and build depends +DEPENDS=("glibc") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr + make && make DESTDIR="${ROOTDIR}" install + rm -f "${ROOTDIR}/usr/lib/libz.a" + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/zstd/.gitignore b/src/zstd/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/zstd/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/zstd/changes.md b/src/zstd/changes.md new file mode 100644 index 0000000..d1acbfd --- /dev/null +++ b/src/zstd/changes.md @@ -0,0 +1,2 @@ +# 1.5.6 +First version diff --git a/src/zstd/pkg.sh b/src/zstd/pkg.sh new file mode 100644 index 0000000..b443722 --- /dev/null +++ b/src/zstd/pkg.sh @@ -0,0 +1,23 @@ +# general info +NAME="zstd" +DESC="A real-time compression algorithm, providing high compression ratios" +VERSION="1.5.6" + +# required files +FILES=("https://github.com/facebook/zstd/releases/download/v${VERSION}/zstd-${VERSION}.tar.gz") +HASHES=("8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1") + +# install and build depends +DEPENDS=("gcc-libs" "glibc" "xz" "zlib") +BUILD=() + +build(){ + tar xf "${NAME}-${VERSION}.tar.gz" + cd "${NAME}-${VERSION}" + + make prefix=/usr + make DESTDIR="${ROOTDIR}" prefix=/usr install + rm "${ROOTDIR}/usr/lib/libzstd.a" + + cd .. && rm -r "${NAME}-${VERSION}" +}