FreeBSD Bugzilla – Attachment 97460 Details for
Bug 136198
[PATCH] x11-toolkits/py-tkinter: Fix building with python3*
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
py26-tkinter-2.6.2_3.patch
py26-tkinter-2.6.2_3.patch (text/plain), 2.25 KB, created by
Li-Wen Hsu
on 2009-07-01 00:20:01 UTC
(
hide
)
Description:
py26-tkinter-2.6.2_3.patch
Filename:
MIME Type:
Creator:
Li-Wen Hsu
Created:
2009-07-01 00:20:01 UTC
Size:
2.25 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/x11-toolkits/py-tkinter/Makefile,v >retrieving revision 1.17 >diff -u -u -r1.17 Makefile >--- Makefile 30 Mar 2009 20:19:19 -0000 1.17 >+++ Makefile 30 Jun 2009 21:55:37 -0000 >@@ -25,9 +25,15 @@ > PYDISTUTILS_PKGVERSION= 0.0.0 > USE_TK= 82+ > WRKSRC= ${PYTHON_WRKSRC}/Modules >-MD5_FILE= ${PORTSDIR}/lang/python/distinfo >+MD5_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo >+ >+.include <bsd.port.pre.mk> > > post-extract: >+.if ${PYTHON_REL} < 300 > @${SED} -e "s|%%TK_VER%%|${TK_VER}|" ${FILESDIR}/setup.py > ${WRKSRC}/setup.py >+.else >+ @${SED} -e "s|%%TK_VER%%|${TK_VER}|" ${FILESDIR}/setup3.py > ${WRKSRC}/setup.py >+.endif > >-.include <bsd.port.mk> >+.include <bsd.port.post.mk> >Index: files/setup3.py >=================================================================== >RCS file: files/setup3.py >diff -N files/setup3.py >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ files/setup3.py 30 Jun 2009 21:55:37 -0000 >@@ -0,0 +1,40 @@ >+#!/usr/bin/env python >+# To use: >+# python setup.py install >+# >+ >+__version__ = "$FreeBSD$" >+ >+import os, string >+ >+try: >+ import distutils >+ from distutils import sysconfig >+ from distutils.command.install import install >+ from distutils.core import setup, Extension >+except: >+ raise SystemExit("Distutils problem") >+ >+tkversion = "%%TK_VER%%" >+prefix = sysconfig.PREFIX >+# Python 1.5 doesn't have os.getenv()? >+x11base = os.environ['LOCALBASE'] or '/usr/X11R6' >+inc_dirs = [prefix + "/include", >+ prefix + "/include/tcl" + tkversion, >+ prefix + "/include/tk" + tkversion, >+ x11base + "/include"] >+lib_dirs = [prefix + "/lib", x11base + "/lib"] >+# use string.replace() for the benefit of Python 1.5 users >+libs = ["tcl" + tkversion.replace(".", ""), >+ "tk" + tkversion.replace(".", ""), >+ "X11"] >+ >+setup(name = "Tkinter", >+ description = "Tk Extension to Python", >+ >+ ext_modules = [Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], >+ define_macros=[('WITH_APPINIT', 1)], >+ include_dirs = inc_dirs, >+ libraries = libs, >+ library_dirs = lib_dirs)] >+ )
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 136198
: 97460