Hi Adriano, hey ports@,
here is a diff to tweak and clean up the libinotify setup in
net/nextcloudclient.
- Use FindInotify.cmake from devel/kf5/extra-cmake-modules
- Drop CFLAGS (nextcloudclient is C++ only code)
- Set rpah by CMAKE_INSTALL_RPATH not by CXXFLAGS.
What do you think? Does it works for you? OK?
Cheers,
Rafael
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/nextcloudclient/Makefile,v
retrieving revision 1.48
diff -u -p -u -p -r1.48 Makefile
--- Makefile 1 Apr 2023 17:52:07 -0000 1.48
+++ Makefile 13 Apr 2023 16:14:49 -0000
@@ -4,6 +4,7 @@ COMMENT = desktop sync client for Nextcl
V = 3.8.0
DISTNAME = nextcloudclient-${V}
+REVISION = 0
GH_ACCOUNT = nextcloud
GH_PROJECT = desktop
@@ -37,6 +38,9 @@ BUILD_DEPENDS = devel/gettext,-tools
# for converting svg icons to png
BUILD_DEPENDS += x11/gnome/librsvg
+# FindInotify.cmake
+BUILD_DEPENDS += devel/kf5/extra-cmake-modules
+
# for tests, but detected during configure
BUILD_DEPENDS += devel/cmocka
@@ -68,12 +72,18 @@ CONFIGURE_ARGS += -DCMAKE_DISABLE_FIND_P
# Disable SharedMime
CONFIGURE_ARGS += -DCMAKE_DISABLE_FIND_PACKAGE_SharedMimeInfo=ON
+CONFIGURE_ARGS += -DCMAKE_MODULE_PATH=${LOCALBASE}/share/ECM/find-modules
+
# Do not install under /etc/Nextcloud
CONFIGURE_ARGS += -DSYSCONF_INSTALL_DIR=${SYSCONFDIR}
-CFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/include/inotify
-I${LOCALBASE}/include/qtkeychain
-CXXFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/include/inotify
-I${LOCALBASE}/include/qtkeychain
-MODCMAKE_LDFLAGS = -L${LOCALBASE}/lib -L${LOCALBASE}/lib/inotify -linotify
-Wl,-rpath=${LOCALBASE}/lib/inotify
+CONFIGURE_ARGS += -DCMAKE_INSTALL_RPATH=${LOCALBASE}/lib/inotify
+
+CXXFLAGS += -I${LOCALBASE}/include/inotify
-I${LOCALBASE}/include/qtkeychain
+MODCMAKE_LDFLAGS = -L${LOCALBASE}/lib/inotify
+
+pre-configure:
+ rm ${WRKSRC}/cmake/modules/FindInotify.cmake
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/Nextcloud/
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/net/nextcloudclient/patches/patch-CMakeLists_txt,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 14 Mar 2023 05:10:18 -0000 1.10
+++ patches/patch-CMakeLists_txt 13 Apr 2023 16:14:49 -0000
@@ -1,6 +1,15 @@
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
+@@ -57,7 +57,7 @@ if (NOT DEFINED PACKAGE)
+ set(PACKAGE "${LINUX_PACKAGE_SHORTNAME}-client")
+ endif()
+
+-set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
++list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+
+ include(ECMCoverageOption)
+
@@ -282,4 +282,4 @@ elseif(BUILD_CLIENT)
configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)
endif()