From 88f403097e192a5edcf083866df1e9e62f7a6c77 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Sun, 1 Jan 2012 09:00:46 +0000 Subject: [PATCH] Integrate the GLib kqueue(2) backend from Dmitry Matveev's GSoC 2011. As a consequence, explicitely disable the FAM backend. This bring a huge improvement compared to what we've been using before (gio-fam+gamin): file / directory monitoring and notifications are next to instantaneous without any cpu overhead like it was before. This means we can also drop the bootstrap FLAVOR of gamin that was needed because of the cyclic dependency (gamin->glib2->gamin). --- devel/glib2/Makefile | 26 +++++++++++++++++++++----- devel/glib2/distinfo | 5 +++++ devel/glib2/pkg/PLIST-main | 6 ++---- devel/glib2/pkg/README-main | 14 ++++++++++++++ 4 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 devel/glib2/pkg/README-main diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile index fd60622cccc..f25c11f6946 100644 --- a/devel/glib2/Makefile +++ b/devel/glib2/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.146 2011/11/16 15:34:54 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.147 2012/01/01 09:00:46 ajacoutot Exp $ COMMENT-main= general-purpose utility library COMMENT-docs= glib2 documentation @@ -10,7 +10,7 @@ EXTRACT_SUFX= .tar.xz PKGNAME-main= glib2-${VERSION} PKGNAME-docs= glib2-docs-${VERSION} -REVISION-main= 1 +REVISION-main= 2 CATEGORIES= devel @@ -41,11 +41,10 @@ MODPY_ADJ_FILES= glib/gtester-report \ gio/gdbus-2.0/codegen/gdbus-codegen.in \ gio/tests/gdbus-testserver.py -WANTLIB-main += ${WANTLIB} c pthread z pcre fam ffi +WANTLIB-main += ${WANTLIB} c pthread z pcre ffi LIB_DEPENDS-main= ${LIB_DEPENDS} \ devel/pcre>=8.13 \ - sysutils/gamin,no_server,no_python,bootstrap \ devel/libffi PKG_ARCH-docs= * @@ -68,10 +67,10 @@ USE_LIBTOOL= Yes CONFIGURE_STYLE= gnu CONFIGURE_ARGS= ${CONFIGURE_SHARED} \ --enable-static \ - --enable-fam \ --with-pcre=system \ --disable-gtk-doc \ --disable-Bsymbolic \ + --disable-fam \ --disable-selinux \ --disable-systemtap \ --disable-xattr @@ -89,6 +88,23 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \ -D_POSIX_MONOTONIC_CLOCK=200112L" \ LDFLAGS="-L${LOCALBASE}/lib -pthread" +### kqueue(1) backend ################################################## +AUTOMAKE_VERSION= 1.11 +AUTOCONF_VERSION= 2.68 +BUILD_DEPENDS+= ${MODGNU_AUTOCONF_DEPENDS} \ + ${MODGNU_AUTOMAKE_DEPENDS} +MASTER_SITES0= http://dmitrymatveev.co.uk/files/ +PATCHFILES= glib-gio-kqueue-2.28.8-v2.patch:0 +AUTO_ENV= AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \ + AUTOCONF_VERSION=${AUTOCONF_VERSION} +post-patch: + perl -pi -e 's,#include ,#include \n#include ,' \ + ${WRKSRC}/gio/kqueue/{kqueue-helper,kqueue-thread,kqueue-utils}.c + cd ${WRKSRC} && ${AUTO_ENV} automake + cd ${WRKSRC} && ${AUTO_ENV} autoheader + cd ${WRKSRC} && ${AUTO_ENV} autoconf +### end of kqueue(1) backend ########################################### + pre-configure: perl -pi -e "s,/usr/local,${LOCALBASE},g;" \ -e "s,/usr/share/locale,${LOCALBASE}/share/locale,g;" \ diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo index fb2d71abc7a..5987e6df822 100644 --- a/devel/glib2/distinfo +++ b/devel/glib2/distinfo @@ -1,5 +1,10 @@ MD5 (glib-2.30.2.tar.xz) = t90mqoPeC1nIZ6C565+UYg== +MD5 (glib-gio-kqueue-2.28.8-v2.patch) = 8QewePQLOOGfy6SMBezs9Q== RMD160 (glib-2.30.2.tar.xz) = 2Px8h2vRXqOpJV1NCmfXReN5BIg= +RMD160 (glib-gio-kqueue-2.28.8-v2.patch) = XTIFLYPqJ83qCvJxNertcAMyOsY= SHA1 (glib-2.30.2.tar.xz) = vHvoVyEimX5NX8ZpH1FgLyjNTjo= +SHA1 (glib-gio-kqueue-2.28.8-v2.patch) = mAUznwwLD+Zgt+GL2BbQZgSOPbg= SHA256 (glib-2.30.2.tar.xz) = 8OkeYzMyHdtI+hK1xm9Ww9XwUyV0jGbdLpAWwnj/joI= +SHA256 (glib-gio-kqueue-2.28.8-v2.patch) = C7224aTqeHvIJdt7gJjRq0WWyuPkmGD9l/kbzk/Quos= SIZE (glib-2.30.2.tar.xz) = 5818860 +SIZE (glib-gio-kqueue-2.28.8-v2.patch) = 88654 diff --git a/devel/glib2/pkg/PLIST-main b/devel/glib2/pkg/PLIST-main index 5c9f2ca2b1c..58588fb898c 100644 --- a/devel/glib2/pkg/PLIST-main +++ b/devel/glib2/pkg/PLIST-main @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST-main,v 1.23 2011/11/13 15:16:17 ajacoutot Exp $ +@comment $OpenBSD: PLIST-main,v 1.24 2012/01/01 09:00:46 ajacoutot Exp $ @conflict glib2-fam-* @pkgpath devel/glib2 @pkgpath devel/glib2,-fam @@ -268,9 +268,6 @@ lib/gdbus-2.0/codegen/utils.pyc lib/gdbus-2.0/codegen/utils.pyo lib/gio/ lib/gio/modules/ -@comment lib/gio/modules/libgiofam.a -@comment lib/gio/modules/libgiofam.la -lib/gio/modules/libgiofam.so lib/glib-2.0/ lib/glib-2.0/include/ lib/glib-2.0/include/glibconfig.h @@ -311,6 +308,7 @@ lib/pkgconfig/gthread-2.0.pc share/aclocal/glib-2.0.m4 share/aclocal/glib-gettext.m4 share/aclocal/gsettings.m4 +share/doc/pkg-readmes/${FULLPKGNAME} share/gdb/ share/gdb/auto-load/ share/gdb/auto-load/libglib-2.0.so.0.3000.2-gdb.py diff --git a/devel/glib2/pkg/README-main b/devel/glib2/pkg/README-main new file mode 100644 index 00000000000..1510f052b6e --- /dev/null +++ b/devel/glib2/pkg/README-main @@ -0,0 +1,14 @@ +$OpenBSD: README-main,v 1.1 2012/01/01 09:00:46 ajacoutot Exp $ + ++----------------------------------------------------------------------- +| Running ${FULLPKGNAME} on OpenBSD ++----------------------------------------------------------------------- + +File and directory monitor +========================== +GLib (GFileMonitor) provides realtime kqueue(2) notifications and +monitoring up to the open file descriptors limit. +If gio-kqueue needs to handle large directories, the kern.maxfiles +sysctl(8) should be increased by adding an entry in sysctl.conf(5) and +the user's login(1) class modified accordingly by bumping the "cur" and +"max" "openfiles" limit in login.conf(5).