aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2021-07-15 07:09:36 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2021-07-15 07:09:45 +0000
commit1e2fe14740d5e5d9902b7f111248a498e11f11e1 (patch)
tree73463dd118153719dc1ae2b3ec97dc1647a8116e
parent650bad9f6880482f5dd92eb30ab1b1231043250e (diff)
downloadports-1e2fe14740d5e5d9902b7f111248a498e11f11e1.tar.gz
ports-1e2fe14740d5e5d9902b7f111248a498e11f11e1.zip
net-p2p/retroshare: optionize and disable WebUI and VoIP to unbreak.
PR: 250100
-rw-r--r--net-p2p/retroshare/Makefile25
-rw-r--r--net-p2p/retroshare/files/patch-retroshare-gui_src_gui_MainWindow.cpp12
-rw-r--r--net-p2p/retroshare/files/patch-retroshare-gui_src_gui_settings_rsettingswin.cpp12
-rw-r--r--net-p2p/retroshare/files/patch-retroshare-gui_src_main.cpp12
-rw-r--r--net-p2p/retroshare/pkg-plist10
5 files changed, 59 insertions, 12 deletions
diff --git a/net-p2p/retroshare/Makefile b/net-p2p/retroshare/Makefile
index 30d9d7493566..3cc28f122ad5 100644
--- a/net-p2p/retroshare/Makefile
+++ b/net-p2p/retroshare/Makefile
@@ -12,20 +12,13 @@ PATCHFILES= 428b331d8efe.patch:-p1
MAINTAINER= peter@netkey.at
COMMENT= Private and secure decentralised communication platform
-BROKEN= Doesn't build with libmicrohttpd 0.9.71 - PR: 250100
-
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
LIB_DEPENDS= libsqlcipher.so:databases/sqlcipher \
- libspeex.so:audio/speex \
- libspeexdsp.so:audio/speexdsp \
libgnome-keyring.so:security/libgnome-keyring \
libgpgme.so:security/gpgme \
- libopencv_highgui.so:graphics/opencv \
- libavcodec.so:multimedia/ffmpeg \
libcurl.so:ftp/curl \
- libmicrohttpd.so:www/libmicrohttpd \
libminiupnpc.so:net/miniupnpc
USES= compiler:features desktop-file-utils dos2unix \
@@ -41,6 +34,20 @@ USE_QT= core gui multimedia printsupport network widgets xml \
DOS2UNIX_FILES= retroshare-nogui/src/retroshare-nogui.pro \
retroshare-gui/src/gui/elastic/node.cpp
+OPTIONS_DEFINE= VOIP WEBUI
+OPTIONS_SUB= yes
+
+VOIP_DESC= Build with VoIP plugin (requires OpenCV)
+VOIP_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \
+ libopencv_highgui.so:graphics/opencv \
+ libspeex.so:audio/speex \
+ libspeexdsp.so:audio/speexdsp
+VOIP_BROKEN= gui/QVideoDevice.cpp:1:10: fatal error: 'opencv/cv.h' file not found
+
+WEBUI_LIB_DEPENDS= libmicrohttpd.so:www/libmicrohttpd
+WEBUI_QMAKE_OFF= CONFIG+=no_libresapihttpserver
+WEBUI_BROKEN= api/ApiServerMHD.cpp:376:5: error: no matching function for call to 'MHD_get_connection_values'
+
.include <bsd.port.pre.mk>
post-patch:
@@ -61,4 +68,8 @@ post-patch:
@${REINPLACE_CMD} -e 's|RS_REVISION_NUMBER.*|RS_REVISION_NUMBER 0x${RS_REVISION}|' \
${WRKSRC}/libretroshare/src/retroshare/rsversion.h
+post-patch-VOIP-off:
+# VoIP plugin does not build against modern `graphics/opencv' port
+ @${REINPLACE_CMD} -e '/VOIP/d' ${WRKSRC}/plugins/plugins.pro
+
.include <bsd.port.post.mk>
diff --git a/net-p2p/retroshare/files/patch-retroshare-gui_src_gui_MainWindow.cpp b/net-p2p/retroshare/files/patch-retroshare-gui_src_gui_MainWindow.cpp
new file mode 100644
index 000000000000..0cf1b7cf8e52
--- /dev/null
+++ b/net-p2p/retroshare/files/patch-retroshare-gui_src_gui_MainWindow.cpp
@@ -0,0 +1,12 @@
+--- retroshare-gui/src/gui/MainWindow.cpp.orig 2018-03-13 19:25:38 UTC
++++ retroshare-gui/src/gui/MainWindow.cpp
+@@ -107,7 +107,9 @@
+ #include "gui/common/RsCollection.h"
+ #include "settings/rsettingswin.h"
+ #include "settings/rsharesettings.h"
++#ifdef ENABLE_WEBUI
+ #include "settings/WebuiPage.h"
++#endif
+ #include "common/StatusDefs.h"
+ #include "gui/notifyqt.h"
+
diff --git a/net-p2p/retroshare/files/patch-retroshare-gui_src_gui_settings_rsettingswin.cpp b/net-p2p/retroshare/files/patch-retroshare-gui_src_gui_settings_rsettingswin.cpp
new file mode 100644
index 000000000000..af8585bd2735
--- /dev/null
+++ b/net-p2p/retroshare/files/patch-retroshare-gui_src_gui_settings_rsettingswin.cpp
@@ -0,0 +1,12 @@
+--- retroshare-gui/src/gui/settings/rsettingswin.cpp.orig 2018-03-13 19:25:38 UTC
++++ retroshare-gui/src/gui/settings/rsettingswin.cpp
+@@ -41,7 +41,9 @@
+ #include "PostedPage.h"
+ #include "PluginsPage.h"
+ #include "ServicePermissionsPage.h"
++#ifdef ENABLE_WEBUI
+ #include "WebuiPage.h"
++#endif
+ #include "rsharesettings.h"
+ #include "gui/notifyqt.h"
+ #include "gui/common/FloatingHelpBrowser.h"
diff --git a/net-p2p/retroshare/files/patch-retroshare-gui_src_main.cpp b/net-p2p/retroshare/files/patch-retroshare-gui_src_main.cpp
new file mode 100644
index 000000000000..9e3fbde36f51
--- /dev/null
+++ b/net-p2p/retroshare/files/patch-retroshare-gui_src_main.cpp
@@ -0,0 +1,12 @@
+--- retroshare-gui/src/main.cpp.orig 2018-03-13 19:25:38 UTC
++++ retroshare-gui/src/main.cpp
+@@ -41,7 +41,9 @@
+ #include "gui/FileTransfer/TransfersDialog.h"
+ #include "gui/settings/RsharePeerSettings.h"
+ #include "gui/settings/rsharesettings.h"
++#ifdef ENABLE_WEBUI
+ #include "gui/settings/WebuiPage.h"
++#endif
+ #include "idle/idle.h"
+ #include "lang/languagesupport.h"
+ #include "util/RsGxsUpdateBroadcast.h"
diff --git a/net-p2p/retroshare/pkg-plist b/net-p2p/retroshare/pkg-plist
index 8284e74e4db8..a885cb0a84cc 100644
--- a/net-p2p/retroshare/pkg-plist
+++ b/net-p2p/retroshare/pkg-plist
@@ -1,7 +1,7 @@
bin/retroshare
bin/retroshare-nogui
lib/retroshare/extensions6/libFeedReader.so
-lib/retroshare/extensions6/libVOIP.so
+%%VOIP%%lib/retroshare/extensions6/libVOIP.so
%%DATADIR%%/bdboot.txt
%%DATADIR%%/qss/blacknight.qss
%%DATADIR%%/qss/blacknight/check_sel.png
@@ -434,10 +434,10 @@ lib/retroshare/extensions6/libVOIP.so
%%DATADIR%%/stylesheets/Bubble_Compact/private/system.htm
%%DATADIR%%/stylesheets/Bubble_Compact/private/variants/color.css
%%DATADIR%%/stylesheets/Bubble_Compact/private/variants/standard.css
-%%DATADIR%%/webui/app.css
-%%DATADIR%%/webui/app.js
-%%DATADIR%%/webui/img/logo_splash.png
-%%DATADIR%%/webui/index.html
+%%WEBUI%%%%DATADIR%%/webui/app.css
+%%WEBUI%%%%DATADIR%%/webui/app.js
+%%WEBUI%%%%DATADIR%%/webui/img/logo_splash.png
+%%WEBUI%%%%DATADIR%%/webui/index.html
share/applications/retroshare.desktop
share/icons/hicolor/128x128/apps/retroshare.png
share/icons/hicolor/24x24/apps/retroshare.png