diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-03-19 05:14:07 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-03-19 05:14:07 +0000 |
commit | 951c257ea3655de6e80c26a36c18c69ee8047ea8 (patch) | |
tree | 249b59a23d9c6fae8db5e5639385f6273d237705 /sysutils/gnome-mount | |
parent | 91926e92b73e3751382216a16044c5d8b24ad126 (diff) | |
download | ports-951c257ea3655de6e80c26a36c18c69ee8047ea8.tar.gz ports-951c257ea3655de6e80c26a36c18c69ee8047ea8.zip |
Notes
Diffstat (limited to 'sysutils/gnome-mount')
-rw-r--r-- | sysutils/gnome-mount/Makefile | 15 | ||||
-rw-r--r-- | sysutils/gnome-mount/distinfo | 6 | ||||
-rw-r--r-- | sysutils/gnome-mount/files/mntent.h | 56 | ||||
-rw-r--r-- | sysutils/gnome-mount/files/patch-gnome-mount.schemas.in | 38 | ||||
-rw-r--r-- | sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c | 87 | ||||
-rw-r--r-- | sysutils/gnome-mount/files/patch-src_gnome-mount-properties.c | 4 | ||||
-rw-r--r-- | sysutils/gnome-mount/files/patch-src_gnome-mount.c | 131 | ||||
-rw-r--r-- | sysutils/gnome-mount/pkg-plist | 6 |
8 files changed, 247 insertions, 96 deletions
diff --git a/sysutils/gnome-mount/Makefile b/sysutils/gnome-mount/Makefile index 64cdda75fa8f..6be9c4a95637 100644 --- a/sysutils/gnome-mount/Makefile +++ b/sysutils/gnome-mount/Makefile @@ -3,19 +3,20 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/gnome-mount/Makefile,v 1.4 2006/10/05 07:37:38 mezz Exp $ +# $MCom: ports/sysutils/gnome-mount/Makefile,v 1.13 2007/02/11 06:03:50 marcus Exp $ # PORTNAME= gnome-mount -PORTVERSION= 0.4 -PORTREVISION= 2 +PORTVERSION= 0.5 +PORTREVISION= 6 CATEGORIES= sysutils gnome MASTER_SITES= http://people.freedesktop.org/~david/dist/ MAINTAINER= gnome@FreeBSD.org COMMENT= A front-end to mount, umount, and eject using HAL -LIB_DEPENDS= hal.1:${PORTSDIR}/sysutils/hal +LIB_DEPENDS= hal.1:${PORTSDIR}/sysutils/hal \ + notify.1:${PORTSDIR}/devel/libnotify USE_XLIB= yes USE_GNOME= gnomeprefix gnomehack intlhack nautilus2 @@ -27,8 +28,10 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" GCONF_SCHEMAS= gnome-mount.schemas +MAN1= gnome-mount.1 -post-extract: - @${CP} -f ${FILESDIR}/mntent.h ${WRKSRC}/src +post-patch: + @${REINPLACE_CMD} -e 's|0.5.8.1|0.5.8|g' \ + ${WRKSRC}/configure .include <bsd.port.mk> diff --git a/sysutils/gnome-mount/distinfo b/sysutils/gnome-mount/distinfo index 656c038250f9..fa1d4818b5bf 100644 --- a/sysutils/gnome-mount/distinfo +++ b/sysutils/gnome-mount/distinfo @@ -1,3 +1,3 @@ -MD5 (gnome-mount-0.4.tar.gz) = 75f260ea6b0ec3c5e0af3c722fbd9568 -SHA256 (gnome-mount-0.4.tar.gz) = fa9456c0cd1adeda962721fed955914bdc23723a403bebf31bd95a1f54211dd8 -SIZE (gnome-mount-0.4.tar.gz) = 364546 +MD5 (gnome-mount-0.5.tar.gz) = 76622ff9af0131fc44687aed7204f84f +SHA256 (gnome-mount-0.5.tar.gz) = f705a44a2534acdae8bae752c54066eb3fc85ce082b3a25a50310f4ad377019b +SIZE (gnome-mount-0.5.tar.gz) = 408472 diff --git a/sysutils/gnome-mount/files/mntent.h b/sysutils/gnome-mount/files/mntent.h deleted file mode 100644 index 078b246cd02e..000000000000 --- a/sysutils/gnome-mount/files/mntent.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * mntent - * mntent.h - compatability header for FreeBSD - * - * Copyright (c) 2001 David Rufino <daverufino@btinternet.com> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(HAVE_MNTENT_H) -#include <mntent.h> -#else -#ifndef _MNTENT_H -#define _MNTENT_H -#include <stdio.h> - -#define MOUNTED "dummy" - -#define MNTTYPE_NFS "nfs" - -struct mntent { - char *mnt_fsname; - char *mnt_dir; - char *mnt_type; - char *mnt_opts; - int mnt_freq; - int mnt_passno; -}; - -#define setmntent(x,y) ((FILE *)0x1) -struct mntent *getmntent __P ((FILE *fp)); -char *hasmntopt __P ((const struct mntent *mnt, const char *option)); -#define endmntent(x) ((int)1) - -#endif /* _MNTENT_H */ -#endif /* HAVE_MNTENT_H */ diff --git a/sysutils/gnome-mount/files/patch-gnome-mount.schemas.in b/sysutils/gnome-mount/files/patch-gnome-mount.schemas.in new file mode 100644 index 000000000000..d4a0961b4018 --- /dev/null +++ b/sysutils/gnome-mount/files/patch-gnome-mount.schemas.in @@ -0,0 +1,38 @@ +--- gnome-mount.schemas.in.orig Wed Jun 21 22:45:53 2006 ++++ gnome-mount.schemas.in Sun Dec 31 15:38:28 2006 +@@ -6,7 +6,7 @@ + <applyto>/system/storage/default_options/vfat/mount_options</applyto> + <type>list</type> + <list_type>string</list_type> +- <default>[shortname=winnt,uid=]</default> ++ <default>[longnames,-u=]</default> + <locale name="C"> + <short>Default mount options for vfat fs</short> + <long>A list of default mount options for volumes formatted with the vfat file system.</long> +@@ -18,7 +18,7 @@ + <applyto>/system/storage/default_options/iso9660/mount_options</applyto> + <type>list</type> + <list_type>string</list_type> +- <default>[uid=]</default> ++ <default>[]</default> + <locale name="C"> + <short>Default mount options for iso9660 fs</short> + <long>A list of default mount options for volumes formatted with the iso9660 file system.</long> +@@ -30,7 +30,7 @@ + <applyto>/system/storage/default_options/udf/mount_options</applyto> + <type>list</type> + <list_type>string</list_type> +- <default>[uid=]</default> ++ <default>[]</default> + <locale name="C"> + <short>Default mount options for udf fs</short> + <long>A list of default mount options for volumes formatted with the udf file system.</long> +@@ -42,7 +42,7 @@ + <applyto>/system/storage/default_options/ntfs/mount_options</applyto> + <type>list</type> + <list_type>string</list_type> +- <default>[umask=222]</default> ++ <default>[-m=222]</default> + <locale name="C"> + <short>Default mount options for ntfs fs</short> + <long>A list of default mount options for volumes formatted with the ntfs file system.</long> diff --git a/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c b/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c index e33d84fd3192..481e82858656 100644 --- a/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c +++ b/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c @@ -1,10 +1,81 @@ ---- src/gnome-mount-properties-view.c.orig Sun Dec 3 02:24:16 2006 -+++ src/gnome-mount-properties-view.c Sun Dec 3 02:25:20 2006 -@@ -30,6 +30,7 @@ - #include <glib/gi18n.h> - #include <gtk/gtk.h> - #include <glade/glade.h> -+#include <libgnomevfs/gnome-vfs-utils.h> - #include <time.h> +--- src/gnome-mount-properties-view.c.orig Mon Aug 14 00:17:22 2006 ++++ src/gnome-mount-properties-view.c Sun Dec 3 02:38:08 2006 +@@ -34,6 +34,7 @@ #include <sys/time.h> #include <string.h> + #include <gconf/gconf-client.h> ++#include <libgnomevfs/gnome-vfs-utils.h> + + #ifdef __FreeBSD__ + #include <fstab.h> +@@ -59,6 +60,35 @@ struct _GnomeMountPropertiesViewClass { + GtkVBoxClass base_class; + }; + ++#ifdef __FreeBSD__ ++static struct opt { ++ int o_opt; ++ const char *o_name; ++} optnames[] = { ++ { MNT_ASYNC, "asynchronous" }, ++ { MNT_EXPORTED, "NFS exported" }, ++ { MNT_LOCAL, "local" }, ++ { MNT_NOATIME, "noatime" }, ++ { MNT_NOEXEC, "noexec" }, ++ { MNT_NOSUID, "nosuid" }, ++ { MNT_NOSYMFOLLOW, "nosymfollow" }, ++ { MNT_QUOTA, "with quotas" }, ++ { MNT_RDONLY, "read-only" }, ++ { MNT_SYNCHRONOUS, "synchronous" }, ++ { MNT_UNION, "union" }, ++ { MNT_NOCLUSTERR, "noclusterr" }, ++ { MNT_NOCLUSTERW, "noclusterw" }, ++ { MNT_SUIDDIR, "suiddir" }, ++ { MNT_SOFTDEP, "soft-updates" }, ++ { MNT_MULTILABEL, "multilabel" }, ++ { MNT_ACLS, "acls" }, ++#ifdef MNT_GJOURNAL ++ { MNT_GJOURNAL, "gjournal" }, ++#endif ++ { 0, NULL } ++}; ++#endif ++ + G_DEFINE_TYPE (GnomeMountPropertiesView, gm_properties_view, GTK_TYPE_VBOX) + + static void +@@ -445,13 +475,29 @@ static gboolean + mtab_next (gpointer handle, char **device_file, char **mount_options, char **mount_fstype) + { + #ifdef __FreeBSD__ +-#error FIXME TODO XXX fix this up for FreeBSD. Thanks. + struct mtab_handle *mtab = handle; + +- if (mtab->iter < mtab->n_mounts) +- return mtab->mounts[mtab->iter++].f_mntfromname; +- else +- return NULL; ++ if (mtab->iter < mtab->n_mounts) { ++ struct opt *o; ++ int flags; ++ GString *optstr; ++ ++ optstr = g_string_new(""); ++ flags = mtab->mounts[mtab->iter].f_flags & MNT_VISFLAGMASK; ++ ++ for (o = optnames; flags && o->o_opt; o++) { ++ if (flags & o->o_opt) { ++ g_string_append_printf(optstr, ", %s", o->o_name); ++ flags &= ~o->o_opt; ++ } ++ } ++ *device_file = mtab->mounts[mtab->iter].f_mntfromname; ++ *mount_options = g_string_free(optstr, FALSE); ++ *mount_fstype = mtab->mounts[mtab->iter++].f_fstypename; ++ return TRUE; ++ } else { ++ return FALSE; ++ } + #else + struct mntent *mnt; + diff --git a/sysutils/gnome-mount/files/patch-src_gnome-mount-properties.c b/sysutils/gnome-mount/files/patch-src_gnome-mount-properties.c index ad32f4a52a73..1f36b1259710 100644 --- a/sysutils/gnome-mount/files/patch-src_gnome-mount-properties.c +++ b/sysutils/gnome-mount/files/patch-src_gnome-mount-properties.c @@ -1,5 +1,5 @@ ---- src/gnome-mount-properties.c.orig Sun Dec 3 02:25:59 2006 -+++ src/gnome-mount-properties.c Sun Dec 3 02:30:25 2006 +--- src/gnome-mount-properties.c.orig Sun Dec 3 02:38:14 2006 ++++ src/gnome-mount-properties.c Sun Dec 3 02:39:27 2006 @@ -27,6 +27,8 @@ #include <libhal.h> #include <libhal-storage.h> diff --git a/sysutils/gnome-mount/files/patch-src_gnome-mount.c b/sysutils/gnome-mount/files/patch-src_gnome-mount.c index eb78bab377f5..19de73ccd87b 100644 --- a/sysutils/gnome-mount/files/patch-src_gnome-mount.c +++ b/sysutils/gnome-mount/files/patch-src_gnome-mount.c @@ -1,29 +1,118 @@ ---- src/gnome-mount.c.orig Mon Sep 4 21:41:09 2006 -+++ src/gnome-mount.c Mon Sep 4 21:45:53 2006 -@@ -42,7 +42,7 @@ +--- src/gnome-mount.c.orig Sun Sep 17 01:17:54 2006 ++++ src/gnome-mount.c Sun Feb 11 01:03:16 2007 +@@ -51,9 +51,14 @@ #include <libhal.h> #include <libhal-storage.h> --#include <mntent.h> -+#include "mntent.h" +-#ifndef sun ++#if !defined(sun) && !defined(__FreeBSD__) + #include <mntent.h> +-#else ++#elif defined(__FreeBSD__) ++#include <fstab.h> ++#include <sys/param.h> ++#include <sys/ucred.h> ++#include <sys/mount.h> ++#elif defined(sun) + #include <sys/mnttab.h> + #endif - static DBusConnection *dbus_connection; - static LibHalContext *hal_ctx; -@@ -477,7 +477,7 @@ +@@ -380,7 +385,7 @@ show_error_dialog_mount (LibHalVolume *v + } else if (strcmp (error_name, "org.freedesktop.Hal.Device.Volume.AlreadyMounted") == 0) { - mount_point = NULL; - device_file = get_dev_file (volume, drive); -- -+#ifdef __linux__ - if (device_file != NULL) { - FILE *f; - struct mntent mnt; -@@ -497,7 +497,7 @@ - endmntent (f); - } + /* don't show any dialog for this */ +- gtk_widget_unref (w); ++ gtk_widget_destroy (w); + w = NULL; + + #if 0 +@@ -399,7 +404,7 @@ show_error_dialog_mount (LibHalVolume *v + * + * Don't show any dialog for this. + */ +- gtk_widget_unref (w); ++ gtk_widget_destroy (w); + w = NULL; + + } else { +@@ -582,19 +587,24 @@ static char * + get_mntent_mount_point(const char *device_file) + { + char *mount_point; ++#if! defined(sun) && !defined(__FreeBSD__) + FILE *f; +-#ifndef sun + struct mntent mnt; + struct mntent *mnte; + char buf[512]; +-#else ++#elif defined(__FreeBSD__) ++ struct statfs *mounts; ++ int n_mounts; ++ int i; ++#elif defined(sun) ++ FILE *f; + struct mnttab mnt; + struct mnttab mpref = { NULL, NULL, NULL, NULL, NULL }; + #endif + + mount_point = NULL; + +-#ifndef sun ++#if !defined(sun) && !defined(__FreeBSD__) + if ((f = setmntent ("/proc/mounts", "r")) != NULL) { + + while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) { +@@ -608,7 +618,7 @@ get_mntent_mount_point(const char *devic + endmntent (f); + } + +-#else /* sun */ ++#elif defined(sun) /* sun */ + + if ((f = fopen(MNTTAB, "r")) != NULL) { + mpref.mnt_special = (char *)device_file; +@@ -617,8 +627,13 @@ get_mntent_mount_point(const char *devic } + fclose(f); + } - +-#endif /* sun */ ++#elif defined(__FreeBSD__) ++ n_mounts = getmntinfo(&mounts, MNT_NOWAIT); ++ for (i = 0; i < n_mounts; i++) { ++ if (!strcmp(mounts[i].f_mntfromname, device_file)) ++ mount_point = g_strdup (mounts[i].f_mntonname); ++ } ++#endif /* sun && __FreeBSD__ */ + + out: + return (mount_point); +@@ -1322,7 +1337,11 @@ volume_mount (const char *udi, LibHalVol + if (volume == NULL && (mount_options->len == 0)) { + /* volume from a non-pollable drive, just set uid.. */ + ++#ifndef __FreeBSD__ + snprintf (uidbuf, sizeof (uidbuf) - 1, "uid=%u", getuid ()); ++#else ++ snprintf (uidbuf, sizeof (uidbuf) - 1, "-u=%u", getuid ()); +#endif - g_print (_("Mounted %s at \"%s\"\n"), device_file, mount_point); - g_free (mount_point); - } + g_ptr_array_add (mount_options, uidbuf); + + } else if (((fstype_override != NULL) || (fstype != NULL)) && (mount_options->len == 0)) { +@@ -1349,9 +1368,15 @@ volume_mount (const char *udi, LibHalVol + g_debug ("read default option '%s' from gconf strlist key %s", option, key); + + /* special workaround to replace "uid=" with "uid=<actual uid of caller>" */ ++#ifndef __FreeBSD__ + if (strcmp (option, "uid=") == 0) { + g_free (option); + option = g_strdup_printf ("uid=%u", getuid ()); ++#else ++ if (strcmp (option, "-u=") == 0) { ++ g_free (option); ++ option = g_strdup_printf ("-u=%u", getuid ()); ++#endif + } + g_ptr_array_add (mount_options, option); + diff --git a/sysutils/gnome-mount/pkg-plist b/sysutils/gnome-mount/pkg-plist index 0ae3f4092a0a..685e8a43929e 100644 --- a/sysutils/gnome-mount/pkg-plist +++ b/sysutils/gnome-mount/pkg-plist @@ -6,7 +6,13 @@ lib/nautilus/extensions-1.0/libgnome-mount.la lib/nautilus/extensions-1.0/libgnome-mount.so libdata/pkgconfig/gnome-mount.pc share/gnome/gnome-mount/gnome-mount-properties.glade +share/locale/en_GB/LC_MESSAGES/gnome-mount.mo +share/locale/es/LC_MESSAGES/gnome-mount.mo share/locale/it/LC_MESSAGES/gnome-mount.mo share/locale/ja/LC_MESSAGES/gnome-mount.mo +share/locale/mk/LC_MESSAGES/gnome-mount.mo share/locale/nb/LC_MESSAGES/gnome-mount.mo +share/locale/ru/LC_MESSAGES/gnome-mount.mo +share/locale/sv/LC_MESSAGES/gnome-mount.mo +share/locale/vi/LC_MESSAGES/gnome-mount.mo @dirrm share/gnome/gnome-mount |