Ports: Add ZSH port

This commit is contained in:
Thiago Henrique Hupner 2021-06-05 08:31:13 -03:00 committed by Linus Groh
parent 4850cf9069
commit d0bed24ca1
4 changed files with 33 additions and 0 deletions

View file

@ -139,4 +139,5 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`xz`](xz/) | xz | 5.2.5 | https://tukaani.org/xz/ |
| [`yasm`](yasm/) | Yasm Modular Assembler | 1.3.0 | https://yasm.tortall.net/ |
| [`zlib`](zlib/) | zlib | 1.2.11 | https://www.zlib.net/ |
| [`zsh`](zsh/) | Z Shell (Zsh) | 5.8 | https://www.zsh.org |
| [`zstd`](zstd/) | Zstandard | 1.4.4 | https://facebook.github.io/zstd/ |

10
Ports/zsh/package.sh Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=zsh
version=5.8
files="https://sourceforge.net/projects/zsh/files/zsh/${version}/zsh-${version}.tar.xz zsh-${version}.tar.xz dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27"
auth_type="sha256"
useconfigure=true
pre_configure() {
run "./Util/preconfig"
}

View file

@ -0,0 +1,11 @@
--- zsh-zsh-5.8/original-config.sub 2021-06-04 22:59:03.710400955 -0300
+++ zsh-zsh-5.8/config.sub 2021-06-04 23:01:41.573688625 -0300
@@ -1516,6 +1516,8 @@
;;
*-eabi)
;;
+ serenity*)
+ ;;
*)
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1

View file

@ -0,0 +1,11 @@
--- zsh-zsh-5.8/Src/original-zsh_system.h 2021-06-05 08:17:15.364000000 -0300
+++ zsh-zsh-5.8/Src/zsh_system.h 2021-06-04 23:05:07.793197002 -0300
@@ -556,7 +556,7 @@
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
-# if defined(__hpux) && !defined(RLIMIT_CPU)
+# if (defined(__hpux) && !defined(RLIMIT_CPU)) || defined(__serenity__)
/* HPUX does have the BSD rlimits in the kernel. Officially they are *
* unsupported but quite a few of them like RLIMIT_CORE seem to work. *
* All the following are in the <sys/resource.h> but made visible *