diff --git a/Ports/zstd/patches/fix_soname_flags.patch b/Ports/zstd/patches/0001-Fix-linker-soname-flags.patch similarity index 65% rename from Ports/zstd/patches/fix_soname_flags.patch rename to Ports/zstd/patches/0001-Fix-linker-soname-flags.patch index 232275d8d7b..a57f35a6752 100644 --- a/Ports/zstd/patches/fix_soname_flags.patch +++ b/Ports/zstd/patches/0001-Fix-linker-soname-flags.patch @@ -1,6 +1,18 @@ ---- zstd-1.5.2/lib/Makefile.orig 2022-01-08 01:21:29.874503163 +0000 -+++ zstd-1.5.2/lib/Makefile 2022-01-08 01:21:43.026368517 +0000 -@@ -69,22 +69,10 @@ +From 119adcddd9faa0485a64c49fb461ed24d26499b6 Mon Sep 17 00:00:00 2001 +From: Luke Wilde +Date: Sun, 13 Mar 2022 16:45:19 +0000 +Subject: [PATCH 1/2] Fix linker soname flags + +Co-Authored-By: EWouters <6179932+EWouters@users.noreply.github.com> +--- + lib/Makefile | 20 ++++---------------- + 1 file changed, 4 insertions(+), 16 deletions(-) + +diff --git a/lib/Makefile b/lib/Makefile +index ef20218..e4766c9 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -69,22 +69,10 @@ endif # macOS linker doesn't support -soname, and use different extension # see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html @@ -27,3 +39,6 @@ .PHONY: all all: lib +-- +2.36.1 + diff --git a/Ports/zstd/patches/0002-Make-platform.h-understand-that-serenity-is-posix-co.patch b/Ports/zstd/patches/0002-Make-platform.h-understand-that-serenity-is-posix-co.patch new file mode 100644 index 00000000000..2c91cc68c93 --- /dev/null +++ b/Ports/zstd/patches/0002-Make-platform.h-understand-that-serenity-is-posix-co.patch @@ -0,0 +1,31 @@ +From 71a4bdd121f346d97c398f92a7ff310132de497a Mon Sep 17 00:00:00 2001 +From: Luke Wilde +Date: Sun, 13 Mar 2022 16:45:19 +0000 +Subject: [PATCH 2/2] Make platform.h understand that serenity is + posix-compliant + +Co-Authored-By: Brian Callahan +--- + programs/platform.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/programs/platform.h b/programs/platform.h +index b858e3b..8628c05 100644 +--- a/programs/platform.h ++++ b/programs/platform.h +@@ -98,7 +98,11 @@ extern "C" { + # endif + # include /* declares _POSIX_VERSION */ + # if defined(_POSIX_VERSION) /* POSIX compliant */ +-# define PLATFORM_POSIX_VERSION _POSIX_VERSION ++# if defined(__serenity__) ++# define PLATFORM_POSIX_VERSION 1 ++# else ++# define PLATFORM_POSIX_VERSION _POSIX_VERSION ++# endif + # else + # define PLATFORM_POSIX_VERSION 1 + # endif +-- +2.36.1 + diff --git a/Ports/zstd/patches/ReadMe.md b/Ports/zstd/patches/ReadMe.md new file mode 100644 index 00000000000..462dfee2bfd --- /dev/null +++ b/Ports/zstd/patches/ReadMe.md @@ -0,0 +1,14 @@ +# Patches for zstd on SerenityOS + +## `0001-Fix-linker-soname-flags.patch` + +Fix linker soname flags + + + +## `0002-Make-platform.h-understand-that-serenity-is-posix-co.patch` + +Make platform.h understand that serenity is posix-compliant + + + diff --git a/Ports/zstd/patches/posix-compliance.patch b/Ports/zstd/patches/posix-compliance.patch deleted file mode 100644 index a2eb1a48627..00000000000 --- a/Ports/zstd/patches/posix-compliance.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- zstd-1.5.2/programs/platform.h.orig 2022-01-08 01:30:53.468728340 +0000 -+++ zstd-1.5.2/programs/platform.h 2022-01-08 01:31:01.480646197 +0000 -@@ -98,7 +98,11 @@ - # endif - # include /* declares _POSIX_VERSION */ - # if defined(_POSIX_VERSION) /* POSIX compliant */ --# define PLATFORM_POSIX_VERSION _POSIX_VERSION -+# if defined(__serenity__) -+# define PLATFORM_POSIX_VERSION 1 -+# else -+# define PLATFORM_POSIX_VERSION _POSIX_VERSION -+# endif - # else - # define PLATFORM_POSIX_VERSION 1 - # endif