diff options
author | Adriaan de Groot <adridg@FreeBSD.org> | 2020-06-15 21:14:46 +0000 |
---|---|---|
committer | Adriaan de Groot <adridg@FreeBSD.org> | 2020-06-15 21:14:46 +0000 |
commit | 8c48f47bcdafede2f9e3f7f5e0a44073b1e39fa5 (patch) | |
tree | 7438ce9aab8e7394cac77014a834eeb6df30eb5a /net-im | |
parent | ef408eef872e5ee0ee77208ba21ee3f25f80bfde (diff) |
Update net-im/spectral to latest upstream release.
After this afternoon's accidental update, fix the port and complete
the update.
- Spectral expects some unreleased and unpackaged dependencies, which
is why the DISTFILES are a mess: it's gitlab, except this one
dependency on github, and this other one.
- libQuotient is net-im/libQuaternion, except that spectral needs a
newer-than-the-latest-unreleased version.
- there is a rather arbitrary and hackish patch to avoid a compile
error -- during template expansion of visit() I sometimes got
a compiler crash, more often an error about returning a value in
a void function. Since the whole package is glued together with
unreleased submodules, I spent some time trying to fix it, and
then decided that this is non-essential functionality. Two
events trigger the compile error, so I commented them out.
PORTREVISION bumped because there's a tiny chance that something
might have built out of the mess that there was earlier.
Notes
Notes:
svn path=/head/; revision=539290
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/spectral/Makefile | 28 | ||||
-rw-r--r-- | net-im/spectral/distinfo | 12 | ||||
-rw-r--r-- | net-im/spectral/files/patch-CMakeLists.txt | 38 | ||||
-rw-r--r-- | net-im/spectral/files/patch-src_spectralroom.cpp | 35 | ||||
-rw-r--r-- | net-im/spectral/pkg-plist | 1 |
5 files changed, 101 insertions, 13 deletions
diff --git a/net-im/spectral/Makefile b/net-im/spectral/Makefile index 0e9d56b510fc..b48641e2f42f 100644 --- a/net-im/spectral/Makefile +++ b/net-im/spectral/Makefile @@ -2,6 +2,7 @@ PORTNAME= spectral PORTVERSION= 817 +PORTREVISION= 1 CATEGORIES= net-im MAINTAINER= adridg@FreeBSD.org @@ -10,7 +11,8 @@ COMMENT= Glossy Matrix IM client based on Qt technologies LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= libqmatrixclient>=0.5.3.2:net-im/libqmatrixclient +LIB_DEPENDS= libqt5keychain.so:security/qtkeychain \ + libcmark.so:textproc/cmark USES= cmake compiler:c++17-lang gl pkgconfig qt:5 tar:bz2 USE_GL= gl @@ -18,11 +20,23 @@ USE_QT= core dbus declarative graphicaleffects gui imageformats \ multimedia network quickcontrols quickcontrols2 svg widgets \ buildtools_build linguist_build qmake_build -USE_GITLAB= yes -GL_ACCOUNT= spectral-im -GL_PROJECT= spectral \ - SortFilterProxyModel:sfpm -GL_COMMIT= 8d6e69d5529b932b85a2f5e6774de27a267a2ace \ - c61f2bdb0da48804a596a9a3a9382eebdba764dc:sfpm +CMAKE_ON= USE_INTREE_LIBQMC + +SFPMNAME= SortFilterProxyModel +SFPMVERSION= 36befddf5d57faad990e72c88c5844794f274145 +QUOTNAME= libQuotient +QUOTVERSION= 58dfe74390ebdd8ec6611d3b8fecfe7d051ff955 +DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.bz2:spectral \ + ${SFPMVERSION}.zip:sfpm \ + ${QUOTVERSION}.zip:quot +MASTER_SITES= https://gitlab.com/spectral-im/spectral/-/archive/${PORTVERSION}/:spectral \ + https://github.com/oKcerG/${SFPMNAME}/archive/:sfpm \ + https://github.com/quotient-im/${QUOTNAME}/archive/:quot + + +post-extract: + ${RMDIR} ${WRKSRC}/include/${SFPMNAME} ${WRKSRC}/include/${QUOTNAME} + ${LN} -s ${WRKDIR}/${SFPMNAME}-${SFPMVERSION} ${WRKSRC}/include/${SFPMNAME} + ${LN} -s ${WRKDIR}/${QUOTNAME}-${QUOTVERSION} ${WRKSRC}/include/${QUOTNAME} .include <bsd.port.mk> diff --git a/net-im/spectral/distinfo b/net-im/spectral/distinfo index a7bd3d82b09c..de82eb623de3 100644 --- a/net-im/spectral/distinfo +++ b/net-im/spectral/distinfo @@ -1,5 +1,7 @@ -TIMESTAMP = 1588512516 -SHA256 (spectral-im-spectral-8d6e69d5529b932b85a2f5e6774de27a267a2ace_GL0.tar.gz) = cc6ed91feb4af8078f0185fd64570c43d5c877030c255a011c7bfe9522e2505b -SIZE (spectral-im-spectral-8d6e69d5529b932b85a2f5e6774de27a267a2ace_GL0.tar.gz) = 845196 -SHA256 (spectral-im-SortFilterProxyModel-c61f2bdb0da48804a596a9a3a9382eebdba764dc_GL0.tar.gz) = 2403a578fc5b3e46ad1c3b14e71590ca4aaa00c521958020cd925e05fadc32c1 -SIZE (spectral-im-SortFilterProxyModel-c61f2bdb0da48804a596a9a3a9382eebdba764dc_GL0.tar.gz) = 18483 +TIMESTAMP = 1592232908 +SHA256 (spectral-817.tar.bz2) = e49ec45b4a112beef173ca739905ee82e0af12827e67a552cb671d11d8c481df +SIZE (spectral-817.tar.bz2) = 850228 +SHA256 (36befddf5d57faad990e72c88c5844794f274145.zip) = 9be60ac00b0671e678f8dd5b986aaa729baf4ec16fd0c65f71d2918cfeb159ce +SIZE (36befddf5d57faad990e72c88c5844794f274145.zip) = 133452 +SHA256 (58dfe74390ebdd8ec6611d3b8fecfe7d051ff955.zip) = b5c25dc4e42b811b00e2aa799e5d166c5660d0d831e4656e315eb7b91a4b12b9 +SIZE (58dfe74390ebdd8ec6611d3b8fecfe7d051ff955.zip) = 714335 diff --git a/net-im/spectral/files/patch-CMakeLists.txt b/net-im/spectral/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..f9b1337c9f8e --- /dev/null +++ b/net-im/spectral/files/patch-CMakeLists.txt @@ -0,0 +1,38 @@ +Replace the linked libraries for QtKeychain by expanded ones. + +This is a workaround for QtKeychain installing a Config.cmake file +that refers to libraries that are **not** expanded or in the +default search path (e.g. glib). Without this expansion, +we end up with -lglib in the final link line -- and no +corresponding -L/usr/local/lib to make sure it is actually found. + + +--- CMakeLists.txt.orig 2020-01-11 18:26:51 UTC ++++ CMakeLists.txt +@@ -206,6 +210,26 @@ endif(APPLE) + add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE + ${spectral_SRCS} ${spectral_QRC_SRC} $<TARGET_OBJECTS:SortFilterProxyModel> + ${spectral_WINRC} ${${PROJECT_NAME}_MAC_ICON}) ++ ++get_target_property(_libs ++ ${QTKEYCHAIN_LIBRARIES} ++ IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE) ++set(_expanded_libs "") ++foreach(d ${_libs}) ++ if(TARGET ${d}) ++ list(APPEND _expanded_libs ${d}) ++ else() ++ find_library(_expanded_d ${d}) ++ if(_expanded_d) ++ list(APPEND _expanded_libs ${_expanded_d}) ++ else() ++ list(APPEND _expanded_libs ${d}) ++ endif() ++ unset(_expanded_d) ++ endif() ++endforeach() ++set_target_properties(${QTKEYCHAIN_LIBRARIES} PROPERTIES ++ IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE ${_expanded_libs}) + + target_link_libraries(${PROJECT_NAME} + Qt5::Widgets Qt5::Quick Qt5::Qml Qt5::Gui Qt5::Network Qt5::Svg Qt5::QuickControls2 diff --git a/net-im/spectral/files/patch-src_spectralroom.cpp b/net-im/spectral/files/patch-src_spectralroom.cpp new file mode 100644 index 000000000000..5512f808d2f5 --- /dev/null +++ b/net-im/spectral/files/patch-src_spectralroom.cpp @@ -0,0 +1,35 @@ +Avoid compiler error. + +These two events cause template substitution errors. Since the +effect of removing them is that we don't get a nice name for +the events (user-facing), it's not essential. + + +--- src/spectralroom.cpp.orig 2020-06-15 18:48:37 UTC ++++ src/spectralroom.cpp +@@ -354,11 +354,13 @@ QString SpectralRoom::eventToString(const RoomEvent& e + return tr("has set room aliases on server %1 to: %2") + .arg(e.stateKey(), QLocale().createSeparatedList(e.aliases())); + }, ++/* + [](const RoomCanonicalAliasEvent& e) { + return (e.alias().isEmpty()) + ? tr("cleared the room main alias") + : tr("set the room main alias to: %1").arg(e.alias()); + }, ++*/ + [](const RoomNameEvent& e) { + return (e.name().isEmpty()) ? tr("cleared the room name") + : tr("set the room name to: %1") +@@ -372,9 +374,11 @@ QString SpectralRoom::eventToString(const RoomEvent& e + : e.topic()); + }, + [](const RoomAvatarEvent&) { return tr("changed the room avatar"); }, ++/* + [](const EncryptionEvent&) { + return tr("activated End-to-End Encryption"); + }, ++*/ + [](const RoomCreateEvent& e) { + return (e.isUpgrade() ? tr("upgraded the room to version %1") + : tr("created the room, version %1")) diff --git a/net-im/spectral/pkg-plist b/net-im/spectral/pkg-plist index e96d3f234dc8..f93e9b866f8c 100644 --- a/net-im/spectral/pkg-plist +++ b/net-im/spectral/pkg-plist @@ -1,7 +1,6 @@ bin/spectral share/applications/org.eu.encom.spectral.desktop share/icons/hicolor/128x128/apps/org.eu.encom.spectral.png -share/icons/hicolor/16x16/apps/org.eu.encom.spectral.png share/icons/hicolor/256x256/apps/org.eu.encom.spectral.png share/icons/hicolor/32x32/apps/org.eu.encom.spectral.png share/icons/hicolor/512x512/apps/org.eu.encom.spectral.png |