On Fri May 22, 2020 at 08:57:21AM +0100, Stuart Henderson wrote: > IIRC it's installed there on purpose, exactly so that it is not > automatically picked up. >
Fair enough, here another try. Just help cmake if inotify is required "find_package(inotify REQUIRED)". This make porting consumer less painful. Rafael 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 13:45:52 -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 13:45:52 -0000 @@ -0,0 +1,33 @@ +$OpenBSD$ + +If inotify is required, help cmake to find it. + +Index: find-modules/FindInotify.cmake +--- find-modules/FindInotify.cmake.orig ++++ find-modules/FindInotify.cmake +@@ -48,7 +48,11 @@ + # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #============================================================================= + +-find_path(Inotify_INCLUDE_DIRS sys/inotify.h) ++if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND Inotify_FIND_REQUIRED) ++ find_path(Inotify_INCLUDE_DIRS NAMES sys/inotify.h PATHS ${LOCALBASE}/include/inotify NO_DEFAULT_PATH) ++else() ++ find_path(Inotify_INCLUDE_DIRS sys/inotify.h) ++endif() + + if(Inotify_INCLUDE_DIRS) + # On Linux there is no library to link against, on the BSDs there is. +@@ -58,7 +62,11 @@ if(Inotify_INCLUDE_DIRS) + set(Inotify_LIBRARIES "") + set(Inotify_INCLUDE_DIRS "") + else() +- find_library(Inotify_LIBRARIES NAMES inotify) ++ if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD" AND Inotify_FIND_REQUIRED) ++ find_library(Inotify_LIBRARIES NAMES inotify PATHS ${LOCALBASE}/lib/inotify NO_DEFAULT_PATH) ++ else() ++ find_library(Inotify_LIBRARIES NAMES inotify) ++ endif() + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Inotify + FOUND_VAR