summaryrefslogtreecommitdiff
path: root/lang/mono
diff options
context:
space:
mode:
authorJeremy Messenger <mezz@FreeBSD.org>2005-06-01 06:53:26 +0000
committerJeremy Messenger <mezz@FreeBSD.org>2005-06-01 06:53:26 +0000
commit635649a373933a36e9cf6b1e7393e933d1c77e40 (patch)
tree9e9c81c9956677a89d9dee3689069a93e97b8c40 /lang/mono
parentFix plist (HTML'ized version of man page is no longer installed). (diff)
[...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
Notes
Notes: svn path=/head/; revision=136579
Diffstat (limited to 'lang/mono')
-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
+ }
+