From ccf69d9370f1b396c50c57421c2d6633769fc944 Mon Sep 17 00:00:00 2001 From: pat Date: Thu, 23 May 2002 00:32:04 +0000 Subject: Fix ports for building with -current without perl PR: 38359 Submitted by: maintainer --- net/py-adns/Makefile | 10 +++++++++- net/py-google/Makefile | 13 +++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'net') diff --git a/net/py-adns/Makefile b/net/py-adns/Makefile index b741415a3123..83e40776422b 100644 --- a/net/py-adns/Makefile +++ b/net/py-adns/Makefile @@ -20,9 +20,17 @@ USE_PYTHON= yes USE_PYDISTUTILS= yes PLIST_SUB+= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g} +.include + post-patch: +.if ${OSVERSION} < 500036 @${PERL} -pi -e 's|^(include_dirs = ).*$$|\1\["${LOCALBASE}/include"\]|g; \ s|^(library_dirs = ).*$$|\1\["${LOCALBASE}/lib"\]|g' \ ${WRKSRC}/setup.py +.else + @${SED} -i.orig -e 's|^\(include_dirs = \).*$$|\1\["${LOCALBASE}/include"\]|g' \ + -e 's|^\(library_dirs = \).*$$|\1\["${LOCALBASE}/lib"\]|g' \ + ${WRKSRC}/setup.py +.endif -.include +.include diff --git a/net/py-google/Makefile b/net/py-google/Makefile index 5c2116e04df9..cf9e7a7be960 100644 --- a/net/py-google/Makefile +++ b/net/py-google/Makefile @@ -24,15 +24,24 @@ EXTRACT_BEFORE_ARGS= -q -aa WRKSRC= ${WRKDIR}/pygoogle EXAMPLESDIR= ${PREFIX}/share/examples/py-google +.include + 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 - @${PERL} -pi -e 's,.*extra_path.*,,g' ${WRKSRC}/setup.py post-install: .if !defined(NOPORTDOCS) @@ -41,4 +50,4 @@ post-install: .endif @${CAT} ${PKGMESSAGE} -.include +.include -- cgit