git: 027ed04832c4 - main - deskutils/nextcloudclient: Fix build failure when tests are enabled

From: Guido Falsi <madpilot_at_FreeBSD.org>
Date: Fri, 29 Oct 2021 09:15:54 UTC
The branch main has been updated by madpilot:

URL: https://cgit.FreeBSD.org/ports/commit/?id=027ed04832c4160ac66139b8769a33d828ee7573

commit 027ed04832c4160ac66139b8769a33d828ee7573
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2021-10-29 09:13:03 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2021-10-29 09:13:03 +0000

    deskutils/nextcloudclient: Fix build failure when tests are enabled
    
    Upstream build system tries to include a Linux only library in the
    build when tests are enabled.
    
    This patch has already been accepted upstream.
    
    PR:                     258119
    Approved by:            Maintiner timeout
    Obtained from:          https://github.com/nextcloud/desktop/pull/3880
---
 deskutils/nextcloudclient/Makefile                            |  1 -
 .../files/patch-test_nextcloud__add__test.cmake               | 11 +++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/deskutils/nextcloudclient/Makefile b/deskutils/nextcloudclient/Makefile
index 57197c93ee57..7fd8e3ddd1c5 100644
--- a/deskutils/nextcloudclient/Makefile
+++ b/deskutils/nextcloudclient/Makefile
@@ -29,7 +29,6 @@ CMAKE_ARGS=	-DBUILD_UPDATER:BOOL=OFF \
 		-DWITH_STACK_PROTECTOR:BOOL=OFF
 USE_LDCONFIG=	yes
 
-DEBUG=		yes
 USE_GITHUB=	yes
 GH_ACCOUNT=	nextcloud
 GH_PROJECT=	desktop
diff --git a/deskutils/nextcloudclient/files/patch-test_nextcloud__add__test.cmake b/deskutils/nextcloudclient/files/patch-test_nextcloud__add__test.cmake
new file mode 100644
index 000000000000..203bafc64807
--- /dev/null
+++ b/deskutils/nextcloudclient/files/patch-test_nextcloud__add__test.cmake
@@ -0,0 +1,11 @@
+--- test/nextcloud_add_test.cmake.orig	2021-09-30 11:13:39 UTC
++++ test/nextcloud_add_test.cmake
+@@ -23,7 +23,7 @@ macro(nextcloud_add_test test_class)
+         )
+     endif()
+ 
+-    if (UNIX)
++    if (LINUX)
+         target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
+             "${synclib_NAME}_vfs_xattr"
+         )