From 73cfabbf21355dd061859120bff172edb0bf1a78 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 26 Jul 2025 21:43:22 +0100 Subject: [PATCH] darwin.libffi: backport automake-1.18 fix Attempt to fix build failure reported at https://github.com/NixOS/nixpkgs/pull/340373#issuecomment-3122173611. --- .../apple-source-releases/libffi/package.nix | 2 ++ .../libffi/patches/automake-1.18.patch | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libffi/patches/automake-1.18.patch diff --git a/pkgs/os-specific/darwin/apple-source-releases/libffi/package.nix b/pkgs/os-specific/darwin/apple-source-releases/libffi/package.nix index 4fe40e86aab9..942f0a26da43 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libffi/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libffi/package.nix @@ -27,6 +27,8 @@ mkAppleDerivation (finalAttrs: { ./patches/llvm-18-compatibility.patch # Fix a memory leak when using the trampoline dylib. See https://github.com/libffi/libffi/pull/621#discussion_r955298301. ./patches/fix-tramponline-memory-leak.patch + # Fix automake-18.18 compatibility, https://github.com/libffi/libffi/issues/853#issuecomment-2909994482 + ./patches/automake-1.18.patch ]; # Make sure libffi is using the trampolines dylib in this package not the system one. diff --git a/pkgs/os-specific/darwin/apple-source-releases/libffi/patches/automake-1.18.patch b/pkgs/os-specific/darwin/apple-source-releases/libffi/patches/automake-1.18.patch new file mode 100644 index 000000000000..148baa6d1e86 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libffi/patches/automake-1.18.patch @@ -0,0 +1,14 @@ +The hunk is used from https://github.com/libffi/libffi/issues/853#issuecomment-2909994482 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4,6 +4,10 @@ AUTOMAKE_OPTIONS = foreign subdir-objects + + ACLOCAL_AMFLAGS = -I m4 + ++# Alias required by AX_ENABLE_BUILDDIR / config-ml ++.PHONY: all-configured ++all-configured: all ++ + SUBDIRS = include testsuite man + if BUILD_DOCS + ## This hack is needed because it doesn't seem possible to make a