[68792] trunk/dports/lang/python26
blb at macports.org
blb at macports.org
Sun Jun 13 13:49:44 PDT 2010
Revision: 68792
http://trac.macports.org/changeset/68792
Author: blb at macports.org
Date: 2010-06-13 13:49:38 -0700 (Sun, 13 Jun 2010)
Log Message:
-----------
lang/python26 - do not link in X11 when tk is installed with +quartz, ticket #25221
Modified Paths:
--------------
trunk/dports/lang/python26/Portfile
Added Paths:
-----------
trunk/dports/lang/python26/files/patch-setup.py_tkquartz.diff
Modified: trunk/dports/lang/python26/Portfile
===================================================================
--- trunk/dports/lang/python26/Portfile 2010-06-13 19:07:52 UTC (rev 68791)
+++ trunk/dports/lang/python26/Portfile 2010-06-13 20:49:38 UTC (rev 68792)
@@ -5,7 +5,7 @@
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 @@
# 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
Added: trunk/dports/lang/python26/files/patch-setup.py_tkquartz.diff
===================================================================
--- trunk/dports/lang/python26/files/patch-setup.py_tkquartz.diff (rev 0)
+++ trunk/dports/lang/python26/files/patch-setup.py_tkquartz.diff 2010-06-13 20:49:38 UTC (rev 68792)
@@ -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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100613/00f2297f/attachment.html>
More information about the macports-changes
mailing list