ports/opt (3.2): tcsh: move man-pages, some fixes from git, remove compiler warnings
commit 875dbfeaae19c19adaab94ccb4990ada81c0bba4 Author: Juergen Daubert <jue@jue.li> Date: Thu Sep 22 20:54:57 2016 +0200 tcsh: move man-pages, some fixes from git, remove compiler warnings diff --git a/tcsh/.footprint b/tcsh/.footprint index a20c559..81c6e6a 100644 --- a/tcsh/.footprint +++ b/tcsh/.footprint @@ -5,6 +5,7 @@ drwxr-xr-x root/root etc/ -rw-r--r-- root/root etc/csh.login -rw-r--r-- root/root etc/csh.logout drwxr-xr-x root/root usr/ -drwxr-xr-x root/root usr/man/ -drwxr-xr-x root/root usr/man/man1/ --r--r--r-- root/root usr/man/man1/tcsh.1.gz +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-r--r--r-- root/root usr/share/man/man1/tcsh.1.gz diff --git a/tcsh/.md5sum b/tcsh/.md5sum index 033b467..908cc93 100644 --- a/tcsh/.md5sum +++ b/tcsh/.md5sum @@ -1,4 +1,5 @@ e722a4480a48f445df762091de3aa76e csh.cshrc 74ee67af79e23951b7c997e25edc5ab5 csh.login 057fad717fcfaf03c6dc3a4cc4c6b604 csh.logout +6b2217cbf88bed1e77b2a20c5600bdeb tcsh-6.19.00.patch f5f854833578647795bc906dd4bcb5d5 tcsh-6.19.00.tar.gz diff --git a/tcsh/Pkgfile b/tcsh/Pkgfile index f54fa65..f2818b1 100644 --- a/tcsh/Pkgfile +++ b/tcsh/Pkgfile @@ -5,17 +5,22 @@ name=tcsh version=6.19.00 -release=1 +release=2 source=(ftp://ftp.astron.com/pub/tcsh/$name-$version.tar.gz \ - csh.login csh.logout csh.cshrc) + csh.login csh.logout csh.cshrc + $name-$version.patch) build() { cd $name-$version - - ./configure --prefix= --disable-nls + + # several fixes from git, https://github.com/tcsh-org/tcsh + # fix to remove compiler warning + patch -p1 -i $SRC/$name-$version.patch + + ./configure --prefix=/usr --bindir=/bin --disable-nls make - make DESTDIR=$PKG mandir=/usr/man install - + make DESTDIR=$PKG install + install -d $PKG/etc install -m 644 $SRC/csh.* $PKG/etc } diff --git a/tcsh/tcsh-6.19.00.patch b/tcsh/tcsh-6.19.00.patch new file mode 100644 index 0000000..b286c6c --- /dev/null +++ b/tcsh/tcsh-6.19.00.patch @@ -0,0 +1,114 @@ +commit 624d3aebb6e6afadb4f35e894d11b5ebe290cd87 +Author: christos <christos> +Date: Thu May 28 11:47:03 2015 +0000 + + avoid gcc-5 optimization malloc + memset = calloc (Fridolin Pokorny) + +diff --git a/tc.alloc.c b/tc.alloc.c +index b9aec63..c1cb330 100644 +--- a/tc.alloc.c ++++ b/tc.alloc.c +@@ -348,10 +348,13 @@ calloc(size_t i, size_t j) + { + #ifndef lint + char *cp; ++ size_t k; + + i *= j; + cp = xmalloc(i); +- memset(cp, 0, i); ++ /* Stop gcc 5.x from optimizing malloc+memset = calloc */ ++ k = i; ++ memset(cp, 0, k); + + return ((memalign_t) cp); + #else + + +commit 05e7406049bd2686dee0ee8d819dcd38eb131f6f +Author: christos <christos> +Date: Tue Jul 7 12:24:54 2015 +0000 + + make k volatile to prevent gcc-5 memset() optimization (Fridolin Pokorny) + +diff --git a/tc.alloc.c b/tc.alloc.c +index c1cb330..f68a8c5 100644 +--- a/tc.alloc.c ++++ b/tc.alloc.c +@@ -348,7 +348,7 @@ calloc(size_t i, size_t j) + { + #ifndef lint + char *cp; +- size_t k; ++ volatile size_t k; + + i *= j; + cp = xmalloc(i); + + +commit c43b072b89f19e9b41d45bdf3946593ae9bc6e5e +Author: christos <christos> +Date: Mon Aug 24 07:08:42 2015 +0000 + + restrict BSDWAIT to __GLIBC__ because other linux libraries (muslc) don't + have the macros. + +diff --git a/sh.proc.c b/sh.proc.c +index 76eca3b..ad07250 100644 +--- a/sh.proc.c ++++ b/sh.proc.c +@@ -47,7 +47,7 @@ RCSID("$tcsh$") + # define HZ 16 + #endif /* aiws */ + +-#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) ++#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__GLIBC__) + # if !defined(__ANDROID__) + # define BSDWAIT + # endif +commit eab72f9797ec4faaf1fb4de491c357f194b84dd6 +Author: christos <christos> +Date: Thu Apr 14 11:09:09 2016 +0000 + + GLIBC is getting rid of union wait. + +diff --git a/sh.proc.c b/sh.proc.c +index ad07250..5c68409 100644 +--- a/sh.proc.c ++++ b/sh.proc.c +@@ -47,11 +47,11 @@ RCSID("$tcsh$") + # define HZ 16 + #endif /* aiws */ + +-#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__GLIBC__) +-# if !defined(__ANDROID__) ++#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) ++# if !defined(__ANDROID__) && !defined(__GLIBC__) + # define BSDWAIT + # endif +-#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */ ++#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || gnu-linux */ + #ifndef WTERMSIG + # define WTERMSIG(w) (((union wait *) &(w))->w_termsig) + # ifndef BSDWAIT + + +diff -Nru tcsh-6.19.00.orig/config/linux tcsh-6.19.00/config/linux +--- tcsh-6.19.00.orig/config/linux 2016-09-22 17:51:43.086924218 +0200 ++++ tcsh-6.19.00/config/linux 2016-09-22 17:54:16.123662001 +0200 +@@ -86,11 +86,11 @@ + */ + + #define __STRICT_ANSI__ +-#ifndef _BSD_SOURCE +-# define _BSD_SOURCE ++#ifndef _DEFAULT_SOURCE ++# define _DEFAULT_SOURCE + #endif +-#ifndef _SVID_SOURCE +-# define _SVID_SOURCE ++#ifndef _DEFAULT_SOURCE ++# define _DEFAULT_SOURCE + #endif + #ifndef _POSIX_SOURCE + # define _POSIX_SOURCE
participants (1)
-
crux@crux.nu