From 6a53a2c36295b37af7e454b9d478cb268c506786 Mon Sep 17 00:00:00 2001 From: Olli Hauer <ohauer@FreeBSD.org> Date: Sun, 10 May 2015 18:06:00 +0000 Subject: - fix build with LibreSSL [1] - install manpages into correct MANDIR - do not run ldconfig in stagedir! - adjust files/patch names so makepatch can be used in future - bump PORTREVISION PR: 198988 [1] Submitted by: Bernard Spil Approved by: joe _at_ thrallingpenguin.com (maintainer) --- net/mosquitto/Makefile | 31 ++++++-------- net/mosquitto/files/patch-CMakeList.txt | 18 -------- net/mosquitto/files/patch-CMakeLists.txt | 21 ++++++++++ net/mosquitto/files/patch-config.mk | 7 ++-- .../files/patch-etc-mosquitto.conf.example | 29 ------------- net/mosquitto/files/patch-lib-tls_mosq.h | 10 ----- net/mosquitto/files/patch-lib_tls__mosq.h | 13 ++++++ net/mosquitto/files/patch-mosquitto.conf | 29 +++++++++++++ net/mosquitto/files/patch-src-CMakeList.txt | 11 ----- net/mosquitto/files/patch-src_CMakeLists.txt | 18 ++++++++ net/mosquitto/pkg-plist | 48 +++++++++++----------- 11 files changed, 121 insertions(+), 114 deletions(-) delete mode 100644 net/mosquitto/files/patch-CMakeList.txt create mode 100644 net/mosquitto/files/patch-CMakeLists.txt delete mode 100644 net/mosquitto/files/patch-etc-mosquitto.conf.example delete mode 100644 net/mosquitto/files/patch-lib-tls_mosq.h create mode 100644 net/mosquitto/files/patch-lib_tls__mosq.h create mode 100644 net/mosquitto/files/patch-mosquitto.conf delete mode 100644 net/mosquitto/files/patch-src-CMakeList.txt create mode 100644 net/mosquitto/files/patch-src_CMakeLists.txt (limited to 'net') diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile index a31e67da0d3c..3fc1483d66ee 100644 --- a/net/mosquitto/Makefile +++ b/net/mosquitto/Makefile @@ -3,6 +3,7 @@ PORTNAME= mosquitto PORTVERSION= 1.3.5 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://mosquitto.org/files/source/ @@ -35,27 +36,19 @@ PLIST_SUB= NOPYTHON="@comment " PORTVERSION=${PORTVERSION} .endif post-patch: - ${MV} ${WRKSRC}/mosquitto.conf ${WRKSRC}/mosquitto.conf.example +# do not run ldconfig in stage dir + ${REINPLACE_CMD} -e '/ldconfig/d' ${WRKSRC}/src/CMakeLists.txt \ + ${WRKSRC}/lib/CMakeLists.txt ${WRKSRC}/lib/cpp/CMakeLists.txt -post-install: +post-stage: .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} + (cd ${WRKSRC}/lib/python && \ + ${PYTHON_CMD} ${WRKSRC}/lib/python/setup.py build 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 - ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man7/mosquitto-tls.7 - ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man5/mosquitto.conf.5 - ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man3/libmosquitto.3 - ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man1/mosquitto_sub.1 - ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man1/mosquitto_pub.1 - ${GZIP_CMD} ${STAGEDIR}${PREFIX}/share/man/man1/mosquitto_passwd.1 - # Adjust configuration files - ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/mosquitto.conf.example ${STAGEDIR}${PREFIX}/etc/mosquitto/mosquitto.conf.sample - ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/pwfile.example ${STAGEDIR}${PREFIX}/etc/mosquitto/pwfile.sample - ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/pskfile.example ${STAGEDIR}${PREFIX}/etc/mosquitto/pskfile.sample - ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/aclfile.example ${STAGEDIR}${PREFIX}/etc/mosquitto/aclfile.sample +# Adjust configuration files + ${MV} ${STAGEDIR}${ETCDIR}/mosquitto.conf ${STAGEDIR}${ETCDIR}/mosquitto.conf.sample + ${MV} ${STAGEDIR}${ETCDIR}/pwfile.example ${STAGEDIR}${ETCDIR}/pwfile.sample + ${MV} ${STAGEDIR}${ETCDIR}/pskfile.example ${STAGEDIR}${ETCDIR}/pskfile.sample + ${MV} ${STAGEDIR}${ETCDIR}/aclfile.example ${STAGEDIR}${ETCDIR}/aclfile.sample .include <bsd.port.mk> diff --git a/net/mosquitto/files/patch-CMakeList.txt b/net/mosquitto/files/patch-CMakeList.txt deleted file mode 100644 index 6b1c183ebf70..000000000000 --- a/net/mosquitto/files/patch-CMakeList.txt +++ /dev/null @@ -1,18 +0,0 @@ ---- CMakeLists.txt.orig 2014-05-16 15:15:44.000000000 -0700 -+++ CMakeLists.txt 2014-05-16 15:28:39.000000000 -0700 -@@ -8,6 +8,9 @@ - - set (VERSION 1.3.1) - -+include_directories(/usr/local/include) -+link_directories(/usr/local/lib) -+ - if (WIN32) - execute_process(COMMAND cmd /c echo %DATE% %TIME% OUTPUT_VARIABLE TIMESTAMP - OUTPUT_STRIP_TRAILING_WHITESPACE) -@@ -71,4 +73,4 @@ - # Install config file - # ======================================== - --install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR}) -+install(FILES mosquitto.conf.example aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR}) diff --git a/net/mosquitto/files/patch-CMakeLists.txt b/net/mosquitto/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..0473e7c71d26 --- /dev/null +++ b/net/mosquitto/files/patch-CMakeLists.txt @@ -0,0 +1,21 @@ +--- CMakeLists.txt.orig 2014-10-08 21:50:07 UTC ++++ CMakeLists.txt +@@ -8,6 +8,9 @@ cmake_minimum_required(VERSION 2.6) + + set (VERSION 1.3.5) + ++include_directories(/usr/local/include) ++link_directories(/usr/local/lib) ++ + if (WIN32) + execute_process(COMMAND cmd /c echo %DATE% %TIME% OUTPUT_VARIABLE TIMESTAMP + OUTPUT_STRIP_TRAILING_WHITESPACE) +@@ -40,7 +43,7 @@ else (WIN32) + set (LIBDIR lib${LIB_SUFFIX}) + set (INCLUDEDIR include) + set (DATAROOTDIR share) +- set (MANDIR ${DATAROOTDIR}/man) ++ set (MANDIR man) + set (SHAREDIR ${DATAROOTDIR}/mosquitto) + endif (WIN32) + diff --git a/net/mosquitto/files/patch-config.mk b/net/mosquitto/files/patch-config.mk index f529d383fe76..3dd9e7d36fa1 100644 --- a/net/mosquitto/files/patch-config.mk +++ b/net/mosquitto/files/patch-config.mk @@ -1,6 +1,6 @@ ---- config.mk.orig 2014-05-07 17:09:56.000000000 -0700 -+++ config.mk 2014-05-07 17:10:31.000000000 -0700 -@@ -213,6 +213,6 @@ +--- config.mk.orig 2014-10-08 21:50:07 UTC ++++ config.mk +@@ -213,7 +213,7 @@ endif INSTALL?=install @@ -10,3 +10,4 @@ +prefix=${PREFIX} +mandir=${PREFIX}/share/man +localedir=${PREFIX}/share/locale + STRIP?=strip diff --git a/net/mosquitto/files/patch-etc-mosquitto.conf.example b/net/mosquitto/files/patch-etc-mosquitto.conf.example deleted file mode 100644 index a93b93d46540..000000000000 --- a/net/mosquitto/files/patch-etc-mosquitto.conf.example +++ /dev/null @@ -1,29 +0,0 @@ ---- mosquitto.conf 2014-05-07 16:08:10.000000000 -0700 -+++ mosquitto.conf 2014-05-07 16:13:05.000000000 -0700 -@@ -32,7 +32,7 @@ - # This should be set to /var/run/mosquitto.pid if mosquitto is - # being run automatically on boot with an init script and - # start-stop-daemon or similar. --#pid_file -+pid_file /var/run/mosquitto.pid - - # When run as root, drop privileges to this user and its primary - # group. -@@ -40,7 +40,7 @@ - # If run as a non-root user, this setting has no effect. - # Note that on Windows this has no effect and so mosquitto should - # be started by the user you wish it to run as. --#user mosquitto -+user nobody - - # The maximum number of QoS 1 and 2 messages currently inflight per - # client. -@@ -133,7 +133,7 @@ - #bind_address - - # Port to use for the default listener. --#port 1883 -+port 1883 - - # The maximum number of client connections to allow. This is - # a per listener setting. diff --git a/net/mosquitto/files/patch-lib-tls_mosq.h b/net/mosquitto/files/patch-lib-tls_mosq.h deleted file mode 100644 index 59fe44b6c4ce..000000000000 --- a/net/mosquitto/files/patch-lib-tls_mosq.h +++ /dev/null @@ -1,10 +0,0 @@ ---- lib/tls_mosq.h.orig 2014-05-07 14:39:22.000000000 -0700 -+++ lib/tls_mosq.h 2014-05-07 14:39:47.000000000 -0700 -@@ -33,6 +33,7 @@ - #ifdef WITH_TLS - - #include <openssl/ssl.h> -+#include <sys/socket.h> - #ifdef WITH_TLS_PSK - # if OPENSSL_VERSION_NUMBER >= 0x10000000 - # define REAL_WITH_TLS_PSK diff --git a/net/mosquitto/files/patch-lib_tls__mosq.h b/net/mosquitto/files/patch-lib_tls__mosq.h new file mode 100644 index 000000000000..a41c04f3bb7d --- /dev/null +++ b/net/mosquitto/files/patch-lib_tls__mosq.h @@ -0,0 +1,13 @@ +--- lib/tls_mosq.h.orig 2014-10-08 21:50:07 UTC ++++ lib/tls_mosq.h +@@ -33,8 +33,9 @@ POSSIBILITY OF SUCH DAMAGE. + #ifdef WITH_TLS + + #include <openssl/ssl.h> ++#include <sys/socket.h> + #ifdef WITH_TLS_PSK +-# if OPENSSL_VERSION_NUMBER >= 0x10000000 ++# if OPENSSL_VERSION_NUMBER >= 0x10000000 && !defined(OPENSSL_NO_PSK) + # define REAL_WITH_TLS_PSK + # else + # warning "TLS-PSK not supported, openssl too old." diff --git a/net/mosquitto/files/patch-mosquitto.conf b/net/mosquitto/files/patch-mosquitto.conf new file mode 100644 index 000000000000..ebda77148a1b --- /dev/null +++ b/net/mosquitto/files/patch-mosquitto.conf @@ -0,0 +1,29 @@ +--- mosquitto.conf.orig 2014-10-08 21:50:07 UTC ++++ mosquitto.conf +@@ -32,7 +32,7 @@ + # This should be set to /var/run/mosquitto.pid if mosquitto is + # being run automatically on boot with an init script and + # start-stop-daemon or similar. +-#pid_file ++pid_file /var/run/mosquitto.pid + + # When run as root, drop privileges to this user and its primary + # group. +@@ -40,7 +40,7 @@ + # If run as a non-root user, this setting has no effect. + # Note that on Windows this has no effect and so mosquitto should + # be started by the user you wish it to run as. +-#user mosquitto ++user nobody + + # The maximum number of QoS 1 and 2 messages currently inflight per + # client. +@@ -133,7 +133,7 @@ + #bind_address + + # Port to use for the default listener. +-#port 1883 ++port 1883 + + # The maximum number of client connections to allow. This is + # a per listener setting. diff --git a/net/mosquitto/files/patch-src-CMakeList.txt b/net/mosquitto/files/patch-src-CMakeList.txt deleted file mode 100644 index bd56d1967c51..000000000000 --- a/net/mosquitto/files/patch-src-CMakeList.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- src/CMakeLists.txt.orig 2014-05-16 15:17:23.000000000 -0700 -+++ src/CMakeLists.txt 2014-05-16 15:18:03.000000000 -0700 -@@ -79,7 +79,7 @@ - if (APPLE) - set (MOSQ_LIBS ${MOSQ_LIBS} dl m) - else (APPLE) -- set (MOSQ_LIBS ${MOSQ_LIBS} rt dl m) -+ set (MOSQ_LIBS ${MOSQ_LIBS} rt m) - endif (APPLE) - endif (UNIX) - diff --git a/net/mosquitto/files/patch-src_CMakeLists.txt b/net/mosquitto/files/patch-src_CMakeLists.txt new file mode 100644 index 000000000000..b434155dd3d5 --- /dev/null +++ b/net/mosquitto/files/patch-src_CMakeLists.txt @@ -0,0 +1,18 @@ +--- src/CMakeLists.txt.orig 2014-10-08 21:50:07 UTC ++++ src/CMakeLists.txt +@@ -79,7 +79,7 @@ if (UNIX) + if (APPLE) + set (MOSQ_LIBS ${MOSQ_LIBS} dl m) + else (APPLE) +- set (MOSQ_LIBS ${MOSQ_LIBS} rt dl m) ++ set (MOSQ_LIBS ${MOSQ_LIBS} rt m) + endif (APPLE) + endif (UNIX) + +@@ -100,6 +100,5 @@ if (${WITH_TLS} STREQUAL ON) + endif (${WITH_TLS} STREQUAL ON) + + if (UNIX) +- install(CODE "EXEC_PROGRAM(/sbin/ldconfig)") + endif (UNIX) + diff --git a/net/mosquitto/pkg-plist b/net/mosquitto/pkg-plist index e07df0e6422f..ebd5042e55e3 100644 --- a/net/mosquitto/pkg-plist +++ b/net/mosquitto/pkg-plist @@ -1,28 +1,28 @@ -share/man/man8/mosquitto.8.gz -share/man/man7/mqtt.7.gz -share/man/man7/mosquitto-tls.7.gz -share/man/man5/mosquitto.conf.5.gz -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 -%%NOPYTHON%%%%PYTHON_LIBDIR%%/site-packages/mosquitto.pyc -%%NOPYTHON%%%%PYTHON_LIBDIR%%/site-packages/mosquitto.py -%%NOPYTHON%%%%PYTHON_LIBDIR%%/site-packages/mosquitto-%%PORTVERSION%%-py%%PYTHON_VER%%.egg-info -lib/libmosquittopp.so.1 -lib/libmosquittopp.so -lib/libmosquitto.so.1 +bin/mosquitto_passwd +bin/mosquitto_pub +bin/mosquitto_sub +@sample %%ETCDIR%%/aclfile.sample +@sample %%ETCDIR%%/mosquitto.conf.sample +@sample %%ETCDIR%%/pskfile.sample +@sample %%ETCDIR%%/pwfile.sample +include/mosquitto.h +include/mosquitto_plugin.h +include/mosquittopp.h lib/libmosquitto.so +lib/libmosquitto.so.1 lib/libmosquitto.so.%%PORTVERSION%% +lib/libmosquittopp.so +lib/libmosquittopp.so.1 lib/libmosquittopp.so.%%PORTVERSION%% -include/mosquittopp.h -include/mosquitto_plugin.h -include/mosquitto.h -bin/mosquitto_sub -bin/mosquitto_pub -bin/mosquitto_passwd +%%NOPYTHON%%%%PYTHON_SITELIBDIR%%/mosquitto-%%PORTVERSION%%-py%%PYTHON_VER%%.egg-info +%%NOPYTHON%%%%PYTHON_SITELIBDIR%%/mosquitto.py +%%NOPYTHON%%%%PYTHON_SITELIBDIR%%/mosquitto.pyc +man/man1/mosquitto_passwd.1.gz +man/man1/mosquitto_pub.1.gz +man/man1/mosquitto_sub.1.gz +man/man3/libmosquitto.3.gz +man/man5/mosquitto.conf.5.gz +man/man7/mosquitto-tls.7.gz +man/man7/mqtt.7.gz +man/man8/mosquitto.8.gz sbin/mosquitto -@sample etc/mosquitto/pwfile.sample -@sample etc/mosquitto/pskfile.sample -@sample etc/mosquitto/mosquitto.conf.sample -@sample etc/mosquitto/aclfile.sample -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0