aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2012-08-05 07:09:55 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2012-08-05 07:09:55 +0000
commit606a01d79eed30f22b141f844e09c79acb478ff1 (patch)
treeb64ffea33166604039221da9d21d07d51565e75e /astro
parent27f191cabf57ea1099d2e81aa9f0d9351c172554 (diff)
- Convert to new options framework
- Cosmetic change
Notes
Notes: svn path=/head/; revision=302083
Diffstat (limited to 'astro')
-rw-r--r--astro/py-metar/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/astro/py-metar/Makefile b/astro/py-metar/Makefile
index d5d3f4ecb6bc..a458afa568d0 100644
--- a/astro/py-metar/Makefile
+++ b/astro/py-metar/Makefile
@@ -14,15 +14,17 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${REALPORTNAME}-${PORTVERSION}
MAINTAINER= sunpoet@FreeBSD.org
-COMMENT= Python module that provides access to NOAA's METAR weather reports
+COMMENT= Python module that provides access to NOAA METAR weather reports
LICENSE= GPLv2
-DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME}
+OPTIONS_DEFINE= DOCS
+
PYDISTUTILS_PKGNAME= ${REALPORTNAME}
USE_PYDISTUTILS= yes
USE_PYTHON= -2.7
+DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME}
PLIST_FILES= bin/${REALPORTNAME} \
%%PYTHON_SITELIBDIR%%/${REALPORTNAME}.py \
%%PYTHON_SITELIBDIR%%/${REALPORTNAME}.pyc \
@@ -31,10 +33,12 @@ PORTDOCS= COPYING README THANKS librarydoc.txt
REALPORTNAME= pymetar
+.include <bsd.port.options.mk>
+
post-patch:
@${REINPLACE_CMD} -E '1 s|/usr/bin/(env *)?python|${PYTHON_CMD}|' \
${WRKSRC}/setup.py ${WRKSRC}/bin/${REALPORTNAME}
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
@${REINPLACE_CMD} \
-e 's|"share/doc/pymetar-%s/"%pymetar.__version__|"${DOCSDIR}"|' \
${WRKSRC}/setup.py