From 153e7fca326bf021eb915b626a565259f10e669a Mon Sep 17 00:00:00 2001 From: strager Date: Tue, 16 Apr 2019 00:11:01 -0700 Subject: boost: fix 1.55 build on macOS (#59508) darwin-no-system-python.patch does not apply cleany on Boost 1.55's sources. Fix this patch file for Boost 1.55, making it build successfully on macOS. --- .../boost/darwin-1.55-no-system-python.patch | 45 ++++++++++++++++++++++ pkgs/development/libraries/boost/generic.nix | 5 ++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/boost/darwin-1.55-no-system-python.patch (limited to 'pkgs') diff --git a/pkgs/development/libraries/boost/darwin-1.55-no-system-python.patch b/pkgs/development/libraries/boost/darwin-1.55-no-system-python.patch new file mode 100644 index 00000000000..f8163f6d271 --- /dev/null +++ b/pkgs/development/libraries/boost/darwin-1.55-no-system-python.patch @@ -0,0 +1,45 @@ +diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam +index 273b28a..2d2031e 100644 +--- a/tools/build/v2/tools/python.jam ++++ b/tools/build/v2/tools/python.jam +@@ -428,13 +428,7 @@ local rule windows-installed-pythons ( version ? ) + + local rule darwin-installed-pythons ( version ? ) + { +- version ?= $(.version-countdown) ; +- +- local prefix +- = [ GLOB /System/Library/Frameworks /Library/Frameworks +- : Python.framework ] ; +- +- return $(prefix)/Versions/$(version)/bin/python ; ++ return ; + } + + +@@ -890,25 +884,6 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : + + # See if we can find a framework directory on darwin. + local framework-directory ; +- if $(target-os) = darwin +- { +- # Search upward for the framework directory. +- local framework-directory = $(libraries[-1]) ; +- while $(framework-directory:D=) && $(framework-directory:D=) != Python.framework +- { +- framework-directory = $(framework-directory:D) ; +- } +- +- if $(framework-directory:D=) = Python.framework +- { +- debug-message framework directory is \"$(framework-directory)\" ; +- } +- else +- { +- debug-message "no framework directory found; using library path" ; +- framework-directory = ; +- } +- } + + local dll-path = $(libraries) ; + diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index dd383bd0123..8ce44b878d0 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -104,7 +104,10 @@ stdenv.mkDerivation { patchFlags = ""; patches = patches - ++ optional stdenv.isDarwin ./darwin-no-system-python.patch; + ++ optional stdenv.isDarwin ( + if version == "1.55.0" + then ./darwin-1.55-no-system-python.patch + else ./darwin-no-system-python.patch); meta = { homepage = http://boost.org/; -- cgit 1.4.1