From 0c85ae9db53ee0e5862df1af56aea1c990134264 Mon Sep 17 00:00:00 2001 From: marcus Date: Sun, 13 Apr 2003 05:52:26 +0000 Subject: Add nautilus2. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@626 df743ca5-7f9a-e211-a948-0013205c9059 --- x11-fm/nautilus/files/patch-Makefile.in | 10 + x11-fm/nautilus/files/patch-aa | 68 ++++++ .../nautilus/files/patch-data_static_bookmarks.xml | 84 +++++++ .../nautilus/files/patch-libbackground_Makefile.in | 11 + ...bnautilus-extensions::nautilus-medusa-support.c | 14 ++ ...-libnautilus-private::nautilus-volume-monitor.c | 269 +++++++++++++++++++++ ...h-libnautilus-private_filesystem-attributes.xml | 31 +++ ...tch-libnautilus-private_nautilus-emblem-utils.c | 10 + 8 files changed, 497 insertions(+) create mode 100644 x11-fm/nautilus/files/patch-Makefile.in create mode 100644 x11-fm/nautilus/files/patch-aa create mode 100644 x11-fm/nautilus/files/patch-data_static_bookmarks.xml create mode 100644 x11-fm/nautilus/files/patch-libbackground_Makefile.in create mode 100644 x11-fm/nautilus/files/patch-libnautilus-extensions::nautilus-medusa-support.c create mode 100644 x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c create mode 100644 x11-fm/nautilus/files/patch-libnautilus-private_filesystem-attributes.xml create mode 100644 x11-fm/nautilus/files/patch-libnautilus-private_nautilus-emblem-utils.c (limited to 'x11-fm/nautilus/files') diff --git a/x11-fm/nautilus/files/patch-Makefile.in b/x11-fm/nautilus/files/patch-Makefile.in new file mode 100644 index 000000000..7fe0bcd6e --- /dev/null +++ b/x11-fm/nautilus/files/patch-Makefile.in @@ -0,0 +1,10 @@ +--- Makefile.in.orig Tue Jan 7 12:28:34 2003 ++++ Makefile.in Tue Jan 7 12:29:48 2003 +@@ -153,7 +153,6 @@ + libnautilus-private \ + libnautilus-adapter \ + src \ +- test \ + components \ + po \ + data \ diff --git a/x11-fm/nautilus/files/patch-aa b/x11-fm/nautilus/files/patch-aa new file mode 100644 index 000000000..bff0e4a65 --- /dev/null +++ b/x11-fm/nautilus/files/patch-aa @@ -0,0 +1,68 @@ +--- configure.orig Mon Jan 13 10:45:25 2003 ++++ configure Tue Jan 14 13:11:53 2003 +@@ -8294,6 +8294,7 @@ + + # This can be used to rebuild libtool when needed + LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" ++$ac_aux_dir/ltconfig $LIBTOOL_DEPS + + # Always use our own libtool. + LIBTOOL='$(SHELL) $(top_builddir)/libtool' +@@ -12661,7 +12662,7 @@ + + LIBNAUTILUS_LIBS="`$PKG_CONFIG --libs $LIBNAUTILUS_MODULES`" + +-LIBNAUTILUS_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $LIBNAUTILUS_MODULES | $srcdir/add-include-prefix`" ++LIBNAUTILUS_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $LIBNAUTILUS_MODULES | xargs -n1 echo -n ' -I '`" + + + CORE_MODULES="eel-2.0 librsvg-2.0 bonobo-activation-2.0 libbonobo-2.0 libbonoboui-2.0 esound gnome-desktop-2.0 $EXTRA_CORE_MODULES" +@@ -12669,7 +12670,7 @@ + + CORE_LIBS="`$PKG_CONFIG --libs $CORE_MODULES` $CDDA_LIBS $LIBJPEG $x_libs" + +-CORE_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $CORE_MODULES | $srcdir/add-include-prefix`" ++CORE_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $CORE_MODULES | xargs -n1 echo -n ' -I '`" + + + COMPONENT_MODULES="eel-2.0 libbonoboui-2.0 gnome-vfs-module-2.0 gnome-desktop-2.0" +@@ -13593,7 +13594,7 @@ + s,@LIBTOOL@,$LIBTOOL,;t t + s,@PKG_CONFIG@,$PKG_CONFIG,;t t + s,@ALL_CFLAGS@,$ALL_CFLAGS,;t t +-s,@ALL_LIBS@,$ALL_LIBS,;t t ++s~@ALL_LIBS@~$ALL_LIBS~;t t + s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t + s,@ALLOCA@,$ALLOCA,;t t + s,@USE_NLS@,$USE_NLS,;t t +@@ -13643,25 +13644,25 @@ + s,@HAVE_JW_FALSE@,$HAVE_JW_FALSE,;t t + s,@HAVE_JW@,$HAVE_JW,;t t + s,@MEDUSA_CFLAGS@,$MEDUSA_CFLAGS,;t t +-s,@MEDUSA_LIBS@,$MEDUSA_LIBS,;t t ++s~@MEDUSA_LIBS@~$MEDUSA_LIBS~;t t + s,@LIBJPEG@,$LIBJPEG,;t t + s,@GIMPHWRAPBOX_CFLAGS@,$GIMPHWRAPBOX_CFLAGS,;t t + s,@LIBEGG_CFLAGS@,$LIBEGG_CFLAGS,;t t + s,@LIBNAUTILUS_CFLAGS@,$LIBNAUTILUS_CFLAGS,;t t +-s,@LIBNAUTILUS_LIBS@,$LIBNAUTILUS_LIBS,;t t ++s~@LIBNAUTILUS_LIBS@~$LIBNAUTILUS_LIBS~;t t + s,@LIBNAUTILUS_IDL_INCLUDES@,$LIBNAUTILUS_IDL_INCLUDES,;t t + s,@CORE_CFLAGS@,$CORE_CFLAGS,;t t +-s,@CORE_LIBS@,$CORE_LIBS,;t t ++s~@CORE_LIBS@~$CORE_LIBS~;t t + s,@CORE_IDL_INCLUDES@,$CORE_IDL_INCLUDES,;t t + s,@COMPONENT_CFLAGS@,$COMPONENT_CFLAGS,;t t +-s,@COMPONENT_LIBS@,$COMPONENT_LIBS,;t t ++s~@COMPONENT_LIBS@~$COMPONENT_LIBS~;t t + s,@EMBLEM_COMPONENT_CFLAGS@,$EMBLEM_COMPONENT_CFLAGS,;t t + s,@EMBLEM_COMPONENT_LIBS@,$EMBLEM_COMPONENT_LIBS,;t t + s,@DISABLE_DEPRECATED_CFLAGS@,$DISABLE_DEPRECATED_CFLAGS,;t t + s,@ENABLE_HARDWARE_VIEW_TRUE@,$ENABLE_HARDWARE_VIEW_TRUE,;t t + s,@ENABLE_HARDWARE_VIEW_FALSE@,$ENABLE_HARDWARE_VIEW_FALSE,;t t + s,@CAPPLET_CFLAGS@,$CAPPLET_CFLAGS,;t t +-s,@CAPPLET_LIBS@,$CAPPLET_LIBS,;t t ++s~@CAPPLET_LIBS@~$CAPPLET_LIBS~;t t + s,@GCONFTOOL@,$GCONFTOOL,;t t + s,@GCONF_SCHEMA_CONFIG_SOURCE@,$GCONF_SCHEMA_CONFIG_SOURCE,;t t + s,@GCONF_SCHEMA_FILE_DIR@,$GCONF_SCHEMA_FILE_DIR,;t t diff --git a/x11-fm/nautilus/files/patch-data_static_bookmarks.xml b/x11-fm/nautilus/files/patch-data_static_bookmarks.xml new file mode 100644 index 000000000..54ea8ae37 --- /dev/null +++ b/x11-fm/nautilus/files/patch-data_static_bookmarks.xml @@ -0,0 +1,84 @@ +--- data/static_bookmarks.xml.orig Wed Jun 5 22:58:43 2002 ++++ data/static_bookmarks.xml Wed Jun 5 23:30:11 2002 +@@ -1,54 +1,44 @@ + + + +- +- +- +- +- +- ++ ++ ++ ++ + + +- + + +- +- +- +- +- ++ ++ ++ ++ ++ ++ + + +- +- +- +- ++ ++ ++ + +- +- + + +- +- +- +- ++ ++ + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/x11-fm/nautilus/files/patch-libbackground_Makefile.in b/x11-fm/nautilus/files/patch-libbackground_Makefile.in new file mode 100644 index 000000000..835db3474 --- /dev/null +++ b/x11-fm/nautilus/files/patch-libbackground_Makefile.in @@ -0,0 +1,11 @@ +--- libbackground/Makefile.in.orig Tue Jan 7 12:30:18 2003 ++++ libbackground/Makefile.in Tue Jan 7 12:30:58 2003 +@@ -141,7 +141,7 @@ + + INCLUDES = \ + -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ +- -DGNOME_ICONDIR=\""${prefix}/share/pixmaps"\" \ ++ -DGNOME_ICONDIR=\""${datadir}/pixmaps"\" \ + -DG_LOG_DOMAIN=\"capplet-common\" \ + -I$(top_srcdir)/ \ + @CAPPLET_CFLAGS@ diff --git a/x11-fm/nautilus/files/patch-libnautilus-extensions::nautilus-medusa-support.c b/x11-fm/nautilus/files/patch-libnautilus-extensions::nautilus-medusa-support.c new file mode 100644 index 000000000..c71f18da7 --- /dev/null +++ b/x11-fm/nautilus/files/patch-libnautilus-extensions::nautilus-medusa-support.c @@ -0,0 +1,14 @@ + +$FreeBSD: ports/x11-fm/nautilus2/files/patch-libnautilus-extensions::nautilus-medusa-support.c,v 1.4 2003/02/07 18:42:18 marcus Exp $ + +--- libnautilus-private/nautilus-medusa-support.c.orig Wed Apr 11 21:36:16 2001 ++++ libnautilus-private/nautilus-medusa-support.c Mon May 14 17:45:24 2001 +@@ -84,7 +84,7 @@ + */ + status = NAUTILUS_CRON_STATUS_OFF; + +- stat_file_name = g_strdup_printf ("/proc/%d/stat", process_number); ++ stat_file_name = g_strdup_printf ("/proc/%d/status", process_number); + stat_file = fopen (stat_file_name, "r"); + g_free (stat_file_name); + diff --git a/x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c b/x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c new file mode 100644 index 000000000..bcf3479a9 --- /dev/null +++ b/x11-fm/nautilus/files/patch-libnautilus-private::nautilus-volume-monitor.c @@ -0,0 +1,269 @@ +--- libnautilus-private/nautilus-volume-monitor.c.orig Fri Feb 28 09:52:23 2003 ++++ libnautilus-private/nautilus-volume-monitor.c Mon Mar 10 18:13:57 2003 +@@ -59,6 +59,18 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#include ++#include ++ ++#define HAVE_GETMNTINFO ++#define HAVE_SETFSENT ++#define HAVE_FSTAB_H ++#define FREEBSD_MNT ++#define setmntent(f,m) setfsent() ++#endif ++ + #ifdef HAVE_SYS_VFSTAB_H + #include + #else +@@ -103,7 +115,7 @@ + #define MNTOPT_RO "ro" + #endif + +-#ifndef HAVE_SETMNTENT ++#if !defined(HAVE_SETMNTENT) && !defined(HAVE_SETFSENT) + #define setmntent(f,m) fopen(f,m) + #endif + +@@ -492,6 +504,9 @@ + static gboolean + has_removable_mntent_options (MountTableEntry *ent) + { ++#ifdef __FreeBSD__ ++ struct fstab *fsent; ++#endif + #ifdef HAVE_HASMNTOPT + /* Use "owner" or "user" or "users" as our way of determining a removable volume */ + if (hasmntopt (ent, "user") != NULL +@@ -501,6 +516,12 @@ + return TRUE; + } + #endif ++#ifdef __FreeBSD__ ++ fsent = getfsspec(ent->f_mntfromname); ++ if (fsent != NULL && strstr (fsent->fs_mntops, "noauto")) { ++ return TRUE; ++ } ++#endif + + #ifdef SOLARIS_MNT + if (eel_str_has_prefix (ent->mnt_special, "/vol/")) { +@@ -522,10 +543,15 @@ + static GList * + get_removable_volumes (NautilusVolumeMonitor *monitor) + { ++#ifndef HAVE_SETFSENT + FILE *file; +- GList *volumes; +- MountTableEntry *ent; +- NautilusVolume *volume; ++#else ++ int file; ++ struct fstab *fsent; ++#endif ++ GList *volumes = NULL; ++ MountTableEntry *ent = NULL; ++ NautilusVolume *volume = NULL; + char * fs_opt; + #ifdef HAVE_SYS_MNTTAB_H + MountTableEntry ent_storage; +@@ -533,26 +559,27 @@ + #ifdef HAVE_GETMNTINFO + int count, index; + #endif +- ent = NULL; +- volume = NULL; +- volumes = NULL; + + #ifdef HAVE_GETMNTINFO + count = getmntinfo (&ent, MNT_WAIT); + /* getmentinfo returns a pointer to static data. Do not free. */ + for (index = 0; index < count; index++) { +- if (has_removable_mntent_options (&ent[index])) { ++ if (has_removable_mntent_options (ent + index)) { + volume = create_volume (ent[index].f_mntfromname, + ent[index].f_mntonname); + volume->is_removable = TRUE; + volumes = finish_creating_volume_and_prepend +- (monitor, volume, ent[index].f_fstypename, volumes); ++ (monitor, volume, ent[index].f_fstypename, volumes); + } + } + #endif + + file = setmntent (MOUNT_TABLE_PATH, "r"); ++#ifndef HAVE_SETFSENT + if (file == NULL) { ++#else ++ if (file == 0) { ++#endif + return NULL; + } + +@@ -587,9 +614,21 @@ + (monitor, volume, ent->mnt_type, volumes); + } + } ++#elif defined (HAVE_SETFSENT) ++ while ((fsent = getfsent ()) != NULL) { ++ if (strstr (fsent->fs_mntops, "noauto") != NULL) { ++ volume = create_volume (fsent->fs_spec, fsent->fs_file); ++ volumes = finish_creating_volume_and_prepend ++ (monitor, volume, fsent->fs_vfstype, volumes); ++ } ++ } + #endif +- ++ ++#ifndef HAVE_SETFSENT + fclose (file); ++#else ++ endfsent(); ++#endif + + #ifdef HAVE_CDDA + volume = create_volume (CD_AUDIO_PATH, CD_AUDIO_PATH); +@@ -619,7 +658,7 @@ + return result; + } + +-#ifndef SOLARIS_MNT ++#if !defined(SOLARIS_MNT) && !defined(FREEBSD_MNT) + + static gboolean + volume_is_removable (const NautilusVolume *volume) +@@ -885,7 +924,7 @@ + char *command; + + if (path != NULL) { +- command = g_strdup_printf ("eject %s", path); ++ command = g_strdup_printf ("/usr/sbin/cdcontrol -f %s eject", path); + eel_gnome_shell_execute (command); + g_free (command); + } +@@ -963,23 +1002,34 @@ + + + +-#ifdef SOLARIS_MNT ++#if defined(SOLARIS_MNT) || defined(FREEBSD_MNT) + + static GList * + get_mount_list (NautilusVolumeMonitor *monitor) + { +- FILE *fh; + GList *volumes; ++#ifndef HAVE_SETFSENT + MountTableEntry ent; ++ FILE *fh; ++#else ++ MountTableEntry *ent; ++ int fh, index; ++#endif + NautilusVolume *volume; + + volumes = NULL; + ++#ifndef HAVE_SETFSENT + fh = setmntent (MOUNT_TABLE_PATH, "r"); + if (fh == NULL) { ++#else ++ fh = getmntinfo (&ent, MNT_WAIT); ++ if (fh == 0) { ++#endif + return NULL; + } + ++#ifndef HAVE_SETFSENT + while (! getmntent(fh, &ent)) { + volume = create_volume (ent.mnt_special, ent.mnt_mountp); + volume->is_removable = has_removable_mntent_options (&ent); +@@ -988,6 +1038,16 @@ + } + + fclose (fh); ++#else ++ /* getmentinfo returns a pointer to static data. Do not free. */ ++ for (index = 0; index < fh; index++) { ++ volume = create_volume (ent[index].f_mntfromname, ++ ent[index].f_mntonname); ++ volume->is_removable = has_removable_mntent_options (ent + index); ++ volumes = finish_creating_volume_and_prepend ++ (monitor, volume, ent[index].f_fstypename, volumes); ++ } ++#endif + + return volumes; + } +@@ -1214,9 +1274,38 @@ + static int + get_cdrom_type (const char *vol_dev_path, int* fd) + { +-#ifndef SOLARIS_MNT ++#if !defined(SOLARIS_MNT) && !defined(FREEBSD_MNT) + *fd = open (vol_dev_path, O_RDONLY|O_NONBLOCK); + return ioctl (*fd, CDROM_DISC_STATUS, CDSL_CURRENT); ++#elif defined(FREEBSD_MNT) ++ struct ioc_toc_header header; ++ struct ioc_read_toc_single_entry entry; ++ int type; ++ ++ *fd = open (vol_dev_path, O_RDONLY|O_NONBLOCK); ++ if (*fd < 0) { ++ return CDS_DATA_1; ++ } ++ ++ if ( ioctl(*fd, CDIOREADTOCHEADER, &header) == 0) { ++ return CDS_DATA_1; ++ } ++ ++ type = CDS_DATA_1; ++ ++ for (entry.track = header.starting_track; ++ entry.track <= header.ending_track; ++ entry.track++) { ++ entry.address_format = CD_LBA_FORMAT; ++ if (ioctl (*fd, CDIOREADTOCENTRY, &entry) == 0) { ++ if (entry.entry.control & CDROM_DATA_TRACK) { ++ type = CDS_AUDIO; ++ break; ++ } ++ } ++ } ++ ++ return type; + #else + GString *new_dev_path; + struct cdrom_tocentry entry; +@@ -1768,7 +1857,7 @@ + for (node = volume_list; node != NULL; node = node->next) { + volume = node->data; + +-#ifndef SOLARIS_MNT ++#if !defined(SOLARIS_MNT) && !defined(FREEBSD_MNT) + /* These are set up by get_current_mount_list for Solaris. */ + volume->is_removable = volume_is_removable (volume); + #endif +@@ -1797,7 +1886,7 @@ + ok = mount_volume_auto_add (volume); + } else if (strcmp (file_system_type_name, "cdda") == 0) { + ok = mount_volume_cdda_add (volume); +- } else if (strcmp (file_system_type_name, "iso9660") == 0) { ++ } else if (strcmp (file_system_type_name, "cd9660") == 0) { + ok = mount_volume_iso9660_add (volume); + } else if (strcmp (file_system_type_name, "nfs") == 0) { + ok = mount_volume_nfs_add (volume); +@@ -1835,8 +1924,8 @@ + } else if (eel_str_has_prefix (volume->device_path, "/dev/cdrom")) { + volume->device_type = NAUTILUS_DEVICE_CDROM_DRIVE; + volume->is_removable = TRUE; +- } else if (eel_str_has_prefix (volume->mount_path, "/mnt/")) { +- name = volume->mount_path + strlen ("/mnt/"); ++ } else if (eel_str_has_prefix (volume->mount_path, "/")) { ++ name = volume->mount_path + strlen ("/"); + + if (eel_str_has_prefix (name, "cdrom") + || eel_str_has_prefix (name, "burn")) { diff --git a/x11-fm/nautilus/files/patch-libnautilus-private_filesystem-attributes.xml b/x11-fm/nautilus/files/patch-libnautilus-private_filesystem-attributes.xml new file mode 100644 index 000000000..81e3a2a71 --- /dev/null +++ b/x11-fm/nautilus/files/patch-libnautilus-private_filesystem-attributes.xml @@ -0,0 +1,31 @@ +--- libnautilus-private/filesystem-attributes.xml.orig Sat Sep 14 16:56:38 2002 ++++ libnautilus-private/filesystem-attributes.xml Sat Sep 14 17:01:31 2002 +@@ -3,10 +3,12 @@ + + + ++ + + + + ++ + + + +@@ -15,10 +17,15 @@ + + + ++ ++ + + + ++ ++ + ++ + + + diff --git a/x11-fm/nautilus/files/patch-libnautilus-private_nautilus-emblem-utils.c b/x11-fm/nautilus/files/patch-libnautilus-private_nautilus-emblem-utils.c new file mode 100644 index 000000000..2d67d65e7 --- /dev/null +++ b/x11-fm/nautilus/files/patch-libnautilus-private_nautilus-emblem-utils.c @@ -0,0 +1,10 @@ +--- libnautilus-private/nautilus-emblem-utils.c.orig Mon Oct 14 22:20:28 2002 ++++ libnautilus-private/nautilus-emblem-utils.c Mon Oct 14 22:20:56 2002 +@@ -24,6 +24,7 @@ + + #include + ++#include + #include + #include + #include -- cgit v1.2.3