Python-dependent port install fails when port & Python use PREFIX
Mike Brown
mike at skew.org
Fri Dec 10 23:01:25 PST 2004
I'm trying to produce the pkg-plist for a new version of the textproc/py-xml
port. This is on a fairly minimal FreeBSD 4.10-STABLE system.
I have not yet installed Python on the system because I want to make sure that
the dependency checking works OK. It seems to be having problems, at least
when I follow the instructions in chapter 18 of the Porters Handbook.
When I did the "make depends PREFIX=/var/tmp/py-xml", Python 2.4 was
successfully built and installed in the temporary directory tree.
But when I do the "make install PREFIX=/var/tmp/py-xml", I get the error
below. Can someone help? I don't know where to look to figure out where the
problem is.
# make install PREFIX=/var/tmp/py-xml
===> py24-xml-0.8.4 depends on file: /usr/local/bin/python - not found
===> Verifying install for /usr/local/bin/python in /usr/ports/lang/python
===> Returning to build of py24-xml-0.8.4
===> Configuring for py24-xml-0.8.4
env: /usr/local/bin/python: No such file or directory
*** Error code 127
Stop in /usr/ports/textproc/py-xml.
My current Makefile for the port is below.
It differs from the previous version in the following ways:
- PORTVERSION updated to 0.8.4
- USE_PYTHON now "2.1+" instead of "yes"
- pkg-req file and reference to it removed (now taken care of w/USE_PYTHON)
- CPIO redefinition replaced with CPIOARGS (trying to clear a portlint nit)
- --with-xslt arg to setup.py removed
- --with-xpath arg to setup.py added (optional though)
# Ports collection Makefile for: PyXML
# Date created: 04/17/1999
# Whom: nectar at FreeBSD.org
#
# $FreeBSD: ports/textproc/py-xml/Makefile,v 1.27 2004/06/14 06:04:29 perky Exp $
#
PORTNAME= xml
PORTVERSION= 0.8.4
CATEGORIES= textproc python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= pyxml
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= PyXML-${PORTVERSION}
MAINTAINER= mike at skew.org
COMMENT= Python XML upgrade/add-on package, including SAX, DOM, Expat, and more
USE_PYTHON= 2.1+
USE_PYDISTUTILS= yes
.include <bsd.port.pre.mk>
CPIOARGS= --quiet -pdum -R
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
PLIST_SUB+= PACKAGE_DIR=_xmlplus
# XSLT support in PyXML is deprecated and broken, and may render PyXML
# incompatible with modern versions of 4Suite, so as of PyXML 0.8.4,
# this port will not install the PyXML's xml.xslt package (this is the
# default when PyXML is installed independently, anyway). Currently,
# there is no XSLT support for minidom, but it is possible to convert
# a minidom document to a format used by various XSLT processors
# (e.g. 4Suite can convert any DOM to its native Domlette, or you can
# serialize the document and let it be reparsed by any XSLT processor).
#
# However, xml.xpath, PyXML's XPath support for minidom is functional,
# so it may be installed by setting WITH_XPATH=yes.
#
.if defined(WITH_XPATH)
PYDISTUTILS_BUILDARGS+= --with-xpath
PYDISTUTILS_INSTALLARGS+= --with-xpath
.else
PYDISTUTILS_BUILDARGS+= --without-xpath
PYDISTUTILS_INSTALLARGS+= --without-xpath
.endif
post-install:
.if !defined(NOPORTDOCS)
@ ${MKDIR} ${DOCSDIR}
.for docfile in ANNOUNCE CREDITS LICENCE README* TODO
@ ${INSTALL_DATA} ${WRKSRC}/${docfile} ${DOCSDIR}
.endfor
@ cd ${WRKSRC}/doc && ${FIND} * \
| ${CPIO} ${CPIOARGS} ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
@ ${MKDIR} ${EXAMPLESDIR}
@ cd ${WRKSRC} && ${FIND} demo test \
| ${CPIO} ${CPIOARGS} ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
.endif
.include <bsd.port.post.mk>
More information about the freebsd-ports
mailing list