pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/fonts/fontconfig fontconfig: fix crash on mac OS aarch...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f2e7b5d0fcea
branches:  trunk
changeset: 458216:f2e7b5d0fcea
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Sep 11 23:34:44 2021 +0000

description:
fontconfig: fix crash on mac OS aarch64. Via upstream. Bump.

diffstat:

 fonts/fontconfig/Makefile                     |   4 +-
 fonts/fontconfig/distinfo                     |   3 +-
 fonts/fontconfig/patches/patch-src_fcatomic.h |  42 +++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 3 deletions(-)

diffs (76 lines):

diff -r 532fc60a30d2 -r f2e7b5d0fcea fonts/fontconfig/Makefile
--- a/fonts/fontconfig/Makefile Sat Sep 11 21:14:31 2021 +0000
+++ b/fonts/fontconfig/Makefile Sat Sep 11 23:34:44 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.121 2020/11/05 17:41:28 nia Exp $
+# $NetBSD: Makefile,v 1.122 2021/09/11 23:34:44 tnn Exp $
 
 DISTNAME=      fontconfig-2.13.1
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    fonts
 MASTER_SITES=  https://www.fontconfig.org/release/
 EXTRACT_SUFX=  .tar.bz2
diff -r 532fc60a30d2 -r f2e7b5d0fcea fonts/fontconfig/distinfo
--- a/fonts/fontconfig/distinfo Sat Sep 11 21:14:31 2021 +0000
+++ b/fonts/fontconfig/distinfo Sat Sep 11 23:34:44 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.67 2020/08/18 08:19:17 tnn Exp $
+$NetBSD: distinfo,v 1.68 2021/09/11 23:34:44 tnn Exp $
 
 SHA1 (fontconfig-2.13.1.tar.bz2) = 75612356ef4f801735b49baf987f8942b4a7a5e1
 RMD160 (fontconfig-2.13.1.tar.bz2) = a971903874fb0395a7ab2d5705378af1ffce2b2c
@@ -9,6 +9,7 @@
 SHA1 (patch-af) = d351265c894738284215f0bb38d47cc1c8f28ec7
 SHA1 (patch-configure) = a4b18983ad7d2cff658b733dab5a09b25019842e
 SHA1 (patch-scandir.c) = e35f4c005f635dd0d8bb949cd32aa34f5e314200
+SHA1 (patch-src_fcatomic.h) = 7c9b7be6d2c95b81a481a829b10b8607e4919c35
 SHA1 (patch-src_fccharset.c) = f3855554b3b3cab2530b46bc1ccec6a33303de7a
 SHA1 (patch-src_fcfreetype.c) = 42542ae666b292af700313ee103d0f295cf69e4e
 SHA1 (patch-src_fcftint.h) = d629fd7ef9713ccc56800d033ba2e09c5a9e2bff
diff -r 532fc60a30d2 -r f2e7b5d0fcea fonts/fontconfig/patches/patch-src_fcatomic.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/fonts/fontconfig/patches/patch-src_fcatomic.h     Sat Sep 11 23:34:44 2021 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_fcatomic.h,v 1.1 2021/09/11 23:34:44 tnn Exp $
+
+Fix crash on mac OS aarch64. From upstream:
+
+From 6def66164a36eed968aae872d76acfac3173d44a Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek%centricular.com@localhost>
+Date: Sat, 22 Feb 2020 03:57:50 +0530
+Subject: [PATCH] fcatomic: Fix EXC_BAD_ACCESS on iOS ARM64
+
+iPhone 2.1 was released a long time ago, and the macro for checking
+the target iOS SDK version has changed. We can simplify everything and
+do a very basic check.
+
+--- src/fcatomic.h.orig        2016-12-02 03:22:19.000000000 +0000
++++ src/fcatomic.h
+@@ -70,24 +70,16 @@ typedef LONG fc_atomic_int_t;
+ #elif !defined(FC_NO_MT) && defined(__APPLE__)
+ 
+ #include <libkern/OSAtomic.h>
+-#ifdef __MAC_OS_X_MIN_REQUIRED
+ #include <AvailabilityMacros.h>
+-#elif defined(__IPHONE_OS_MIN_REQUIRED)
+-#include <Availability.h>
+-#endif
+ 
+ typedef int fc_atomic_int_t;
+ #define fc_atomic_int_add(AI, V)      (OSAtomicAdd32Barrier ((V), &(AI)) - (V))
+ 
+ #define fc_atomic_ptr_get(P)          (OSMemoryBarrier (), (void *) *(P))
+-#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100)
++#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 20100)
+ #define fc_atomic_ptr_cmpexch(P,O,N)  OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
+ #else
+-#if __ppc64__ || __x86_64__
+-#define fc_atomic_ptr_cmpexch(P,O,N)  OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P))
+-#else
+-#define fc_atomic_ptr_cmpexch(P,O,N)  OSAtomicCompareAndSwap32Barrier ((int32_t) (O), (int32_t) (N), (int32_t*) (P))
+-#endif
++#error "Your macOS / iOS targets are too old"
+ #endif
+ 
+ #elif !defined(FC_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)



Home | Main Index | Thread Index | Old Index