summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-01-10 03:55:24 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-01-10 03:55:24 +0800
commit1f54644c601db9102def6d2a04c4af7db9714511 (patch)
tree7f88663aed80c12d3d352c2c12c2a2b012e07f3d /devel
parent868ea39205fb83309080af61df139d23278b8dff (diff)
downloadmarcuscom-ports-1f54644c601db9102def6d2a04c4af7db9714511.tar
marcuscom-ports-1f54644c601db9102def6d2a04c4af7db9714511.tar.gz
marcuscom-ports-1f54644c601db9102def6d2a04c4af7db9714511.tar.bz2
marcuscom-ports-1f54644c601db9102def6d2a04c4af7db9714511.tar.lz
marcuscom-ports-1f54644c601db9102def6d2a04c4af7db9714511.tar.xz
marcuscom-ports-1f54644c601db9102def6d2a04c4af7db9714511.tar.zst
marcuscom-ports-1f54644c601db9102def6d2a04c4af7db9714511.zip
Update glib20 to 2.15.1, and break out the GIO FAM backend into a separate
port (gio-fam-backend). This requires a bit of trickery in bsd.gnome.mk to avoid a dependency loop, so a new _glib20 component was added that should only be required by FAM providers. To that end, add gamin, and make gamin depend on _glib20. Update gvfs to 0.1.1, and add a new gvfs component to bsd.gnome.mk. gio-standalone is no longer needed as this code is now part of glib. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@10030 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel')
-rw-r--r--devel/gamin/Makefile57
-rw-r--r--devel/gamin/distinfo3
-rw-r--r--devel/gamin/files/patch-libgamin_gam_api.c119
-rw-r--r--devel/gamin/files/patch-python_Makefile.in23
-rw-r--r--devel/gamin/files/patch-server_gam_channel.c127
-rw-r--r--devel/gamin/files/patch-server_gam_fs.c161
-rw-r--r--devel/gamin/files/patch-server_gam_kqueue.c129
-rw-r--r--devel/gamin/files/patch-server_gam_node.c10
-rw-r--r--devel/gamin/files/patch-server_gam_poll_basic.c11
-rw-r--r--devel/gamin/files/patch-server_gam_server.c20
-rw-r--r--devel/gamin/files/patch-tests_testing.c27
-rw-r--r--devel/gamin/pkg-descr8
-rw-r--r--devel/gamin/pkg-message16
-rw-r--r--devel/gamin/pkg-plist12
-rw-r--r--devel/gio-fam-backend/Makefile38
-rw-r--r--devel/gio-fam-backend/distinfo3
-rw-r--r--devel/gio-fam-backend/files/patch-gio_fam_Makefile.in27
-rw-r--r--devel/gio-fam-backend/files/patch-glib_gio_fam_fam-helper.c11
-rw-r--r--devel/gio-fam-backend/files/patch-glib_gio_fam_gfamdirectorymonitor.c18
-rw-r--r--devel/gio-fam-backend/files/patch-glib_gio_fam_gfamfilemonitor.c18
-rw-r--r--devel/gio-fam-backend/pkg-descr2
-rw-r--r--devel/gio-fam-backend/pkg-plist5
-rw-r--r--devel/gio-standalone/Makefile28
-rw-r--r--devel/gio-standalone/distinfo3
-rw-r--r--devel/gio-standalone/pkg-descr1
-rw-r--r--devel/gio-standalone/pkg-plist129
-rw-r--r--devel/glib20/Makefile80
-rw-r--r--devel/glib20/distinfo3
-rw-r--r--devel/glib20/files/extra-patch-glib_Makefile.in11
-rw-r--r--devel/glib20/files/extra-patch-glib_gunicollate.c116
-rw-r--r--devel/glib20/files/extra-patch-gthread_gthread-posix.c32
-rw-r--r--devel/glib20/files/patch-ae11
-rw-r--r--devel/glib20/files/patch-ag21
-rw-r--r--devel/glib20/files/patch-ah11
-rw-r--r--devel/glib20/files/patch-gio_glocalfile.c14
-rw-r--r--devel/glib20/files/patch-gio_gunixmount.c21
-rw-r--r--devel/glib20/files/patch-gio_gunixmounts.c31
-rw-r--r--devel/glib20/files/patch-gio_gunixvolume.c17
-rw-r--r--devel/glib20/files/patch-glib::libcharset::Makefile.in30
-rw-r--r--devel/glib20/files/patch-glib_gatomic.c37
-rw-r--r--devel/glib20/files/patch-glib_gregex.c13
-rw-r--r--devel/glib20/files/patch-glib_gutils.c20
-rw-r--r--devel/glib20/files/patch-gmodule::gmodule-dl.c20
-rw-r--r--devel/glib20/files/patch-gthread_gthread-posix.c21
-rw-r--r--devel/glib20/pkg-descr5
-rw-r--r--devel/glib20/pkg-plist287
-rw-r--r--devel/gvfs/Makefile25
-rw-r--r--devel/gvfs/distinfo6
-rw-r--r--devel/gvfs/files/patch-Makefile.in10
-rw-r--r--devel/gvfs/files/patch-configure38
-rw-r--r--devel/gvfs/files/patch-daemon_gvfsbackendcomputer.c10
-rw-r--r--devel/gvfs/files/patch-daemon_gvfsmonitor.c14
-rw-r--r--devel/gvfs/files/patch-daemon_gvfswritechannel.c10
-rw-r--r--devel/gvfs/pkg-plist31
54 files changed, 1774 insertions, 177 deletions
diff --git a/devel/gamin/Makefile b/devel/gamin/Makefile
new file mode 100644
index 000000000..12289abf5
--- /dev/null
+++ b/devel/gamin/Makefile
@@ -0,0 +1,57 @@
+# ports collection makefile for: gamin
+# Date created: 24 March 2005
+# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
+#
+# $FreeBSD$
+# $MCom: ports/devel/gamin/Makefile,v 1.2 2007/02/02 18:57:01 mezz Exp $
+#
+
+PORTNAME= gamin
+PORTVERSION= 0.1.9
+PORTREVISION= 1
+CATEGORIES?= devel
+MASTER_SITES= http://www.gnome.org/~veillard/gamin/sources/
+
+MAINTAINER?= gnome@FreeBSD.org
+COMMENT?= A file and directory monitoring system
+
+USE_AUTOTOOLS= libtool:15
+USE_GMAKE= yes
+USE_GNOME?= gnomehack _glib20
+USE_LDCONFIG= yes
+CONFIGURE_ARGS?=--with-html-dir=${PREFIX}/share/doc \
+ --without-python
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+CPPFLAGS= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+
+CONFLICTS= fam-[0-9]*
+
+GNU_CONFIGURE= yes
+
+.if !defined(GAMIN_SLAVE)
+OPTIONS= GAM_POLLER "Use gamin's poller instead of kqueue's" off
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if !defined(GAMIN_SLAVE)
+.if defined(WITH_GAM_POLLER)
+CPPFLAGS+= -DUSE_GAMIN_POLLER=1
+.endif
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/server/gam_conf.c
+
+.if !defined(GAMIN_SLAVE)
+regression-test: build
+ @${ECHO_MSG} "===> Running gamin regression tests"
+ @(cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
+ Makefile ${MAKE_ARGS} tests)
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/gamin/distinfo b/devel/gamin/distinfo
new file mode 100644
index 000000000..fffc0de2e
--- /dev/null
+++ b/devel/gamin/distinfo
@@ -0,0 +1,3 @@
+MD5 (gamin-0.1.9.tar.gz) = 2d3a6a70df090ed923238e381e6c2982
+SHA256 (gamin-0.1.9.tar.gz) = 19e2c620e84da678b629d4acb07d93f47a2e5075982892646f77520bb277f239
+SIZE (gamin-0.1.9.tar.gz) = 645429
diff --git a/devel/gamin/files/patch-libgamin_gam_api.c b/devel/gamin/files/patch-libgamin_gam_api.c
new file mode 100644
index 000000000..7c46e9335
--- /dev/null
+++ b/devel/gamin/files/patch-libgamin_gam_api.c
@@ -0,0 +1,119 @@
+--- libgamin/gam_api.c.orig Tue Feb 7 17:49:07 2006
++++ libgamin/gam_api.c Tue Feb 7 17:49:13 2006
+@@ -14,6 +14,7 @@
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <sys/uio.h>
++#include <string.h>
+ #include "fam.h"
+ #include "gam_protocol.h"
+ #include "gam_data.h"
+@@ -421,10 +422,10 @@
+ {
+ char data[2] = { 0, 0 };
+ int written;
+-#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
+- struct {
++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
++ union {
+ struct cmsghdr hdr;
+- struct cmsgcred cred;
++ char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
+ } cmsg;
+ struct iovec iov;
+ struct msghdr msg;
+@@ -436,16 +437,16 @@
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+- msg.msg_control = &cmsg;
+- msg.msg_controllen = sizeof (cmsg);
++ msg.msg_control = (caddr_t) &cmsg;
++ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
+ memset (&cmsg, 0, sizeof (cmsg));
+- cmsg.hdr.cmsg_len = sizeof (cmsg);
++ cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred));
+ cmsg.hdr.cmsg_level = SOL_SOCKET;
+ cmsg.hdr.cmsg_type = SCM_CREDS;
+ #endif
+
+ retry:
+-#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
+ written = sendmsg(fd, &msg, 0);
+ #else
+ written = write(fd, &data[0], 1);
+@@ -647,15 +648,16 @@
+ gid_t c_gid;
+
+ #ifdef HAVE_CMSGCRED
+- struct {
++ struct cmsgcred *cred;
++ union {
+ struct cmsghdr hdr;
+- struct cmsgcred cred;
++ char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
+ } cmsg;
+ #endif
+
+ s_uid = getuid();
+
+-#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED)
++#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__)
+ /* Set the socket to receive credentials on the next message */
+ {
+ int on = 1;
+@@ -676,8 +678,8 @@
+
+ #ifdef HAVE_CMSGCRED
+ memset(&cmsg, 0, sizeof(cmsg));
+- msg.msg_control = &cmsg;
+- msg.msg_controllen = sizeof(cmsg);
++ msg.msg_control = (caddr_t) &cmsg;
++ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
+ #endif
+
+ retry:
+@@ -694,7 +696,7 @@
+ goto failed;
+ }
+ #ifdef HAVE_CMSGCRED
+- if (cmsg.hdr.cmsg_len < sizeof(cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS) {
++ if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) || cmsg.hdr.cmsg_type != SCM_CREDS) {
+ GAM_DEBUG(DEBUG_INFO,
+ "Message from recvmsg() was not SCM_CREDS\n");
+ goto failed;
+@@ -720,9 +722,10 @@
+ goto failed;
+ }
+ #elif defined(HAVE_CMSGCRED)
+- c_pid = cmsg.cred.cmcred_pid;
+- c_uid = cmsg.cred.cmcred_euid;
+- c_gid = cmsg.cred.cmcred_groups[0];
++ cred = (struct cmsgcred *) CMSG_DATA (&cmsg);
++ c_pid = cred->cmcred_pid;
++ c_uid = cred->cmcred_euid;
++ c_gid = cred->cmcred_groups[0];
+ #else /* !SO_PEERCRED && !HAVE_CMSGCRED */
+ GAM_DEBUG(DEBUG_INFO,
+ "Socket credentials not supported on this OS\n");
+@@ -1283,14 +1286,17 @@
+
+ // FIXME: drop and reacquire lock while blocked?
+ gamin_data_lock(conn);
+- if (!gamin_data_event_ready(conn)) {
++ while ((ret = gamin_data_event_ready(conn)) == 0) {
+ if (gamin_read_data(conn, fc->fd, 1) < 0) {
+ gamin_try_reconnect(conn, fc->fd);
+ FAMErrno = FAM_CONNECT;
+ return (-1);
+ }
+ }
+- ret = gamin_data_read_event(conn, fe);
++
++ if (ret > 0)
++ ret = gamin_data_read_event(conn, fe);
++
+ gamin_data_unlock(conn);
+
+ if (ret < 0) {
diff --git a/devel/gamin/files/patch-python_Makefile.in b/devel/gamin/files/patch-python_Makefile.in
new file mode 100644
index 000000000..3cc568b4e
--- /dev/null
+++ b/devel/gamin/files/patch-python_Makefile.in
@@ -0,0 +1,23 @@
+--- python/Makefile.in.orig Mon Feb 6 23:00:32 2006
++++ python/Makefile.in Tue Feb 7 08:10:46 2006
+@@ -59,7 +59,7 @@
+ pythonLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(python_LTLIBRARIES)
+ @WITH_PYTHON_TRUE@am__DEPENDENCIES_1 = \
+-@WITH_PYTHON_TRUE@ $(top_builddir)/libgamin/libgamin-1.la
++@WITH_PYTHON_TRUE@ -lgamin-1
+ @WITH_PYTHON_TRUE@_gamin_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am___gamin_la_SOURCES_DIST = gamin.c
+ @WITH_PYTHON_TRUE@am__gamin_la_OBJECTS = gamin.lo
+@@ -239,9 +239,9 @@
+ gamin.c \
+ gamin.py
+
+-_gamin_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/libgamin/.libs
++_gamin_la_LDFLAGS = -module -avoid-version
+ @WITH_PYTHON_TRUE@mylibs = \
+-@WITH_PYTHON_TRUE@ $(top_builddir)/libgamin/libgamin-1.la
++@WITH_PYTHON_TRUE@ -lgamin-1
+
+ @WITH_PYTHON_TRUE@python_LTLIBRARIES = _gamin.la
+ @WITH_PYTHON_TRUE@_gamin_la_SOURCES = gamin.c
diff --git a/devel/gamin/files/patch-server_gam_channel.c b/devel/gamin/files/patch-server_gam_channel.c
new file mode 100644
index 000000000..7b5fb8aee
--- /dev/null
+++ b/devel/gamin/files/patch-server_gam_channel.c
@@ -0,0 +1,127 @@
+--- server/gam_channel.c.orig Tue Aug 9 12:17:39 2005
++++ server/gam_channel.c Fri Feb 10 01:22:46 2006
+@@ -7,6 +7,7 @@
+ #include <sys/stat.h>
+ #include <sys/un.h>
+ #include <sys/uio.h>
++#include <string.h>
+ #include "gam_error.h"
+ #include "gam_connection.h"
+ #include "gam_channel.h"
+@@ -30,10 +31,10 @@ gam_client_conn_send_cred(int fd)
+ {
+ char data[2] = { 0, 0 };
+ int written;
+-#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
+- struct {
++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
++ union {
+ struct cmsghdr hdr;
+- struct cmsgcred cred;
++ char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
+ } cmsg;
+ struct iovec iov;
+ struct msghdr msg;
+@@ -45,16 +46,16 @@ gam_client_conn_send_cred(int fd)
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+- msg.msg_control = &cmsg;
+- msg.msg_controllen = sizeof (cmsg);
++ msg.msg_control = (caddr_t) &cmsg;
++ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
+ memset (&cmsg, 0, sizeof (cmsg));
+- cmsg.hdr.cmsg_len = sizeof (cmsg);
++ cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred));
+ cmsg.hdr.cmsg_level = SOL_SOCKET;
+ cmsg.hdr.cmsg_type = SCM_CREDS;
+ #endif
+
+ retry:
+-#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS)
++#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__))
+ written = sendmsg(fd, &msg, 0);
+ #else
+ written = write(fd, &data[0], 1);
+@@ -95,15 +96,16 @@ gam_client_conn_check_cred(GIOChannel *
+ gid_t c_gid;
+
+ #ifdef HAVE_CMSGCRED
+- struct {
++ struct cmsgcred *cred;
++ union {
+ struct cmsghdr hdr;
+- struct cmsgcred cred;
++ char cred[CMSG_SPACE (sizeof (struct cmsgcred))];
+ } cmsg;
+ #endif
+
+ s_uid = getuid();
+
+-#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED)
++#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__)
+ /* Set the socket to receive credentials on the next message */
+ {
+ int on = 1;
+@@ -124,8 +126,8 @@ gam_client_conn_check_cred(GIOChannel *
+
+ #ifdef HAVE_CMSGCRED
+ memset(&cmsg, 0, sizeof(cmsg));
+- msg.msg_control = &cmsg;
+- msg.msg_controllen = sizeof(cmsg);
++ msg.msg_control = (caddr_t) &cmsg;
++ msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred));
+ #endif
+
+ retry:
+@@ -142,7 +144,7 @@ gam_client_conn_check_cred(GIOChannel *
+ goto failed;
+ }
+ #ifdef HAVE_CMSGCRED
+- if (cmsg.hdr.cmsg_len < sizeof(cmsg) || cmsg.hdr.cmsg_type != SCM_CREDS) {
++ if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) || cmsg.hdr.cmsg_type != SCM_CREDS) {
+ GAM_DEBUG(DEBUG_INFO,
+ "Message from recvmsg() was not SCM_CREDS\n");
+ goto failed;
+@@ -168,9 +170,10 @@ gam_client_conn_check_cred(GIOChannel *
+ goto failed;
+ }
+ #elif defined(HAVE_CMSGCRED)
+- c_pid = cmsg.cred.cmcred_pid;
+- c_uid = cmsg.cred.cmcred_euid;
+- c_gid = cmsg.cred.cmcred_groups[0];
++ cred = (struct cmsgcred *) CMSG_DATA (&cmsg);
++ c_pid = cred->cmcred_pid;
++ c_uid = cred->cmcred_euid;
++ c_gid = cred->cmcred_groups[0];
+ #else /* !SO_PEERCRED && !HAVE_CMSGCRED */
+ GAM_DEBUG(DEBUG_INFO,
+ "Socket credentials not supported on this OS\n");
+@@ -620,6 +621,7 @@ gam_listen_unix_socket(const char *path)
+ {
+ int fd;
+ struct sockaddr_un addr;
++ struct stat st;
+
+ fd = socket(PF_UNIX, SOCK_STREAM, 0);
+ if (fd < 0) {
+@@ -640,8 +642,18 @@ gam_listen_unix_socket(const char *path)
+ * some extra protection checks. Also make sure the socket is created
+ * with restricted mode
+ */
+- if (!gam_check_secure_path(path)) {
++ if (!gam_check_secure_dir()) {
++ close(fd);
+ return (-1);
++ }
++
++ if (stat(path, &st) == 0) {
++ /* bind() will fail if the socket already exists */
++ if (unlink(path) < 0) {
++ GAM_DEBUG(DEBUG_INFO, "Failed to remove %s\n", path);
++ close(fd);
++ return (-1);
++ }
+ }
+ strncpy(&addr.sun_path[0], path, (sizeof(addr) - 4) - 1);
+ umask(0077);
diff --git a/devel/gamin/files/patch-server_gam_fs.c b/devel/gamin/files/patch-server_gam_fs.c
new file mode 100644
index 000000000..2fcc24209
--- /dev/null
+++ b/devel/gamin/files/patch-server_gam_fs.c
@@ -0,0 +1,161 @@
+--- server/gam_fs.c.orig 2007-07-04 09:36:49.000000000 -0400
++++ server/gam_fs.c 2007-08-10 15:05:41.000000000 -0400
+@@ -7,6 +7,11 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <glib.h>
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#endif
+ #include "gam_error.h"
+ #include "gam_fs.h"
+
+@@ -21,9 +26,13 @@ typedef struct _gam_fs_properties {
+ typedef struct _gam_fs {
+ char *path;
+ char *fsname;
++ guint64 flags;
+ } gam_fs;
+
+ static gboolean initialized = FALSE;
++#ifdef __FreeBSD__
++static gboolean initializing = FALSE;
++#endif
+ static GList *filesystems = NULL;
+ static GList *fs_props = NULL;
+ static struct stat mtab_sbuf;
+@@ -110,6 +119,7 @@ gam_fs_filesystem_sort_cb (gconstpointer
+ return strlen(fsb->path) - strlen (fsa->path);
+ }
+
++#ifdef __linux__
+ static void
+ gam_fs_scan_mtab (void)
+ {
+@@ -165,10 +175,41 @@ gam_fs_scan_mtab (void)
+ gam_fs_free_filesystems ();
+ filesystems = g_list_sort (new_filesystems, gam_fs_filesystem_sort_cb);
+ }
++#endif
++
++#ifdef __FreeBSD__
++static void
++gam_fs_getmntinfo (void)
++{
++ struct statfs *stat;
++ GList *new_filesystems = NULL;
++ gam_fs *fs = NULL;
++ int i, n;
++
++ n = getmntinfo(&stat, MNT_NOWAIT);
++ if (n == -1)
++ return;
++
++ for (i = 0; i < n; i++)
++ {
++ fs = g_new0 (gam_fs, 1);
++ fs->path = g_strdup (stat[i].f_mntonname);
++ fs->fsname = g_strdup (stat[i].f_fstypename);
++ fs->flags = stat[i].f_flags;
++
++ new_filesystems = g_list_prepend (new_filesystems, fs);
++ }
++
++ /* Replace the old file systems list with the new one */
++ gam_fs_free_filesystems ();
++ filesystems = g_list_sort (new_filesystems, gam_fs_filesystem_sort_cb);
++}
++#endif
+
+ void
+ gam_fs_init (void)
+ {
++#if defined(__linux__)
+ if (initialized == FALSE)
+ {
+ initialized = TRUE;
+@@ -181,6 +222,7 @@ gam_fs_init (void)
+ if (stat("/etc/mtab", &mtab_sbuf) != 0)
+ {
+ GAM_DEBUG(DEBUG_INFO, "Could not stat /etc/mtab\n");
++ return;
+ }
+ gam_fs_scan_mtab ();
+ } else {
+@@ -189,6 +231,7 @@ gam_fs_init (void)
+ if (stat("/etc/mtab", &sbuf) != 0)
+ {
+ GAM_DEBUG(DEBUG_INFO, "Could not stat /etc/mtab\n");
++ return;
+ }
+
+ /* /etc/mtab has changed */
+@@ -199,6 +242,54 @@ gam_fs_init (void)
+
+ mtab_sbuf = sbuf;
+ }
++#elif defined(__FreeBSD__)
++ if (initialized == FALSE && initializing == FALSE)
++ {
++ GList *iterator = NULL;
++ GHashTable *fs_hash = NULL;
++ gam_fs *fs = NULL;
++
++ initialized = TRUE;
++ initializing = TRUE;
++
++ gam_fs_getmntinfo ();
++
++ iterator = filesystems;
++ fs_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
++
++ while (iterator) {
++ fs = iterator->data;
++
++ if (!g_hash_table_lookup (fs_hash, fs->fsname)) {
++ if (fs->flags & MNT_LOCAL)
++ gam_fs_set (fs->fsname, GFS_MT_DEFAULT, 0);
++ else
++ gam_fs_set (fs->fsname, GFS_MT_POLL, 5);
++
++ g_hash_table_insert (fs_hash, g_strdup (fs->fsname), GINT_TO_POINTER (1));
++ }
++
++ iterator = g_list_next (iterator);
++ }
++
++ g_hash_table_destroy (fs_hash);
++ initializing = FALSE;
++ } else if (initializing == FALSE) {
++ struct stat sbuf;
++
++ if (stat ("/etc/fstab", &sbuf) != 0) {
++ GAM_DEBUG(DEBUG_INFO, "Could not stat /etc/fstab\n");
++ return;
++ }
++
++ if (sbuf.st_mtime != mtab_sbuf.st_mtime) {
++ GAM_DEBUG(DEBUG_INFO, "Updating list of mounted filesystems\n");
++ gam_fs_getmntinfo ();
++ }
++
++ mtab_sbuf = sbuf;
++ }
++#endif
+ }
+
+ gam_fs_mon_type
+@@ -210,7 +301,11 @@ gam_fs_get_mon_type (const char *path)
+ props = gam_fs_find_fs_props (path);
+
+ if (!props)
++#ifdef USE_GAMIN_POLLER
++ return GFS_MT_POLL;
++#else
+ return GFS_MT_DEFAULT;
++#endif
+
+ return props->mon_type;
+ }
diff --git a/devel/gamin/files/patch-server_gam_kqueue.c b/devel/gamin/files/patch-server_gam_kqueue.c
new file mode 100644
index 000000000..df4437e31
--- /dev/null
+++ b/devel/gamin/files/patch-server_gam_kqueue.c
@@ -0,0 +1,129 @@
+--- server/gam_kqueue.c.orig 2007-07-04 09:50:41.000000000 -0400
++++ server/gam_kqueue.c 2007-08-10 15:03:59.000000000 -0400
+@@ -10,9 +10,10 @@
+ * FAM should do: we do not call g_dir_open() if the file is a
+ * symbolic link).
+ *
+- * * kqueue cannot monitor files residing on anything but a UFS
+- * file system. If kqueue cannot monitor a file, this backend
+- * will poll it periodically.
++ * * While kqueue is no longer tied to the UFS file system, it is
++ * better to not use it for remote file systems (because for
++ * such file systems, only local changes are detected by
++ * the kernel).
+ *
+ * * Monitoring a file with kqueue prevents the file system it
+ * resides on from being unmounted, because kqueue can only
+@@ -28,10 +29,9 @@
+ * - kqueue needs to be augmented with a filename-based
+ * monitoring facility;
+ *
+- * - kqueue needs to be moved out the UFS code.
+- *
+ * Copyright (C) 2005 Joe Marcus Clarke <marcus@FreeBSD.org>
+- * Copyright (C) 2005 Jean-Yves Lefort <jylefort@FreeBSD.org>
++ * Copyright (C) 2005, 2006 Jean-Yves Lefort <jylefort@FreeBSD.org>
++ * Copyright (C) 2006 Alex Dupre <ale@FreeBSD.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+@@ -53,6 +53,9 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/param.h>
++#ifndef USE_GAMIN_POLLER
++#include <sys/mount.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include <sys/stat.h>
+@@ -326,7 +329,7 @@ gam_kqueue_isdir (const char *pathname,
+ static gboolean
+ gam_kqueue_get_uint_sysctl (const char *name, unsigned int *value)
+ {
+- unsigned int value_len = sizeof(*value);
++ size_t value_len = sizeof(*value);
+
+ if (sysctlbyname(name, value, &value_len, (void *)NULL, 0) < 0)
+ {
+@@ -509,6 +512,9 @@ static gboolean
+ gam_kqueue_monitor_enable_kqueue (Monitor *mon)
+ {
+ struct kevent ev[1];
++#ifndef USE_GAMIN_POLLER
++ struct statfs sb;
++#endif
+
+ if (open_files == max_open_files)
+ {
+@@ -516,26 +522,36 @@ gam_kqueue_monitor_enable_kqueue (Monito
+ return FALSE;
+ }
+
+- mon->fd = open(mon->pathname, O_RDONLY | O_NOFOLLOW);
++ mon->fd = open(mon->pathname, O_RDONLY | O_NONBLOCK | O_NOFOLLOW);
+ if (mon->fd < 0)
+ {
+ GAM_DEBUG(DEBUG_INFO, "cannot open %s (%s), falling back to poll\n", mon->pathname, g_strerror(errno));
+ return FALSE;
+ }
+
++#ifndef USE_GAMIN_POLLER
++ if (fstatfs(mon->fd, &sb) == 0 && (sb.f_flags & MNT_LOCAL) == 0)
++ {
++ GAM_DEBUG(DEBUG_INFO, "%s resides on a remote file system, falling back to poll\n", mon->pathname);
++ goto poll;
++ }
++#endif
++
+ EV_SET(ev, mon->fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, VN_NOTE_ALL, 0, mon);
+ if (kevent(kq, ev, G_N_ELEMENTS(ev), NULL, 0, NULL) < 0)
+ {
+ GAM_DEBUG(DEBUG_INFO, "cannot enable kqueue notification for %s (%s), falling back to poll\n", mon->pathname, g_strerror(errno));
+-
+- close(mon->fd);
+- mon->fd = -1;
+-
+- return FALSE;
++ goto poll;
+ }
+
+ open_files++;
+ return TRUE;
++
++ poll:
++ close(mon->fd);
++ mon->fd = -1;
++
++ return FALSE;
+ }
+
+ static void
+@@ -840,6 +856,8 @@ gam_kqueue_sub_monitor_emit_event (SubMo
+ case GAMIN_EVENT_MOVED:
+ gam_kqueue_sub_monitor_set_missing(smon);
+ break;
++ default:
++ break;
+ }
+
+ gam_server_emit_event(mon->pathname, isdir, event, smon->subs, 1);
+@@ -981,6 +999,8 @@ gam_kqueue_file_monitor_emit_event (File
+
+ gam_kqueue_hash_table_remove(fmon->smon->fmons, fmon);
+ break;
++ default:
++ break;
+ }
+ }
+
+@@ -1167,6 +1187,9 @@ gam_kqueue_init (void)
+ channel = g_io_channel_unix_new(kq);
+ g_io_add_watch(channel, G_IO_IN, gam_kqueue_kevent_cb, NULL);
+
++#ifdef USE_GAMIN_POLLER
++ gam_poll_basic_init ();
++#endif
+
+ gam_server_install_kernel_hooks(GAMIN_K_KQUEUE,
+ gam_kqueue_add_subscription,
diff --git a/devel/gamin/files/patch-server_gam_node.c b/devel/gamin/files/patch-server_gam_node.c
new file mode 100644
index 000000000..dbf7f638b
--- /dev/null
+++ b/devel/gamin/files/patch-server_gam_node.c
@@ -0,0 +1,10 @@
+--- server/gam_node.c.orig Thu Feb 9 01:22:56 2006
++++ server/gam_node.c Thu Feb 9 01:23:03 2006
+@@ -23,6 +23,7 @@
+ #include "gam_event.h"
+ #include "gam_node.h"
+ #include "gam_error.h"
++#include "gam_server.h"
+
+ /**
+ * Create a new node
diff --git a/devel/gamin/files/patch-server_gam_poll_basic.c b/devel/gamin/files/patch-server_gam_poll_basic.c
new file mode 100644
index 000000000..9a0333149
--- /dev/null
+++ b/devel/gamin/files/patch-server_gam_poll_basic.c
@@ -0,0 +1,11 @@
+--- server/gam_poll_basic.c.orig 2007-08-10 15:12:29.000000000 -0400
++++ server/gam_poll_basic.c 2007-08-10 15:16:07.000000000 -0400
+@@ -345,7 +345,7 @@ gam_poll_basic_poll_file(GamNode * node)
+ #ifdef ST_MTIM_NSEC
+ GAM_DEBUG(DEBUG_INFO, "%d %d : %d %d\n", node->sbuf.st_mtim.tv_sec, node->sbuf.st_mtim.tv_nsec, sbuf.st_mtim.tv_sec, sbuf.st_mtim.tv_nsec);
+ #else
+- GAM_DEBUG(DEBUG_INFO, "%d : %d\n", node->sbuf.st_mtime, sbuf.st_mtim.tv_nsec);
++ GAM_DEBUG(DEBUG_INFO, "%d : %d\n", node->sbuf.st_mtime, sbuf.st_mtime);
+ #endif /* ST_MTIM_NSEC */
+ #endif /* VERBOSE_POLL */
+ }
diff --git a/devel/gamin/files/patch-server_gam_server.c b/devel/gamin/files/patch-server_gam_server.c
new file mode 100644
index 000000000..282dc28f0
--- /dev/null
+++ b/devel/gamin/files/patch-server_gam_server.c
@@ -0,0 +1,20 @@
+--- server/gam_server.c.orig 2007-07-04 09:36:49.000000000 -0400
++++ server/gam_server.c 2007-08-10 15:09:14.000000000 -0400
+@@ -32,7 +32,7 @@
+ #include "gam_server.h"
+ #include "gam_channel.h"
+ #include "gam_subscription.h"
+-#include "gam_poll_generic.h"
++#include "gam_poll_basic.h"
+ #ifdef ENABLE_INOTIFY
+ #include "gam_inotify.h"
+ #endif
+@@ -438,7 +438,7 @@ gam_server_get_kernel_handler (void)
+ GamPollHandler
+ gam_server_get_poll_handler (void)
+ {
+- return __gam_kernel_handler;
++ return __gam_poll_handler;
+ }
+
+ gboolean
diff --git a/devel/gamin/files/patch-tests_testing.c b/devel/gamin/files/patch-tests_testing.c
new file mode 100644
index 000000000..35097790d
--- /dev/null
+++ b/devel/gamin/files/patch-tests_testing.c
@@ -0,0 +1,27 @@
+--- tests/testing.c.orig Thu Oct 27 10:51:03 2005
++++ tests/testing.c Tue Feb 14 17:46:01 2006
+@@ -376,11 +376,11 @@ processCommand(char *line, int no)
+ }
+ printf("chmod %s to %s\n", arg, arg2);
+ } else if (!strcmp(command, "chown")) {
++ struct stat sb;
+ if (args != 3) {
+ fprintf(stderr, "chown line %d: lacks path and owner\n", no);
+ return (-1);
+ }
+- struct stat sb;
+ if (!lstat (arg, &sb)) {
+ ret = (S_ISLNK (sb.st_mode)) ?
+ lchown(arg, strtol(arg2, NULL, 10), -1) :
+@@ -486,9 +486,9 @@ processCommand(char *line, int no)
+ return (-1);
+ }
+ /*
+- * wait at most 3 secs before declaring failure
++ * wait at most 7 secs before declaring failure
+ */
+- while ((delay < 30) && (testState.nb_events < nb_events + count)) {
++ while ((delay < 70) && (testState.nb_events < nb_events + count)) {
+ debugLoop(100);
+
+ /* printf("+"); fflush(stdout); */
diff --git a/devel/gamin/pkg-descr b/devel/gamin/pkg-descr
new file mode 100644
index 000000000..7bac17f94
--- /dev/null
+++ b/devel/gamin/pkg-descr
@@ -0,0 +1,8 @@
+Gamin is a file and directory monitoring system defined to be a subset of the
+FAM (File Alteration Monitor) system. This is a service provided by a library
+which allows to detect when a file or a directory has been modified.
+
+Whereas the FreeBSD port of FAM polls files every few seconds, this port
+includes a kqueue(2) backend for immediate notification of most alterations.
+
+WWW: http://www.gnome.org/~veillard/gamin/index.html
diff --git a/devel/gamin/pkg-message b/devel/gamin/pkg-message
new file mode 100644
index 000000000..1e1ea39bb
--- /dev/null
+++ b/devel/gamin/pkg-message
@@ -0,0 +1,16 @@
+===============================================================================
+
+Gamin will only provide realtime notification of changes for at most n files,
+where n is the minimum value between (kern.maxfiles * 0.7) and
+(kern.maxfilesperproc - 200). Beyond that limit, files will be polled.
+
+If you often open several large folders with Nautilus, you might want to
+increase the kern.maxfiles tunable (you do not need to set
+kern.maxfilesperproc, since it is computed at boot time from kern.maxfiles).
+
+For a typical desktop, add the following line to /boot/loader.conf, then
+reboot the system:
+
+ kern.maxfiles="25000"
+
+===============================================================================
diff --git a/devel/gamin/pkg-plist b/devel/gamin/pkg-plist
new file mode 100644
index 000000000..008f29b34
--- /dev/null
+++ b/devel/gamin/pkg-plist
@@ -0,0 +1,12 @@
+include/fam.h
+lib/libfam.a
+lib/libfam.la
+lib/libfam.so
+lib/libfam.so.0
+lib/libgamin-1.a
+lib/libgamin-1.la
+lib/libgamin-1.so
+lib/libgamin-1.so.1
+lib/libgamin_shared.a
+libdata/pkgconfig/gamin.pc
+libexec/gam_server
diff --git a/devel/gio-fam-backend/Makefile b/devel/gio-fam-backend/Makefile
new file mode 100644
index 000000000..7085534a2
--- /dev/null
+++ b/devel/gio-fam-backend/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: gio-fam-backend
+# Date Created: 22 December 2007
+# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
+#
+# $FreeBSD$
+# $MCom$
+#
+
+PORTNAME= gio-fam-backend
+PORTVERSION= 2.15.1
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GNOME:S,%SUBDIR%,sources/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/},} \
+ ftp://ftp.gtk.org/pub/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/ \
+ ftp://ftp.gimp.org/pub/%SUBDIR%/ \
+ ftp://ftp.cs.umn.edu/pub/gimp/%SUBDIR%/ \
+ http://www.ameth.org/gimp/%SUBDIR%/ \
+ ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,graphics/gimp/%SUBDIR%,}
+MASTER_SITE_SUBDIR= gtk/v${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
+DISTNAME= glib-${PORTVERSION}
+DIST_SUBDIR= gnome2
+
+MAINTAINER= gnome@FreeBSD.org
+COMMENT= FAM backend for GLib's GIO library
+
+USE_BZIP2= yes
+BUILD_WRKSRC= ${WRKSRC}/gio/fam
+INSTALL_WRKSRC= ${BUILD_WRKSRC}
+GNU_CONFIGURE= yes
+USE_GNOME= gnomehack gnometarget pkgconfig _glib20
+USE_FAM= yes
+USE_GMAKE= yes
+CONFIGURE_ARGS= --enable-static --with-libiconv=gnu
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib -lintl" \
+ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}"
+
+.include <bsd.port.mk>
diff --git a/devel/gio-fam-backend/distinfo b/devel/gio-fam-backend/distinfo
new file mode 100644
index 000000000..7215bcdad
--- /dev/null
+++ b/devel/gio-fam-backend/distinfo
@@ -0,0 +1,3 @@
+MD5 (gnome2/glib-2.15.1.tar.bz2) = b3a2ca18e618927d03d39000f2155958
+SHA256 (gnome2/glib-2.15.1.tar.bz2) = 1e380efc1f7906a74672e5088777aea524234c063947cf9c7eab67206ea29c9c
+SIZE (gnome2/glib-2.15.1.tar.bz2) = 4238577
diff --git a/devel/gio-fam-backend/files/patch-gio_fam_Makefile.in b/devel/gio-fam-backend/files/patch-gio_fam_Makefile.in
new file mode 100644
index 000000000..0f6a9e25e
--- /dev/null
+++ b/devel/gio-fam-backend/files/patch-gio_fam_Makefile.in
@@ -0,0 +1,27 @@
+--- gio/fam/Makefile.in.orig 2008-01-07 19:40:38.000000000 -0500
++++ gio/fam/Makefile.in 2008-01-07 19:41:53.000000000 -0500
+@@ -59,9 +59,8 @@ am__installdirs = "$(DESTDIR)$(giomodule
+ giomoduleLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(giomodule_LTLIBRARIES)
+ am__DEPENDENCIES_1 =
+-libgiofam_la_DEPENDENCIES = $(top_builddir)/gio/libgio-2.0.la \
+- $(top_builddir)/gobject/libgobject-2.0.la \
+- $(top_builddir)/glib/libglib-2.0.la $(am__DEPENDENCIES_1) \
++libgiofam_la_DEPENDENCIES = \
++ $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+ am__objects_1 =
+ am_libgiofam_la_OBJECTS = libgiofam_la-fam-helper.lo \
+@@ -321,9 +320,9 @@ libgiofam_la_CFLAGS = \
+
+ libgiofam_la_LDFLAGS = $(module_flags)
+ libgiofam_la_LIBADD = \
+- $(top_builddir)/gio/libgio-2.0.la \
+- $(top_builddir)/gobject/libgobject-2.0.la \
+- $(top_builddir)/glib/libglib-2.0.la \
++ -lgio-2.0 \
++ -lgobject-2.0 \
++ -lglib-2.0 \
+ $(GLIB_LIBS) \
+ $(FAM_LIBS) \
+ $(NULL)
diff --git a/devel/gio-fam-backend/files/patch-glib_gio_fam_fam-helper.c b/devel/gio-fam-backend/files/patch-glib_gio_fam_fam-helper.c
new file mode 100644
index 000000000..b419ffa1c
--- /dev/null
+++ b/devel/gio-fam-backend/files/patch-glib_gio_fam_fam-helper.c
@@ -0,0 +1,11 @@
+--- glib/gio/fam/fam-helper.c.orig 2008-01-09 01:32:59.000000000 -0500
++++ glib/gio/fam/fam-helper.c 2008-01-09 01:33:15.000000000 -0500
+@@ -82,7 +82,7 @@ fam_do_iter_unlocked (void)
+ cancelled = sub->cancelled;
+ if (ev.code == FAMAcknowledge && cancelled)
+ {
+- g_free (sub);
++ _fam_sub_free (sub);
+ continue;
+ }
+
diff --git a/devel/gio-fam-backend/files/patch-glib_gio_fam_gfamdirectorymonitor.c b/devel/gio-fam-backend/files/patch-glib_gio_fam_gfamdirectorymonitor.c
new file mode 100644
index 000000000..f45e1e4f0
--- /dev/null
+++ b/devel/gio-fam-backend/files/patch-glib_gio_fam_gfamdirectorymonitor.c
@@ -0,0 +1,18 @@
+--- glib/gio/fam/gfamdirectorymonitor.c.orig 2008-01-09 01:33:43.000000000 -0500
++++ glib/gio/fam/gfamdirectorymonitor.c 2008-01-09 01:33:53.000000000 -0500
+@@ -50,7 +50,6 @@ g_fam_directory_monitor_finalize (GObjec
+ if (!_fam_sub_cancel (sub))
+ g_warning ("Unexpected error cancelling fam monitor");
+
+- _fam_sub_free (sub);
+ fam_monitor->sub = NULL;
+ }
+
+@@ -134,7 +133,6 @@ g_fam_directory_monitor_cancel (GFileMon
+ if (!_fam_sub_cancel (sub))
+ g_warning ("Unexpected error cancelling fam monitor");
+
+- _fam_sub_free (sub);
+ fam_monitor->sub = NULL;
+ }
+
diff --git a/devel/gio-fam-backend/files/patch-glib_gio_fam_gfamfilemonitor.c b/devel/gio-fam-backend/files/patch-glib_gio_fam_gfamfilemonitor.c
new file mode 100644
index 000000000..3dff41f52
--- /dev/null
+++ b/devel/gio-fam-backend/files/patch-glib_gio_fam_gfamfilemonitor.c
@@ -0,0 +1,18 @@
+--- glib/gio/fam/gfamfilemonitor.c.orig 2008-01-09 01:34:15.000000000 -0500
++++ glib/gio/fam/gfamfilemonitor.c 2008-01-09 01:34:19.000000000 -0500
+@@ -49,7 +49,6 @@ g_fam_file_monitor_finalize (GObject *ob
+ if (sub) {
+ if (!_fam_sub_cancel (sub))
+ g_warning ("Unexpected error cancelling fam monitor");
+- _fam_sub_free (sub);
+ fam_monitor->sub = NULL;
+ }
+
+@@ -132,7 +131,6 @@ g_fam_file_monitor_cancel (GFileMonitor*
+ if (sub) {
+ if (!_fam_sub_cancel (sub))
+ g_warning ("Unexpected error cancelling fam monitor");
+- _fam_sub_free (sub);
+ fam_monitor->sub = NULL;
+ }
+
diff --git a/devel/gio-fam-backend/pkg-descr b/devel/gio-fam-backend/pkg-descr
new file mode 100644
index 000000000..b44b5d557
--- /dev/null
+++ b/devel/gio-fam-backend/pkg-descr
@@ -0,0 +1,2 @@
+gio-fam-backend provides a file Alteration Monitor (FAM) backend module for
+GLib's GIO subsystem.
diff --git a/devel/gio-fam-backend/pkg-plist b/devel/gio-fam-backend/pkg-plist
new file mode 100644
index 000000000..4304d626a
--- /dev/null
+++ b/devel/gio-fam-backend/pkg-plist
@@ -0,0 +1,5 @@
+lib/gio/modules/libgiofam.a
+lib/gio/modules/libgiofam.la
+lib/gio/modules/libgiofam.so
+@dirrmtry lib/gio/modules
+@dirrmtry lib/gio
diff --git a/devel/gio-standalone/Makefile b/devel/gio-standalone/Makefile
deleted file mode 100644
index 4919b56cc..000000000
--- a/devel/gio-standalone/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# New ports collection makefile for: gio-standalone
-# Date created: 2007-11-06
-# Whom: Michael Johnson <ahze@FreeBSD.org>
-#
-# $FreeBSD$
-# $MCom: ports/devel/gio-standalone/Makefile,v 1.3 2007/11/06 23:47:46 ahze Exp $
-
-PORTNAME= gio-standalone
-PORTVERSION= 0.1.2
-CATEGORIES= devel gnome
-MASTER_SITES= GNOME
-
-MAINTAINER= gnome@FreeBSD.org
-COMMENT= Glib I/O library
-
-USE_GNOME= glib20 gnomehack gnomeprefix
-GNU_CONFIGURE= yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
-USE_GMAKE= yes
-USE_FAM= yes
-USE_LDCONFIG= yes
-USE_GETTEXT= yes
-
-post-patch:
- @${REINPLACE_CMD} -e 's|$${datadir}/gtk-doc|${DOCSDIR}|' \
- ${WRKSRC}/configure
-
-.include <bsd.port.mk>
diff --git a/devel/gio-standalone/distinfo b/devel/gio-standalone/distinfo
deleted file mode 100644
index 098f05bb6..000000000
--- a/devel/gio-standalone/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 (gio-standalone-0.1.2.tar.gz) = 045ef93b2b27b8e5abbde90c63afa761
-SHA256 (gio-standalone-0.1.2.tar.gz) = b13d1129d27404469f56284f252c3388e8fd414dd946fd7f38ba9a70b6c01113
-SIZE (gio-standalone-0.1.2.tar.gz) = 847142
diff --git a/devel/gio-standalone/pkg-descr b/devel/gio-standalone/pkg-descr
deleted file mode 100644
index 35948ad37..000000000
--- a/devel/gio-standalone/pkg-descr
+++ /dev/null
@@ -1 +0,0 @@
-Glib Input/output library
diff --git a/devel/gio-standalone/pkg-plist b/devel/gio-standalone/pkg-plist
deleted file mode 100644
index 35c4977bc..000000000
--- a/devel/gio-standalone/pkg-plist
+++ /dev/null
@@ -1,129 +0,0 @@
-bin/gio-cat
-bin/gio-copy
-bin/gio-info
-bin/gio-ls
-bin/gio-monitor-dir
-bin/gio-monitor-file
-bin/gio-mount
-bin/gio-move
-bin/gio-rm
-bin/gio-save
-bin/gio-trash
-include/gio-standalone-unix/gio/gunixmounts.h
-include/gio-standalone/gio/gappinfo.h
-include/gio-standalone/gio/gasyncresult.h
-include/gio-standalone/gio/gbufferedinputstream.h
-include/gio-standalone/gio/gbufferedoutputstream.h
-include/gio-standalone/gio/gcancellable.h
-include/gio-standalone/gio/gcontenttype.h
-include/gio-standalone/gio/gdatainputstream.h
-include/gio-standalone/gio/gdataoutputstream.h
-include/gio-standalone/gio/gdirectorymonitor.h
-include/gio-standalone/gio/gdrive.h
-include/gio-standalone/gio/gdummyfile.h
-include/gio-standalone/gio/gfile.h
-include/gio-standalone/gio/gfileattribute.h
-include/gio-standalone/gio/gfileenumerator.h
-include/gio-standalone/gio/gfileicon.h
-include/gio-standalone/gio/gfileinfo.h
-include/gio-standalone/gio/gfileinputstream.h
-include/gio-standalone/gio/gfilemonitor.h
-include/gio-standalone/gio/gfilenamecompleter.h
-include/gio-standalone/gio/gfileoutputstream.h
-include/gio-standalone/gio/gfilterinputstream.h
-include/gio-standalone/gio/gfilteroutputstream.h
-include/gio-standalone/gio/gicon.h
-include/gio-standalone/gio/ginputstream.h
-include/gio-standalone/gio/gioerror.h
-include/gio-standalone/gio/giomodule.h
-include/gio-standalone/gio/gioscheduler.h
-include/gio-standalone/gio/gloadableicon.h
-include/gio-standalone/gio/gmemoryinputstream.h
-include/gio-standalone/gio/gmemoryoutputstream.h
-include/gio-standalone/gio/gmountoperation.h
-include/gio-standalone/gio/goutputstream.h
-include/gio-standalone/gio/gseekable.h
-include/gio-standalone/gio/gsimpleasyncresult.h
-include/gio-standalone/gio/gsocketinputstream.h
-include/gio-standalone/gio/gsocketoutputstream.h
-include/gio-standalone/gio/gthemedicon.h
-include/gio-standalone/gio/gurifuncs.h
-include/gio-standalone/gio/gvfs.h
-include/gio-standalone/gio/gvolume.h
-include/gio-standalone/gio/gvolumemonitor.h
-lib/gio/modules/libgiofam.la
-lib/gio/modules/libgiofam.so
-lib/libgio.la
-lib/libgio.so
-lib/libgio.so.0
-libdata/pkgconfig/gio-2.0.pc
-libdata/pkgconfig/gio-unix-2.0.pc
-share/doc/gio/GAppInfo.html
-share/doc/gio/GAsyncResult.html
-share/doc/gio/GBufferedInputStream.html
-share/doc/gio/GBufferedOutputStream.html
-share/doc/gio/GCancellable.html
-share/doc/gio/GDataInputStream.html
-share/doc/gio/GDataOutputStream.html
-share/doc/gio/GDirectoryMonitor.html
-share/doc/gio/GDrive.html
-share/doc/gio/GFile.html
-share/doc/gio/GFileEnumerator.html
-share/doc/gio/GFileIcon.html
-share/doc/gio/GFileInfo.html
-share/doc/gio/GFileInputStream.html
-share/doc/gio/GFileMonitor.html
-share/doc/gio/GFileOutputStream.html
-share/doc/gio/GFilenameCompleter.html
-share/doc/gio/GFilterInputStream.html
-share/doc/gio/GFilterOutputStream.html
-share/doc/gio/GIOModule.html
-share/doc/gio/GIcon.html
-share/doc/gio/GInputStream.html
-share/doc/gio/GLoadableIcon.html
-share/doc/gio/GMemoryInputStream.html
-share/doc/gio/GMemoryOutputStream.html
-share/doc/gio/GMountOperation.html
-share/doc/gio/GOutputStream.html
-share/doc/gio/GSeekable.html
-share/doc/gio/GSimpleAsyncResult.html
-share/doc/gio/GSocketInputStream.html
-share/doc/gio/GSocketOutputStream.html
-share/doc/gio/GThemedIcon.html
-share/doc/gio/GVfs.html
-share/doc/gio/GVolume.html
-share/doc/gio/GVolumeMonitor.html
-share/doc/gio/async.html
-share/doc/gio/extending.html
-share/doc/gio/file_mon.html
-share/doc/gio/file_ops.html
-share/doc/gio/gio-GContentType.html
-share/doc/gio/gio-GIOError.html
-share/doc/gio/gio-GIOScheduler.html
-share/doc/gio/gio-Unix-Mounts.html
-share/doc/gio/gio-Uri-functions.html
-share/doc/gio/gio-hierarchy.html
-share/doc/gio/gio.devhelp
-share/doc/gio/gio.devhelp2
-share/doc/gio/home.png
-share/doc/gio/icons.html
-share/doc/gio/index.html
-share/doc/gio/index.sgml
-share/doc/gio/ix01.html
-share/doc/gio/left.png
-share/doc/gio/pt01.html
-share/doc/gio/pt02.html
-share/doc/gio/right.png
-share/doc/gio/streaming.html
-share/doc/gio/style.css
-share/doc/gio/types.html
-share/doc/gio/up.png
-share/doc/gio/utils.html
-share/doc/gio/volume_mon.html
-@dirrm share/doc/gio
-@dirrm lib/gio/modules
-@dirrm lib/gio
-@dirrm include/gio-standalone/gio
-@dirrm include/gio-standalone-unix/gio
-@dirrm include/gio-standalone-unix
-@dirrm include/gio-standalone
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile
new file mode 100644
index 000000000..9d0957594
--- /dev/null
+++ b/devel/glib20/Makefile
@@ -0,0 +1,80 @@
+# New ports collection makefile for: glib13
+# Date Created: 28 July 1998
+# Whom: Vanilla I. Shu <vanilla@FreeBSD.org>
+#
+# $FreeBSD$
+# $MCom: ports-stable/devel/glib20/Makefile,v 1.1 2007/11/30 18:48:03 marcus Exp $
+#
+
+PORTNAME= glib
+PORTVERSION= 2.15.1
+PORTREVISION?= 0
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GNOME:S,%SUBDIR%,sources/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/},} \
+ ftp://ftp.gtk.org/pub/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/ \
+ ftp://ftp.gimp.org/pub/%SUBDIR%/ \
+ ftp://ftp.cs.umn.edu/pub/gimp/%SUBDIR%/ \
+ http://www.ameth.org/gimp/%SUBDIR%/ \
+ ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,graphics/gimp/%SUBDIR%,}
+MASTER_SITE_SUBDIR= gtk/v${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
+DIST_SUBDIR= gnome2
+
+MAINTAINER= gnome@FreeBSD.org
+COMMENT= Some useful routines of C programming (current stable version)
+
+LATEST_LINK= glib20
+
+USE_BZIP2= yes
+
+.if !defined(REFERENCE_PORT)
+
+LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
+
+USE_GETTEXT= yes
+USE_AUTOTOOLS= libtool:15
+USE_LDCONFIG= yes
+USE_GNOME= gnomehack gnometarget pkgconfig ltverhack
+USE_GMAKE= yes
+USE_PYTHON= yes
+USE_PERL5= yes
+CONFIGURE_ARGS= --enable-static --with-libiconv=gnu \
+ --disable-gtk-doc --with-html-dir=${PREFIX}/share/doc \
+ --disable-man --without-xml-catalog \
+ --with-pcre=system \
+ --disable-fam
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib -lintl" \
+ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}"
+
+OPTIONS= COLLATION_FIX "fix string collation" off
+
+.include <bsd.port.pre.mk>
+
+# Let glib use asm code for implementing atomic ops on i386 and amd64.
+.if ${ARCH} == "i386"
+GLIB_ARCH= i486
+.elif ${ARCH} == "amd64"
+GLIB_ARCH= x86_64
+.else
+GLIB_ARCH= ${ARCH}
+.endif
+CONFIGURE_TARGET= --build=${GLIB_ARCH}-portbld-freebsd${OSREL}
+
+.if ( ( ${OSVERSION} < 504101 ) || ( ${OSVERSION} >= 600000 && ${OSVERSION} < 600012 ) )
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gthread_gthread-posix.c
+.endif
+
+.if defined(WITH_COLLATION_FIX)
+LIB_DEPENDS+= icui18n:${PORTSDIR}/devel/icu
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-glib_Makefile.in \
+ ${FILESDIR}/extra-patch-glib_gunicollate.c
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+ ${WRKSRC}/glib/gutils.c
+
+.include <bsd.port.post.mk>
+
+.endif
diff --git a/devel/glib20/distinfo b/devel/glib20/distinfo
new file mode 100644
index 000000000..7215bcdad
--- /dev/null
+++ b/devel/glib20/distinfo
@@ -0,0 +1,3 @@
+MD5 (gnome2/glib-2.15.1.tar.bz2) = b3a2ca18e618927d03d39000f2155958
+SHA256 (gnome2/glib-2.15.1.tar.bz2) = 1e380efc1f7906a74672e5088777aea524234c063947cf9c7eab67206ea29c9c
+SIZE (gnome2/glib-2.15.1.tar.bz2) = 4238577
diff --git a/devel/glib20/files/extra-patch-glib_Makefile.in b/devel/glib20/files/extra-patch-glib_Makefile.in
new file mode 100644
index 000000000..3c5676d2e
--- /dev/null
+++ b/devel/glib20/files/extra-patch-glib_Makefile.in
@@ -0,0 +1,11 @@
+--- glib/Makefile.in.orig Wed Jul 19 01:08:13 2006
++++ glib/Makefile.in Wed Jul 19 01:09:10 2006
+@@ -130,7 +130,7 @@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INSTOBJEXT = @INSTOBJEXT@
+ INTLLIBS = @INTLLIBS@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ -licui18n
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
diff --git a/devel/glib20/files/extra-patch-glib_gunicollate.c b/devel/glib20/files/extra-patch-glib_gunicollate.c
new file mode 100644
index 000000000..dfcb99209
--- /dev/null
+++ b/devel/glib20/files/extra-patch-glib_gunicollate.c
@@ -0,0 +1,116 @@
+--- glib/gunicollate.c.orig Thu Jun 8 17:24:10 2006
++++ glib/gunicollate.c Thu Oct 19 20:12:50 2006
+@@ -26,10 +26,57 @@
+ #include <wchar.h>
+ #endif
+
++#include <unicode/umachine.h>
++#include <unicode/ustring.h>
++#include <unicode/ucol.h>
++
+ #include "glib.h"
+ #include "gunicodeprivate.h"
+ #include "galias.h"
+
++static gboolean icu_collator_initialized = FALSE;
++static UCollator *icu_collator = NULL;
++G_LOCK_DEFINE_STATIC(icu_collator);
++
++static void
++init_icu_collator (void)
++{
++ G_LOCK(icu_collator);
++ if (! icu_collator_initialized)
++ {
++ UErrorCode error = U_ZERO_ERROR;
++
++ icu_collator = ucol_open(NULL, &error);
++ if (icu_collator == NULL)
++ g_warning("unable to initialize the ICU collator (%s), FreeBSD collation routines will be used", u_errorName(error));
++
++ icu_collator_initialized = TRUE;
++ }
++ G_UNLOCK(icu_collator);
++}
++
++static UChar *
++utf8_to_uchar (const char *str, int32_t len, int32_t *result_len)
++{
++ UErrorCode error = U_ZERO_ERROR;
++ UChar *result = NULL;
++
++ u_strFromUTF8(NULL, 0, result_len, str, len, &error);
++ if (error <= U_ZERO_ERROR || error == U_BUFFER_OVERFLOW_ERROR)
++ {
++ error = U_ZERO_ERROR;
++ result = g_new(UChar, *result_len);
++ u_strFromUTF8(result, *result_len, NULL, str, len, &error);
++ if (error > U_ZERO_ERROR)
++ {
++ g_free(result);
++ result = NULL;
++ }
++ }
++
++ return result;
++}
++
+ #ifdef _MSC_VER
+ /* Workaround for bug in MSVCR80.DLL */
+ static size_t
+@@ -94,6 +141,28 @@
+ g_return_val_if_fail (str1 != NULL, 0);
+ g_return_val_if_fail (str2 != NULL, 0);
+
++ init_icu_collator();
++ if (icu_collator != NULL)
++ {
++ int32_t wstr1_len;
++ UChar *wstr1 = utf8_to_uchar(str1, -1, &wstr1_len);
++ if (wstr1 != NULL)
++ {
++ int32_t wstr2_len;
++ UChar *wstr2 = utf8_to_uchar(str2, -1, &wstr2_len);
++ if (wstr2 != NULL)
++ {
++ result = ucol_strcoll(icu_collator, wstr1, wstr1_len, wstr2, wstr2_len);
++
++ g_free(wstr1);
++ g_free(wstr2);
++
++ return result;
++ }
++ g_free(wstr1);
++ }
++ }
++
+ str1_norm = g_utf8_normalize (str1, -1, G_NORMALIZE_ALL_COMPOSE);
+ str2_norm = g_utf8_normalize (str2, -1, G_NORMALIZE_ALL_COMPOSE);
+
+@@ -235,6 +304,26 @@
+ gchar *str_norm;
+
+ g_return_val_if_fail (str != NULL, NULL);
++
++ init_icu_collator();
++ if (icu_collator != NULL)
++ {
++ int32_t wstr_len;
++ UChar *wstr = utf8_to_uchar(str, len, &wstr_len);
++ if (wstr != NULL)
++ {
++ int32_t result_len;
++
++ /* get size of result */
++ result_len = ucol_getSortKey(icu_collator, wstr, wstr_len, NULL, 0);
++
++ result = g_new(char, result_len);
++ ucol_getSortKey(icu_collator, wstr, wstr_len, result, result_len);
++ g_free(wstr);
++
++ return result;
++ }
++ }
+
+ str_norm = g_utf8_normalize (str, len, G_NORMALIZE_ALL_COMPOSE);
+
diff --git a/devel/glib20/files/extra-patch-gthread_gthread-posix.c b/devel/glib20/files/extra-patch-gthread_gthread-posix.c
new file mode 100644
index 000000000..bde2862f6
--- /dev/null
+++ b/devel/glib20/files/extra-patch-gthread_gthread-posix.c
@@ -0,0 +1,32 @@
+--- gthread/gthread-posix.c.orig Thu Jun 9 11:25:01 2005
++++ gthread/gthread-posix.c Fri Jun 10 20:23:17 2005
+@@ -115,7 +115,11 @@ static gint priority_normal_value;
+ # define PRIORITY_NORMAL_VALUE priority_normal_value
+ #endif /* POSIX_MIN_PRIORITY && POSIX_MAX_PRIORITY */
+
++#define G_THREAD_STACK_SIZE32 (1*1024*1024)
++#define G_THREAD_STACK_SIZE64 (2*1024*1024)
++
+ static gulong g_thread_min_stack_size = 0;
++static gulong g_thread_default_stack_size = 0;
+
+ #define G_MUTEX_SIZE (sizeof (pthread_mutex_t))
+
+@@ -309,8 +313,16 @@ g_thread_create_posix_impl (GThreadFunc
+ stack_size = MAX (g_thread_min_stack_size, stack_size);
+ /* No error check here, because some systems can't do it and
+ * we simply don't want threads to fail because of that. */
+- pthread_attr_setstacksize (&attr, stack_size);
+ }
++ else
++ {
++ if (sizeof(void *) == 8)
++ g_thread_default_stack_size = G_THREAD_STACK_SIZE64;
++ else
++ g_thread_default_stack_size = G_THREAD_STACK_SIZE32;
++ stack_size = MAX (g_thread_min_stack_size, g_thread_default_stack_size);
++ }
++ pthread_attr_setstacksize (&attr, stack_size);
+ #endif /* HAVE_PTHREAD_ATTR_SETSTACKSIZE */
+
+ #ifdef PTHREAD_SCOPE_SYSTEM
diff --git a/devel/glib20/files/patch-ae b/devel/glib20/files/patch-ae
new file mode 100644
index 000000000..46738f939
--- /dev/null
+++ b/devel/glib20/files/patch-ae
@@ -0,0 +1,11 @@
+--- configure.orig Sun Jan 29 13:06:22 2006
++++ configure Sun Jan 29 13:06:48 2006
+@@ -34462,6 +34461,8 @@
+ ;;
+ esac
+ fi
++ G_THREAD_CFLAGS="${PTHREAD_CFLAGS}"
++ G_THREAD_LIBS="${PTHREAD_LIBS}"
+
+ if test x"$G_THREAD_CFLAGS" = x; then
+
diff --git a/devel/glib20/files/patch-ag b/devel/glib20/files/patch-ag
new file mode 100644
index 000000000..23a652f38
--- /dev/null
+++ b/devel/glib20/files/patch-ag
@@ -0,0 +1,21 @@
+--- Makefile.in.orig 2007-12-21 16:52:39.000000000 -0500
++++ Makefile.in 2007-12-21 16:53:52.000000000 -0500
+@@ -337,7 +337,7 @@ EXTRA_DIST = ChangeLog.pre-2-14 ChangeLo
+ gio-2.0-uninstalled.pc.in gio-unix-2.0-uninstalled.pc.in
+ TEST_PROGS =
+ AUTOMAKE_OPTIONS = 1.7
+-SUBDIRS = . m4macros glib gobject gmodule gthread gio tests po docs
++SUBDIRS = . m4macros glib gobject gmodule gthread gio po docs
+ DIST_SUBDIRS = $(SUBDIRS) build
+ bin_SCRIPTS = glib-gettextize
+ AM_CPPFLAGS = \
+@@ -355,7 +355,8 @@ BUILT_EXTRA_DIST = \
+ config.h.win32 \
+ gtk-doc.make
+
+-configexecincludedir = $(libdir)/glib-2.0/include
++glibincludedir = $(includedir)/glib-2.0
++configexecincludedir = $(glibincludedir)
+ configexecinclude_DATA = glibconfig.h
+ CONFIGURE_DEPENDENCIES = acglib.m4
+ BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
diff --git a/devel/glib20/files/patch-ah b/devel/glib20/files/patch-ah
new file mode 100644
index 000000000..3784d16b8
--- /dev/null
+++ b/devel/glib20/files/patch-ah
@@ -0,0 +1,11 @@
+--- docs/reference/Makefile.in.orig 2007-12-21 16:54:10.000000000 -0500
++++ docs/reference/Makefile.in 2007-12-21 16:54:40.000000000 -0500
+@@ -268,7 +268,7 @@ GTESTER_REPORT = $(top_builddir)/glib/gt
+ # initialize variables for unconditional += appending
+ EXTRA_DIST =
+ TEST_PROGS =
+-SUBDIRS = glib gobject gio
++SUBDIRS = #glib gobject gio
+ all: all-recursive
+
+ .SUFFIXES:
diff --git a/devel/glib20/files/patch-gio_glocalfile.c b/devel/glib20/files/patch-gio_glocalfile.c
new file mode 100644
index 000000000..5a3a86600
--- /dev/null
+++ b/devel/glib20/files/patch-gio_glocalfile.c
@@ -0,0 +1,14 @@
+--- gio/glocalfile.c.orig 2007-12-22 15:19:11.000000000 -0500
++++ gio/glocalfile.c 2007-12-22 15:29:09.000000000 -0500
+@@ -849,7 +849,11 @@ g_local_file_query_filesystem_info (GFil
+ #endif
+ }
+ #ifdef USE_STATFS
++#ifndef __FreeBSD__
+ fstype = get_fs_type (statfs_buffer.f_type);
++#else
++ fstype = statfs_buffer.f_fstypename;
++#endif
+ if (fstype &&
+ g_file_attribute_matcher_matches (attribute_matcher,
+ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE))
diff --git a/devel/glib20/files/patch-gio_gunixmount.c b/devel/glib20/files/patch-gio_gunixmount.c
new file mode 100644
index 000000000..b9bfe143e
--- /dev/null
+++ b/devel/glib20/files/patch-gio_gunixmount.c
@@ -0,0 +1,21 @@
+--- gio/gunixmount.c.orig 2007-12-23 15:53:50.000000000 -0500
++++ gio/gunixmount.c 2007-12-23 15:52:52.000000000 -0500
+@@ -372,12 +372,18 @@ g_unix_mount_eject (GMount *
+ gpointer user_data)
+ {
+ GUnixMount *unix_mount = G_UNIX_MOUNT (mount);
++#ifndef __FreeBSD__
+ char *argv[] = {"eject", NULL, NULL};
+
+ if (unix_mount->mount_path != NULL)
+ argv[1] = unix_mount->mount_path;
+ else
+ argv[1] = unix_mount->device_path;
++#else
++ char *argv[] = {"cdcontrol", "-f", NULL, "eject", NULL};
++
++ argv[2] = unix_mount->device_path;
++#endif
+
+ return eject_unmount_do (mount, cancellable, callback, user_data, argv);
+ }
diff --git a/devel/glib20/files/patch-gio_gunixmounts.c b/devel/glib20/files/patch-gio_gunixmounts.c
new file mode 100644
index 000000000..18852c980
--- /dev/null
+++ b/devel/glib20/files/patch-gio_gunixmounts.c
@@ -0,0 +1,31 @@
+--- gio/gunixmounts.c.orig 2008-01-07 09:15:54.000000000 -0500
++++ gio/gunixmounts.c 2008-01-07 18:39:57.000000000 -0500
+@@ -215,20 +215,28 @@ g_unix_is_mount_path_system_internal (co
+ "/", /* we already have "Filesystem root" in Nautilus */
+ "/bin",
+ "/boot",
++ "/compat/linux/proc",
++ "/compat/linux/sys",
+ "/dev",
+ "/etc",
+ "/home",
+ "/lib",
+ "/lib64",
++ "/libexec",
+ "/media",
+ "/mnt",
+ "/opt",
++ "/rescue",
+ "/root",
+ "/sbin",
+ "/srv",
+ "/tmp",
+ "/usr",
++ "/usr/X11R6",
+ "/usr/local",
++ "/usr/obj",
++ "/usr/ports",
++ "/usr/src",
+ "/var",
+ "/var/log/audit", /* https://bugzilla.redhat.com/show_bug.cgi?id=333041 */
+ "/var/tmp", /* https://bugzilla.redhat.com/show_bug.cgi?id=335241 */
diff --git a/devel/glib20/files/patch-gio_gunixvolume.c b/devel/glib20/files/patch-gio_gunixvolume.c
new file mode 100644
index 000000000..377a7d6b5
--- /dev/null
+++ b/devel/glib20/files/patch-gio_gunixvolume.c
@@ -0,0 +1,17 @@
+--- gio/gunixvolume.c.orig 2007-12-23 15:43:17.000000000 -0500
++++ gio/gunixvolume.c 2007-12-23 15:47:08.000000000 -0500
+@@ -387,9 +387,13 @@ g_unix_volume_eject (GVolume *volume,
+ gpointer user_data)
+ {
+ GUnixVolume *unix_volume = G_UNIX_VOLUME (volume);
++#ifdef __FreeBSD__
++ char *argv[] = {"cdcontrol", "-f", NULL, "eject", NULL};
++ argv[2] = unix_volume->device_path;
++#else
+ char *argv[] = {"eject", NULL, NULL};
+-
+ argv[1] = unix_volume->device_path;
++#endif
+
+ eject_mount_do (volume, cancellable, callback, user_data, argv);
+ }
diff --git a/devel/glib20/files/patch-glib::libcharset::Makefile.in b/devel/glib20/files/patch-glib::libcharset::Makefile.in
new file mode 100644
index 000000000..9cec8906f
--- /dev/null
+++ b/devel/glib20/files/patch-glib::libcharset::Makefile.in
@@ -0,0 +1,30 @@
+--- glib/libcharset/Makefile.in.orig 2007-12-21 16:55:09.000000000 -0500
++++ glib/libcharset/Makefile.in 2007-12-21 16:56:04.000000000 -0500
+@@ -277,15 +277,15 @@ EXTRA_DIST = README config.charset ref-a
+ codeset.m4 update.sh make-patch.sh libcharset-glib.patch
+ TEST_PROGS =
+ INCLUDES = \
+- -DLIBDIR=\"$(libdir)\" -I$(top_srcdir)
++ -DLIBDIR=\"$(prefix)/libdata\" -I$(top_srcdir)
+
+ noinst_LTLIBRARIES = libcharset.la
+ libcharset_la_SOURCES = \
+ libcharset.h \
+ localcharset.c
+
+-charset_alias = $(DESTDIR)$(libdir)/charset.alias
+-charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
++charset_alias = $(DESTDIR)$(prefix)/libdata/charset.alias
++charset_tmp = $(DESTDIR)$(prefix)/libdata/charset.tmp
+ SUFFIXES = .sed .sin
+ CLEANFILES = charset.alias ref-add.sed ref-del.sed
+ all: all-am
+@@ -497,7 +497,7 @@ install-data-am:
+
+ install-dvi: install-dvi-am
+
+-install-exec-am: install-exec-local
++install-exec-am: # install-exec-local
+
+ install-html: install-html-am
+
diff --git a/devel/glib20/files/patch-glib_gatomic.c b/devel/glib20/files/patch-glib_gatomic.c
new file mode 100644
index 000000000..93b29badd
--- /dev/null
+++ b/devel/glib20/files/patch-glib_gatomic.c
@@ -0,0 +1,37 @@
+--- glib/gatomic.c.orig Thu Jul 6 11:21:02 2006
++++ glib/gatomic.c Thu Jul 6 11:18:48 2006
+@@ -414,14 +414,14 @@
+ g_atomic_int_exchange_and_add (volatile gint *atomic,
+ gint val)
+ {
+- return __sync_fetch_and_add (atomic, val);
++ return __sync_fetch_and_add_si (atomic, val);
+ }
+
+ void
+ g_atomic_int_add (volatile gint *atomic,
+ gint val)
+ {
+- __sync_fetch_and_add (atomic, val);
++ __sync_fetch_and_add_si (atomic, val);
+ }
+
+ gboolean
+@@ -429,7 +429,7 @@
+ gint oldval,
+ gint newval)
+ {
+- return __sync_bool_compare_and_swap (atomic, oldval, newval);
++ return __sync_bool_compare_and_swap_si (atomic, oldval, newval);
+ }
+
+ gboolean
+@@ -437,7 +437,7 @@
+ gpointer oldval,
+ gpointer newval)
+ {
+- return __sync_bool_compare_and_swap ((long *)atomic,
++ return __sync_bool_compare_and_swap_di ((long *)atomic,
+ (long)oldval, (long)newval);
+ }
+
diff --git a/devel/glib20/files/patch-glib_gregex.c b/devel/glib20/files/patch-glib_gregex.c
new file mode 100644
index 000000000..ef7f0a87b
--- /dev/null
+++ b/devel/glib20/files/patch-glib_gregex.c
@@ -0,0 +1,13 @@
+--- glib/gregex.c.orig 2007-09-09 18:35:32.000000000 -0400
++++ glib/gregex.c 2007-09-09 18:36:05.000000000 -0400
+@@ -164,8 +164,10 @@ match_error (gint errcode)
+ case PCRE_ERROR_DFA_RECURSE:
+ case PCRE_ERROR_RECURSIONLIMIT:
+ return _("recursion limit reached");
++#ifdef PCRE_ERROR_NULLWSLIMIT
+ case PCRE_ERROR_NULLWSLIMIT:
+ return _("workspace limit for empty substrings reached");
++#endif
+ case PCRE_ERROR_BADNEWLINE:
+ return _("invalid combination of newline flags");
+ default:
diff --git a/devel/glib20/files/patch-glib_gutils.c b/devel/glib20/files/patch-glib_gutils.c
new file mode 100644
index 000000000..95a02e475
--- /dev/null
+++ b/devel/glib20/files/patch-glib_gutils.c
@@ -0,0 +1,20 @@
+--- glib/gutils.c.orig Wed Mar 23 09:55:02 2005
++++ glib/gutils.c Thu Apr 7 01:06:16 2005
+@@ -1929,7 +1929,7 @@ g_get_system_data_dirs (void)
+ data_dirs = (gchar *) g_getenv ("XDG_DATA_DIRS");
+
+ if (!data_dirs || !data_dirs[0])
+- data_dirs = "/usr/local/share/:/usr/share/";
++ data_dirs = "/usr/local/share/";
+
+ data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
+ #endif
+@@ -1983,7 +1983,7 @@ g_get_system_config_dirs (void)
+ conf_dirs = (gchar *) g_getenv ("XDG_CONFIG_DIRS");
+
+ if (!conf_dirs || !conf_dirs[0])
+- conf_dirs = "/etc/xdg";
++ conf_dirs = "/usr/local/etc/xdg:/etc/xdg";
+
+ conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
+ #endif
diff --git a/devel/glib20/files/patch-gmodule::gmodule-dl.c b/devel/glib20/files/patch-gmodule::gmodule-dl.c
new file mode 100644
index 000000000..586d7f80b
--- /dev/null
+++ b/devel/glib20/files/patch-gmodule::gmodule-dl.c
@@ -0,0 +1,20 @@
+--- gmodule/gmodule-dl.c.orig Sat Feb 17 08:28:07 2001
++++ gmodule/gmodule-dl.c Fri Jan 18 09:48:45 2002
+@@ -104,6 +104,7 @@
+ static gpointer
+ _g_module_self (void)
+ {
++#ifndef __FreeBSD__
+ gpointer handle;
+
+ /* to query symbols from the program itself, special link options
+@@ -115,6 +116,9 @@
+ g_module_set_error (fetch_dlerror (TRUE));
+
+ return handle;
++#else
++ return RTLD_DEFAULT;
++#endif
+ }
+
+ static void
diff --git a/devel/glib20/files/patch-gthread_gthread-posix.c b/devel/glib20/files/patch-gthread_gthread-posix.c
new file mode 100644
index 000000000..47c5ab8f1
--- /dev/null
+++ b/devel/glib20/files/patch-gthread_gthread-posix.c
@@ -0,0 +1,21 @@
+--- gthread/gthread-posix.c.orig Mon Nov 1 13:47:12 2004
++++ gthread/gthread-posix.c Wed Mar 9 14:21:20 2005
+@@ -125,7 +129,8 @@
+ g_thread_impl_init(void)
+ {
+ #ifdef _SC_THREAD_STACK_MIN
+- g_thread_min_stack_size = MAX (sysconf (_SC_THREAD_STACK_MIN), 0);
++ g_thread_min_stack_size = MAX (sysconf (_SC_THREAD_STACK_MIN),
++ g_thread_min_stack_size);
+ #endif /* _SC_THREAD_STACK_MIN */
+ #ifdef HAVE_PRIORITIES
+ # ifdef G_THREADS_IMPL_POSIX
+@@ -176,7 +181,7 @@
+ result = pthread_mutex_trylock ((pthread_mutex_t *) mutex);
+
+ #ifdef G_THREADS_IMPL_POSIX
+- if (result == EBUSY)
++ if ((result == EBUSY) || (result == EDEADLK))
+ return FALSE;
+ #else /* G_THREADS_IMPL_DCE */
+ if (result == 0)
diff --git a/devel/glib20/pkg-descr b/devel/glib20/pkg-descr
new file mode 100644
index 000000000..3b3059030
--- /dev/null
+++ b/devel/glib20/pkg-descr
@@ -0,0 +1,5 @@
+GLib provides a simple, abstract, and highly portable set of C support
+routines such as lists, trees, hashes, memory allocation, and much, much
+more. It is a foundation for writing portable applications.
+
+WWW: http://www.gtk.org/
diff --git a/devel/glib20/pkg-plist b/devel/glib20/pkg-plist
new file mode 100644
index 000000000..685cc6036
--- /dev/null
+++ b/devel/glib20/pkg-plist
@@ -0,0 +1,287 @@
+bin/glib-genmarshal
+bin/glib-gettextize
+bin/glib-mkenums
+bin/gobject-query
+bin/gtester
+bin/gtester-report
+include/gio-unix-2.0/gio/gdesktopappinfo.h
+include/gio-unix-2.0/gio/gunixinputstream.h
+include/gio-unix-2.0/gio/gunixmounts.h
+include/gio-unix-2.0/gio/gunixoutputstream.h
+include/glib-2.0/gio/gappinfo.h
+include/glib-2.0/gio/gasyncresult.h
+include/glib-2.0/gio/gbufferedinputstream.h
+include/glib-2.0/gio/gbufferedoutputstream.h
+include/glib-2.0/gio/gcancellable.h
+include/glib-2.0/gio/gcontenttype.h
+include/glib-2.0/gio/gdatainputstream.h
+include/glib-2.0/gio/gdataoutputstream.h
+include/glib-2.0/gio/gdrive.h
+include/glib-2.0/gio/gfile.h
+include/glib-2.0/gio/gfileattribute.h
+include/glib-2.0/gio/gfileenumerator.h
+include/glib-2.0/gio/gfileicon.h
+include/glib-2.0/gio/gfileinfo.h
+include/glib-2.0/gio/gfileinputstream.h
+include/glib-2.0/gio/gfilemonitor.h
+include/glib-2.0/gio/gfilenamecompleter.h
+include/glib-2.0/gio/gfileoutputstream.h
+include/glib-2.0/gio/gfilterinputstream.h
+include/glib-2.0/gio/gfilteroutputstream.h
+include/glib-2.0/gio/gicon.h
+include/glib-2.0/gio/ginputstream.h
+include/glib-2.0/gio/gio.h
+include/glib-2.0/gio/gioenumtypes.h
+include/glib-2.0/gio/gioerror.h
+include/glib-2.0/gio/giomodule.h
+include/glib-2.0/gio/gioscheduler.h
+include/glib-2.0/gio/gloadableicon.h
+include/glib-2.0/gio/gmemoryinputstream.h
+include/glib-2.0/gio/gmemoryoutputstream.h
+include/glib-2.0/gio/gmount.h
+include/glib-2.0/gio/gmountoperation.h
+include/glib-2.0/gio/gnativevolumemonitor.h
+include/glib-2.0/gio/goutputstream.h
+include/glib-2.0/gio/gseekable.h
+include/glib-2.0/gio/gsimpleasyncresult.h
+include/glib-2.0/gio/gthemedicon.h
+include/glib-2.0/gio/gvfs.h
+include/glib-2.0/gio/gvolume.h
+include/glib-2.0/gio/gvolumemonitor.h
+include/glib-2.0/glib-object.h
+include/glib-2.0/glib.h
+include/glib-2.0/glib/galloca.h
+include/glib-2.0/glib/garray.h
+include/glib-2.0/glib/gasyncqueue.h
+include/glib-2.0/glib/gatomic.h
+include/glib-2.0/glib/gbacktrace.h
+include/glib-2.0/glib/gbase64.h
+include/glib-2.0/glib/gbookmarkfile.h
+include/glib-2.0/glib/gcache.h
+include/glib-2.0/glib/gchecksum.h
+include/glib-2.0/glib/gcompletion.h
+include/glib-2.0/glib/gconvert.h
+include/glib-2.0/glib/gdataset.h
+include/glib-2.0/glib/gdate.h
+include/glib-2.0/glib/gdir.h
+include/glib-2.0/glib/gerror.h
+include/glib-2.0/glib/gfileutils.h
+include/glib-2.0/glib/ghash.h
+include/glib-2.0/glib/ghook.h
+include/glib-2.0/glib/gi18n-lib.h
+include/glib-2.0/glib/gi18n.h
+include/glib-2.0/glib/giochannel.h
+include/glib-2.0/glib/gkeyfile.h
+include/glib-2.0/glib/glist.h
+include/glib-2.0/glib/gmacros.h
+include/glib-2.0/glib/gmain.h
+include/glib-2.0/glib/gmappedfile.h
+include/glib-2.0/glib/gmarkup.h
+include/glib-2.0/glib/gmem.h
+include/glib-2.0/glib/gmessages.h
+include/glib-2.0/glib/gnode.h
+include/glib-2.0/glib/goption.h
+include/glib-2.0/glib/gpattern.h
+include/glib-2.0/glib/gprimes.h
+include/glib-2.0/glib/gprintf.h
+include/glib-2.0/glib/gqsort.h
+include/glib-2.0/glib/gquark.h
+include/glib-2.0/glib/gqueue.h
+include/glib-2.0/glib/grand.h
+include/glib-2.0/glib/gregex.h
+include/glib-2.0/glib/grel.h
+include/glib-2.0/glib/gscanner.h
+include/glib-2.0/glib/gsequence.h
+include/glib-2.0/glib/gshell.h
+include/glib-2.0/glib/gslice.h
+include/glib-2.0/glib/gslist.h
+include/glib-2.0/glib/gspawn.h
+include/glib-2.0/glib/gstdio.h
+include/glib-2.0/glib/gstrfuncs.h
+include/glib-2.0/glib/gstring.h
+include/glib-2.0/glib/gtestutils.h
+include/glib-2.0/glib/gthread.h
+include/glib-2.0/glib/gthreadpool.h
+include/glib-2.0/glib/gtimer.h
+include/glib-2.0/glib/gtree.h
+include/glib-2.0/glib/gtypes.h
+include/glib-2.0/glib/gunicode.h
+include/glib-2.0/glib/gurifuncs.h
+include/glib-2.0/glib/gutils.h
+include/glib-2.0/glib/gwin32.h
+include/glib-2.0/glibconfig.h
+include/glib-2.0/gmodule.h
+include/glib-2.0/gobject/gboxed.h
+include/glib-2.0/gobject/gclosure.h
+include/glib-2.0/gobject/genums.h
+include/glib-2.0/gobject/gmarshal.h
+include/glib-2.0/gobject/gobject.h
+include/glib-2.0/gobject/gobjectnotifyqueue.c
+include/glib-2.0/gobject/gparam.h
+include/glib-2.0/gobject/gparamspecs.h
+include/glib-2.0/gobject/gsignal.h
+include/glib-2.0/gobject/gsourceclosure.h
+include/glib-2.0/gobject/gtype.h
+include/glib-2.0/gobject/gtypemodule.h
+include/glib-2.0/gobject/gtypeplugin.h
+include/glib-2.0/gobject/gvalue.h
+include/glib-2.0/gobject/gvaluearray.h
+include/glib-2.0/gobject/gvaluecollector.h
+include/glib-2.0/gobject/gvaluetypes.h
+lib/libgio-2.0.a
+lib/libgio-2.0.la
+lib/libgio-2.0.so
+lib/libgio-2.0.so.0
+lib/libglib-2.0.a
+lib/libglib-2.0.la
+lib/libglib-2.0.so
+lib/libglib-2.0.so.0
+lib/libgmodule-2.0.a
+lib/libgmodule-2.0.la
+lib/libgmodule-2.0.so
+lib/libgmodule-2.0.so.0
+lib/libgobject-2.0.a
+lib/libgobject-2.0.la
+lib/libgobject-2.0.so
+lib/libgobject-2.0.so.0
+lib/libgthread-2.0.a
+lib/libgthread-2.0.la
+lib/libgthread-2.0.so
+lib/libgthread-2.0.so.0
+libdata/pkgconfig/gio-2.0.pc
+libdata/pkgconfig/gio-unix-2.0.pc
+libdata/pkgconfig/glib-2.0.pc
+libdata/pkgconfig/gmodule-2.0.pc
+libdata/pkgconfig/gmodule-export-2.0.pc
+libdata/pkgconfig/gmodule-no-export-2.0.pc
+libdata/pkgconfig/gobject-2.0.pc
+libdata/pkgconfig/gthread-2.0.pc
+share/aclocal/glib-2.0.m4
+share/aclocal/glib-gettext.m4
+share/glib-2.0/gettext/mkinstalldirs
+share/glib-2.0/gettext/po/Makefile.in.in
+share/locale/am/LC_MESSAGES/glib20.mo
+share/locale/ar/LC_MESSAGES/glib20.mo
+share/locale/as/LC_MESSAGES/glib20.mo
+share/locale/az/LC_MESSAGES/glib20.mo
+share/locale/be/LC_MESSAGES/glib20.mo
+share/locale/be@latin/LC_MESSAGES/glib20.mo
+share/locale/bg/LC_MESSAGES/glib20.mo
+share/locale/bn/LC_MESSAGES/glib20.mo
+share/locale/bn_IN/LC_MESSAGES/glib20.mo
+share/locale/bs/LC_MESSAGES/glib20.mo
+share/locale/ca/LC_MESSAGES/glib20.mo
+share/locale/cs/LC_MESSAGES/glib20.mo
+share/locale/cy/LC_MESSAGES/glib20.mo
+share/locale/da/LC_MESSAGES/glib20.mo
+share/locale/de/LC_MESSAGES/glib20.mo
+share/locale/dz/LC_MESSAGES/glib20.mo
+share/locale/el/LC_MESSAGES/glib20.mo
+share/locale/en_CA/LC_MESSAGES/glib20.mo
+share/locale/en_GB/LC_MESSAGES/glib20.mo
+share/locale/eo/LC_MESSAGES/glib20.mo
+share/locale/es/LC_MESSAGES/glib20.mo
+share/locale/et/LC_MESSAGES/glib20.mo
+share/locale/eu/LC_MESSAGES/glib20.mo
+share/locale/fa/LC_MESSAGES/glib20.mo
+share/locale/fi/LC_MESSAGES/glib20.mo
+share/locale/fr/LC_MESSAGES/glib20.mo
+share/locale/ga/LC_MESSAGES/glib20.mo
+share/locale/gl/LC_MESSAGES/glib20.mo
+share/locale/gu/LC_MESSAGES/glib20.mo
+share/locale/he/LC_MESSAGES/glib20.mo
+share/locale/hi/LC_MESSAGES/glib20.mo
+share/locale/hr/LC_MESSAGES/glib20.mo
+share/locale/hu/LC_MESSAGES/glib20.mo
+share/locale/hy/LC_MESSAGES/glib20.mo
+share/locale/id/LC_MESSAGES/glib20.mo
+share/locale/is/LC_MESSAGES/glib20.mo
+share/locale/it/LC_MESSAGES/glib20.mo
+share/locale/ja/LC_MESSAGES/glib20.mo
+share/locale/ka/LC_MESSAGES/glib20.mo
+share/locale/kn/LC_MESSAGES/glib20.mo
+share/locale/ko/LC_MESSAGES/glib20.mo
+share/locale/ku/LC_MESSAGES/glib20.mo
+share/locale/lt/LC_MESSAGES/glib20.mo
+share/locale/lv/LC_MESSAGES/glib20.mo
+share/locale/mg/LC_MESSAGES/glib20.mo
+share/locale/mk/LC_MESSAGES/glib20.mo
+share/locale/ml/LC_MESSAGES/glib20.mo
+share/locale/mn/LC_MESSAGES/glib20.mo
+share/locale/mr/LC_MESSAGES/glib20.mo
+share/locale/ms/LC_MESSAGES/glib20.mo
+share/locale/nb/LC_MESSAGES/glib20.mo
+share/locale/ne/LC_MESSAGES/glib20.mo
+share/locale/nl/LC_MESSAGES/glib20.mo
+share/locale/nn/LC_MESSAGES/glib20.mo
+share/locale/oc/LC_MESSAGES/glib20.mo
+share/locale/or/LC_MESSAGES/glib20.mo
+share/locale/pa/LC_MESSAGES/glib20.mo
+share/locale/pl/LC_MESSAGES/glib20.mo
+share/locale/pt/LC_MESSAGES/glib20.mo
+share/locale/pt_BR/LC_MESSAGES/glib20.mo
+share/locale/ro/LC_MESSAGES/glib20.mo
+share/locale/ru/LC_MESSAGES/glib20.mo
+share/locale/rw/LC_MESSAGES/glib20.mo
+share/locale/sk/LC_MESSAGES/glib20.mo
+share/locale/sl/LC_MESSAGES/glib20.mo
+share/locale/sq/LC_MESSAGES/glib20.mo
+share/locale/sr/LC_MESSAGES/glib20.mo
+share/locale/sr@Latn/LC_MESSAGES/glib20.mo
+share/locale/sr@ije/LC_MESSAGES/glib20.mo
+share/locale/sv/LC_MESSAGES/glib20.mo
+share/locale/ta/LC_MESSAGES/glib20.mo
+share/locale/te/LC_MESSAGES/glib20.mo
+share/locale/th/LC_MESSAGES/glib20.mo
+share/locale/tl/LC_MESSAGES/glib20.mo
+share/locale/tr/LC_MESSAGES/glib20.mo
+share/locale/tt/LC_MESSAGES/glib20.mo
+share/locale/uk/LC_MESSAGES/glib20.mo
+share/locale/vi/LC_MESSAGES/glib20.mo
+share/locale/wa/LC_MESSAGES/glib20.mo
+share/locale/xh/LC_MESSAGES/glib20.mo
+share/locale/yi/LC_MESSAGES/glib20.mo
+share/locale/zh_CN/LC_MESSAGES/glib20.mo
+share/locale/zh_HK/LC_MESSAGES/glib20.mo
+share/locale/zh_TW/LC_MESSAGES/glib20.mo
+@dirrm share/glib-2.0/gettext/po
+@dirrm share/glib-2.0/gettext
+@dirrm share/glib-2.0
+@dirrm include/glib-2.0/gobject
+@dirrm include/glib-2.0/glib
+@dirrm include/glib-2.0/gio
+@dirrm include/glib-2.0
+@dirrm include/gio-unix-2.0/gio
+@dirrm include/gio-unix-2.0
+@dirrmtry share/locale/zh_HK/LC_MESSAGES
+@dirrmtry share/locale/zh_HK
+@dirrmtry share/locale/yi/LC_MESSAGES
+@dirrmtry share/locale/yi
+@dirrmtry share/locale/xh/LC_MESSAGES
+@dirrmtry share/locale/xh
+@dirrmtry share/locale/tt/LC_MESSAGES
+@dirrmtry share/locale/tt
+@dirrmtry share/locale/tl/LC_MESSAGES
+@dirrmtry share/locale/tl
+@dirrmtry share/locale/te/LC_MESSAGES
+@dirrmtry share/locale/te
+@dirrmtry share/locale/sr@ije/LC_MESSAGES
+@dirrmtry share/locale/sr@ije
+@dirrmtry share/locale/rw/LC_MESSAGES
+@dirrmtry share/locale/rw
+@dirrmtry share/locale/oc/LC_MESSAGES
+@dirrmtry share/locale/oc
+@dirrmtry share/locale/mg/LC_MESSAGES
+@dirrmtry share/locale/mg
+@dirrmtry share/locale/ku/LC_MESSAGES
+@dirrmtry share/locale/ku
+@dirrmtry share/locale/hy/LC_MESSAGES
+@dirrmtry share/locale/hy
+@dirrmtry share/locale/dz/LC_MESSAGES
+@dirrmtry share/locale/dz
+@dirrmtry share/locale/bn_IN/LC_MESSAGES
+@dirrmtry share/locale/bn_IN
+@dirrmtry share/locale/be@latin/LC_MESSAGES
+@dirrmtry share/locale/be@latin
+@dirrmtry share/locale/as/LC_MESSAGES
+@dirrmtry share/locale/as
diff --git a/devel/gvfs/Makefile b/devel/gvfs/Makefile
index 42bf3117f..8b508688c 100644
--- a/devel/gvfs/Makefile
+++ b/devel/gvfs/Makefile
@@ -3,26 +3,31 @@
# Whom: Michael Johnson <ahze@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/devel/gvfs/Makefile,v 1.2 2007/11/06 23:49:40 ahze Exp $
+# $MCom: ports/devel/gvfs/Makefile,v 1.3 2007/11/16 03:49:34 marcus Exp $
PORTNAME= gvfs
-PORTVERSION= 0.0.2
+PORTVERSION= 0.1.1
CATEGORIES= devel gnome
MASTER_SITES= GNOME
MAINTAINER= gnome@FreeBSD.org
COMMENT= GNOME virtual file system
-LIB_DEPENDS= gio.0:${PORTSDIR}/devel/gio-standalone \
- dbus-1.3:${PORTSDIR}/devel/dbus
+LIB_DEPENDS= dbus-1.3:${PORTSDIR}/devel/dbus \
+ hal.1:${PORTSDIR}/sysutils/hal
+RUN_DEPENDS= gnome-mount:${PORTSDIR}/sysutils/gnome-mount
USE_GNOME= glib20 gnomehack gnomeprefix
-GNU_CONFIGURE= yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
USE_GMAKE= yes
+USE_GETTEXT= yes
USE_LDCONFIG= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+
OPTIONS= FUSE "Enable fuse" on \
SAMBA "Enable Samba" on
+# CDDA "Enable CDDA" on
.include <bsd.port.pre.mk>
@@ -42,4 +47,12 @@ CONFIGURE_ARGS+= --disable-samba
PLIST_SUB+= SMB="@comment "
.endif
+#.if defined(WITH_CDDA)
+#LIB_DEPENDS+= cdio_paranoia.0:${PORTSDIR}/sysutils/libcdio
+#PLIST_SUB+= CDDA=""
+#.else
+CONFIGURE_ARGS+= --disable-cdda
+PLIST_SUB+= CDDA="@comment "
+#.endif
+
.include <bsd.port.post.mk>
diff --git a/devel/gvfs/distinfo b/devel/gvfs/distinfo
index 0142d15ce..8cdd6529a 100644
--- a/devel/gvfs/distinfo
+++ b/devel/gvfs/distinfo
@@ -1,3 +1,3 @@
-MD5 (gvfs-0.0.2.tar.gz) = 36c0e17e6e3169278c237bd44c956da3
-SHA256 (gvfs-0.0.2.tar.gz) = 5befefc5960dea42db3a48ae107accbebdb684ccbcdd2906d059c206c85551a0
-SIZE (gvfs-0.0.2.tar.gz) = 563598
+MD5 (gvfs-0.1.1.tar.gz) = 38b266de43fc5f2ab8fa274f29a1f456
+SHA256 (gvfs-0.1.1.tar.gz) = 6c22fcb920a95c3587c17e1e0d1dee64a785222c4a8d4544937efb138ddcf3b1
+SIZE (gvfs-0.1.1.tar.gz) = 630884
diff --git a/devel/gvfs/files/patch-Makefile.in b/devel/gvfs/files/patch-Makefile.in
new file mode 100644
index 000000000..e5bc9df26
--- /dev/null
+++ b/devel/gvfs/files/patch-Makefile.in
@@ -0,0 +1,10 @@
+--- Makefile.in.orig 2007-12-30 16:07:20.000000000 -0500
++++ Makefile.in 2007-12-30 16:07:26.000000000 -0500
+@@ -220,7 +220,6 @@ SUBDIRS = \
+ daemon \
+ po \
+ programs \
+- test \
+ hal \
+ $(NULL)
+
diff --git a/devel/gvfs/files/patch-configure b/devel/gvfs/files/patch-configure
new file mode 100644
index 000000000..54743070b
--- /dev/null
+++ b/devel/gvfs/files/patch-configure
@@ -0,0 +1,38 @@
+--- configure.orig 2007-12-22 18:32:00.000000000 -0500
++++ configure 2007-12-22 18:32:13.000000000 -0500
+@@ -24091,7 +24091,7 @@ if test "x$enable_cdda" != "xno"; then
+ msg_cdda=yes
+ fi
+
+- if test "x$msg_cdda" == "xyes"; then
++ if test "x$msg_cdda" = "xyes"; then
+
+ pkg_failed=no
+ { echo "$as_me:$LINENO: checking for CDDA" >&5
+@@ -24242,7 +24242,7 @@ if test "x$enable_fuse" != "xno"; then
+ msg_fuse=yes
+ fi
+
+- if test "x$msg_fuse" == "xyes"; then
++ if test "x$msg_fuse" = "xyes"; then
+
+ pkg_failed=no
+ { echo "$as_me:$LINENO: checking for FUSE" >&5
+@@ -24394,7 +24394,7 @@ if test "x$enable_hal" != "xno"; then
+ msg_hal=yes
+ fi
+
+- if test "x$msg_hal" == "xyes"; then
++ if test "x$msg_hal" = "xyes"; then
+
+ pkg_failed=no
+ { echo "$as_me:$LINENO: checking for HAL" >&5
+@@ -24576,7 +24576,7 @@ if test $ac_cv_lib_hal_libhal_get_all_de
+ have_hal_fast_init=yes
+ fi
+
+- if test "x$have_hal_fast_init" == "xyes"; then
++ if test "x$have_hal_fast_init" = "xyes"; then
+
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_HAL_FAST_INIT 1
diff --git a/devel/gvfs/files/patch-daemon_gvfsbackendcomputer.c b/devel/gvfs/files/patch-daemon_gvfsbackendcomputer.c
new file mode 100644
index 000000000..0994b22d2
--- /dev/null
+++ b/devel/gvfs/files/patch-daemon_gvfsbackendcomputer.c
@@ -0,0 +1,10 @@
+--- daemon/gvfsbackendcomputer.c.orig 2008-01-09 03:12:26.000000000 -0500
++++ daemon/gvfsbackendcomputer.c 2008-01-09 03:13:00.000000000 -0500
+@@ -417,6 +417,7 @@ recompute_files (GVfsBackendComputer *ba
+ file->icon = g_volume_get_icon (file->volume);
+ file->display_name = g_volume_get_name (file->volume);
+ file->can_mount = g_volume_can_mount (file->volume);
++ file->root = NULL;
+ file->can_eject = g_volume_can_eject (file->volume);
+ }
+ else /* drive */
diff --git a/devel/gvfs/files/patch-daemon_gvfsmonitor.c b/devel/gvfs/files/patch-daemon_gvfsmonitor.c
new file mode 100644
index 000000000..de12e2ea7
--- /dev/null
+++ b/devel/gvfs/files/patch-daemon_gvfsmonitor.c
@@ -0,0 +1,14 @@
+--- daemon/gvfsmonitor.c.orig 2008-01-09 03:13:27.000000000 -0500
++++ daemon/gvfsmonitor.c 2008-01-09 03:13:35.000000000 -0500
+@@ -223,9 +223,9 @@ g_vfs_monitor_new (GVfsDaemon *daemon)
+ vfs_monitor_message_callback,
+ monitor);
+
+- g_timeout_add (5000,
++/* g_timeout_add (5000,
+ vfs_monitor_initial_unref,
+- monitor);
++ monitor);*/
+
+ return monitor;
+ }
diff --git a/devel/gvfs/files/patch-daemon_gvfswritechannel.c b/devel/gvfs/files/patch-daemon_gvfswritechannel.c
new file mode 100644
index 000000000..54c421687
--- /dev/null
+++ b/devel/gvfs/files/patch-daemon_gvfswritechannel.c
@@ -0,0 +1,10 @@
+--- daemon/gvfswritechannel.c.orig 2007-12-22 18:50:10.000000000 -0500
++++ daemon/gvfswritechannel.c 2007-12-22 18:50:20.000000000 -0500
+@@ -30,6 +30,7 @@
+ #include <sys/un.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <string.h>
+
+ #include <glib.h>
+ #include <glib-object.h>
diff --git a/devel/gvfs/pkg-plist b/devel/gvfs/pkg-plist
index c24b391a9..9c9af41c8 100644
--- a/devel/gvfs/pkg-plist
+++ b/devel/gvfs/pkg-plist
@@ -1,16 +1,26 @@
-etc/gvfs/mounts/ftp.mount
-etc/gvfs/mounts/sftp.mount
-%%SMB%%etc/gvfs/mounts/smb-browse.mount
-%%SMB%%etc/gvfs/mounts/smb.mount
-etc/gvfs/mounts/trash.mount
+bin/gvfs-cat
+bin/gvfs-copy
+bin/gvfs-info
+bin/gvfs-less
+bin/gvfs-ls
+bin/gvfs-monitor-dir
+bin/gvfs-monitor-file
+bin/gvfs-mount
+bin/gvfs-move
+bin/gvfs-rm
+bin/gvfs-save
+bin/gvfs-trash
include/gvfs-client/gvfs/gvfsurimapper.h
include/gvfs-client/gvfs/gvfsuriutils.h
+lib/gio/modules/libgiohal-volume-monitor.la
+lib/gio/modules/libgiohal-volume-monitor.so
lib/gio/modules/libgvfsdbus.la
lib/gio/modules/libgvfsdbus.so
lib/libgvfscommon.la
lib/libgvfscommon.so
lib/libgvfscommon.so.0
libexec/gvfsd
+libexec/gvfsd-computer
libexec/gvfsd-ftp
libexec/gvfsd-sftp
%%SMB%%libexec/gvfsd-smb
@@ -18,7 +28,14 @@ libexec/gvfsd-sftp
libexec/gvfsd-trash
%%FUSE%%libexec/gvfs-fuse-daemon
share/dbus-1/services/gvfs-daemon.service
+share/gvfs/mounts/computer.mount
+share/gvfs/mounts/ftp.mount
+share/gvfs/mounts/sftp.mount
+%%SMB%%share/gvfs/mounts/smb-browse.mount
+%%SMB%%share/gvfs/mounts/smb.mount
+share/gvfs/mounts/trash.mount
+share/locale/it/LC_MESSAGES/gvfs.mo
+@dirrm share/gvfs/mounts
+@dirrm share/gvfs
@dirrm include/gvfs-client/gvfs
@dirrm include/gvfs-client
-@dirrm etc/gvfs/mounts
-@dirrm etc/gvfs