From d0bed24ca1595a5f426a66dc715dc5054e637c97 Mon Sep 17 00:00:00 2001 From: Thiago Henrique Hupner Date: Sat, 5 Jun 2021 08:31:13 -0300 Subject: [PATCH] Ports: Add ZSH port --- Ports/AvailablePorts.md | 1 + Ports/zsh/package.sh | 10 ++++++++++ Ports/zsh/patches/0001-add-serenity-config-sub.patch | 11 +++++++++++ Ports/zsh/patches/0002-add-serenity.patch | 11 +++++++++++ 4 files changed, 33 insertions(+) create mode 100755 Ports/zsh/package.sh create mode 100644 Ports/zsh/patches/0001-add-serenity-config-sub.patch create mode 100644 Ports/zsh/patches/0002-add-serenity.patch diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 950fb47dc6d..3e33cfde9d6 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -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/ | diff --git a/Ports/zsh/package.sh b/Ports/zsh/package.sh new file mode 100755 index 00000000000..5b050aee5dc --- /dev/null +++ b/Ports/zsh/package.sh @@ -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" +} diff --git a/Ports/zsh/patches/0001-add-serenity-config-sub.patch b/Ports/zsh/patches/0001-add-serenity-config-sub.patch new file mode 100644 index 00000000000..ac3318512fd --- /dev/null +++ b/Ports/zsh/patches/0001-add-serenity-config-sub.patch @@ -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 diff --git a/Ports/zsh/patches/0002-add-serenity.patch b/Ports/zsh/patches/0002-add-serenity.patch new file mode 100644 index 00000000000..a7ccf37f714 --- /dev/null +++ b/Ports/zsh/patches/0002-add-serenity.patch @@ -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 +-# 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 but made visible *