diff options
-rw-r--r-- | x11/py-Tk/Makefile | 43 | ||||
-rw-r--r-- | x11/py-Tk/PLIST | 6 | ||||
-rw-r--r-- | x11/py-Tk/buildlink.mk | 6 | ||||
-rw-r--r-- | x11/py-Tk/distinfo | 4 | ||||
-rw-r--r-- | x11/py-Tk/files/setup.py | 26 |
5 files changed, 63 insertions, 22 deletions
diff --git a/x11/py-Tk/Makefile b/x11/py-Tk/Makefile index 7418e7be3a8..4290954399f 100644 --- a/x11/py-Tk/Makefile +++ b/x11/py-Tk/Makefile @@ -1,28 +1,41 @@ -# $NetBSD: Makefile,v 1.18 2002/01/22 18:08:01 drochner Exp $ +# $NetBSD: Makefile,v 1.19 2002/01/28 17:34:29 drochner Exp $ # -DISTNAME= ${PY_DISTNAME} -PKGNAME= py-Tk-${PY_VERSION} +PKGNAME= ${PYPKGPREFIX}-Tk-0 CATEGORIES= x11 -MASTER_SITES= ${PY_MASTER_SITES} MAINTAINER= tsarna@netbsd.org HOMEPAGE= http://www.python.org/topics/tkinter/ COMMENT= Tkinter -- Python interface to Tcl/Tk DEPENDS+= tk>=8.3.2:../../x11/tk +EVAL_PREFIX+= TCLDIR=tcl USE_X11= yes -WRKSRC= ${PY_WRKSRC} -EXTRACT_ELEMENTS= ${PY_MODULES}/_tkinter.c \ - ${PY_MODULES}/tkappinit.c - -do-configure: python-std-do-configure - -do-install: - ${INSTALL_DATA} ${WRKSRC}/_tkinter.so ${PY_LIBDIR}/lib-dynload - ${INSTALL_DATA} ${WRKSRC}/Setup.in ${PY_CONFIGDIR}/Setup.tk - -.include "../../lang/python20/Makefile.inc" +EXTRACT_ELEMENTS= ${PYSUBDIR}/Modules/_tkinter.c \ + ${PYSUBDIR}/Modules/tkappinit.c +PYDISTUTILSPKG= yes +PYBINMODULE= yes +PY_PATCHPLIST= yes + +PY_SETUP_SUBST+= TCLPREFIX=${TCLDIR} +PY_SETUP_SUBST+= X11PREFIX=${X11BASE} +PLIST_SUBST+= PYLIB=${PYLIB} + +# ignore errors due to missing files (EXTRACT_ELEMENTS!) +do-patch: + (cd ${WRKSRC}; \ + for f in ${PATCHDIR}/patch-*;do \ + ${PATCH} --batch <$$f || true; \ + done) + +# this is needed by graphics/sketch +post-install: + ${SED} -e "s|@LOCALBASE@|${LOCALBASE}|g" \ + -e "s|@X11BASE@|${X11BASE}|g" \ + <${FILESDIR}/Setup.in >${PREFIX}/${PYLIB}/config/Setup.tk + +.include "../../lang/python/extension.buildlink.mk" +.include "../../lang/python/srcdist.mk" .include "../../mk/bsd.pkg.mk" diff --git a/x11/py-Tk/PLIST b/x11/py-Tk/PLIST index eb962b7a40d..41ffb129a22 100644 --- a/x11/py-Tk/PLIST +++ b/x11/py-Tk/PLIST @@ -1,3 +1,3 @@ -@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:11:20 zuntum Exp $ -lib/python2.0/lib-dynload/_tkinter.so -lib/python2.0/config/Setup.tk +@comment $NetBSD: PLIST,v 1.2 2002/01/28 17:34:29 drochner Exp $ +${PYSITELIB}/_tkinter.so +${PYLIB}/config/Setup.tk diff --git a/x11/py-Tk/buildlink.mk b/x11/py-Tk/buildlink.mk new file mode 100644 index 00000000000..6ce562aafaa --- /dev/null +++ b/x11/py-Tk/buildlink.mk @@ -0,0 +1,6 @@ +# $NetBSD: buildlink.mk,v 1.1 2002/01/28 17:34:29 drochner Exp $ + +.include "../../lang/python/pyversion.mk" + +BUILDLINK_DEPENDS.pytk?= ${PYPKGPREFIX}-Tk-* +DEPENDS+= ${BUILDLINK_DEPENDS.pytk}:../../x11/py-Tk diff --git a/x11/py-Tk/distinfo b/x11/py-Tk/distinfo deleted file mode 100644 index 6b0732c3cf5..00000000000 --- a/x11/py-Tk/distinfo +++ /dev/null @@ -1,4 +0,0 @@ -$NetBSD: distinfo,v 1.2 2001/04/19 11:07:42 skrll Exp $ - -SHA1 (python/BeOpen-Python-2.0.tar.gz) = 16ca42c5be1ddf5dc08d9b59b97f728f330e1fdc -Size (python/BeOpen-Python-2.0.tar.gz) = 4066781 bytes diff --git a/x11/py-Tk/files/setup.py b/x11/py-Tk/files/setup.py new file mode 100644 index 00000000000..843b26b2a08 --- /dev/null +++ b/x11/py-Tk/files/setup.py @@ -0,0 +1,26 @@ +# $NetBSD: setup.py,v 1.1 2002/01/28 17:34:30 drochner Exp $ + +import distutils +from distutils.core import setup, Extension + +tclprefix = '@TCLPREFIX@' +tclincl = tclprefix + '/include' +tcllib = tclprefix + '/lib' + +x11prefix = '@X11PREFIX@' +x11incl = x11prefix + '/include' +x11lib = x11prefix + '/lib' + +setup( + ext_modules = [ + Extension( + '_tkinter', + ['Modules/_tkinter.c', 'Modules/tkappinit.c'], + define_macros=[('WITH_APPINIT', None)], + include_dirs=[tclincl, x11incl], + library_dirs=[tcllib, x11lib], + runtime_library_dirs=[tcllib, x11lib], + libraries=['tk83', 'tcl83', 'X11'] + ) + ] +) |