diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/libraries/fontconfig | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/fontconfig')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/fontconfig/default.nix | 7 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/fontconfig/macos-atomics.h | 39 |
2 files changed, 45 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/fontconfig/default.nix b/nixpkgs/pkgs/development/libraries/fontconfig/default.nix index a7f8fa89c166..c0846edbbfe4 100644 --- a/nixpkgs/pkgs/development/libraries/fontconfig/default.nix +++ b/nixpkgs/pkgs/development/libraries/fontconfig/default.nix @@ -61,6 +61,11 @@ stdenv.mkDerivation rec { url = "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/409b37c62780728755c908991c912a6b16f2389c.patch"; sha256 = "zJFh37QErSAINPGFkFVJyhYRP27BuIN7PIgoDl/PIwI="; }) + + # Combination of + # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/88 + # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/131 + ./macos-atomics.h ]; outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config @@ -118,6 +123,6 @@ stdenv.mkDerivation rec { homepage = "http://fontconfig.org/"; license = licenses.bsd2; # custom but very bsd-like platforms = platforms.all; - maintainers = [ maintainers.vcunat ]; + maintainers = with maintainers; teams.freedesktop.members ++ [ ]; }; } diff --git a/nixpkgs/pkgs/development/libraries/fontconfig/macos-atomics.h b/nixpkgs/pkgs/development/libraries/fontconfig/macos-atomics.h new file mode 100644 index 000000000000..07b0cf1d52dc --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/fontconfig/macos-atomics.h @@ -0,0 +1,39 @@ +--- a/src/fcatomic.h 2020-11-27 13:23:44.000000000 +0900 ++++ b/src/fcatomic.h 2020-11-27 13:24:43.000000000 +0900 +@@ -70,24 +70,25 @@ + #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) +-#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)) ++#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 20100) ++ ++#if SIZEOF_VOID_P == 8 ++#define fc_atomic_ptr_get(P) OSAtomicAdd64Barrier (0, (int64_t*)(P)) ++#elif SIZEOF_VOID_P == 4 ++#define fc_atomic_ptr_get(P) OSAtomicAdd32Barrier (0, (int32_t*)(P)) + #else +-#define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwap32Barrier ((int32_t) (O), (int32_t) (N), (int32_t*) (P)) ++#error "SIZEOF_VOID_P not 4 or 8 (assumes CHAR_BIT is 8)" + #endif ++ ++#define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) ++ ++#else ++#error "Your macOS / iOS targets are too old" + #endif + + #elif !defined(FC_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) |