Hi,

simple diff using post-patch instead of do-configure and post-install
instead of do-install, allowing us to use the provided Makefile and
install the desktop file and icons for proper desktop integration.

Landry
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/x2goclient/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile    19 Mar 2020 19:51:09 -0000      1.14
+++ Makefile    24 Dec 2020 13:20:28 -0000
@@ -3,6 +3,7 @@
 COMMENT =      Qt client for the X2Go system
 
 DISTNAME =     x2goclient-4.1.2.2
+REVISION =     0
 
 CATEGORIES =   x11
 
@@ -28,12 +29,14 @@
 
 RUN_DEPENDS =  x11/nx/nxcomp \
                x11/nx/nxproxy \
+               x11/gtk+3,-guic \
+               devel/desktop-file-utils \
                shells/bash
 
-DOCSDIR =      ${PREFIX}/share/doc/x2goclient
 EXAMPLESDIR =  ${PREFIX}/share/examples/x2goclient
+MAKE_ENV =     CURDIR=${WRKSRC}
 
-do-configure:
+post-patch:
        find ${WRKSRC} -type f -iname "*.cpp"  -exec \
                perl -pi -e 's,Q_OS_LINUX,Q_OS_UNIX,g;' \
                -e 's,#include <linux/fs.h>,,g;' {} \;
@@ -42,14 +45,8 @@
                -e 's,#include <linux/fs.h>,,g;' {} \;
        sed -i -e 's,nxproxy -S nx,${LOCALBASE}/NX/bin/nxproxy -S nx,' \
                ${WRKSRC}/src/onmainwindow.cpp
-       cd ${WRKSRC} && ${MODQT_LRELEASE} x2goclient.pro \
-               && ${MODQT_QMAKE} x2goclient.pro
 
-do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/x2goclient ${PREFIX}/bin
-       ${INSTALL_MAN} ${WRKSRC}/man/man1/x2goclient.1 ${PREFIX}/man/man1
-       ${INSTALL_DATA_DIR} ${DOCSDIR}
-       ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}
+post-install:
        ${INSTALL_DATA_DIR} ${EXAMPLESDIR}
        ${INSTALL_DATA} ${WRKSRC}/examples/x2goclient-cli ${EXAMPLESDIR}
        ${INSTALL_DATA} ${WRKSRC}/HOWTO.GPGCARD ${EXAMPLESDIR}
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile      24 Dec 2020 13:20:28 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -19,9 +19,9 @@ PREFIX=/usr/local
+ ETCDIR=/etc/x2go
+ BINDIR=$(PREFIX)/bin
+ SHAREDIR=$(PREFIX)/share
+-MANDIR=$(SHAREDIR)/man
+-QMAKE_BINARY=qmake-qt4
+-LRELEASE_BINARY=lrelease-qt4
++MANDIR=$(PREFIX)/man
++QMAKE_BINARY=qmake-qt5
++LRELEASE_BINARY=lrelease-qt5
+ QMAKE_OPTS=
+ 
+ LDFLAGS=
+@@ -115,7 +115,6 @@ install_man:
+       $(INSTALL_DIR) $(DESTDIR)$(MANDIR)/
+       $(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man1
+       $(INSTALL_FILE) man/man1/x2goclient.1    
$(DESTDIR)$(MANDIR)/man1/x2goclient.1
+-      gzip -f $(DESTDIR)$(MANDIR)/man1/x2goclient.1
+ 
+ uninstall: uninstall_client uninstall_man
+ 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/x2goclient/pkg/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- pkg/PLIST   26 Jun 2018 16:56:50 -0000      1.2
+++ pkg/PLIST   24 Dec 2020 13:20:28 -0000
@@ -1,8 +1,18 @@
-@comment $OpenBSD: PLIST,v 1.2 2018/06/26 16:56:50 rsadowski Exp $
+@comment $OpenBSD: PLIST,v$
 @bin bin/x2goclient
 @man man/man1/x2goclient.1
-share/doc/x2goclient/
-share/doc/x2goclient/LICENSE
+share/applications/x2goclient.desktop
 share/examples/x2goclient/
 share/examples/x2goclient/HOWTO.GPGCARD
 share/examples/x2goclient/x2goclient-cli
+share/icons/hicolor/128x128/apps/x2goclient.png
+share/icons/hicolor/16x16/apps/x2goclient.png
+share/icons/hicolor/32x32/apps/x2goclient.png
+share/icons/hicolor/64x64/apps/x2goclient.png
+share/x2goclient/
+share/x2goclient/icons/
+share/x2goclient/icons/x2goclient.png
+share/x2goclient/icons/x2goclient.xpm
+share/x2goclient/icons/x2gosession.png
+@tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor

Reply via email to