aboutsummaryrefslogtreecommitdiff
path: root/net-im/qxmpp/Makefile
blob: c466530ecde45e5d25d4083fd425c84b881d7261 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
PORTNAME=	qxmpp
DISTVERSIONPREFIX=	v
DISTVERSION=	1.7.0
CATEGORIES=	net-im
PKGNAMESUFFIX=	-${FLAVOR}

MAINTAINER=	kde@FreeBSD.org
COMMENT=	XMPP client library based on Qt and C++
WWW=		https://github.com/qxmpp-project/qxmpp/

LICENSE=	LGPL21+
LICENSE_FILE=	${WRKSRC}/LICENSES/LGPL-2.1-or-later.txt

LIB_DEPENDS=	libomemo-c.so:security/libomemo-c

FLAVORS=	qt5 qt6
FLAVOR?=	qt5

USES=		cmake compiler:c++17-lang pathfix pkgconfig qca \
		qt:${QT_VER}
USE_GITHUB=	yes
GH_ACCOUNT=	qxmpp-project
USE_LDCONFIG=	yes
_USE_QT_qt5=	core network xml \
		buildtools:build qmake:build
_USE_QT_qt6=	base
USE_QT=		${_USE_QT_${FLAVOR}}

CMAKE_ARGS=	-DQT_VERSION_MAJOR=${QT_VER}
CMAKE_ON=	BUILD_OMEMO
CMAKE_OFF=	BUILD_EXAMPLES

_PLIST_SUB_qt5=	QT5_ONLY=""
_PLIST_SUB_qt6=	QT5_ONLY="@comment "
PLIST_SUB=	VERSION=${PORTVERSION} \
		QT_VER=${QT_VER} \
		${_PLIST_SUB_${FLAVOR}}

QT_VER=		${FLAVOR:S/qt//}

OPTIONS_DEFINE=		GSTREAMER TEST
OPTIONS_SUB=		yes

GSTREAMER_DESC=		Audio/video support over Jingle via GStreamer
GSTREAMER_USES=		gnome gstreamer
GSTREAMER_USE=		GNOME=glib20 \
			GSTREAMER=good,ugly
GSTREAMER_CMAKE_BOOL=	WITH_GSTREAMER

_TEST_USE_QT_qt5=	QT=testlib:build
_TEST_USE_QT_qt6=	# empty
TEST_USE=		${_TEST_USE_QT_${FLAVOR}}
TEST_CMAKE_BOOL=	BUILD_TESTS
TEST_TEST_TARGET=	test

.include <bsd.port.mk>