diff options
author | davidovski <david@davidovski.xyz> | 2022-06-27 23:09:07 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-06-27 23:09:07 +0100 |
commit | f6332a43c35387c4a2dea1746be5fd092890ae0e (patch) | |
tree | d6599f63de04096f3fc21a98e0b3bb39d55a3531 /repo/tcsh | |
parent | f13e0cac13f90f7f57bce3b26b2e6383de6e4ad2 (diff) |
added lf and iptables
Diffstat (limited to 'repo/tcsh')
-rw-r--r-- | repo/tcsh/001-sysmalloc.patch | 15 | ||||
-rw-r--r-- | repo/tcsh/6974bc35a5cda6eab748e364bd76a860ca66968b.patch | 22 | ||||
-rw-r--r-- | repo/tcsh/csh.cshrc | 96 | ||||
-rw-r--r-- | repo/tcsh/csh.login | 71 | ||||
-rw-r--r-- | repo/tcsh/tcsh.post-install | 4 | ||||
-rw-r--r-- | repo/tcsh/tcsh.post-upgrade | 4 | ||||
-rw-r--r-- | repo/tcsh/tcsh.pre-deinstall | 4 | ||||
-rw-r--r-- | repo/tcsh/tcsh.xibuild | 52 |
8 files changed, 268 insertions, 0 deletions
diff --git a/repo/tcsh/001-sysmalloc.patch b/repo/tcsh/001-sysmalloc.patch new file mode 100644 index 0000000..b22c018 --- /dev/null +++ b/repo/tcsh/001-sysmalloc.patch @@ -0,0 +1,15 @@ +--- a/config_f.h ++++ b/config_f.h +@@ -139,11 +139,8 @@ + * This can be much slower and no memory statistics will be + * provided. + */ +-#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__) ++ + # define SYSMALLOC +-#else +-# undef SYSMALLOC +-#endif + + /* + * USE_ACCESS Use access(2) rather than stat(2) when POSIX is defined. diff --git a/repo/tcsh/6974bc35a5cda6eab748e364bd76a860ca66968b.patch b/repo/tcsh/6974bc35a5cda6eab748e364bd76a860ca66968b.patch new file mode 100644 index 0000000..b5a0cf0 --- /dev/null +++ b/repo/tcsh/6974bc35a5cda6eab748e364bd76a860ca66968b.patch @@ -0,0 +1,22 @@ +From 6974bc35a5cda6eab748e364bd76a860ca66968b Mon Sep 17 00:00:00 2001 +From: zoulasc <christos@zoulas.com> +Date: Sat, 11 Jan 2020 11:16:51 -0500 +Subject: [PATCH] Remove extra variable definition that cause -fno-common build + to fail (Werner Fink) + +--- + tc.sig.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tc.sig.c b/tc.sig.c +index 77659ca..576605a 100644 +--- a/tc.sig.c ++++ b/tc.sig.c +@@ -56,7 +56,6 @@ int alrmcatch_disabled; /* = 0; */ + int phup_disabled; /* = 0; */ + int pchild_disabled; /* = 0; */ + int pintr_disabled; /* = 0; */ +-int handle_interrupt; /* = 0; */ + + int + handle_pending_signals(void) diff --git a/repo/tcsh/csh.cshrc b/repo/tcsh/csh.cshrc new file mode 100644 index 0000000..5f53824 --- /dev/null +++ b/repo/tcsh/csh.cshrc @@ -0,0 +1,96 @@ +############################################################################# +## +## Gentoo's csh.cshrc +## +## Based on the TCSH package (http://tcshrc.sourceforge.net) +## +## .tcshrc 2Sep2001, Simos Xenitellis (simos@hellug.gr) +## +## 2003-01-13 -- Alain Penders (alain@gentoo.org) +## Renamed to /etc/csh.cshrc, basic cleanup work. +## +## 2003-01-24 -- Alain Penders (alain@gentoo.org) +## Improved config file handling. +## +onintr - +## + +## +## Load the environment defaults. +## +if ( -r /etc/csh.env ) then + source /etc/csh.env +endif + + +## +## Make sure our path includes the basic stuff for root and normal users. +## +if ($LOGNAME == "root") then + set -f path = ( $path /sbin ) + set -f path = ( $path /usr/sbin ) + set -f path = ( $path /usr/local/sbin ) +endif +set -f path = ( $path /bin ) +set -f path = ( $path /usr/bin ) +set -f path = ( $path /usr/local/bin ) +set -f path = ( $path /opt/bin ) + + +## +## Load our settings -- most are for interactive shells only, but not all. +## +if ( -e /etc/profile.d/tcsh-settings ) then + source /etc/profile.d/tcsh-settings +endif + + +## +## Source extensions installed by ebuilds +## +if ( -d /etc/profile.d ) then + set _tmp=${?nonomatch} + set nonomatch + foreach _s ( /etc/profile.d/*.csh ) + if ( -r $_s ) then + source $_s + endif + end + if ( ! ${_tmp} ) unset nonomatch + unset _tmp _s +endif + + +# Everything after this point is interactive shells only. +if ( $?prompt == 0 ) goto end + + +## +## Load our aliases -- for interactive shells only +## +if ( -e /etc/profile.d/tcsh-aliases ) then + source /etc/profile.d/tcsh-aliases +endif + + +## +## Load our key bindings -- for interactive shells only +## +if ( -e /etc/profile.d/tcsh-bindkey ) then + source /etc/profile.d/tcsh-bindkey +endif + + +## +## Load our command completions -- for interactive shells only +## +if ( -e /etc/profile.d/tcsh-complete ) then + source /etc/profile.d/tcsh-complete +endif + + +end: +## +onintr +## + diff --git a/repo/tcsh/csh.login b/repo/tcsh/csh.login new file mode 100644 index 0000000..6868228 --- /dev/null +++ b/repo/tcsh/csh.login @@ -0,0 +1,71 @@ +############################################################################# +## +## Gentoo's csh.login +## +## 2003-01-13 -- Alain Penders (alain@gentoo.org) +## +## Initial version. Inspired by the Suse version. +## + + +## +## Default terminal initialization +## +if ( -o /dev/$tty && ${?prompt} ) then + # Console + if ( ! ${?TERM} ) setenv TERM linux + if ( "$TERM" == "unknown" ) setenv TERM linux + # No tset available on SlackWare + if ( -x "`which stty`" ) stty sane cr0 pass8 dec + if ( -x "`which tset`" ) tset -I -Q + unsetenv TERMCAP + settc km yes +endif + +## +## Default UMASK +## +umask 022 + +## +## Set our SHELL variable. +## +setenv SHELL /bin/tcsh + +## +## Setup a default MAIL variable +## +if ( -f /var/mail/$USER ) then + setenv MAIL /var/mail/$USER + set mail=$MAIL +endif + +## +## If we're root, report who's logging in and out. +## disabled because musl libc doesn't support utmp +##if ( "$uid" == "0" ) then +## set who=( "%n has %a %l from %M." ) +## set watch=( any any ) # +##endif + +## +## Show the MOTD once the first time, and once after it has been changed. +## +## Note: if this is a SSH login, SSH will always show the MOTD, so we +## skip it. Create ~/.hushlogin is you don't want SSH to show it. +## +if (-f /etc/motd ) then + if ( ! $?SSH_CLIENT ) then + cmp -s /etc/motd ~/.hushmotd + if ($status) then + tee ~/.hushmotd < /etc/motd + echo "((( MOTD shown only once, unless it is changed )))" + endif + endif +endif + +## +## Send us home. +## +cd + diff --git a/repo/tcsh/tcsh.post-install b/repo/tcsh/tcsh.post-install new file mode 100644 index 0000000..33c7ebe --- /dev/null +++ b/repo/tcsh/tcsh.post-install @@ -0,0 +1,4 @@ +#!/bin/sh +add-shell '/bin/tcsh' +add-shell '/bin/csh' +exit 0 diff --git a/repo/tcsh/tcsh.post-upgrade b/repo/tcsh/tcsh.post-upgrade new file mode 100644 index 0000000..33c7ebe --- /dev/null +++ b/repo/tcsh/tcsh.post-upgrade @@ -0,0 +1,4 @@ +#!/bin/sh +add-shell '/bin/tcsh' +add-shell '/bin/csh' +exit 0 diff --git a/repo/tcsh/tcsh.pre-deinstall b/repo/tcsh/tcsh.pre-deinstall new file mode 100644 index 0000000..3c0b05c --- /dev/null +++ b/repo/tcsh/tcsh.pre-deinstall @@ -0,0 +1,4 @@ +#!/bin/sh +remove-shell '/bin/csh' +remove-shell '/bin/tcsh' +exit 0 diff --git a/repo/tcsh/tcsh.xibuild b/repo/tcsh/tcsh.xibuild new file mode 100644 index 0000000..9bca519 --- /dev/null +++ b/repo/tcsh/tcsh.xibuild @@ -0,0 +1,52 @@ +#!/bin/sh + +NAME="tcsh" +DESC="extended C-shell" + +MAKEDEPS="ncurses" + +PKG_VER=6.24.00 +SOURCE="https://github.com/tcsh-org/tcsh/archive/TCSH6_21_00.tar.gz" + +ADDITIONAL=" +001-sysmalloc.patch +6974bc35a5cda6eab748e364bd76a860ca66968b.patch +csh.cshrc +csh.login +tcsh.post-install +" + +prepare() { + apply_patches +} + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --bindir=/bin \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-rpath + make +} + + +package() { + make DESTDIR="$PKG_DEST" install + install -Dm0644 "$BUILD_ROOT/csh.cshrc" "$PKG_DEST/etc/csh.cshrc" + install -Dm0644 "$BUILD_ROOT/csh.login" "$PKG_DEST/etc/csh.login" + ln -s tcsh "$PKG_DEST/bin/csh" + ln -s tcsh.1 "$PKG_DEST/usr/share/man/man1/csh.1" + rm -rf "$PKG_DEST"/usr/share/locale +} + +postinstall () { + if [ -f /etc/shells ] || grep -vq "tcsh" /etc/shells; then + echo "/bin/tcsh" >> /etc/shells + fi + + if [ -f /etc/shells ] || grep -vq "csh" /etc/shells; then + echo "/bin/csh" >> /etc/shells + fi +} |