summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch')
-rw-r--r--pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch b/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch
index 15d03830e07..cf1bcddeba6 100644
--- a/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch
+++ b/pkgs/development/interpreters/python/pypy/tk_tcl_paths.patch
@@ -1,14 +1,18 @@
 --- a/lib_pypy/_tkinter/tklib_build.py
 +++ b/lib_pypy/_tkinter/tklib_build.py
-@@ -17,19 +17,14 @@ elif sys.platform == 'win32':
+@@ -17,23 +17,14 @@ elif sys.platform == 'win32':
      incdirs = []
      linklibs = ['tcl85', 'tk85']
      libdirs = []
 -elif sys.platform == 'darwin':
 -    # homebrew
+-    homebrew = os.environ.get('HOMEBREW_PREFIX', '')
 -    incdirs = ['/usr/local/opt/tcl-tk/include']
 -    linklibs = ['tcl8.6', 'tk8.6']
--    libdirs = ['/usr/local/opt/tcl-tk/lib']
+-    libdirs = []
+-    if homebrew:
+-        incdirs.append(homebrew + '/include')
+-        libdirs.append(homebrew + '/opt/tcl-tk/lib')
  else:
      # On some Linux distributions, the tcl and tk libraries are
      # stored in /usr/include, so we must check this case also