aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authormezz <mezz@FreeBSD.org>2005-06-01 14:53:26 +0800
committermezz <mezz@FreeBSD.org>2005-06-01 14:53:26 +0800
commitc559ee66a0bf3828df79ccd572be7905b5eaa316 (patch)
tree4472fc9e081193491196365a62973f68a4106e21 /lang
parentd3ec1ed37080fb87ae463c03c2e34f1b6be53406 (diff)
downloadfreebsd-ports-gnome-c559ee66a0bf3828df79ccd572be7905b5eaa316.tar.gz
freebsd-ports-gnome-c559ee66a0bf3828df79ccd572be7905b5eaa316.tar.zst
freebsd-ports-gnome-c559ee66a0bf3828df79ccd572be7905b5eaa316.zip
[...Took from jylefort's comment in email with a bit tweak...]
Mono will using Gamin or FAM by default if it exists in the runtime. If either doesn't exist then it will use KeventWatcher.cs. Add auto-check on Gamin and FAM for dependency. Bump the PORTREVISION to have the fix of kqueue. Rationale: - KeventWatcher.cs is naive, it does not report changes made to files within a monitored directory [1] - KeventWatcher.cs is implemented in C#, it is therefore slower than Gamin or FAM, which are implemented in C and C++, respectively [1] this is a bug which should be reported to the vendor Testing, using the attached WatchTest.cs: With KeventWatcher.cs: $ mono WatchTest.exe /somedir & [1] 89857 $ touch /somedir/foo OnCreatedEvent /somedir/foo $ echo foo >> /somedir/foo <nothing happens> With Gamin: $ mono WatchTest.exe /somedir & [1] 89889 $ touch /somedir/foo OnCreatedEvent /somedir/foo $ echo foo >> /somedir/foo OnChangedEvent /somedir/foo Submitted by: jylefort
Diffstat (limited to 'lang')
-rw-r--r--lang/mono/Makefile8
-rw-r--r--lang/mono/files/patch-mono_metadata_filewatcher.c34
2 files changed, 41 insertions, 1 deletions
diff --git a/lang/mono/Makefile b/lang/mono/Makefile
index f33bc04b7c24..3f2512995134 100644
--- a/lang/mono/Makefile
+++ b/lang/mono/Makefile
@@ -8,7 +8,7 @@
PORTNAME= mono
PORTVERSION= 1.1.7
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= lang
MASTER_SITES= http://www.go-mono.com/sources/mono-1.1/
@@ -52,6 +52,12 @@ IGNORE= Does not work on 4.X and 5.X before 503000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-support_mph.h
.endif
+.if exists(${LOCALBASE}/lib/libgamin-1.so)
+LIB_DEPENDS+= fam.0:${PORTSDIR}/devel/gamin
+.elif exists(${LOCALBASE}/lib/libfam.so)
+LIB_DEPENDS+= fam.0:${PORTSDIR}/devel/fam
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|g' \
${WRKSRC}/mono/metadata/assembly.c
diff --git a/lang/mono/files/patch-mono_metadata_filewatcher.c b/lang/mono/files/patch-mono_metadata_filewatcher.c
new file mode 100644
index 000000000000..3d36d76cdc31
--- /dev/null
+++ b/lang/mono/files/patch-mono_metadata_filewatcher.c
@@ -0,0 +1,34 @@
+--- mono/metadata/filewatcher.c.orig Wed Jun 1 06:25:57 2005
++++ mono/metadata/filewatcher.c Wed Jun 1 06:27:17 2005
+@@ -97,9 +97,6 @@
+ gint
+ ves_icall_System_IO_FSW_SupportsFSW (void)
+ {
+-#if HAVE_KQUEUE
+- return 3;
+-#else
+ GModule *fam_module;
+ gchar *filename;
+
+@@ -109,13 +106,19 @@
+ fam_module = g_module_open (filename, G_MODULE_BIND_LAZY);
+ g_free (filename);
+ if (fam_module == NULL)
+- return 0;
++ goto nofam;
+
+ g_module_symbol (fam_module, "FAMNextEvent", (gpointer *) &FAMNextEvent);
+ if (FAMNextEvent == NULL)
+- return 0;
++ goto nofam;
+
+ return 2;
++
++ nofam:
++#if HAVE_KQUEUE
++ return 3;
++#else
++ return 0;
+ #endif
+ }
+