From 1af97d0c4495ab4d323538fa3f86c26f3b063efb Mon Sep 17 00:00:00 2001 From: Dan Theisen Date: Thu, 27 Sep 2018 22:42:20 -0700 Subject: user/tcsh: new package --- user/tcsh/001-sysmalloc.patch | 15 +++++++++++ user/tcsh/002-test_123-posix_fix.patch | 34 ++++++++++++++++++++++++ user/tcsh/APKBUILD | 47 ++++++++++++++++++++++++++++++++++ user/tcsh/tcsh.post-install | 3 +++ user/tcsh/tcsh.post-upgrade | 1 + user/tcsh/tcsh.pre-deinstall | 3 +++ 6 files changed, 103 insertions(+) create mode 100644 user/tcsh/001-sysmalloc.patch create mode 100644 user/tcsh/002-test_123-posix_fix.patch create mode 100644 user/tcsh/APKBUILD create mode 100644 user/tcsh/tcsh.post-install create mode 120000 user/tcsh/tcsh.post-upgrade create mode 100644 user/tcsh/tcsh.pre-deinstall diff --git a/user/tcsh/001-sysmalloc.patch b/user/tcsh/001-sysmalloc.patch new file mode 100644 index 000000000..b22c01898 --- /dev/null +++ b/user/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/user/tcsh/002-test_123-posix_fix.patch b/user/tcsh/002-test_123-posix_fix.patch new file mode 100644 index 000000000..6ed59de38 --- /dev/null +++ b/user/tcsh/002-test_123-posix_fix.patch @@ -0,0 +1,34 @@ +Author: Dan Theisen +Date: Wed Jun 06 03:30:25 2018 -0800 + +The following lines have a subtle change around [:blank:], changing it +to [[:blank:]] instead. This is required because POSIX treats characters +inside of brackets as a group of characters to match against. In this case, +[[:space:]] means [] group of characters, and [:space:] is the group, as per: +IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008), Chapter 9 +http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html + +--- tcsh-6.20.00/tests/lexical.at.old 2018-06-06 02:20:16.787145186 -0700 ++++ tcsh-6.20.00/tests/lexical.at 2018-06-06 02:21:09.537890842 -0700 +@@ -567,10 +567,10 @@ + ]]) + AT_DATA([uniformity_test.csh], + [[ +-set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'` ++set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'` + echo -n "$SERVICE_NAME_LOG" > ./output1 + +-cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2 ++cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2 + + diff -uprN ./output1 ./output2 >& /dev/null + +@@ -587,7 +587,7 @@ + echo "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP\)(HOST=db\)(PORT=1521\)\)(CONNECT_DATA=(SERVER=DEDICATED\)(SERVICE_NAME=bns03\)\)\)" > ./expected_result + + set string = "jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))" +-set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'` ++set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'` + + echo "$SERVICE_NAME_LOG" > ./actual_result + diff --git a/user/tcsh/APKBUILD b/user/tcsh/APKBUILD new file mode 100644 index 000000000..2fdfac0b2 --- /dev/null +++ b/user/tcsh/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Dan Theisen +# Maintainer: Dan Theisen +pkgname=tcsh +pkgver=6.20.00 +pkgrel=2 +pkgdesc="extended C-shell" +url="http://www.tcsh.org" +arch="all" +license="BSD-3-Clause" +depends="" +checkdepends="diffutils autoconf" +makedepends="ncurses-dev ncurses-terminfo utmps-dev gettext-tiny-dev" +install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall" +subpackages="$pkgname-doc" +options="!checkroot" +source="$pkgname-$pkgver.tar.gz::http://http.debian.net/debian/pool/main/t/tcsh/${pkgname}_${pkgver}.orig.tar.gz + 001-sysmalloc.patch + 002-test_123-posix_fix.patch" + +build() { + cd "$builddir" + LIBS="-lutmps -lskarnet -ltinfo" ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --bindir=/bin \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --enable-nls \ + --enable-nls-catalogs \ + --disable-rpath + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="c5635393c22341e62fb9a0b953ddf8871a876ab09deb08c98237f93afa9257b4a3381d1db65eefe769e22ef845db29ab7bc78773f1f609d73c8205689a6683e9 tcsh-6.20.00.tar.gz +40149d8eb2fc0fe5184f3c24c7a1b728e881cc0048ccd37a986c3b2d2094499ec1c37ae2bae4c209fb8a847aa943e83e81f79e3d2f55c59990bc00d9d07f5a94 001-sysmalloc.patch +b4c1afe04554d117b1402608bcdb243148c0c7b2442bdc10dde3ed6601db5e7c5a2341373f9bdc31fda8860e47a6e152cdcc4e3a8b273742037eebc624df282c 002-test_123-posix_fix.patch" diff --git a/user/tcsh/tcsh.post-install b/user/tcsh/tcsh.post-install new file mode 100644 index 000000000..7342c5e72 --- /dev/null +++ b/user/tcsh/tcsh.post-install @@ -0,0 +1,3 @@ +#!/bin/sh +add-shell '/bin/tcsh' +exit 0 diff --git a/user/tcsh/tcsh.post-upgrade b/user/tcsh/tcsh.post-upgrade new file mode 120000 index 000000000..180542a18 --- /dev/null +++ b/user/tcsh/tcsh.post-upgrade @@ -0,0 +1 @@ +tcsh.post-install \ No newline at end of file diff --git a/user/tcsh/tcsh.pre-deinstall b/user/tcsh/tcsh.pre-deinstall new file mode 100644 index 000000000..9e2e34c1c --- /dev/null +++ b/user/tcsh/tcsh.pre-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh +remove-shell '/bin/tcsh' +exit 0 -- cgit v1.2.3-70-g09d2