mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
zsh: add recipe for version 5.2.
This commit is contained in:
115
app-shells/zsh/patches/zsh-5.2.patchset
Normal file
115
app-shells/zsh/patches/zsh-5.2.patchset
Normal file
@@ -0,0 +1,115 @@
|
||||
From ff7312554e7eff2959ca52986e77f65ab963a083 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Wed, 18 Sep 2013 03:11:28 -0600
|
||||
Subject: Fix for gcc2
|
||||
|
||||
|
||||
diff --git a/Src/Modules/param_private.c b/Src/Modules/param_private.c
|
||||
index e13813c..16778bc 100644
|
||||
--- a/Src/Modules/param_private.c
|
||||
+++ b/Src/Modules/param_private.c
|
||||
@@ -79,6 +79,7 @@ static int makeprivate_error = 0;
|
||||
static void
|
||||
makeprivate(HashNode hn, UNUSED(int flags))
|
||||
{
|
||||
+ struct gsu_closure *gsu;
|
||||
Param pm = (Param)hn;
|
||||
if (pm->level == locallevel) {
|
||||
if (pm->ename || (pm->node.flags & PM_NORESTORE) ||
|
||||
@@ -92,7 +93,7 @@ makeprivate(HashNode hn, UNUSED(int flags))
|
||||
makeprivate_error = 1;
|
||||
return;
|
||||
}
|
||||
- struct gsu_closure *gsu = zhalloc(sizeof(struct gsu_closure));
|
||||
+ gsu = zhalloc(sizeof(struct gsu_closure));
|
||||
switch (PM_TYPE(pm->node.flags)) {
|
||||
case PM_SCALAR:
|
||||
gsu->g = (void *)(pm->gsu.s);
|
||||
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 95d96c9..85c64a5 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 86840bd..a773af9 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 d8bf83d..48b7bf6 100644
|
||||
--- a/Src/params.c
|
||||
+++ b/Src/params.c
|
||||
@@ -4522,7 +4522,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 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
|
||||
|
||||
-AC_CHECK_LIB(socket, socket)
|
||||
+AC_CHECK_LIB(network, socket)
|
||||
AC_SEARCH_LIBS(gethostbyname2, bind)
|
||||
|
||||
case $LIBS in
|
||||
--
|
||||
2.2.2
|
||||
|
||||
66
app-shells/zsh/zsh-5.2.recipe
Normal file
66
app-shells/zsh/zsh-5.2.recipe
Normal file
@@ -0,0 +1,66 @@
|
||||
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="1"
|
||||
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
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user