diff options
author | Daniel Drake <dsd@gentoo.org> | 2005-06-19 15:35:29 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2005-06-19 15:35:29 +0000 |
commit | 91860b636545e8bbe9612649a78767b132acaa32 (patch) | |
tree | 5de92b5879114f8ec4712be386660b8962d57288 /app-admin/gamin | |
parent | Initial import (diff) | |
download | historical-91860b636545e8bbe9612649a78767b132acaa32.tar.gz historical-91860b636545e8bbe9612649a78767b132acaa32.tar.bz2 historical-91860b636545e8bbe9612649a78767b132acaa32.zip |
Version bump to 0.1.1, should solve bug 74285. Requires a new inotify kernel such as gentoo-sources-2.6.12 for best performance.
Package-Manager: portage-1.589-cvs
Diffstat (limited to 'app-admin/gamin')
-rw-r--r-- | app-admin/gamin/ChangeLog | 9 | ||||
-rw-r--r-- | app-admin/gamin/Manifest | 15 | ||||
-rw-r--r-- | app-admin/gamin/files/digest-gamin-0.1.1 | 1 | ||||
-rw-r--r-- | app-admin/gamin/files/gamin-0.1.1-inotify-fix.patch | 482 | ||||
-rw-r--r-- | app-admin/gamin/gamin-0.1.1.ebuild | 60 |
5 files changed, 555 insertions, 12 deletions
diff --git a/app-admin/gamin/ChangeLog b/app-admin/gamin/ChangeLog index c9b42370ef49..d736973594d8 100644 --- a/app-admin/gamin/ChangeLog +++ b/app-admin/gamin/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-admin/gamin # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/gamin/ChangeLog,v 1.20 2005/04/02 22:49:57 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/gamin/ChangeLog,v 1.21 2005/06/19 15:35:29 dsd Exp $ + +*gamin-0.1.1 (19 Jun 2005) + + 19 Jun 2005; Daniel Drake <dsd@gentoo.org> + +files/gamin-0.1.1-inotify-fix.patch, +gamin-0.1.1.ebuild: + Version bump to 0.1.1, should solve bug 74285. Requires a new inotify kernel + such as gentoo-sources-2.6.12 for best performance. *gamin-0.0.26-r6 (02 Apr 2005) diff --git a/app-admin/gamin/Manifest b/app-admin/gamin/Manifest index acc6270d22d8..dbdc62e9bba6 100644 --- a/app-admin/gamin/Manifest +++ b/app-admin/gamin/Manifest @@ -1,27 +1,20 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 59d28e6a7eced2cd85355b76c6ae02b4 gamin-0.0.26.ebuild 1186 MD5 e14b51caa6ba40b1982f36284c19f75b gamin-0.0.19.ebuild 833 MD5 d56aae268087693c5b5fe3fc58cdae4c gamin-0.0.25.ebuild 1185 MD5 1a12b6356c49807d6a034d775c96575f gamin-0.0.20.ebuild 828 MD5 0cdad230fe4f3ab61550ef8079ddeb1f gamin-0.0.26-r6.ebuild 1258 MD5 2695c38fbf4b4e11fe5d9c4d6f080ffc gamin-0.0.18.ebuild 889 -MD5 d7c83a9607d74fbab9d1bffda281497a ChangeLog 3947 +MD5 4ab8f54deff871259bda81799d18d7f1 gamin-0.1.1.ebuild 1279 +MD5 b3f7532a3f2bb7e6593f2a3bfe9fff10 ChangeLog 4215 MD5 875135e8740bafa4dab79ee592cf9744 metadata.xml 279 MD5 39ade60322eb86b40eca5ba38fd6d522 gamin-0.0.15.ebuild 842 MD5 315c32e4751bc7d3bcfd88e03841a168 files/gamin-0.0.26-inotify_use_fd.patch 2759 +MD5 50691da4c01bbd32e1397b8873180986 files/gamin-0.1.1-inotify-fix.patch 14533 MD5 caf15e7329c9675dff66e7f65b424e79 files/digest-gamin-0.0.26-r6 64 +MD5 fd8dba98fd1b79aed73e3b6f17e0a779 files/digest-gamin-0.1.1 63 MD5 c576a2ec43ce151b5bc78b77e0f58c9a files/digest-gamin-0.0.15 64 MD5 b183176dcfe9a0ad1609767f11cafc12 files/digest-gamin-0.0.18 64 MD5 35d7d4d3208d674f62e4f2d7ef7d383f files/digest-gamin-0.0.19 64 MD5 04ae13b77ce72f4c93d0460b1bbcfd57 files/digest-gamin-0.0.20 64 MD5 a6ae9d25c124ec87523b00e860cc0d2f files/digest-gamin-0.0.25 64 MD5 caf15e7329c9675dff66e7f65b424e79 files/digest-gamin-0.0.26 64 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) - -iD8DBQFCTyF8iJcSIUGNthERAiwIAKCj7vQTXQHo6IZLkqWhZ32EtZUbNwCghH+M -RKV5I4QFFHkRQExFX0yZrew= -=NUAX ------END PGP SIGNATURE----- diff --git a/app-admin/gamin/files/digest-gamin-0.1.1 b/app-admin/gamin/files/digest-gamin-0.1.1 new file mode 100644 index 000000000000..f33e19ddded8 --- /dev/null +++ b/app-admin/gamin/files/digest-gamin-0.1.1 @@ -0,0 +1 @@ +MD5 5c5330c3df26ece7d71b69a0b8f4a126 gamin-0.1.1.tar.gz 512316 diff --git a/app-admin/gamin/files/gamin-0.1.1-inotify-fix.patch b/app-admin/gamin/files/gamin-0.1.1-inotify-fix.patch new file mode 100644 index 000000000000..5dbb9e415516 --- /dev/null +++ b/app-admin/gamin/files/gamin-0.1.1-inotify-fix.patch @@ -0,0 +1,482 @@ +=================================================================== +RCS file: /cvs/gnome/gamin/server gam_dnotify.c,v +retrieving revision 1.19 +retrieving revision 1.20 +diff -u -r1.19 -r1.20 +--- server/gam_dnotify.c 2005/06/08 13:57:28 1.19 ++++ server/gam_dnotify.c 2005/06/13 09:13:45 1.20 +@@ -58,6 +58,29 @@ + + static gboolean have_consume_idler = FALSE; + ++void ++gam_dnotify_data_debug (gpointer key, gpointer value, gpointer user_data) ++{ ++ DNotifyData *data = (DNotifyData *)value; ++ ++ if (!data) ++ return; ++ ++ int deactivated = data->fd == -1 ? 1 : 0; ++ ++ GAM_DEBUG(DEBUG_INFO, "dsub fd %d refs %d busy %d deactivated %d: %s\n", data->fd, data->refcount, data->busy, deactivated, data->path); ++} ++ ++void ++gam_dnotify_debug (void) ++{ ++ if (path_hash == NULL) ++ return; ++ ++ GAM_DEBUG(DEBUG_INFO, "Dumping dnotify subscriptions\n"); ++ g_hash_table_foreach (path_hash, gam_dnotify_data_debug, NULL); ++} ++ + static DNotifyData * + gam_dnotify_data_new(const char *path, int fd) + { +=================================================================== +RCS file: /cvs/gnome/gamin/server gam_dnotify.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -u -r1.1 -r1.2 +--- server/gam_dnotify.h 2004/06/15 19:30:49 1.1 ++++ server/gam_dnotify.h 2005/06/13 09:13:45 1.2 +@@ -12,6 +12,7 @@ + gboolean gam_dnotify_add_subscription (GamSubscription *sub); + gboolean gam_dnotify_remove_subscription (GamSubscription *sub); + gboolean gam_dnotify_remove_all_for (GamListener *listener); ++void gam_dnotify_debug (void); + + G_END_DECLS + +=================================================================== +RCS file: /cvs/gnome/gamin/server gam_inotify.c,v +retrieving revision 1.23 +retrieving revision 1.24 +diff -u -r1.23 -r1.24 +--- server/gam_inotify.c 2005/06/08 09:35:56 1.23 ++++ server/gam_inotify.c 2005/06/13 09:13:45 1.24 +@@ -44,15 +44,15 @@ + #include "gam_debugging.h" + #endif + +-#define MIN_POLL_TIME 1.0 +- + typedef struct { + char *path; + int wd; + int refcount; + GList *subs; + int busy; +- gboolean deactivated; ++ gboolean deactivated; ++ int events; ++ int deactivated_events; + } inotify_data_t; + + static GHashTable *path_hash = NULL; +@@ -68,6 +68,36 @@ + + static guint should_poll_mask = IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_DELETE|IN_CREATE|IN_DELETE_SELF|IN_UNMOUNT; + ++static void ++gam_inotify_data_debug (gpointer key, gpointer value, gpointer user_data) ++{ ++ inotify_data_t *data = (inotify_data_t *)value; ++ ++ if (!data) ++ return; ++ ++ int deactivated = data->deactivated; ++ ++ GAM_DEBUG(DEBUG_INFO, "isub wd %d refs %d busy %d deactivated %d events (%d:%d): %s\n", data->wd, data->refcount, data->busy, deactivated, data->events, data->deactivated_events, data->path); ++} ++ ++void ++gam_inotify_debug(void) ++{ ++ if (inotify_device_fd == -1) ++ { ++ GAM_DEBUG(DEBUG_INFO, "Inotify device not opened\n"); ++ return; ++ } ++ ++ if (path_hash == NULL) ++ return; ++ ++ GAM_DEBUG(DEBUG_INFO, "Inotify device fd = %d\n", inotify_device_fd); ++ GAM_DEBUG(DEBUG_INFO, "Dumping inotify subscriptions\n"); ++ g_hash_table_foreach (path_hash, gam_inotify_data_debug, NULL); ++} ++ + static void print_mask(int mask) + { + if (mask & IN_ACCESS) +@@ -138,6 +168,8 @@ + data->wd = wd; + data->busy = 0; + data->refcount = 1; ++ data->deactivated_events = 0; ++ data->events = 0; + + return data; + } +@@ -145,7 +177,7 @@ + static void + gam_inotify_data_free(inotify_data_t * data) + { +- if (data->refcount != 0) ++ if (data->refcount != 0) + GAM_DEBUG(DEBUG_INFO, "gam_inotify_data_free called with reffed data.\n"); + g_free(data->path); + g_free(data); +@@ -155,11 +187,8 @@ + gam_inotify_directory_handler_internal(const char *path, pollHandlerMode mode) + { + inotify_data_t *data; +- int path_fd; +- int path_wd; ++ int path_fd, path_wd; + struct inotify_watch_request iwr; +- +- + switch (mode) { + case GAMIN_ACTIVATE: + GAM_DEBUG(DEBUG_INFO, "Adding %s to inotify\n", path); +@@ -178,9 +207,11 @@ + mode, path); + return; + } ++ + G_LOCK(inotify); + + if (mode == GAMIN_ACTIVATE) { ++ + if ((data = g_hash_table_lookup(path_hash, path)) != NULL) { + data->refcount++; + GAM_DEBUG(DEBUG_INFO, " found incremented refcount: %d\n", +@@ -214,24 +245,13 @@ + gam_debug_report(GAMinotifyCreate, path, 0); + #endif + } else if (mode == GAMIN_DESACTIVATE) { +- char *dir = (char *) path; +- + data = g_hash_table_lookup(path_hash, path); + + if (!data) { +- dir = g_path_get_dirname(path); +- data = g_hash_table_lookup(path_hash, dir); +- +- if (!data) { +- GAM_DEBUG(DEBUG_INFO, " not found !!!\n"); ++ GAM_DEBUG(DEBUG_INFO, " not found !!!\n"); + +- if (dir != NULL) +- g_free(dir); +- +- G_UNLOCK(inotify); +- return; +- } +- GAM_DEBUG(DEBUG_INFO, " not found using parent\n"); ++ G_UNLOCK(inotify); ++ return; + } + + data->refcount--; +@@ -240,46 +260,32 @@ + + if (data->refcount == 0) { + int wd = data->wd; +- +- GAM_DEBUG(DEBUG_INFO, "removed inotify watch for %s\n", data->path); +- ++ GAM_DEBUG(DEBUG_INFO, "removed inotify watch for %s\n", ++ data->path); + g_hash_table_remove(path_hash, data->path); + g_hash_table_remove(wd_hash, GINT_TO_POINTER(data->wd)); + gam_inotify_data_free(data); +- + if (ioctl (inotify_device_fd, INOTIFY_IGNORE, &wd) < 0) { + GAM_DEBUG (DEBUG_INFO, "INOTIFY_IGNORE failed for %s (wd = %d)\n", data->path, data->wd); + } + #ifdef GAMIN_DEBUG_API +- gam_debug_report(GAMinotifyDelete, dir, 0); ++ gam_debug_report(GAMinotifyDelete, data->path, 0); + #endif + } else { + GAM_DEBUG(DEBUG_INFO, " found decremented refcount: %d\n", + data->refcount); + #ifdef GAMIN_DEBUG_API +- gam_debug_report(GAMinotifyChange, dir, data->refcount); ++ gam_debug_report(GAMinotifyChange, data->path, data->refcount); + #endif + } +- if ((dir != path) && (dir != NULL)) +- g_free(dir); + } else if ((mode == GAMIN_FLOWCONTROLSTART) || + (mode == GAMIN_FLOWCONTROLSTOP)) { +- char *dir = (char *) path; +- + data = g_hash_table_lookup(path_hash, path); + if (!data) { +- dir = g_path_get_dirname(path); +- data = g_hash_table_lookup(path_hash, dir); +- +- if (!data) { +- GAM_DEBUG(DEBUG_INFO, " not found !!!\n"); ++ GAM_DEBUG(DEBUG_INFO, " not found !!!\n"); + +- if (dir != NULL) +- g_free(dir); +- G_UNLOCK(inotify); +- return; +- } +- GAM_DEBUG(DEBUG_INFO, " not found using parent\n"); ++ G_UNLOCK(inotify); ++ return; + } + if (data != NULL) { + if (mode == GAMIN_FLOWCONTROLSTART) { +@@ -292,7 +298,7 @@ + GAM_DEBUG(DEBUG_INFO, "deactivated inotify for %s\n", + data->path); + #ifdef GAMIN_DEBUG_API +- gam_debug_report(GAMinotifyFlowOn, dir, 0); ++ gam_debug_report(GAMinotifyFlowOn, data->path, 0); + #endif + } + data->busy++; +@@ -310,13 +316,11 @@ + "failed to reactivate inotify for %s\n", + data->path); + +- if ((dir != path) && (dir != NULL)) +- g_free(dir); + return; + } + + iwr.fd = path_fd; +- iwr.mask = 0xffffffff; ++ iwr.mask = should_poll_mask; + path_wd = ioctl (inotify_device_fd, INOTIFY_WATCH, &iwr); + close (path_fd); + +@@ -338,8 +342,6 @@ + } + } + } +- if ((dir != path) && (dir != NULL)) +- g_free(dir); + } else { + GAM_DEBUG(DEBUG_INFO, "Unimplemented operation\n"); + } +@@ -353,17 +355,7 @@ + GAM_DEBUG(DEBUG_INFO, "gam_inotify_directory_handler %s : %d\n", + path, mode); + +- if ((mode == GAMIN_DESACTIVATE) || +- (g_file_test(path, G_FILE_TEST_IS_DIR))) { +- gam_inotify_directory_handler_internal(path, mode); +- } else { +- char *dir; +- +- dir = g_path_get_dirname(path); +- GAM_DEBUG(DEBUG_INFO, " not a dir using parent %s\n", dir); +- gam_inotify_directory_handler_internal(dir, mode); +- g_free(dir); +- } ++ gam_inotify_directory_handler_internal(path, mode); + } + + static void +@@ -374,15 +366,18 @@ + if (g_file_test(path, G_FILE_TEST_IS_DIR)) { + gam_inotify_directory_handler_internal(path, mode); + } else { +- char *dir; +- +- dir = g_path_get_dirname(path); +- GAM_DEBUG(DEBUG_INFO, " not a dir using parent %s\n", dir); +- gam_inotify_directory_handler_internal(dir, mode); +- g_free(dir); ++ GAM_DEBUG(DEBUG_INFO, " not a dir %s, FAILED!!!\n", path); + } + } + ++static void ++gam_inotify_q_overflow (gpointer key, gpointer value, gpointer user_data) ++{ ++ inotify_data_t *data = (inotify_data_t *)value; ++ ++ gam_poll_scan_directory (data->path); ++} ++ + static gboolean + gam_inotify_read_handler(gpointer user_data) + { +@@ -393,10 +388,6 @@ + + G_LOCK(inotify); + +-#if 0 +- gam_inotify_dirty_list_cleaner (); +-#endif +- + if (ioctl(inotify_device_fd, FIONREAD, &buffer_size) < 0) { + G_UNLOCK(inotify); + GAM_DEBUG(DEBUG_INFO, "inotify FIONREAD < 0. kaboom!\n"); +@@ -427,6 +418,7 @@ + GAM_DEBUG(DEBUG_INFO, "processing event: inotify can't find wd %d\n", event->wd); + } else if (data->deactivated) { + GAM_DEBUG(DEBUG_INFO, "inotify: ignoring event on temporarily deactivated watch %s\n", data->path); ++ data->deactivated_events++; + } else { + if (event->mask == IN_IGNORED) { + GList *l; +@@ -434,6 +426,8 @@ + GAM_DEBUG(DEBUG_INFO, "inotify: IN_IGNORE on wd=%d\n", event->wd); + GAM_DEBUG(DEBUG_INFO, "inotify: removing all subscriptions for %s\n", data->path); + ++ data->events++; ++ + l = data->subs; + data->subs = NULL; + for (l = l; l; l = l->next) { +@@ -445,11 +439,12 @@ + GAM_DEBUG(DEBUG_INFO, "inotify requesting poll for %s\n", data->path); + GAM_DEBUG(DEBUG_INFO, "poll was requested for event = "); + print_mask (event->mask); ++ data->events++; + gam_poll_scan_directory (data->path); + } + } else if (event->mask == IN_Q_OVERFLOW) { +- GAM_DEBUG(DEBUG_INFO, "inotify queue over flowed\n"); +- GAM_DEBUG(DEBUG_INFO, "FIXME, should request poll for all paths here\n"); ++ GAM_DEBUG(DEBUG_INFO, "inotify queue over flowed, requesting poll on all watched paths\n"); ++ g_hash_table_foreach (path_hash, gam_inotify_q_overflow, NULL); + } + } + +@@ -516,16 +511,16 @@ + { + GSource *source; + ++ g_return_val_if_fail(gam_poll_init_full(FALSE), FALSE); ++ + inotify_device_fd = open("/dev/inotify", O_RDONLY); + + if (inotify_device_fd < 0) { +- GAM_DEBUG(DEBUG_INFO, "Could not open /dev/inotify\n"); +- return FALSE; ++ GAM_DEBUG(DEBUG_INFO, "Could not open /dev/inotify\n"); ++ return FALSE; + } + +- g_return_val_if_fail(gam_poll_init_full(FALSE), FALSE); +- +- inotify_read_ioc = g_io_channel_unix_new(inotify_device_fd); ++ inotify_read_ioc = g_io_channel_unix_new(inotify_device_fd); + + /* For binary data */ + g_io_channel_set_encoding(inotify_read_ioc, NULL, NULL); +@@ -563,6 +558,7 @@ + gam_inotify_add_subscription(GamSubscription * sub) + { + GAM_DEBUG(DEBUG_INFO, "gam_inotify_add_subscription\n"); ++ + if (!gam_poll_add_subscription(sub)) { + return FALSE; + } +=================================================================== +RCS file: /cvs/gnome/gamin/server gam_inotify.h,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -r1.2 -r1.3 +--- server/gam_inotify.h 2005/04/15 11:17:38 1.2 ++++ server/gam_inotify.h 2005/06/13 09:13:45 1.3 +@@ -11,6 +11,7 @@ + gboolean gam_inotify_add_subscription (GamSubscription *sub); + gboolean gam_inotify_remove_subscription (GamSubscription *sub); + gboolean gam_inotify_remove_all_for (GamListener *listener); ++void gam_inotify_debug (void); + + G_END_DECLS + +=================================================================== +RCS file: /cvs/gnome/gamin/server gam_poll.c,v +retrieving revision 1.56 +retrieving revision 1.57 +diff -u -r1.56 -r1.57 +--- server/gam_poll.c 2005/06/10 14:31:33 1.56 ++++ server/gam_poll.c 2005/06/13 09:13:45 1.57 +@@ -149,7 +149,7 @@ + static void + trigger_dir_handler(const char *path, pollHandlerMode mode, GamNode * node) + { +- if (type_khandler == GAMIN_K_DNOTIFY) { ++ if (type_khandler == GAMIN_K_DNOTIFY || type_khandler == GAMIN_K_INOTIFY) { + if (gam_node_is_dir(node)) { + if (dir_handler != NULL) + (*dir_handler) (path, mode); +@@ -172,7 +172,7 @@ + static void + trigger_file_handler(const char *path, pollHandlerMode mode, GamNode * node) + { +- if (type_khandler == GAMIN_K_DNOTIFY) { ++ if (type_khandler == GAMIN_K_DNOTIFY || type_khandler == GAMIN_K_INOTIFY) { + if (gam_node_is_dir(node)) { + (*file_handler) (path, mode); + } else { +@@ -947,8 +947,14 @@ + gboolean + gam_poll_init_full(gboolean start_scan_thread) + { ++ /* already started */ ++ if ((poll_mode == 2) && (start_scan_thread)) ++ return (TRUE); ++ if ((poll_mode == 1) && (!start_scan_thread)) ++ return (TRUE); ++ /* not started as expected */ + if (poll_mode != 0) +- return (FALSE); ++ return(FALSE); + + if (!start_scan_thread) { + g_timeout_add(1000, gam_poll_scan_callback, NULL); +=================================================================== +RCS file: /cvs/gnome/gamin/server gam_server.c,v +retrieving revision 1.24 +retrieving revision 1.25 +diff -u -r1.24 -r1.25 +--- server/gam_server.c 2005/06/08 22:07:51 1.24 ++++ server/gam_server.c 2005/06/13 09:13:45 1.25 +@@ -82,6 +82,12 @@ + void + gam_show_debug(void) { + gam_connections_debug(); ++#ifdef ENABLE_INOTIFY ++ gam_inotify_debug (); ++#endif ++#ifdef ENABLE_DNOTIFY ++ gam_dnotify_debug (); ++#endif + } + + /** +=================================================================== +RCS file: /cvs/gnome/gamin/tests testing.c,v +retrieving revision 1.10 +retrieving revision 1.11 +diff -u -r1.10 -r1.11 +--- tests/testing.c 2005/04/04 11:51:38 1.10 ++++ tests/testing.c 2005/06/13 09:13:45 1.11 +@@ -313,7 +313,7 @@ + testState.nb_requests++; + } else if (!strcmp(command, "monfile")) { + if (args != 2) { +- fprintf(stderr, "mkdir line %d: lacks name\n", no); ++ fprintf(stderr, "monfile line %d: lacks name\n", no); + return (-1); + } + if (arg[0] != '/') diff --git a/app-admin/gamin/gamin-0.1.1.ebuild b/app-admin/gamin/gamin-0.1.1.ebuild new file mode 100644 index 000000000000..bcb846adf0f7 --- /dev/null +++ b/app-admin/gamin/gamin-0.1.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/gamin/gamin-0.1.1.ebuild,v 1.1 2005/06/19 15:35:29 dsd Exp $ + +inherit eutils + +DESCRIPTION="Library providing the FAM File Alteration Monitor API" +HOMEPAGE="http://www.gnome.org/~veillard/gamin/" +SRC_URI="http://www.gnome.org/~veillard/gamin/sources/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~arm ~hppa ~ia64 ~ppc ~s390" +IUSE="debug doc" + +RDEPEND="virtual/libc + >=dev-libs/glib-2 + !app-admin/fam" + +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +PROVIDE="virtual/fam" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-inotify-fix.patch +} + +src_compile() { + + econf \ + --enable-inotify \ + `use_enable debug` \ + `use_enable debug debug-api` \ + || die + + emake || die "emake failed" + +} + +src_install() { + + make DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog README TODO NEWS doc/*txt + + use doc && dohtml doc/* + +} + +pkg_postinst() { + + einfo "It is strongly suggested you use Gamin with an inotify enabled" + einfo "kernel for best performance. For this release of gamin you need" + einfo "at least an inotify 0.23-6 patched kernel, gentoo-sources-2.6.12" + einfo "provides this patch for example." + +} |