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).
This commit is contained in:
ajacoutot 2012-01-01 09:00:46 +00:00
parent 1b1084e088
commit 88f403097e
4 changed files with 42 additions and 9 deletions

View File

@ -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 <sys/event.h>,#include <sys/types.h>\n#include <sys/event.h>,' \
${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;" \

View File

@ -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

View File

@ -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

View File

@ -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).