Simple patch to fix FindInotify. CMake needs some help to find
"sys/inotify.h" and libinotify because we do not install it under
LOCALBASE/{include,lib}.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/kf5/extra-cmake-modules/Makefile,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 Makefile
--- Makefile 30 Mar 2020 15:00:38 -0000 1.9
+++ Makefile 22 May 2020 06:25:00 -0000
@@ -3,7 +3,7 @@
COMMENT = CMake modules required by KDE5
DISTNAME = extra-cmake-modules-${VERSION}
HOMEPAGE =
https://projects.kde.org/projects/kdesupport/extra-cmake-modules
-REVISION = 1
+REVISION = 2
WANTLIB- =
@@ -21,6 +21,9 @@ PKG_ARCH = *
# use depleted
CONFIGURE_ARGS += -DMAN_INSTALL_DIR=${PREFIX}/man
+
+post-patch:
+ ${SUBST_CMD} ${WRKSRC}/find-modules/FindInotify.cmake
post-install:
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
Index: patches/patch-find-modules_FindInotify_cmake
===================================================================
RCS file: patches/patch-find-modules_FindInotify_cmake
diff -N patches/patch-find-modules_FindInotify_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-find-modules_FindInotify_cmake 22 May 2020 06:25:00
-0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+inotify is not installed in the standard path
+
+Index: find-modules/FindInotify.cmake
+--- find-modules/FindInotify.cmake.orig
++++ find-modules/FindInotify.cmake
+@@ -48,7 +48,7 @@
+ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #=============================================================================
+
+-find_path(Inotify_INCLUDE_DIRS sys/inotify.h)
++find_path(Inotify_INCLUDE_DIRS NAMES sys/inotify.h PATHS
${LOCALBASE}/include/inotify NO_DEFAULT_PATH)
+
+ if(Inotify_INCLUDE_DIRS)
+ # On Linux there is no library to link against, on the BSDs there is.
+@@ -58,7 +58,7 @@ if(Inotify_INCLUDE_DIRS)
+ set(Inotify_LIBRARIES "")
+ set(Inotify_INCLUDE_DIRS "")
+ else()
+- find_library(Inotify_LIBRARIES NAMES inotify)
++ find_library(Inotify_LIBRARIES NAMES inotify PATHS
${LOCALBASE}/lib/inotify NO_DEFAULT_PATH)
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Inotify
+ FOUND_VAR