pkgsrc/devel/py-idle/Makefile

66 lines
1.8 KiB
Makefile

# $NetBSD: Makefile,v 1.10 2003/09/02 13:21:30 seb Exp $
#
PKGNAME= ${PYPKGPREFIX}-idle-0
CATEGORIES= devel
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.python.org/idle/
COMMENT= IDLE - The Integrated DeveLopment Environment for Python
USE_X11= yes
USE_BUILDLINK2= yes
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
PY_PATCHPLIST= yes
PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
# ignore errors due to missing files (EXTRACT_ELEMENTS!)
do-patch:
(cd ${WRKSRC}; \
for f in ${PATCHDIR}/patch-*;do \
${PATCH} --batch <$$f || true; \
done)
#
# With Python-2.3, the Idle code is part of the base library.
# We just install a wrapper script. Also, threads are required now.
#
PYTHON_VERSIONS_ACCEPTED= 20 20pth 21 21pth 22 22pth 23pth
.include "../../lang/python/extension.mk"
.if ${PYPKGPREFIX} != "py23pth"
EXTRACT_ELEMENTS= ${PYSUBDIR}/Tools/idle/*
PYTHON_PATCH_SCRIPTS= Tools/idle/idle.py
do-build:
${PYTHONBIN} ${LOCALBASE}/${PYLIB}/compileall.py ${WRKSRC}/Tools/idle
do-install:
${CP} -r ${WRKSRC}/Tools/idle ${PREFIX}/${PYSITELIB}
${CHMOD} +x ${PREFIX}/${PYSITELIB}/idle/idle.py
${LN} -sf ${PREFIX}/${PYSITELIB}/idle/idle.py \
${PREFIX}/bin/idle${PYVERSSUFFIX}
${CAT} ${PKGDIR}/PLIST.pre >${PLIST_SRC}
(cd ${PREFIX}; ${FIND} ${PYSITELIB}/idle -type f -print \
>>${PLIST_SRC})
(cd ${PREFIX}; ${FIND} -d ${PYSITELIB}/idle -type d -print | \
${SED} -e "s/^/@dirrm /" >>${PLIST_SRC})
.else # py23pth
EXTRACT_ELEMENTS= ${PYSUBDIR}/Tools/scripts/idle
PYTHON_PATCH_SCRIPTS= ${WRKSRC}/Tools/scripts/idle
NO_BUILD= yes
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/Tools/scripts/idle \
${PREFIX}/bin/idle${PYVERSSUFFIX}
${CAT} ${PKGDIR}/PLIST.pre >${PLIST_SRC}
.endif # py23pth
.include "../../lang/python/srcdist.mk"
.include "../../lang/python/application.mk"
.include "../../x11/py-Tk/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"