Re: Fix FindInotify in devel/kf5/extra-cmake-modules
On 2022/09/04 09:40, Rafael Sadowski wrote: > On Sun Sep 04, 2022 at 09:28:35AM +0200, Antoine Jacoutot wrote: > > 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? > > I would love to see it! But even then, we need some patches unless we > install it in ${LOCALBASE}/include/sys/inotify.h and not > ${LOCALBASE}/include/inotify.h. > > Anyway it will help with WANTLIB and ld. I worry that we'll have the same problem we had with libexecinfo with ports picking up the header but not realising that they need to link an extra library because the function isn't in libc like it is on Linux. Now libexecinfo is in base we miss the worst of that (dep not listed -> dpb junking breaks builds) but I think we'll see it again with libinotify in a standard searched dir. (It won't show up in check-lib-depends if some port knows about the header but not the library). It goes double with the way we're using lld (which I think is connected with how we don't list deps on libc in shared libraries) as it often doesn't tell us about missing symbols. There is another side-issue that we might suddenly run into huge fd use from some software (our default fd limits are really low and the way that directory-monitoring has to be implemented for the kqueue backend uses a lot of FDs) though this could be partially dealt with by disabling inotify case-by-case when we find those ports (so if we *do* change this it's probably best to time it for soon after unlock). inotify shows up in logs from these: audio/mpd databases/kdb databases/pspg databases/recoll databases/tdb devel/git-cola devel/glib2 devel/kf5/kcoreaddons devel/libev devel/libivykis devel/libtalloc devel/monotone devel/p5-EV devel/py-gevent devel/py-intervaltree devel/py-pyinotify devel/py-twisted devel/ruby-ffi devel/sdl2 devel/spidermonkey91 editors/emacs emulators/qemu games/0ad/base games/openclonk graphics/nsxiv graphics/sane-backends lang/dmd lang/gcc/11 lang/ldc lang/mono lang/wasi-libc mail/courier-imap mail/dovecot mail/extsmail mail/maildrop mail/mozilla-thunderbird mail/mutt mail/neomutt mail/rspamd math/graphviz math/py-networkx math/rstudio multimedia/mediainfo multimedia/minidlna net/avahi net/dnsmasq net/gdnsd net/nextcloudclient net/owncloudclient net/ruby-eventmachine net/samba net/seafile/seafile net/transmission security/ossec-hids security/pwntools security/sn0int sysutils/bacula sysutils/conky sysutils/consolekit sysutils/coreutils sysutils/gamin sysutils/incron sysutils/inotify-tools sysutils/logfmon sysutils/lsyncd sysutils/rsy sysutils/salt sysutils/syslog-ng sysutils/vifm telephony/asterisk/16 telephony/asterisk/18 telephony/asterisk/19 textproc/calibre textproc/mdbook textproc/ruby-haml textproc/wkhtmltopdf www/firefox-esr www/lighttpd www/mozilla-firefox www/ruby-passenger www/tor-browser/browser www/zola x11/alacritty x11/compiz/ccsm x11/compiz/core x11/compiz/libcompizconfig x11/dbus x11/ede/lib x11/emelfm2 x11/kde-applications/akonadi-import-wizard x11/kde-applications/akonadiconsole x11/kde-applications/akregator x11/kde-applications/grantlee-editor x11/kde-applications/kdepim-addons x11/kde-applications/khelpcenter x11/kde-applications/kmail x11/kde-applications/mailcommon x11/kde-applications/mbox-importer x11/kde-applications/messagelib x11/kde-applications/pim-data-exporter x11/nitrogen x11/polybar x11/qt5/qtbase x11/qt6/qtbase x11/qtfm x11/rox-filer x11/rxvt-unicode x11/windowmaker x11/wxWidgets x11/xmobar
Re: Fix FindInotify in devel/kf5/extra-cmake-modules
On Sun Sep 04, 2022 at 09:28:35AM +0200, Antoine Jacoutot wrote: > 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? I would love to see it! But even then, we need some patches unless we install it in ${LOCALBASE}/include/sys/inotify.h and not ${LOCALBASE}/include/inotify.h. Anyway it will help with WANTLIB and ld. +1 > > > > 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 > > --- Makefile11 Jul 2022 15:49:52 - 1.25 > > +++ Makefile4 Sep 2022 06:58:40 - > > @@ -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 > > 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 - > > +++ patches/patch-find-modules_FindInotify_cmake4 Sep 2022 06:58:40 > > - > > @@ -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
Re: Fix FindInotify in devel/kf5/extra-cmake-modules
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 - 1.25 > +++ Makefile 4 Sep 2022 06:58:40 - > @@ -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 > 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 - > +++ patches/patch-find-modules_FindInotify_cmake 4 Sep 2022 06:58:40 > - > @@ -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
Fix FindInotify in devel/kf5/extra-cmake-modules
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? 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 --- Makefile11 Jul 2022 15:49:52 - 1.25 +++ Makefile4 Sep 2022 06:58:40 - @@ -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 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 - +++ patches/patch-find-modules_FindInotify_cmake4 Sep 2022 06:58:40 - @@ -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