aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanael LAPLANCHE <martymac@FreeBSD.org>2023-10-12 10:30:21 +0000
committerGanael LAPLANCHE <martymac@FreeBSD.org>2023-10-12 10:30:21 +0000
commit4918ddd0865348af03c481751b97988cf2a7a1d3 (patch)
tree81103194e1e07e34ae628e564844cb94cc35788d
parentddb103c3cecbc7504be186e4e5c3a93e11446016 (diff)
downloadports-4918ddd0865348af03c481751b97988cf2a7a1d3.tar.gz
ports-4918ddd0865348af03c481751b97988cf2a7a1d3.zip
comms/gqrx: add flavors for Qt5 and Qt6
-rw-r--r--comms/gqrx/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/comms/gqrx/Makefile b/comms/gqrx/Makefile
index bb9f5e3c03fb..cc981feef948 100644
--- a/comms/gqrx/Makefile
+++ b/comms/gqrx/Makefile
@@ -1,8 +1,10 @@
PORTNAME= gqrx
PORTVERSION= 2.17.2
DISTVERSIONPREFIX= v
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= comms hamradio
+PKGNAMESUFFIX= -${FLAVOR}
MAINTAINER= martymac@FreeBSD.org
COMMENT= Software defined radio receiver powered by GNU Radio and Qt
@@ -31,16 +33,24 @@ LIB_DEPENDS= libgnuradio-runtime.so:comms/gnuradio \
libjack.so:audio/jack \
libportaudio.so:audio/portaudio
-USES= cmake compiler:c++11-lang gl pkgconfig qt:6
+FLAVORS= qt5 qt6
+FLAVOR?= qt6
+
+USES= cmake compiler:c++11-lang gl pkgconfig qt:${FLAVOR:S/qt//}
USE_GITHUB= yes
GH_ACCOUNT= gqrx-sdr
USE_GL= gl
-USE_QT= base svg
+_USE_QT_qt5= core gui network svg widgets
+_USE_QT_qt6= base svg
+USE_QT= ${_USE_QT_${FLAVOR}}
+
+CONFLICTS_INSTALL= gqrx ${FLAVORS:N${FLAVOR}:S/^/${PORTNAME}-/}
# XXX Use Portaudio as Gqrx is invariably linked to it
# (auto-detected and used through Gnuradio CMake files)
-CMAKE_ARGS+= -DLINUX_AUDIO_BACKEND:STRING="Portaudio"
+CMAKE_ARGS+= -DLINUX_AUDIO_BACKEND:STRING="Portaudio" \
+ -DFORCE_QT${FLAVOR:S/qt//}:BOOL=ON
# XXX Work around Gnuradio 3.8 headers (gnuradio/rpcserver_aggregator.h) still
# using std::unary_function (removed with C++17). This breaks when building