diff options
author | drochner <drochner> | 2002-01-28 09:30:08 +0000 |
---|---|---|
committer | drochner <drochner> | 2002-01-28 09:30:08 +0000 |
commit | be7dae53678fd7742d975f44772ff6d003dddac7 (patch) | |
tree | fe5860441007f7a6027e99095bbd0f169dad1062 /devel/py-curses | |
parent | 9132700f40f0d6a30cdd9c25c2ea9a732c61c62c (diff) | |
download | pkgsrc-be7dae53678fd7742d975f44772ff6d003dddac7.tar.gz |
use distutils to build the extension module, to make it work with
newer Python versions too,
XXX we have to override the do-patch rule to avoid patch errors
(we use EXTRACT_ELEMENTS, so we don't generally have all the
original files)
Diffstat (limited to 'devel/py-curses')
-rw-r--r-- | devel/py-curses/Makefile | 28 | ||||
-rw-r--r-- | devel/py-curses/PLIST | 4 | ||||
-rw-r--r-- | devel/py-curses/distinfo | 4 | ||||
-rw-r--r-- | devel/py-curses/files/setup.py | 22 |
4 files changed, 41 insertions, 17 deletions
diff --git a/devel/py-curses/Makefile b/devel/py-curses/Makefile index 35d59e364aa..53131607398 100644 --- a/devel/py-curses/Makefile +++ b/devel/py-curses/Makefile @@ -1,24 +1,30 @@ -# $NetBSD: Makefile,v 1.12 2001/02/16 14:38:58 wiz Exp $ +# $NetBSD: Makefile,v 1.13 2002/01/28 09:32:54 drochner Exp $ # -DISTNAME= ${PY_DISTNAME} -PKGNAME= py-curses-${PY_VERSION} -WRKSRC= ${PY_WRKSRC} +PKGNAME= ${PYPKGPREFIX}-curses-0 CATEGORIES= devel -MASTER_SITES= ${PY_MASTER_SITES} MAINTAINER= tsarna@netbsd.org HOMEPAGE= http://www.python.org/doc/current/lib/module-curses.html -COMMENT= Enhanced curses module for Python +COMMENT= Curses module for Python DEPENDS+= ncurses>=4.2:../../devel/ncurses +EVAL_PREFIX+= NCURSESDIR=ncurses -EXTRACT_ELEMENTS= ${PY_MODULES}/_cursesmodule.c +EXTRACT_ELEMENTS= ${PYSUBDIR}/Modules/_cursesmodule.c +PYDISTUTILSPKG= yes +PYBINMODULE= yes +PY_PATCHPLIST= yes -do-configure: python-std-do-configure +PY_SETUP_SUBST= NCURSESPREFIX=${NCURSESDIR} -do-install: - ${INSTALL_DATA} ${WRKSRC}/_cursesmodule.so ${PY_LIBDIR}/lib-dynload +# ignore errors due to missing files (EXTRACT_ELEMENTS!) +do-patch: + (cd ${WRKSRC}; \ + for f in ${PATCHDIR}/patch-*;do \ + ${PATCH} --batch <$$f || true; \ + done) -.include "../../lang/python/Makefile.inc" +.include "../../lang/python/srcdist.mk" +.include "../../lang/python/extension.buildlink.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/py-curses/PLIST b/devel/py-curses/PLIST index 0f30b964360..42c8498cafc 100644 --- a/devel/py-curses/PLIST +++ b/devel/py-curses/PLIST @@ -1,2 +1,2 @@ -@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:26:05 zuntum Exp $ -lib/python2.0/lib-dynload/_cursesmodule.so +@comment $NetBSD: PLIST,v 1.2 2002/01/28 09:32:54 drochner Exp $ +${PYSITELIB}/_curses.so diff --git a/devel/py-curses/distinfo b/devel/py-curses/distinfo deleted file mode 100644 index c7647245623..00000000000 --- a/devel/py-curses/distinfo +++ /dev/null @@ -1,4 +0,0 @@ -$NetBSD: distinfo,v 1.2 2001/04/21 00:44:43 wiz Exp $ - -SHA1 (python/BeOpen-Python-2.0.tar.gz) = 16ca42c5be1ddf5dc08d9b59b97f728f330e1fdc -Size (python/BeOpen-Python-2.0.tar.gz) = 4066781 bytes diff --git a/devel/py-curses/files/setup.py b/devel/py-curses/files/setup.py new file mode 100644 index 00000000000..d9959ee9321 --- /dev/null +++ b/devel/py-curses/files/setup.py @@ -0,0 +1,22 @@ +# $NetBSD: setup.py,v 1.1 2002/01/28 09:32:55 drochner Exp $ + +import distutils +from distutils.core import setup, Extension + +ncursesprefix = '@NCURSESPREFIX@' +ncincl = ncursesprefix + '/include' +nclib = ncursesprefix + '/lib' + +setup( + ext_modules = [ + Extension( + '_curses', + ['Modules/_cursesmodule.c'], + define_macros=[('HAVE_NCURSES_H', None)], + include_dirs=[ncincl], + library_dirs=[nclib], + runtime_library_dirs=[nclib], + libraries=['ncurses'] + ) + ] +) |