From ff8630c66fc7e44a91f2985058bc761f8b6f5ca1 Mon Sep 17 00:00:00 2001 From: TheFightingCatfish Date: Fri, 13 Aug 2021 06:52:59 +0800 Subject: Ports: Disable uname detection when building git Previously, the git port would fail in various ways because it uses an uname detection mechanism to update the configurations, and Makefile would receive incorrect configurations from the host system. This makes sure the build uses the correct configurations detected by ./configure. Fixes #9357. --- Ports/git/patches/have_no_librt.patch | 12 ------------ Ports/git/patches/have_no_sysinfo.patch | 11 ----------- Ports/git/patches/no-uname-detection.patch | 23 +++++++++++++++++++++++ 3 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 Ports/git/patches/have_no_librt.patch delete mode 100644 Ports/git/patches/have_no_sysinfo.patch create mode 100644 Ports/git/patches/no-uname-detection.patch diff --git a/Ports/git/patches/have_no_librt.patch b/Ports/git/patches/have_no_librt.patch deleted file mode 100644 index a23611438a..0000000000 --- a/Ports/git/patches/have_no_librt.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- git-2.26.0/config.mak.uname.orig 2021-03-13 13:30:24.439217597 +0100 -+++ git-2.26.0/config.mak.uname 2021-03-13 13:30:32.747203874 +0100 -@@ -52,7 +52,8 @@ - HAVE_CLOCK_GETTIME = YesPlease - HAVE_CLOCK_MONOTONIC = YesPlease - # -lrt is needed for clock_gettime on glibc <= 2.16 -- NEEDS_LIBRT = YesPlease -+ # But not when cross-compiling for Serenity. -+ # NEEDS_LIBRT = YesPlease - HAVE_GETDELIM = YesPlease - SANE_TEXT_GREP=-a - FREAD_READS_DIRECTORIES = UnfortunatelyYes diff --git a/Ports/git/patches/have_no_sysinfo.patch b/Ports/git/patches/have_no_sysinfo.patch deleted file mode 100644 index 4bbb6a0040..0000000000 --- a/Ports/git/patches/have_no_sysinfo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- git-2.26.0/config.mak.uname.orig 2021-03-13 13:30:24.439217597 +0100 -+++ git-2.26.0/config.mak.uname 2021-03-13 13:30:32.747203874 +0100 -@@ -57,7 +57,7 @@ - HAVE_GETDELIM = YesPlease - SANE_TEXT_GREP=-a - FREAD_READS_DIRECTORIES = UnfortunatelyYes -- BASIC_CFLAGS += -DHAVE_SYSINFO -+ # BASIC_CFLAGS += -DHAVE_SYSINFO - PROCFS_EXECUTABLE_PATH = /proc/self/exe - endif - ifeq ($(uname_S),GNU/kFreeBSD) diff --git a/Ports/git/patches/no-uname-detection.patch b/Ports/git/patches/no-uname-detection.patch new file mode 100644 index 0000000000..66a1dfb943 --- /dev/null +++ b/Ports/git/patches/no-uname-detection.patch @@ -0,0 +1,23 @@ +diff --git a/config.mak.uname b/config.mak.uname +index d204c20..d49e3ba 100644 +--- a/config.mak.uname ++++ b/config.mak.uname +@@ -4,12 +4,12 @@ + # Microsoft's Safe Exception Handling in libraries (such as zlib). + # Typically required for VS2013+/32-bit compilation on Vista+ versions. + +-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') +-uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') +-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') +-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') +-uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') +-uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') ++# uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') ++# uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') ++# uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') ++# uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') ++# uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') ++# uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') + + ifdef MSVC + # avoid the MingW and Cygwin configuration sections -- cgit v1.2.3