Zsh: enable dynamic modules (#1579)

* Less dotfiles in HOME
This commit is contained in:
miqlas
2017-08-19 14:43:07 +02:00
committed by Jérôme Duval
parent fed4c9a7ab
commit 7f7e717ffb
2 changed files with 61 additions and 23 deletions

View File

@@ -1,11 +1,11 @@
From ff7312554e7eff2959ca52986e77f65ab963a083 Mon Sep 17 00:00:00 2001
From 48856051b2d420e2201161451de0fda8fbe640e7 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
index 86416c5..b8e7c18 100644
--- a/Src/Modules/param_private.c
+++ b/Src/Modules/param_private.c
@@ -79,6 +79,7 @@ static int makeprivate_error = 0;
@@ -26,10 +26,10 @@ index e13813c..16778bc 100644
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
index bf83906..180e3fb 100644
--- a/Src/Zle/textobjects.c
+++ b/Src/Zle/textobjects.c
@@ -71,8 +71,9 @@ selectword(UNUSED(char **args))
@@ -68,8 +68,9 @@ selectword(UNUSED(char **args))
}
/* similarly scan forward over characters of the same class */
while (zlecs < zlell) {
@@ -41,10 +41,10 @@ index 9b3277a..5041cd0 100644
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
index 581ca49..ebe5a1b 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1619,10 +1619,11 @@ doisearch(char **args, int dir, int pattern)
@@ -1622,10 +1622,11 @@ doisearch(char **args, int dir, int pattern)
else
goto ins;
} else if (cmd == Th(z_bracketedpaste)) {
@@ -58,10 +58,10 @@ index 95d96c9..85c64a5 100644
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
index e0923db..ec66f6a 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -173,11 +173,12 @@ getvirange(int wf)
@@ -183,11 +183,12 @@ getvirange(int wf)
vilinerange = (visual == 2);
region_active = 0;
} else {
@@ -76,10 +76,10 @@ index 86840bd..a773af9 100644
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
index 6fbee88..451105a 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -4522,7 +4522,7 @@ arrfixenv(char *s, char **t)
@@ -4846,7 +4846,7 @@ arrfixenv(char *s, char **t)
int
zputenv(char *str)
{
@@ -89,10 +89,10 @@ index d8bf83d..48b7bf6 100644
/*
* If we are using unsetenv() to remove values from the
diff --git a/configure.ac b/configure.ac
index c3bd713..4e53073 100644
index ec0bdae..bad78f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -863,7 +863,7 @@ if test x$enable_cap = xyes; then
@@ -874,7 +874,7 @@ if test x$enable_cap = xyes; then
AC_CHECK_LIB(cap, cap_get_proc)
fi
@@ -102,22 +102,20 @@ index c3bd713..4e53073 100644
case $LIBS in
--
2.2.2
2.14.1
From 07c2bf31df39856861faec9bb84cbd0d103add17 Mon Sep 17 00:00:00 2001
From ae08f42563fc3b3e4831da9de566e0f496544aba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Wed, 11 Jan 2017 18:17:20 +0100
Subject: [PATCH] Haiku rusage fix
Subject: 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
index 66dfb5a..47b0a64 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -936,7 +936,7 @@ should_report_time(Job j)
@@ -940,7 +940,7 @@ should_report_time(Job j)
#endif
}
@@ -127,4 +125,37 @@ index d1b98ac..eba94d8 100644
j->procs->ti.ru_maxrss / 1024 > reportmemory)
return 1;
--
2.11.0
2.14.1
From b02514e4def8ad607e2d19d36a013dadb285430d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Thu, 17 Aug 2017 16:16:21 +0200
Subject: Enable dynamic modules on Haiku
diff --git a/configure.ac b/configure.ac
index bad78f9..ae3b215 100644
--- a/configure.ac
+++ b/configure.ac
@@ -868,6 +868,7 @@ fi
if test "x$dynamic" = xyes; then
AC_CHECK_LIB(dl, dlopen)
+ AC_CHECK_LIB(root, dlopen)
fi
if test x$enable_cap = xyes; then
@@ -2899,7 +2900,8 @@ char *argv[];
aix*) DLLDFLAGS="${DLLDFLAGS=-G -bexpall -lc}" ;;
solaris*|sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G}" ;;
darwin*) DLLDFLAGS="${DLLDFLAGS=-bundle -flat_namespace -undefined suppress}" ;;
- beos*|haiku*) DLLDFLAGS="${DLLDFLAGS=-nostart}" ;;
+ beos*) DLLDFLAGS="${DLLDFLAGS=-nostart}" ;;
+ haiku*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;;
openbsd*)
if test x$zsh_cv_sys_elf = xyes; then
DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}"
--
2.14.1

View File

@@ -7,7 +7,7 @@ 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="2"
REVISION="3"
SOURCE_URI="https://downloads.sf.net/zsh/zsh-$portVersion.tar.xz"
CHECKSUM_SHA256="94cbd57508287e8faa081424509738d496f5f41e32ed890e3a5498ce05d3633b"
PATCHES="zsh-$portVersion.patchset"
@@ -59,9 +59,16 @@ BUILD()
runConfigure ./configure \
--enable-multibyte \
--enable-zshrc=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/zshrc \
--enable-zshenv=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/zshenv \
--enable-zprofile=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/zprofile \
--enable-zlogin=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/zlogin \
--enable-zlogout=`finddir B_USER_SETTINGS_DIRECTORY`/zsh/zlogout \
--sysconfdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh \
--enable-etcdir=`finddir B_USER_SETTINGS_DIRECTORY`/zsh \
--enable-pcre
--enable-pcre \
--enable-dynamic \
--enable-cap \
--enable-unicode9
sed --in-place '/HAVE_WAIT3/d' config.h
make $jobArgs
}