zsh: reenable gcc2; fix build

This commit is contained in:
Jerome Duval
2015-12-08 19:07:45 +00:00
parent 6eb382123f
commit 39c4999a9b
3 changed files with 64 additions and 6 deletions

View File

@@ -1,13 +1,64 @@
From e436d167eae648e23d576cea10900eba7228271d Mon Sep 17 00:00:00 2001
From 333298b21997a9f611de6f92e322b0245dc9a5b4 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/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 00f43e4..2bc304c 100644
index de151a4..357f2f8 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -4425,7 +4425,7 @@ arrfixenv(char *s, char **t)
@@ -4428,7 +4428,7 @@ arrfixenv(char *s, char **t)
int
zputenv(char *str)
{
@@ -38,3 +89,6 @@ index d7db8ba..38e9313 100644
AC_SEARCH_LIBS(gethostbyname2, bind)
case $LIBS in
--
2.2.2

View File

@@ -40,12 +40,14 @@ BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld
cmd:make
cmd:sed
cmd:awk
"
BUILD()
{
autoreconf -fi
runConfigure ./configure \
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

View File

@@ -12,7 +12,7 @@ SOURCE_URI="http://sourceforge.net/projects/zsh/files/zsh/$portVersion/zsh-$port
CHECKSUM_SHA256="74e9453b5470b3c0970f9f93cfd603d241c3d7b1968adc0e4b3951073e8d3dec"
PATCHES="zsh-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
@@ -40,12 +40,14 @@ BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld
cmd:make
cmd:sed
cmd:awk
"
BUILD()
{
autoreconf -fi
runConfigure ./configure \
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