On Sun, Sep 04, 2022 at 09:24:22AM +0200, Rafael Sadowski wrote:
> I figure out that FindInotify from ecm was useless. Please find below a
> patch to unbreak FindInotify. With this FindInotify will find our
> devel/libinotify includes and shared lib.
>
> In most ports it should then look like this:
>
> WANTLIB += lib/inotify/inotify
>
> LIB_DEPENDS = devel/libinotify
>
> CXXFLAGS += -I${LOCALBASE}/include/inotify
> MODCMAKE_LDFLAGS = -L${LOCALBASE}/lib/inotify
>
> OK or should this go into a bulk build? Volunteers?
Is it time to install libinotify to the standard lib and inclure dirs?
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/kf5/extra-cmake-modules/Makefile,v
> retrieving revision 1.25
> diff -u -p -u -p -r1.25 Makefile
> --- Makefile 11 Jul 2022 15:49:52 -0000 1.25
> +++ Makefile 4 Sep 2022 06:58:40 -0000
> @@ -1,6 +1,7 @@
> COMMENT = CMake modules required by KDE5
> DISTNAME = extra-cmake-modules-${VERSION}
> HOMEPAGE = https://projects.kde.org/projects/kdesupport/extra-cmake-modules
> +REVISION = 0
>
> MODULES = lang/python
> MODPY_RUNDEP = No
> @@ -20,5 +21,7 @@ post-install:
> ${PREFIX}/share/ECM/find-modules/ \
> ${PREFIX}/share/ECM/modules/ \
> ${PREFIX}/share/ECM/toolchain/
> +pre-configure:
> + ${SUBST_CMD} ${WRKSRC}/find-modules/FindInotify.cmake
>
> .include <bsd.port.mk>
> 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 4 Sep 2022 06:58:40 -0000
> @@ -0,0 +1,24 @@
> +Index: find-modules/FindInotify.cmake
> +--- find-modules/FindInotify.cmake.orig
> ++++ find-modules/FindInotify.cmake
> +@@ -28,7 +28,11 @@ these may be needed to use inotify.
> + Since 5.32.0.
> + #]=======================================================================]
> +
> ++if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
> ++find_path(Inotify_INCLUDE_DIRS inotify/sys/inotify.h)
> ++else()
> + find_path(Inotify_INCLUDE_DIRS sys/inotify.h)
> ++endif()
> +
> + if(Inotify_INCLUDE_DIRS)
> + # On Linux and SunOS, there is no library to link against, on the BSDs there is.
> +@@ -38,7 +42,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/)
> + include(FindPackageHandleStandardArgs)
> + find_package_handle_standard_args(Inotify
> + FOUND_VAR
>
--
Antoine
No comments:
Post a Comment