Hi,
Would it make sense to pass LDFLAGS="${LDFLAGS}" to cmake, similar to
what already happens with CC, CFLAGS, CXX, and CXXFLAGS? Proposal below.
The reason I ran into this is because I'm working on a proposal/diff
(see the attachment for the WIP diff). In order for that patched port
to build, I need to set LDFLAGS but without this cmake.port.mk diff it
does not get passed to cmake.
Given that this possibly affects a lot of ports, it probably makes sense
to verify whether all cmake ports still build properly. That hasn't
happened yet; first I'd like to check if you think this makes sense.
Thanks,
Caspar Schutijser
Index: cmake.port.mk
===================================================================
RCS file: /cvs/ports/devel/cmake/cmake.port.mk,v
retrieving revision 1.66
diff -u -p -r1.66 cmake.port.mk
--- cmake.port.mk 25 May 2020 05:12:00 -0000 1.66
+++ cmake.port.mk 9 Oct 2020 09:58:28 -0000
@@ -94,6 +94,7 @@ CONFIGURE_STYLE= cmake
MODCMAKE_configure= cd ${WRKBUILD} && ${SETENV} \
CC="${CC}" CFLAGS="${CFLAGS}" \
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
${CONFIGURE_ENV} ${LOCALBASE}/bin/cmake \
-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \
-G ${_MODCMAKE_GEN} ${CONFIGURE_ARGS} ${WRKSRC}
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/mosquitto/Makefile,v
retrieving revision 1.33
diff -u -p -r1.33 Makefile
--- Makefile 22 Aug 2020 13:55:07 -0000 1.33
+++ Makefile 9 Oct 2020 10:39:16 -0000
@@ -3,6 +3,7 @@
COMMENT = opensource MQTT broker
DISTNAME = mosquitto-1.6.12
+REVISION = 0
SHARED_LIBS += mosquitto 1.0 # 1.5
SHARED_LIBS += mosquittopp 1.0 # 1.5
@@ -15,7 +16,7 @@ MAINTAINER = Jasper Lievisse Adriaanse
# EPL/EDL
PERMIT_PACKAGE = Yes
-WANTLIB += c crypto m pthread ssl ${COMPILER_LIBCXX}
+WANTLIB += c crypto m pthread ssl websockets ${COMPILER_LIBCXX}
MASTER_SITES = https://mosquitto.org/files/source/
@@ -30,13 +31,17 @@ MODPY_VERSION= ${MODPY_DEFAULT_VERSION_
BUILD_DEPENDS = devel/uthash
+LIB_DEPENDS = www/libwebsockets
+
DEBUG_PACKAGES = ${BUILD_PACKAGES}
CONFIGURE_ARGS= -DWITH_SRV=no
# Pre-shared key support was intentionally removed from libressl
CONFIGURE_ARGS += -DWITH_TLS_PSK=no
+CONFIGURE_ARGS += -DWITH_WEBSOCKETS=yes
CFLAGS += -I${LOCALBASE}/include
+LDFLAGS += -L${LOCALBASE}/lib
TEST_DEPENDS= ${MODPY_RUN_DEPENDS} \
devel/cunit \