diff options
author | swills <swills@FreeBSD.org> | 2014-07-08 11:39:37 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2014-07-08 11:39:37 +0800 |
commit | 8196b69f18346f062c7190a08097bbb98c4c607e (patch) | |
tree | cd4bb57caa255114b59e30dc67b7d29969316bd0 /net | |
parent | 9b3c9421bd1fb7bdbd54565b3aac14c2580a7881 (diff) | |
download | freebsd-ports-gnome-8196b69f18346f062c7190a08097bbb98c4c607e.tar.gz freebsd-ports-gnome-8196b69f18346f062c7190a08097bbb98c4c607e.tar.zst freebsd-ports-gnome-8196b69f18346f062c7190a08097bbb98c4c607e.zip |
net/mosquitto: make python support optional
PR: 191366
Submitted by: joe@thrallingpenguin.com (maintainer)
Diffstat (limited to 'net')
-rw-r--r-- | net/mosquitto/Makefile | 16 | ||||
-rw-r--r-- | net/mosquitto/pkg-plist | 10 |
2 files changed, 19 insertions, 7 deletions
diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile index c40c938ca41a..423fdb4d7b25 100644 --- a/net/mosquitto/Makefile +++ b/net/mosquitto/Makefile @@ -14,6 +14,11 @@ LICENSE= BSD3CLAUSE LIB_DEPENDS= libcares.so:${PORTSDIR}/dns/c-ares BUILD_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt +OPTIONS_DEFAULT=PYTHON +OPTIONS_DEFINE= PYTHON + +PYTHON_DESC= Build python driver + USES= cmake USE_PYTHON= 2 NOCONFIGURE= yes @@ -24,16 +29,23 @@ USE_LDCONFIG= yes USERS= nobody -PLIST_SUB= PYTHON_VER=${PYTHON_VER} +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MPYTHON} +PLIST_SUB= PYTHON_VER=${PYTHON_VER} NOPYTHON="" +.else +PLIST_SUB= NOPYTHON="@comment " +.endif post-patch: ${MV} ${WRKSRC}/mosquitto.conf ${WRKSRC}/mosquitto.conf.example post-install: +.if ${PORT_OPTIONS:MPYTHON} cd ${WRKSRC}/lib/python ; \ ${PYTHON_CMD} ${WRKSRC}/lib/python/setup.py build ; \ ${PYTHON_CMD} ${WRKSRC}/lib/python/setup.py install --prefix=${PREFIX} --root=${STAGEDIR} - +.endif # Compress Man Pages ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man8/mosquitto.8 ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man7/mqtt.7 diff --git a/net/mosquitto/pkg-plist b/net/mosquitto/pkg-plist index 58a2d60c6009..f1d18eeb57e5 100644 --- a/net/mosquitto/pkg-plist +++ b/net/mosquitto/pkg-plist @@ -6,9 +6,9 @@ share/man/man3/libmosquitto.3.gz share/man/man1/mosquitto_sub.1.gz share/man/man1/mosquitto_pub.1.gz share/man/man1/mosquitto_passwd.1.gz -%%PYTHON_LIBDIR%%/site-packages/mosquitto.pyc -%%PYTHON_LIBDIR%%/site-packages/mosquitto.py -%%PYTHON_LIBDIR%%/site-packages/mosquitto-1.3.1-py%%PYTHON_VER%%.egg-info +%%NOPYTHON%%%%PYTHON_LIBDIR%%/site-packages/mosquitto.pyc +%%NOPYTHON%%%%PYTHON_LIBDIR%%/site-packages/mosquitto.py +%%NOPYTHON%%%%PYTHON_LIBDIR%%/site-packages/mosquitto-1.3.1-py%%PYTHON_VER%%.egg-info lib/libmosquittopp.so.1 lib/libmosquittopp.so lib/libmosquitto.so.1 @@ -35,5 +35,5 @@ etc/mosquitto/aclfile.example @dirrmtry share/man/man3 @dirrmtry share/man/man1 @dirrmtry share/man -@dirrmtry %%PYTHON_LIBDIR%%/site-packages -@dirrmtry %%PYTHON_LIBDIR%% +%%NOPYTHON%% @dirrmtry %%PYTHON_SITELIBDIR%% +%%NOPYTHON%% @dirrmtry %%PYTHON_LIBDIR%% |