From 0b7079a76a602db77b62dea89c3098c4d4da3227 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 14 Apr 2021 04:31:52 +0200 Subject: [PATCH] Ports: Add npth port --- Ports/AvailablePorts.md | 1 + Ports/npth/package.sh | 9 +++++++++ Ports/npth/patches/configure.patch | 12 ++++++++++++ 3 files changed, 22 insertions(+) create mode 100755 Ports/npth/package.sh create mode 100644 Ports/npth/patches/configure.patch diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 96e518d1062..bb00941d270 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -67,6 +67,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`neofetch`](neofetch/) | neofetch | 7.1.0 | https://github.com/dylanaraps/neofetch | | [`nesalizer`](nesalizer/) | Nesalizer | | https://github.com/SerenityOS/nesalizer | | [`ninja`](ninja/) | Ninja | 1.8.2 | https://ninja-build.org/ | +| [`npth`](npth/) | New GNU Portable Threads Library | 1.6 | https://gnupg.org/software/npth/index.html | | [`nyancat`](nyancat/) | Nyancat | | https://github.com/klange/nyancat | | [`openssh`](openssh/) | OpenSSH | 8.3-9ca7e9c | https://github.com/openssh/openssh-portable | | [`openssl`](openssl/) | OpenSSL | 1.0.2 | https://www.openssl.org/ | diff --git a/Ports/npth/package.sh b/Ports/npth/package.sh new file mode 100755 index 00000000000..9fdb9febe79 --- /dev/null +++ b/Ports/npth/package.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=npth +version=1.6 +useconfigure=true +files="https://gnupg.org/ftp/gcrypt/npth/npth-${version}.tar.bz2 npth-${version}.tar.bz2" + +configure() { + run ./configure --host="${SERENITY_ARCH}-pc-serenity" --build="$($workdir/build-aux/config.guess)" $configopts +} diff --git a/Ports/npth/patches/configure.patch b/Ports/npth/patches/configure.patch new file mode 100644 index 00000000000..7bcce5a55b4 --- /dev/null +++ b/Ports/npth/patches/configure.patch @@ -0,0 +1,12 @@ +diff -Naur npth-1.6/build-aux/config.sub npth-1.6.serenity/build-aux/config.sub +--- npth-1.6/build-aux/config.sub 2021-04-14 02:43:42.288159882 +0200 ++++ npth-1.6.serenity/build-aux/config.sub 2016-07-13 19:03:42.000000000 +0200 +@@ -1381,7 +1381,7 @@ + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. +- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ ++ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \