From eaf201113222ee3da7ef55ef83982f6bfbb81138 Mon Sep 17 00:00:00 2001 From: miqlas Date: Sat, 14 Jan 2017 20:33:43 +0100 Subject: [PATCH] Zsh : bump version, updated recipe and patchset (#1036) * WIP * Fixed patchset * zsh: bump version, updated recipe, patchset * Fixed wait warning * Removed SecondaryArchSuffixes --- app-shells/zsh/patches/zsh-5.0.7.patchset | 40 -------- app-shells/zsh/patches/zsh-5.1.1.patchset | 94 ------------------- .../{zsh-5.2.patchset => zsh-5.3.1.patchset} | 33 +++++-- app-shells/zsh/zsh-5.0.7.recipe | 66 ------------- app-shells/zsh/zsh-5.1.1.recipe | 66 ------------- app-shells/zsh/zsh-5.2.recipe | 66 ------------- app-shells/zsh/zsh-5.3.1.recipe | 79 ++++++++++++++++ 7 files changed, 103 insertions(+), 341 deletions(-) delete mode 100644 app-shells/zsh/patches/zsh-5.0.7.patchset delete mode 100644 app-shells/zsh/patches/zsh-5.1.1.patchset rename app-shells/zsh/patches/{zsh-5.2.patchset => zsh-5.3.1.patchset} (84%) delete mode 100644 app-shells/zsh/zsh-5.0.7.recipe delete mode 100644 app-shells/zsh/zsh-5.1.1.recipe delete mode 100644 app-shells/zsh/zsh-5.2.recipe create mode 100644 app-shells/zsh/zsh-5.3.1.recipe diff --git a/app-shells/zsh/patches/zsh-5.0.7.patchset b/app-shells/zsh/patches/zsh-5.0.7.patchset deleted file mode 100644 index 3cd03a8da..000000000 --- a/app-shells/zsh/patches/zsh-5.0.7.patchset +++ /dev/null @@ -1,40 +0,0 @@ -From e436d167eae648e23d576cea10900eba7228271d Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Wed, 18 Sep 2013 03:11:28 -0600 -Subject: Fix for gcc2 - -diff --git a/Src/params.c b/Src/params.c -index 61edc5d..57e1e8d 100644 ---- a/Src/params.c -+++ b/Src/params.c -@@ -4356,7 +4356,7 @@ arrfixenv(char *s, char **t) - int - zputenv(char *str) - { -- DPUTS(!str, "Attempt to put null string into environment."); -+ //DPUTS(!str, "Attempt to put null string into environment."); - #ifdef USE_SET_UNSET_ENV - /* - * If we are using unsetenv() to remove values from the -diff --git a/configure.ac b/configure.ac -index 306a005..1dac756 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -752,7 +752,7 @@ dnl On ReliantUNIX -lc better be the last library, else funny things - dnl may happen. - AC_CHECK_LIB(c, printf, [LIBS="$LIBS -lc"]) - --AC_CHECK_LIB(m, pow) -+AC_CHECK_LIB(root, pow) - - AC_CHECK_LIB(rt, clock_gettime) - -@@ -857,7 +857,7 @@ if test x$enable_cap = xyes; then - AC_CHECK_LIB(cap, cap_get_proc) - fi - --AC_CHECK_LIB(socket, socket) -+AC_CHECK_LIB(network, socket) - AC_SEARCH_LIBS(gethostbyname2, bind) - - case $LIBS in diff --git a/app-shells/zsh/patches/zsh-5.1.1.patchset b/app-shells/zsh/patches/zsh-5.1.1.patchset deleted file mode 100644 index a9749cb3e..000000000 --- a/app-shells/zsh/patches/zsh-5.1.1.patchset +++ /dev/null @@ -1,94 +0,0 @@ -From 333298b21997a9f611de6f92e322b0245dc9a5b4 Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Wed, 18 Sep 2013 03:11:28 -0600 -Subject: Fix for gcc2 - - -diff --git a/Src/Zle/textobjects.c b/Src/Zle/textobjects.c -index 9b3277a..5041cd0 100644 ---- a/Src/Zle/textobjects.c -+++ b/Src/Zle/textobjects.c -@@ -71,8 +71,9 @@ selectword(UNUSED(char **args)) - } - /* similarly scan forward over characters of the same class */ - while (zlecs < zlell) { -+ int pos; - INCCS(); -- int pos = zlecs; -+ pos = zlecs; - /* single newlines within blanks are included */ - if (all && !sclass && pos < zlell && zleline[pos] == ZWC('\n')) - INCPOS(pos); -diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c -index c61b4ef..d44ebe3 100644 ---- a/Src/Zle/zle_hist.c -+++ b/Src/Zle/zle_hist.c -@@ -1619,10 +1619,11 @@ doisearch(char **args, int dir, int pattern) - else - goto ins; - } else if (cmd == Th(z_bracketedpaste)) { -+ size_t pastelen; - char *paste = bracketedstring(); - set_isrch_spot(top_spot++, hl, pos, pat_hl, pat_pos, end_pos, - zlemetacs, sbptr, dir, nomatch); -- size_t pastelen = strlen(paste); -+ pastelen = strlen(paste); - if (sbptr + pastelen >= sibuf - FIRST_SEARCH_CHAR - 2) { - int oldsize = sibuf; - sibuf += (pastelen >= sibuf) ? pastelen + 1 : sibuf; -diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c -index 42dc46e..796fdec 100644 ---- a/Src/Zle/zle_vi.c -+++ b/Src/Zle/zle_vi.c -@@ -173,11 +173,12 @@ getvirange(int wf) - vilinerange = (visual == 2); - region_active = 0; - } else { -+ Keymap km; - virangeflag = 1; - wordflag = wf; - mark = -1; - /* use operator-pending keymap if one exists */ -- Keymap km = openkeymap("viopp"); -+ km = openkeymap("viopp"); - if (km) - selectlocalmap(km); - /* Now we need to execute the movement command, to see where it * -diff --git a/Src/params.c b/Src/params.c -index de151a4..357f2f8 100644 ---- a/Src/params.c -+++ b/Src/params.c -@@ -4428,7 +4428,7 @@ arrfixenv(char *s, char **t) - int - zputenv(char *str) - { -- DPUTS(!str, "Attempt to put null string into environment."); -+ //DPUTS(!str, "Attempt to put null string into environment."); - #ifdef USE_SET_UNSET_ENV - /* - * If we are using unsetenv() to remove values from the -diff --git a/configure.ac b/configure.ac -index d7db8ba..38e9313 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -758,7 +758,7 @@ dnl On ReliantUNIX -lc better be the last library, else funny things - dnl may happen. - AC_CHECK_LIB(c, printf, [LIBS="$LIBS -lc"]) - --AC_CHECK_LIB(m, pow) -+AC_CHECK_LIB(root, pow) - - AC_CHECK_LIB(rt, clock_gettime) - -@@ -863,7 +863,7 @@ if test x$enable_cap = xyes; then - AC_CHECK_LIB(cap, cap_get_proc) - fi - --AC_CHECK_LIB(socket, socket) -+AC_CHECK_LIB(network, socket) - AC_SEARCH_LIBS(gethostbyname2, bind) - - case $LIBS in --- -2.2.2 - diff --git a/app-shells/zsh/patches/zsh-5.2.patchset b/app-shells/zsh/patches/zsh-5.3.1.patchset similarity index 84% rename from app-shells/zsh/patches/zsh-5.2.patchset rename to app-shells/zsh/patches/zsh-5.3.1.patchset index 6f54926e1..2c6bcb976 100644 --- a/app-shells/zsh/patches/zsh-5.2.patchset +++ b/app-shells/zsh/patches/zsh-5.3.1.patchset @@ -92,15 +92,6 @@ diff --git a/configure.ac b/configure.ac index c3bd713..4e53073 100644 --- a/configure.ac +++ b/configure.ac -@@ -758,7 +758,7 @@ dnl On ReliantUNIX -lc better be the last library, else funny things - dnl may happen. - AC_CHECK_LIB(c, printf, [LIBS="$LIBS -lc"]) - --AC_CHECK_LIB(m, pow) -+AC_CHECK_LIB(root, pow) - - AC_CHECK_LIB(rt, clock_gettime) - @@ -863,7 +863,7 @@ if test x$enable_cap = xyes; then AC_CHECK_LIB(cap, cap_get_proc) fi @@ -113,3 +104,27 @@ index c3bd713..4e53073 100644 -- 2.2.2 +From 07c2bf31df39856861faec9bb84cbd0d103add17 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Wed, 11 Jan 2017 18:17:20 +0100 +Subject: [PATCH] Haiku rusage fix + +--- + Src/jobs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Src/jobs.c b/Src/jobs.c +index d1b98ac..eba94d8 100644 +--- a/Src/jobs.c ++++ b/Src/jobs.c +@@ -936,7 +936,7 @@ should_report_time(Job j) + #endif + } + +-#ifdef HAVE_GETRUSAGE ++#if defined(HAVE_GETRUSAGE) && !defined(__HAIKU__) + if (reportmemory >= 0 && + j->procs->ti.ru_maxrss / 1024 > reportmemory) + return 1; +-- +2.11.0 diff --git a/app-shells/zsh/zsh-5.0.7.recipe b/app-shells/zsh/zsh-5.0.7.recipe deleted file mode 100644 index e07e0fa64..000000000 --- a/app-shells/zsh/zsh-5.0.7.recipe +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY="A UNIX command interpreter (shell)" -DESCRIPTION="Zsh is a shell designed for interactive use, although it \ -is also a powerful scripting language. Many of the useful features of \ -bash, ksh, and tcsh were incorporated into zsh; many original features \ -were added." -HOMEPAGE="http://www.zsh.org" -COPYRIGHT="1992-2014 Paul Falstad, Richard Coleman, Zoltán Hidvégi, \ -Andrew Main, Peter Stephenson, Sven Wishnowsky, and others" -LICENSE="ZSH" -REVISION="3" -SOURCE_URI="http://sourceforge.net/projects/zsh/files/zsh/$portVersion/zsh-$portVersion.tar.bz2" -CHECKSUM_SHA256="544e27de81740286b916d1d77c9f48ad7c26ad7943ed96d278abee67cf6704b3" -PATCHES="zsh-$portVersion.patchset" - -ARCHITECTURES="x86_gcc2 x86 x86_64" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - zsh$secondaryArchSuffix = $portVersion compat >= 5 - cmd:zsh$secondaryArchSuffix = $portVersion compat >= 5 - cmd:zsh_$portVersion$secondaryArchSuffix = $portVersion compat >= 5 - cmd:sh$secondaryArchSuffix - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libncurses$secondaryArchSuffix - lib:libpcre$secondaryArchSuffix - lib:libiconv$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libncurses$secondaryArchSuffix - devel:libpcre$secondaryArchSuffix - devel:libiconv$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:autoconf - cmd:find - cmd:gcc$secondaryArchSuffix - cmd:ld$secondaryArchSuffix - cmd:make - cmd:sed - cmd:awk - " - -BUILD() -{ - autoreconf -fi - CFLAGS=-D_BSD_SOURCE runConfigure ./configure \ - --enable-zshrc=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/.zshrc \ - --sysconfdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh \ - --enable-etcdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh - make $jobArgs -} - -INSTALL() -{ - make install - ln -s zsh $binDir/sh -} - -TEST() -{ - make check -} diff --git a/app-shells/zsh/zsh-5.1.1.recipe b/app-shells/zsh/zsh-5.1.1.recipe deleted file mode 100644 index 46ed0c591..000000000 --- a/app-shells/zsh/zsh-5.1.1.recipe +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY="A UNIX command interpreter (shell)" -DESCRIPTION="Zsh is a shell designed for interactive use, although it \ -is also a powerful scripting language. Many of the useful features of \ -bash, ksh, and tcsh were incorporated into zsh; many original features \ -were added." -HOMEPAGE="http://zsh.sourceforge.net" -COPYRIGHT="1992-2014 Paul Falstad, Richard Coleman, Zoltán Hidvégi, \ -Andrew Main, Peter Stephenson, Sven Wishnowsky, and others" -LICENSE="ZSH" -REVISION="2" -SOURCE_URI="http://sourceforge.net/projects/zsh/files/zsh/$portVersion/zsh-$portVersion.tar.xz" -CHECKSUM_SHA256="74e9453b5470b3c0970f9f93cfd603d241c3d7b1968adc0e4b3951073e8d3dec" -PATCHES="zsh-$portVersion.patchset" - -ARCHITECTURES="x86_gcc2 x86 x86_64" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - zsh$secondaryArchSuffix = $portVersion compat >= 5 - cmd:zsh$secondaryArchSuffix = $portVersion compat >= 5 - cmd:zsh_$portVersion$secondaryArchSuffix = $portVersion compat >= 5 - cmd:sh$secondaryArchSuffix - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libncurses$secondaryArchSuffix - lib:libpcre$secondaryArchSuffix - lib:libiconv$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libncurses$secondaryArchSuffix - devel:libpcre$secondaryArchSuffix - devel:libiconv$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:autoconf - cmd:find - cmd:gcc$secondaryArchSuffix - cmd:ld$secondaryArchSuffix - cmd:make - cmd:sed - cmd:awk - " - -BUILD() -{ - autoreconf -fi - CFLAGS=-D_BSD_SOURCE runConfigure ./configure \ - --enable-zshrc=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/.zshrc \ - --sysconfdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh \ - --enable-etcdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh - make $jobArgs -} - -INSTALL() -{ - make install - ln -s zsh $binDir/sh -} - -TEST() -{ - make check -} diff --git a/app-shells/zsh/zsh-5.2.recipe b/app-shells/zsh/zsh-5.2.recipe deleted file mode 100644 index 92771e16f..000000000 --- a/app-shells/zsh/zsh-5.2.recipe +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY="A UNIX command interpreter (shell)" -DESCRIPTION="Zsh is a shell designed for interactive use, although it \ -is also a powerful scripting language. Many of the useful features of \ -bash, ksh, and tcsh were incorporated into zsh; many original features \ -were added." -HOMEPAGE="http://zsh.sourceforge.net" -COPYRIGHT="1992-2014 Paul Falstad, Richard Coleman, Zoltán Hidvégi, \ -Andrew Main, Peter Stephenson, Sven Wishnowsky, and others" -LICENSE="ZSH" -REVISION="2" -SOURCE_URI="http://sourceforge.net/projects/zsh/files/zsh/$portVersion/zsh-$portVersion.tar.xz" -CHECKSUM_SHA256="f17916320ffaa844bbd7ce48ceeb5945fc5f3eff64b149b4229bbfbdf3795a9d" -PATCHES="zsh-$portVersion.patchset" - -ARCHITECTURES="x86_gcc2 x86 x86_64" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - zsh$secondaryArchSuffix = $portVersion compat >= 5 - cmd:zsh$secondaryArchSuffix = $portVersion compat >= 5 - cmd:zsh_$portVersion$secondaryArchSuffix = $portVersion compat >= 5 - cmd:sh$secondaryArchSuffix - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libncurses$secondaryArchSuffix - lib:libpcre$secondaryArchSuffix - lib:libiconv$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libncurses$secondaryArchSuffix - devel:libpcre$secondaryArchSuffix - devel:libiconv$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:autoconf - cmd:find - cmd:gcc$secondaryArchSuffix - cmd:ld$secondaryArchSuffix - cmd:make - cmd:sed - cmd:awk - " - -BUILD() -{ - autoreconf -fi - CFLAGS=-D_BSD_SOURCE runConfigure ./configure \ - --enable-zshrc=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/.zshrc \ - --sysconfdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh \ - --enable-etcdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh - make $jobArgs -} - -INSTALL() -{ - make install - ln -s zsh $binDir/sh -} - -TEST() -{ - make check -} diff --git a/app-shells/zsh/zsh-5.3.1.recipe b/app-shells/zsh/zsh-5.3.1.recipe new file mode 100644 index 000000000..46f56faa1 --- /dev/null +++ b/app-shells/zsh/zsh-5.3.1.recipe @@ -0,0 +1,79 @@ +SUMMARY="A UNIX command interpreter (shell)" +DESCRIPTION="Zsh is a shell designed for interactive use, although it \ +is also a powerful scripting language. Many of the useful features of \ +bash, ksh, and tcsh were incorporated into zsh; many original features \ +were added." +HOMEPAGE="https://zsh.org/" +COPYRIGHT="1992-2017 Paul Falstad, Richard Coleman, Zoltán Hidvégi, \ +Andrew Main, Peter Stephenson, Sven Wishnowsky, and others" +LICENSE="ZSH" +REVISION="1" +SOURCE_URI="https://downloads.sf.net/zsh/zsh-$portVersion.tar.xz" +CHECKSUM_SHA256="fc886cb2ade032d006da8322c09a7e92b2309177811428b121192d44832920da" +PATCHES="zsh-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PROVIDES=" + zsh = $portVersion compat >= 5 + cmd:zsh = $portVersion compat >= 5 + cmd:zsh_$portVersion = $portVersion compat >= 5 + #zsh isn't bash compatible enough + #cmd:zsh_$portVersion = $portVersion compat >= 5 + " +REQUIRES=" + haiku + lib:libiconv + lib:libncursesw + lib:libpcre + lib:libiconv + " + +BUILD_REQUIRES=" + haiku_devel + devel:libiconv + devel:libncursesw + devel:libpcre + devel:libiconv + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:awk + cmd:find + cmd:gcc + cmd:grep + cmd:libtoolize + cmd:ld + cmd:make + cmd:sed + " + +BUILD() +{ + autoreconf -fi + libtoolize -vfi + + export LDFLAGS="-lnetwork -lbsd" + export CFLAGS="-D_BSD_SOURCE" + + runConfigure ./configure \ + --enable-multibyte \ + --enable-zshrc=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/zshrc \ + --sysconfdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh \ + --enable-etcdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh \ + --enable-pcre + sed --in-place '/HAVE_WAIT3/d' config.h + make $jobArgs +} + +INSTALL() +{ + make install + #zsh isn't bash compatible enough + #ln -s zsh $binDir/sh +} + +TEST() +{ + make check +}