pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/m4



Module Name:    pkgsrc
Committed By:   wiz
Date:           Tue Feb 18 15:07:14 UTC 2025

Modified Files:
        pkgsrc/devel/m4: distinfo
        pkgsrc/devel/m4/patches: patch-lib_sigsegv.c

Log Message:
m4: Improve macOS patch compatibility.

This should now work across all versions, and fix the build problem
raised in NetBSD/pkgsrc#158.  Tested locally against the 10.4 SDK.

>From Jonathan Perkin <jperkin%smartos.org@localhost>
via drecklypkg commit 05d082ecd383bb9abfeebc219de0ff7ee50645c8


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 pkgsrc/devel/m4/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/m4/patches/patch-lib_sigsegv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/m4/distinfo
diff -u pkgsrc/devel/m4/distinfo:1.53 pkgsrc/devel/m4/distinfo:1.54
--- pkgsrc/devel/m4/distinfo:1.53       Tue May 24 14:43:03 2022
+++ pkgsrc/devel/m4/distinfo    Tue Feb 18 15:07:14 2025
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.53 2022/05/24 14:43:03 hauke Exp $
+$NetBSD: distinfo,v 1.54 2025/02/18 15:07:14 wiz Exp $
 
 BLAKE2s (m4-1.4.19.tar.gz) = f1380114d839935b2afa53fdd7162dc5df2bbeb6d5eab48528916a138f483cbc
 SHA512 (m4-1.4.19.tar.gz) = f5dd0f02fcae65a176a16af9a8e1747c26e9440c6c224003ba458d3298b777a75ffb189aee9051fb0c4840b2a48278be4a51d959381af0b1d627570f478c58f2
 Size (m4-1.4.19.tar.gz) = 2953876 bytes
 SHA1 (patch-configure) = 941bba8b1a10c3fc305d20abdb247cf45e44d534
-SHA1 (patch-lib_sigsegv.c) = 31eebf620879e727737af41e3283a9209bbf5a9c
+SHA1 (patch-lib_sigsegv.c) = 5f49ac75d55aae5a5ad5530a212ec25e15c679e8
 SHA1 (patch-lib_strerror_override.c) = 29905fecf6c92f75c4999f1e3cb56e14fe2f4aae
 SHA1 (patch-m4_sparcv8+.m4) = 761e592a700ea47ac0ba15d960f073115005dedd

Index: pkgsrc/devel/m4/patches/patch-lib_sigsegv.c
diff -u pkgsrc/devel/m4/patches/patch-lib_sigsegv.c:1.1 pkgsrc/devel/m4/patches/patch-lib_sigsegv.c:1.2
--- pkgsrc/devel/m4/patches/patch-lib_sigsegv.c:1.1     Tue May 24 14:43:03 2022
+++ pkgsrc/devel/m4/patches/patch-lib_sigsegv.c Tue Feb 18 15:07:14 2025
@@ -1,16 +1,53 @@
-$NetBSD: patch-lib_sigsegv.c,v 1.1 2022/05/24 14:43:03 hauke Exp $
+$NetBSD: patch-lib_sigsegv.c,v 1.2 2025/02/18 15:07:14 wiz Exp $
 
 Use older regnames on MacOS X 10.4 "Tiger", taken from
 <https://github.com/macports/macports-ports/blob/f9641f5f5cb7287e6787b566945fff460a80bc39/devel/m4/files/patch-m4-use-older-regnames-on-tiger.diff>
 
 --- lib/sigsegv.c.orig 2021-05-19 14:36:49.000000000 +0000
 +++ lib/sigsegv.c
-@@ -586,7 +586,7 @@ int libsigsegv_version = LIBSIGSEGV_VERS
+@@ -33,6 +33,9 @@
+ # include <sys/param.h> /* defines macro OpenBSD */
+ #endif
+ 
++#ifdef __APPLE__
++# include <AvailabilityMacros.h>
++#endif
+ 
+ /* Version number.  */
+ int libsigsegv_version = LIBSIGSEGV_VERSION;
+@@ -562,7 +565,11 @@ int libsigsegv_version = LIBSIGSEGV_VERS
+      - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_types/_ucontext.h>,
+      - 'struct __darwin_mcontext64' in <i386/_mcontext.h>, and
+      - 'struct __darwin_x86_thread_state64' in <mach/i386/_structs.h>.  */
++# if __MAC_OS_X_VERSION_MAX_ALLOWED < 1050
++#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->ss.rsp
++# else
+ #  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__rsp
++# endif
+ 
+ # elif defined __i386__
+ 
+@@ -570,7 +577,11 @@ int libsigsegv_version = LIBSIGSEGV_VERS
+      - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_types/_ucontext.h>,
+      - 'struct __darwin_mcontext32' in <i386/_mcontext.h>, and
+      - 'struct __darwin_i386_thread_state' in <mach/i386/_structs.h>.  */
++# if __MAC_OS_X_VERSION_MAX_ALLOWED < 1050
++#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->ss.esp
++# else
+ #  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__esp
++# endif
+ 
+ # elif defined __arm64__
+ 
+@@ -586,7 +597,11 @@ int libsigsegv_version = LIBSIGSEGV_VERS
       - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_structs.h>,
       - 'struct __darwin_mcontext' in <ppc/_structs.h>, and
       - 'struct __darwin_ppc_thread_state' in <mach/ppc/_structs.h>.  */
--#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__r1
++# if __MAC_OS_X_VERSION_MAX_ALLOWED < 1050
 +#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->ss.r1
++# else
+ #  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__r1
++#endif
  
  # endif
  



Home | Main Index | Thread Index | Old Index