freebsd-ports/net/py-google/Makefile
Patrick Li 797bc0968f Fix ports for building with -current without perl
PR:		38359
Submitted by:	maintainer
2002-05-23 00:32:04 +00:00

53 lines
1.3 KiB
Makefile

# New ports collection makefile for: py-google
# Date created: 22 April 2002
# Whom: Hye-Shik Chang <perky@fallin.lv>
#
# $FreeBSD$
#
PORTNAME= google
PORTVERSION= 0.5.2
CATEGORIES= net python
MASTER_SITES= http://diveintomark.org/projects/pygoogle/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= pygoogle-${PORTVERSION}
MAINTAINER= perky@fallin.lv
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/_xmlplus/sax/__init__.py:${PORTSDIR}/textproc/py-xml
USE_PYTHON= yes
USE_ZIP= yes
USE_PYDISTUTILS= yes
EXTRACT_BEFORE_ARGS= -q -aa
WRKSRC= ${WRKDIR}/pygoogle
EXAMPLESDIR= ${PREFIX}/share/examples/py-google
.include <bsd.port.pre.mk>
post-patch:
# www/py-websvcs has an incompatible version of SOAP.py
@${MV} ${WRKSRC}/SOAP.py ${WRKSRC}/SOAPgoogle.py
.if ${OSVERSION} < 500036
@cd ${WRKSRC}; for f in *.py; do \
${PERL} -pi -e 's,import SOAP,import SOAPgoogle as SOAP,g' $$f; \
done
@${PERL} -pi -e 's,.*extra_path.*,,g' ${WRKSRC}/setup.py
.else
@cd ${WRKSRC}; for f in *.py; do \
${SED} -i "" -e 's,import SOAP,import SOAPgoogle as SOAP,g' $$f; \
done
@${SED} -i.orig -e 's,.*extra_path.*,,g' ${WRKSRC}/setup.py
.endif
@${MKDIR} ${WRKSRC}/tests
@${MV} ${WRKSRC}/*test*.py ${WRKSRC}/tests
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_SCRIPT} ${WRKSRC}/tests/*.py ${EXAMPLESDIR}
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>