aboutsummaryrefslogtreecommitdiff
path: root/net-im/nheko/Makefile
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2019-03-25 22:04:55 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2019-03-25 22:04:55 +0000
commit35a3fe2a430ed9dfcbfc3bed4ee751f7c094727b (patch)
treec44b552bf072a8a8a01bcba5b524181d0ae9f334 /net-im/nheko/Makefile
parent95cc8180fd3cc0dec740745aa5c92fd4897caa42 (diff)
downloadports-35a3fe2a430ed9dfcbfc3bed4ee751f7c094727b.tar.gz
ports-35a3fe2a430ed9dfcbfc3bed4ee751f7c094727b.zip
New port net-im/nheko
Third time's the charm for Qt-based Matrix clients; this one looks pretty good and seems to work pretty well. It also offers registration for new users, and understands both plain (matrix.org) and premium (modular.im) accounts. The port contains the following yuckiness: - a hack to change <json.hpp> to <nlohmann/json.hpp>, since the CMake bits in nheko don't actually go look for it. - a (GH_TUPLE) copy of lmdb++, which is #included by the C++ code, but CMake doesn't go looking for it. - a (GH_TUPLE) copy of tweeny, which is used by the C++ code, but CMake doesn't go looking for it. Since this is a source copy, the header isn't in the tweeny/ directory (where it gets installed), so an extra hack is called for to provide that subdirectory. I considered making tweeny a separate port (many Linuxen do), but this would be the only consumer, and it doesn't even consume the whole library but only parts of one header.
Notes
Notes: svn path=/head/; revision=496858
Diffstat (limited to 'net-im/nheko/Makefile')
-rw-r--r--net-im/nheko/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/net-im/nheko/Makefile b/net-im/nheko/Makefile
new file mode 100644
index 000000000000..96bac15dd6c0
--- /dev/null
+++ b/net-im/nheko/Makefile
@@ -0,0 +1,49 @@
+# $FreeBSD$
+
+PORTNAME= nheko
+DISTVERSIONPREFIX=v
+DISTVERSION= 0.6.3
+CATEGORIES= net-im
+
+MAINTAINER= adridg@FreeBSD.org
+COMMENT= Matrix IM client based on Qt technologies
+
+LICENSE= GPLv3
+LICENSE_FILES= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= cmark:textproc/cmark \
+ mtxclient>=0.2:net-im/mtxclient \
+ nlohmann-json>=3:devel/nlohmann-json \
+ spdlog>=1.3:devel/spdlog
+LIB_DEPENDS= liblmdb.so:databases/lmdb
+
+USES= cmake compiler:c++17-lang pkgconfig \
+ localbase:ldflags qt:5 tar:xz
+USE_QT= concurrent core dbus declarative gui multimedia network svg widgets \
+ buildtools_build linguist_build qmake_build
+
+# There are two external dependencies: lmdb++ and tweeny.
+# - lmdb++ is a single header file, it just needs to be included
+# - tweeny is a library, but only one header is needed; it is normally
+# installed into a tweeny/ subdirectory, but its sources place it
+# in include/. Add one more symlink to the build for that.
+CMAKE_ARGS= -DLMDBXX_INCLUDE_DIR=${WRKSRC}/deps/lmdb \
+ -DTWEENY_INCLUDE_DIR=${WRKSRC}/deps/tweeny
+
+USE_GITHUB= yes
+GH_ACCOUNT= Nheko-Reborn
+GH_TUPLE= drycpp:lmdbxx:0b43ca87d8cfabba392dfe884eb1edb83874de02:lmdb/deps/lmdb \
+ mobius3:tweeny:v3:tweeny/deps/tweeny
+
+post-extract:
+ cd ${WRKSRC}/deps/tweeny && ${LN} -s include tweeny
+
+# Includes <json.hpp> without referencing where it's installed,
+# so hackishly correct all the broken paths.
+post-patch:
+ ${FIND} ${WRKSRC} -type f -print0 | \
+ ${XARGS} -0 ${REINPLACE_CMD} \
+ -e 's+include <json.hpp>+include <nlohmann/json.hpp>+' \
+ -e 's+include "json.hpp"+include <nlohmann/json.hpp>+'
+
+.include <bsd.port.mk>