summaryrefslogtreecommitdiffstats
path: root/sysutils/nautilus-cd-burner
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2006-11-19 19:07:16 +0000
committermarcus <marcus@FreeBSD.org>2006-11-19 19:07:16 +0000
commit423bb2a1b8e4adc29891c06cba61effd658b1b56 (patch)
tree3e1800b422a0625aef3cf19ebdf72da37e18e421 /sysutils/nautilus-cd-burner
parente800acde5e63e97c2e6f45b12601b079f2e23974 (diff)
downloadFreeBSD-ports-423bb2a1b8e4adc29891c06cba61effd658b1b56.zip
FreeBSD-ports-423bb2a1b8e4adc29891c06cba61effd658b1b56.tar.gz
To fix other applications that make use of n-c-b (e.g. sound-juicer)
break out the x,x,x device notation needed for tools like cdrecord from the standard /dev/X device name specification. While here, add a RUN_DEPENDS on cdrdao which is needed for some of n-c-b's features.
Diffstat (limited to 'sysutils/nautilus-cd-burner')
-rw-r--r--sysutils/nautilus-cd-burner/Makefile4
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_list_cddrives.c10
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_make-iso.c38
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-monitor.c22
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-private.h10
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-selection.c29
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.c51
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.h10
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-recorder.c60
-rw-r--r--sysutils/nautilus-cd-burner/files/patch-src_nautilus-cd-burner.c13
10 files changed, 233 insertions, 14 deletions
diff --git a/sysutils/nautilus-cd-burner/Makefile b/sysutils/nautilus-cd-burner/Makefile
index fa040f0..ec1aefb 100644
--- a/sysutils/nautilus-cd-burner/Makefile
+++ b/sysutils/nautilus-cd-burner/Makefile
@@ -8,7 +8,7 @@
PORTNAME= nautilus-cd-burner
PORTVERSION= 2.16.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
@@ -17,6 +17,8 @@ DIST_SUBDIR= gnome2
MAINTAINER= gnome@FreeBSD.org
COMMENT= CD burner view for Nautilus
+RUN_DEPENDS= cdrdao:${PORTSDIR}/sysutils/cdrdao
+
USE_BZIP2= yes
USE_GETTEXT= yes
USE_XLIB= yes
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_list_cddrives.c b/sysutils/nautilus-cd-burner/files/patch-src_list_cddrives.c
new file mode 100644
index 0000000..7b228d4
--- /dev/null
+++ b/sysutils/nautilus-cd-burner/files/patch-src_list_cddrives.c
@@ -0,0 +1,10 @@
+--- src/list_cddrives.c.orig Sun Nov 19 13:36:40 2006
++++ src/list_cddrives.c Sun Nov 19 13:37:08 2006
+@@ -49,6 +49,7 @@ list_drive_info (NautilusBurnDrive *driv
+ g_print ("Drive:\n");
+ g_print (" name:\t\t\t%s\n", display_name);
+ g_print (" device:\t\t%s\n", nautilus_burn_drive_get_device (drive));
++ g_print (" cdrecord device:\t%s\n", nautilus_burn_drive_get_cdrecord_device (drive));
+ g_print (" door:\t\t\t%s\n", door_is_open ? "open" : "closed");
+ g_print (" type:\t\t\t%s\n", type_str);
+ g_print (" is mounted:\t\t%s\n", is_mounted ? "TRUE" : "FALSE");
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_make-iso.c b/sysutils/nautilus-cd-burner/files/patch-src_make-iso.c
new file mode 100644
index 0000000..f3fa05c
--- /dev/null
+++ b/sysutils/nautilus-cd-burner/files/patch-src_make-iso.c
@@ -0,0 +1,38 @@
+--- src/make-iso.c.orig Sun Nov 19 13:34:29 2006
++++ src/make-iso.c Sun Nov 19 13:36:03 2006
+@@ -1367,7 +1367,7 @@ get_disc_info (NautilusBurnIso *iso,
+ &has_data,
+ &_has_audio);
+ if (_has_audio) {
+- device_arg = g_strdup_printf ("%s", nautilus_burn_drive_get_device (drive));
++ device_arg = g_strdup_printf ("%s", nautilus_burn_drive_get_cdrecord_device (drive));
+
+ argv = g_ptr_array_new ();
+ g_ptr_array_add (argv, "cdrdao");
+@@ -1377,7 +1377,7 @@ get_disc_info (NautilusBurnIso *iso,
+ g_ptr_array_add (argv, NULL);
+
+ } else {
+- device_arg = g_strdup_printf ("-dev=%s", nautilus_burn_drive_get_device (drive));
++ device_arg = g_strdup_printf ("-dev=%s", nautilus_burn_drive_get_cdrecord_device (drive));
+
+ argv = g_ptr_array_new ();
+ g_ptr_array_add (argv, "readcd");
+@@ -1547,7 +1547,7 @@ nautilus_burn_iso_make_from_drive (Nauti
+ g_ptr_array_add (argv, "--datafile");
+ g_ptr_array_add (argv, (char *)filename);
+ g_ptr_array_add (argv, "--device");
+- g_ptr_array_add (argv, (char *)nautilus_burn_drive_get_device (drive));
++ g_ptr_array_add (argv, (char *)nautilus_burn_drive_get_cdrecord_device (drive));
+ g_ptr_array_add (argv, "-v");
+ g_ptr_array_add (argv, "2");
+ g_ptr_array_add (argv, (char *)toc_filename_arg);
+@@ -1559,7 +1559,7 @@ nautilus_burn_iso_make_from_drive (Nauti
+
+ filename_arg = g_strdup_printf ("f=%s", filename);
+
+- dev_arg = g_strdup_printf ("dev=%s", nautilus_burn_drive_get_device (drive));
++ dev_arg = g_strdup_printf ("dev=%s", nautilus_burn_drive_get_cdrecord_device (drive));
+
+ argv = g_ptr_array_new ();
+ g_ptr_array_add (argv, "readcd");
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-monitor.c b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-monitor.c
index 9ae3889..7027882 100644
--- a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-monitor.c
+++ b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-monitor.c
@@ -1,30 +1,38 @@
---- src/nautilus-burn-drive-monitor.c.orig Thu Nov 2 12:56:50 2006
-+++ src/nautilus-burn-drive-monitor.c Thu Nov 2 12:56:21 2006
-@@ -683,6 +683,7 @@ hal_drive_from_udi (LibHalContext *ctx,
+--- src/nautilus-burn-drive-monitor.c.orig Fri Sep 29 14:18:23 2006
++++ src/nautilus-burn-drive-monitor.c Sun Nov 19 13:28:16 2006
+@@ -683,6 +683,8 @@ hal_drive_from_udi (LibHalContext *ctx,
NautilusBurnDrive *drive;
char **write_speeds = NULL;
char *raw_device = NULL;
+ char *cam_path = NULL;
++ char *cam_device = NULL;
LIBHAL_CHECK_LIBHALCONTEXT (ctx, FALSE);
-@@ -711,6 +712,7 @@ hal_drive_from_udi (LibHalContext *ctx,
+@@ -711,6 +713,8 @@ hal_drive_from_udi (LibHalContext *ctx,
LIBHAL_PROP_EXTRACT_STRING ("block.device", drive->priv->device);
LIBHAL_PROP_EXTRACT_STRING ("block.solaris.raw_device", raw_device);
++ LIBHAL_PROP_EXTRACT_STRING ("block.freebsd.atapi_cam_device", cam_device);
+ LIBHAL_PROP_EXTRACT_STRING ("block.freebsd.cam_path", cam_path);
LIBHAL_PROP_EXTRACT_STRING ("storage.model", drive->priv->display_name);
LIBHAL_PROP_EXTRACT_INT ("storage.cdrom.read_speed", drive->priv->max_speed_read);
-@@ -734,6 +736,11 @@ hal_drive_from_udi (LibHalContext *ctx,
+@@ -734,6 +738,17 @@ hal_drive_from_udi (LibHalContext *ctx,
if (raw_device != NULL) {
g_free (drive->priv->device);
drive->priv->device = raw_device;
+ }
+
-+ if (cam_path != NULL) {
++ if (cam_device != NULL) {
+ g_free (drive->priv->device);
-+ drive->priv->device = cam_path;
++ drive->priv->device = cam_device;
++ }
++
++ if (cam_path != NULL) {
++ drive->priv->cdrecord_device = cam_path;
++ } else {
++ drive->priv->cdrecord_device = g_strdup (drive->priv->device);
}
drive->priv->drive_udi = g_strdup (udi);
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-private.h b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-private.h
new file mode 100644
index 0000000..f70c5d4a
--- /dev/null
+++ b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-private.h
@@ -0,0 +1,10 @@
+--- src/nautilus-burn-drive-private.h.orig Sun Nov 19 13:43:24 2006
++++ src/nautilus-burn-drive-private.h Sun Nov 19 13:43:50 2006
+@@ -34,6 +34,7 @@ struct NautilusBurnDrivePrivate {
+
+ int type;
+ char *device;
++ char *cdrecord_device;
+ char *display_name;
+ int max_speed_write;
+ int max_speed_read;
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-selection.c b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-selection.c
new file mode 100644
index 0000000..0210c9f
--- /dev/null
+++ b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive-selection.c
@@ -0,0 +1,29 @@
+--- src/nautilus-burn-drive-selection.c.orig Sun Nov 19 13:39:17 2006
++++ src/nautilus-burn-drive-selection.c Sun Nov 19 13:39:30 2006
+@@ -151,7 +151,7 @@ nautilus_burn_drive_selection_set_drive_
+ 0, drive);
+ g_signal_emit (G_OBJECT (selection),
+ nautilus_burn_drive_selection_table_signals [DEVICE_CHANGED],
+- 0, nautilus_burn_drive_get_device (drive));
++ 0, nautilus_burn_drive_get_cdrecord_device (drive));
+
+ g_object_notify (G_OBJECT (selection), "device");
+ g_object_notify (G_OBJECT (selection), "drive");
+@@ -584,7 +584,7 @@ nautilus_burn_drive_selection_get_defaul
+ if (drives == NULL) {
+ device = "/dev/cdrom";
+ } else {
+- device = nautilus_burn_drive_get_device (drives->data);
++ device = nautilus_burn_drive_get_cdrecord_device (drives->data);
+ g_list_foreach (drives, (GFunc)nautilus_burn_drive_unref, NULL);
+ g_list_free (drives);
+ }
+@@ -633,7 +633,7 @@ nautilus_burn_drive_selection_get_device
+ g_return_val_if_fail (selection != NULL, NULL);
+ g_return_val_if_fail (NAUTILUS_BURN_IS_DRIVE_SELECTION (selection), NULL);
+
+- return selection->priv->selected_drive != NULL ? nautilus_burn_drive_get_device (selection->priv->selected_drive) : NULL;
++ return selection->priv->selected_drive != NULL ? nautilus_burn_drive_get_cdrecord_device (selection->priv->selected_drive) : NULL;
+ }
+
+ /**
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.c b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.c
index 9d3ce89..cb0cd12 100644
--- a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.c
+++ b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.c
@@ -1,6 +1,32 @@
---- src/nautilus-burn-drive.c.orig Thu Jul 13 22:51:49 2006
-+++ src/nautilus-burn-drive.c Thu Jul 13 22:52:25 2006
-@@ -806,7 +806,11 @@ nautilus_burn_drive_eject (NautilusBurnD
+--- src/nautilus-burn-drive.c.orig Fri Sep 29 12:55:36 2006
++++ src/nautilus-burn-drive.c Sun Nov 19 13:27:31 2006
+@@ -266,6 +266,25 @@ nautilus_burn_drive_get_device (Nautilus
+ }
+
+ /**
++ * nautilus_burn_drive_get_cdrecord_device:
++ * @drive: #NautilusBurnDrive
++ *
++ * Get the name of the device associated with the drive suitable for
++ * user with cdrcord.
++ *
++ * Returns: device name. Must be not be freed.
++ *
++ * Since: 2.16
++ **/
++const char *
++nautilus_burn_drive_get_cdrecord_device (NautilusBurnDrive *drive)
++{
++ g_return_val_if_fail (drive != NULL, NULL);
++
++ return drive->priv->cdrecord_device;
++}
++
++/**
+ * nautilus_burn_drive_get_drive_type:
+ * @drive: #NautilusBurnDrive
+ *
+@@ -808,8 +827,12 @@ nautilus_burn_drive_eject (NautilusBurnD
#ifdef USE_GNOME_MOUNT
cmd = g_strdup_printf ("gnome-mount --eject --no-ui --device=%s", drive->priv->device);
#else
@@ -8,7 +34,24 @@
+ cmd = g_strdup_printf ("cdcontrol -f %s eject", drive->priv->device);
+#else
cmd = g_strdup_printf ("eject %s", drive->priv->device);
-+#endif
#endif
++#endif
res = g_spawn_command_line_sync (cmd, NULL, NULL, NULL, NULL);
+ g_free (cmd);
+@@ -1021,6 +1044,7 @@ nautilus_burn_drive_finalize (GObject *o
+ g_free (drive->priv->write_speeds);
+ g_free (drive->priv->display_name);
+ g_free (drive->priv->device);
++ g_free (drive->priv->cdrecord_device);
+
+ if (G_OBJECT_CLASS (nautilus_burn_drive_parent_class)->finalize != NULL) {
+ (* G_OBJECT_CLASS (nautilus_burn_drive_parent_class)->finalize) (object);
+@@ -1038,6 +1062,7 @@ nautilus_burn_drive_init (NautilusBurnDr
+ drive->priv->max_speed_read = 0;
+ drive->priv->write_speeds = NULL;
+ drive->priv->device = NULL;
++ drive->priv->cdrecord_device = NULL;
+ }
+
+ /**
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.h b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.h
new file mode 100644
index 0000000..034d495
--- /dev/null
+++ b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-drive.h
@@ -0,0 +1,10 @@
+--- src/nautilus-burn-drive.h.orig Sun Nov 19 13:37:32 2006
++++ src/nautilus-burn-drive.h Sun Nov 19 13:37:55 2006
+@@ -127,6 +127,7 @@ gboolean nautilus_burn_driv
+ int nautilus_burn_drive_get_drive_type (NautilusBurnDrive *drive);
+ char * nautilus_burn_drive_get_name_for_display (NautilusBurnDrive *drive);
+ const char * nautilus_burn_drive_get_device (NautilusBurnDrive *drive);
++const char * nautilus_burn_drive_get_cdrecord_device (NautilusBurnDrive *drive);
+
+ /* Capabilities */
+ gboolean nautilus_burn_drive_can_write (NautilusBurnDrive *drive);
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-recorder.c b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-recorder.c
new file mode 100644
index 0000000..6d811ff
--- /dev/null
+++ b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-burn-recorder.c
@@ -0,0 +1,60 @@
+--- src/nautilus-burn-recorder.c.orig Sun Nov 19 13:39:57 2006
++++ src/nautilus-burn-recorder.c Sun Nov 19 13:40:58 2006
+@@ -1153,10 +1153,10 @@ nautilus_burn_recorder_write_growisofs (
+
+ dev_str = NULL;
+ if (t->type == NAUTILUS_BURN_RECORDER_TRACK_TYPE_DATA) {
+- dev_str = g_strdup_printf ("%s=%s", nautilus_burn_drive_get_device (drive), t->contents.data.filename);
++ dev_str = g_strdup_printf ("%s=%s", nautilus_burn_drive_get_cdrecord_device (drive), t->contents.data.filename);
+ g_ptr_array_add (argv, dev_str);
+ } else {
+- g_ptr_array_add (argv, (char *)nautilus_burn_drive_get_device (drive));
++ g_ptr_array_add (argv, (char *)nautilus_burn_drive_get_cdrecord_device (drive));
+
+ /* mkisofs options */
+ if (ncb_mkisofs_supports_utf8 ()) {
+@@ -1343,7 +1343,7 @@ nautilus_burn_recorder_write_cdrecord (N
+ g_ptr_array_add (argv, "cdrdao");
+ g_ptr_array_add (argv, "write");
+ g_ptr_array_add (argv, "--device");
+- g_ptr_array_add (argv, (char *)nautilus_burn_drive_get_device (drive));
++ g_ptr_array_add (argv, (char *)nautilus_burn_drive_get_cdrecord_device (drive));
+ g_ptr_array_add (argv, "--speed");
+ speed_str = g_strdup_printf ("%d", speed);
+ g_ptr_array_add (argv, speed_str);
+@@ -1375,7 +1375,7 @@ nautilus_burn_recorder_write_cdrecord (N
+ if (speed != 0) {
+ g_ptr_array_add (argv, speed_str);
+ }
+- dev_str = g_strdup_printf ("dev=%s", nautilus_burn_drive_get_device (drive));
++ dev_str = g_strdup_printf ("dev=%s", nautilus_burn_drive_get_cdrecord_device (drive));
+ g_ptr_array_add (argv, dev_str);
+ if (flags & NAUTILUS_BURN_RECORDER_WRITE_DUMMY_WRITE) {
+ g_ptr_array_add (argv, "-dummy");
+@@ -1486,7 +1486,7 @@ nautilus_burn_recorder_blank_disc_cdreco
+ argv = g_ptr_array_new ();
+ g_ptr_array_add (argv, "cdrecord");
+
+- dev_str = g_strdup_printf ("dev=%s", nautilus_burn_drive_get_device (drive));
++ dev_str = g_strdup_printf ("dev=%s", nautilus_burn_drive_get_cdrecord_device (drive));
+ g_ptr_array_add (argv, dev_str);
+ g_ptr_array_add (argv, "-v");
+
+@@ -1560,7 +1560,7 @@ nautilus_burn_recorder_blank_disc_dvdrw_
+ g_ptr_array_add (argv, "growisofs");
+ g_ptr_array_add (argv, "-Z");
+
+- dev_str = g_strdup_printf ("%s=%s", nautilus_burn_drive_get_device (drive), "/dev/zero");
++ dev_str = g_strdup_printf ("%s=%s", nautilus_burn_drive_get_cdrecord_device (drive), "/dev/zero");
+ g_ptr_array_add (argv, dev_str);
+ g_ptr_array_add (argv, NULL);
+
+@@ -1583,7 +1583,7 @@ nautilus_burn_recorder_blank_disc_dvdrw_
+ g_ptr_array_add (argv, blank_str);
+ }
+
+- dev_str = g_strdup_printf ("%s", nautilus_burn_drive_get_device (drive));
++ dev_str = g_strdup_printf ("%s", nautilus_burn_drive_get_cdrecord_device (drive));
+ g_ptr_array_add (argv, dev_str);
+ g_ptr_array_add (argv, NULL);
+
diff --git a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-cd-burner.c b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-cd-burner.c
index 3d5585e..9f729b8 100644
--- a/sysutils/nautilus-cd-burner/files/patch-src_nautilus-cd-burner.c
+++ b/sysutils/nautilus-cd-burner/files/patch-src_nautilus-cd-burner.c
@@ -1,5 +1,5 @@
---- src/nautilus-cd-burner.c.orig Tue May 9 13:31:13 2006
-+++ src/nautilus-cd-burner.c Mon May 15 21:11:00 2006
+--- src/nautilus-cd-burner.c.orig Fri Jul 14 10:20:19 2006
++++ src/nautilus-cd-burner.c Sun Nov 19 13:41:34 2006
@@ -27,6 +27,8 @@
#include "config.h"
@@ -9,3 +9,12 @@
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
+@@ -246,7 +248,7 @@ selection_dialog_response (GtkWidget *di
+ /* save selections */
+ gconf_client = gconf_client_get_default ();
+ gconf_client_set_int (gconf_client, "/apps/nautilus-cd-burner/default_speed", speed, NULL);
+- gconf_save_device (gconf_client, nautilus_burn_drive_get_device (drive));
++ gconf_save_device (gconf_client, nautilus_burn_drive_get_cdrecord_device (drive));
+ g_object_unref (gconf_client);
+
+ operation = ncb_operation_new ();
OpenPOWER on IntegriCloud