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.
This commit is contained in:
Adriaan de Groot 2019-03-25 22:04:55 +00:00
parent 95cc8180fd
commit 35a3fe2a43
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=496858
5 changed files with 72 additions and 0 deletions

View File

@ -78,6 +78,7 @@ PORTREVISION= 1
SUBDIR += mikutter
SUBDIR += mtxclient
SUBDIR += mu-conference
SUBDIR += nheko
SUBDIR += openfire
SUBDIR += oysttyer
SUBDIR += p5-AnyEvent-XMPP

49
net-im/nheko/Makefile Normal file
View File

@ -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>

7
net-im/nheko/distinfo Normal file
View File

@ -0,0 +1,7 @@
TIMESTAMP = 1553549643
SHA256 (Nheko-Reborn-nheko-v0.6.3_GH0.tar.gz) = e88678d10195f5e2618e0d1a44cc9c152122ff3ab03b347d00f16b39abe2ac3e
SIZE (Nheko-Reborn-nheko-v0.6.3_GH0.tar.gz) = 4556147
SHA256 (drycpp-lmdbxx-0b43ca87d8cfabba392dfe884eb1edb83874de02_GH0.tar.gz) = 93721132bbf5045d38ad62de2997655e9984c48ea5c9886746d42128f4b26fbd
SIZE (drycpp-lmdbxx-0b43ca87d8cfabba392dfe884eb1edb83874de02_GH0.tar.gz) = 47524
SHA256 (mobius3-tweeny-v3_GH0.tar.gz) = 699633578f958cbb1363f80164ac063dc40ce08dfc26b0591752ca412e64c941
SIZE (mobius3-tweeny-v3_GH0.tar.gz) = 48997

5
net-im/nheko/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
The motivation behind the project is to provide a native desktop app
for Matrix that feels more like a mainstream chat app (Riot, Telegram)
and less like an IRC client.
WWW: https://github.com/Nheko-Reborn/nheko

10
net-im/nheko/pkg-plist Normal file
View File

@ -0,0 +1,10 @@
bin/nheko
share/applications/nheko.desktop
share/icons/hicolor/128x128/apps/nheko.png
share/icons/hicolor/16x16/apps/nheko.png
share/icons/hicolor/256x256/apps/nheko.png
share/icons/hicolor/32x32/apps/nheko.png
share/icons/hicolor/48x48/apps/nheko.png
share/icons/hicolor/512x512/apps/nheko.png
share/icons/hicolor/64x64/apps/nheko.png
share/metainfo/nheko.appdata.xml