diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index ce31660ea3..58be3b652b 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -81,6 +81,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`openssl`](openssl/) | OpenSSL | 1.0.2 | https://www.openssl.org/ | | [`oksh`](oksh/) | oksh | 6.8.1 | https://github.com/ibara/oksh | | [`patch`](patch/) | patch (OpenBSD) | 6.6 | https://github.com/ibara/libpuffy | +| [`pcre`](pcre/) | Perl-compatible Regular Expressions (PCRE) | 8.44 | https://www.pcre.org/ | | [`pcre2`](pcre2/) | Perl-compatible Regular Expressions (PCRE2) | 10.34 | https://www.pcre.org/ | | [`pkgconf`](pkgconf/) | pkgconf | 1.7.3 | https://github.com/pkgconf/pkgconf | | [`SDLPoP`](SDLPoP/) | Prince of Persia game | | https://github.com/NagyD/SDLPoP | diff --git a/Ports/pcre/package.sh b/Ports/pcre/package.sh new file mode 100755 index 0000000000..798580f4d0 --- /dev/null +++ b/Ports/pcre/package.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=pcre +version=8.44 +useconfigure=true +files="https://ftp.pcre.org/pub/pcre/pcre-${version}.tar.gz pcre-${version}.tar.gz +https://ftp.pcre.org/pub/pcre/pcre-${version}.tar.gz.sig pcre-${version}.tar.gz.sig" + +auth_type="sig" +auth_import_key="45F68D54BBE23FB3039B46E59766E084FB0F43D8" +auth_opts="pcre-${version}.tar.gz.sig" diff --git a/Ports/pcre/patches/fix-autoconf.patch b/Ports/pcre/patches/fix-autoconf.patch new file mode 100644 index 0000000000..328ed5d060 --- /dev/null +++ b/Ports/pcre/patches/fix-autoconf.patch @@ -0,0 +1,12 @@ +diff -Naur pcre-8.44/config.sub pcre-8.44.serenity/config.sub +--- pcre-8.44/config.sub 2020-02-12 18:17:31.000000000 +0100 ++++ pcre-8.44.serenity/config.sub 2021-04-12 01:21:59.467797075 +0200 +@@ -1390,7 +1390,7 @@ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ +- | -midnightbsd*) ++ | -midnightbsd* | -serenity*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) diff --git a/Ports/pcre/patches/fix-rlimit.patch b/Ports/pcre/patches/fix-rlimit.patch new file mode 100644 index 0000000000..16b78b08c8 --- /dev/null +++ b/Ports/pcre/patches/fix-rlimit.patch @@ -0,0 +1,12 @@ +diff -Naur pcre-8.44/pcretest.c pcre-8.44.serenity/pcretest.c +--- pcre-8.44/pcretest.c 2020-02-11 18:28:46.000000000 +0100 ++++ pcre-8.44.serenity/pcretest.c 2021-04-12 01:23:25.182873375 +0200 +@@ -3168,7 +3168,7 @@ + ((stack_size = get_value((pcre_uint8 *)argv[op+1], &endptr)), + *endptr == 0)) + { +-#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS) ++#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS) || defined(__serenity__) + printf("PCRE: -S not supported on this OS\n"); + exit(1); + #else