summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/py-cursespanel/DESCR2
-rw-r--r--devel/py-cursespanel/Makefile35
-rw-r--r--devel/py-cursespanel/PLIST2
-rw-r--r--devel/py-cursespanel/buildlink2.mk14
-rw-r--r--devel/py-cursespanel/files/setup.py22
5 files changed, 75 insertions, 0 deletions
diff --git a/devel/py-cursespanel/DESCR b/devel/py-cursespanel/DESCR
new file mode 100644
index 00000000000..c0463d79780
--- /dev/null
+++ b/devel/py-cursespanel/DESCR
@@ -0,0 +1,2 @@
+The curses module provides an interface for Python to the curses
+library, the de-facto standard for portable advanced terminal handling.
diff --git a/devel/py-cursespanel/Makefile b/devel/py-cursespanel/Makefile
new file mode 100644
index 00000000000..4b35d47228e
--- /dev/null
+++ b/devel/py-cursespanel/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/06/04 19:32:13 drochner Exp $
+#
+
+PKGNAME= ${PYPKGPREFIX}-cursespanel-0
+CATEGORIES= devel
+
+MAINTAINER= tsarna@netbsd.org
+HOMEPAGE= http://www.python.org/doc/current/lib/module-curses.html
+COMMENT= Curses panel module for Python
+
+USE_BUILDLINK2= yes
+USE_NCURSES= # filter getsyx getwin has_key immedok mvwinsnstr mvwinsstr ...
+# noqiflush pechochar putp putwin qiflush redrawwin setsyx syncok termattrs
+# termname tigetflag tigetnum tigetstr tparm typeahead use_env wcursyncup
+# wechochar winsnstr winsstr wredrawln wsyncdown wsyncup
+EXTRACT_ELEMENTS= ${PYSUBDIR}/Modules/_curses_panel.c
+PYDISTUTILSPKG= yes
+PYBINMODULE= yes
+PY_PATCHPLIST= yes
+PYTHON_VERSIONS_ACCEPTED= 22 22pth 21 21pth
+
+PY_SETUP_SUBST= NCURSESPREFIX=${BUILDLINK_PREFIX.ncurses}
+
+# 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/extension.mk"
+.include "../../lang/python/srcdist.mk"
+.include "../../devel/py-curses/buildlink2.mk"
+.include "../../devel/ncurses/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/py-cursespanel/PLIST b/devel/py-cursespanel/PLIST
new file mode 100644
index 00000000000..ebb58fdfd2e
--- /dev/null
+++ b/devel/py-cursespanel/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/06/04 19:32:13 drochner Exp $
+${PYSITELIB}/_curses_panel.so
diff --git a/devel/py-cursespanel/buildlink2.mk b/devel/py-cursespanel/buildlink2.mk
new file mode 100644
index 00000000000..0b728aba872
--- /dev/null
+++ b/devel/py-cursespanel/buildlink2.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink2.mk,v 1.1.1.1 2003/06/04 19:32:13 drochner Exp $
+
+.if !defined(PYCURSESPANEL_BUILDLINK2_MK)
+PYCURSESPANEL_BUILDLINK2_MK= # defined
+
+.include "../../lang/python/pyversion.mk"
+
+BUILDLINK_PACKAGES+= pycursespanel
+BUILDLINK_DEPENDS.pycursespanel?= ${PYPKGPREFIX}-cursespanel-[0-9]*
+BUILDLINK_PKGSRCDIR.pycursespanel?= ../../devel/py-cursespanel
+
+.include "../../devel/py-curses/buildlink2.mk"
+
+.endif # PYCURSESPANEL_BUILDLINK2_MK
diff --git a/devel/py-cursespanel/files/setup.py b/devel/py-cursespanel/files/setup.py
new file mode 100644
index 00000000000..c16a85cc688
--- /dev/null
+++ b/devel/py-cursespanel/files/setup.py
@@ -0,0 +1,22 @@
+# $NetBSD: setup.py,v 1.1.1.1 2003/06/04 19:32:13 drochner Exp $
+
+import distutils
+from distutils.core import setup, Extension
+
+ncursesprefix = '@NCURSESPREFIX@'
+ncincl = ncursesprefix + '/include'
+nclib = ncursesprefix + '/lib'
+
+setup(
+ ext_modules = [
+ Extension(
+ '_curses_panel',
+ ['Modules/_curses_panel.c'],
+ define_macros=[('HAVE_NCURSES_H', None)],
+ include_dirs=[ncincl],
+ library_dirs=[nclib],
+ runtime_library_dirs=[nclib],
+ libraries=['panel', 'ncurses']
+ )
+ ]
+)