From bce4388874bd205d45518727f2a92a142f18635b Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 3 Jul 2018 21:08:46 +0200 Subject: [PATCH] boost: disable system Python.framework detection There doesn't seem to be a --without-python flag and since the system framework is always available the build tries to enable python support while we have it disabled by default and explicitly don't pass in the python headers. --- .../boost/darwin-no-system-python.patch | 45 +++++++++++++++++++ pkgs/development/libraries/boost/generic.nix | 12 ++--- 2 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/libraries/boost/darwin-no-system-python.patch diff --git a/pkgs/development/libraries/boost/darwin-no-system-python.patch b/pkgs/development/libraries/boost/darwin-no-system-python.patch new file mode 100644 index 00000000000..73e0910336a --- /dev/null +++ b/pkgs/development/libraries/boost/darwin-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/src/tools/python.jam ++++ b/tools/build/src/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 34e837f7cd2..dab6fac6f0c 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -87,11 +87,13 @@ stdenv.mkDerivation { inherit src; patchFlags = optionalString (hostPlatform.libc == "msvcrt") "-p0"; - patches = patches ++ optional (hostPlatform.libc == "msvcrt") (fetchurl { - url = "https://svn.boost.org/trac/boost/raw-attachment/tickaet/7262/" - + "boost-mingw.patch"; - sha256 = "0s32kwll66k50w6r5np1y5g907b7lcpsjhfgr7rsw7q5syhzddyj"; - }); + patches = patches + ++ optional stdenv.isDarwin ./darwin-no-system-python.patch + ++ optional (hostPlatform.libc == "msvcrt") (fetchurl { + url = "https://svn.boost.org/trac/boost/raw-attachment/tickaet/7262/" + + "boost-mingw.patch"; + sha256 = "0s32kwll66k50w6r5np1y5g907b7lcpsjhfgr7rsw7q5syhzddyj"; + }); meta = { homepage = http://boost.org/;