Skip to content
Permalink
Browse files

lang/python26 - do not link in X11 when tk is installed with +quartz,…

  • Loading branch information
blb committed Jun 13, 2010
1 parent 4a5f224 commit 0f9e710eb46ec05e75f579ebd204d48724e8aa80
Showing with 22 additions and 1 deletion.
  1. +9 −1 lang/python26/Portfile
  2. +13 −0 lang/python26/files/patch-setup.py_tkquartz.diff
@@ -5,7 +5,7 @@ PortGroup select 1.0

name python26
version 2.6.5
revision 1
revision 2
set major [lindex [split $version .] 0]
set branch [join [lrange [split ${version} .] 0 1] .]
categories lang
@@ -78,6 +78,14 @@ post-patch {
# http://trac.macports.org/ticket/21559
system "cd ${worksrcpath} && ed - Modules/posixmodule.c < ${filespath}/posixmodule.c.ed"
}

# Check for whether tk is installed for X11 or Quartz (to avoid trying
# to link to X11 in the Quartz case, ticket #25221)
if {[catch {exec grep "^TK_LIBS.*X11" ${prefix}/lib/tkConfig.sh > /dev/null 2>@1} results options]} {
# Error from grep means not found, so Quartz
system "cd ${worksrcpath} && patch -p0 < ${filespath}/patch-setup.py_tkquartz.diff"
}

}

build.target all
@@ -0,0 +1,13 @@
--- setup.py.orig 2010-03-08 00:08:25.000000000 -0700
+++ setup.py 2010-06-13 14:19:56.000000000 -0600
@@ -1636,8 +1636,8 @@
libs.append('ld')

# Finally, link with the X11 libraries (not appropriate on cygwin)
- if platform != "cygwin":
- libs.append('X11')
+# if platform != "cygwin":
+# libs.append('X11')

ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
define_macros=[('WITH_APPINIT', 1)] + defs,

0 comments on commit 0f9e710

Please sign in to comment.
You can’t perform that action at this time.