Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2002 01:49:46 +0200 (CEST)
From:      Arne H Juul <Arne.Juul@fast.no>
To:        freebsd-ports@freebsd.org
Cc:        gnome@freebsd.org
Message-ID:  <Pine.BSF.4.10.10204160131160.65059-100000@midten.fast.no>

next in thread | raw e-mail | index | archive | help
To get the Gnome CD player application (gtcd) to
play nicely on my FreeBSD 4.5 system and send
updates to freedb.org I had to make a couple of patches
to gnome-media-1.2.3.

The first i'm not completely sure of - it tried to access
/usr/X11R6/share/gnome/gnome/cddb-submit-methods instead
of /usr/X11R6/share/gnome/cddb-submit-methods but of course
the fix may be in the wrong place; I think it's needed
only because of the existing FreeBSD patches/configure
machinery that forces $(datadir) to /usr/X11R6/share/gnome
while the gnome files want to use $(datadir)/gnome instead.
So the "right" fix may be to configure with --datadir
/usr/X11R6/share and revert these FreeBSD specific patches
for all I know.

The second fix (make sure we have the device open to do the ioctl)
is copied from the similar linux case so I'm pretty sure it's right
(or at least, better than the previous version) so it doesn't read
the volume as 0 all the time.

diff gnome-media-1.2.3/cddbslave/cddbsubmit.c gnome-media-1.2.3.ahj/cddbslave/cddbsubmit.c
--- gnome-media-1.2.3/cddbslave/cddbsubmit.c	Mon Jun 11 19:50:45 2001
+++ gnome-media-1.2.3.ahj/cddbslave/cddbsubmit.c	Sat Apr 13 23:27:37 2002
@@ -210,7 +210,7 @@
   poptFreeContext(gnomelib_parse_args(argc, argv, 0));
 
   /* config prefix points to cddb submission description file */
-  fname = gnome_datadir_file("gnome/cddb-submit-methods");
+  fname = gnome_datadir_file("cddb-submit-methods");
   prefix = g_strconcat("=", fname, "=/", service, "/", NULL);
   g_free(fname);
   gnome_config_push_prefix(prefix);
diff gnome-media-1.2.3/tcd/gtracked.c gnome-media-1.2.3.ahj/tcd/gtracked.c
--- gnome-media-1.2.3/tcd/gtracked.c	Mon Apr 15 13:02:21 2002
+++ gnome-media-1.2.3.ahj/tcd/gtracked.c	Sat Apr 13 23:27:28 2002
@@ -397,7 +397,7 @@
     
     /* build service menu */
     service_menu = gtk_menu_new();
-    key = gnome_datadir_file("gnome/cddb-submit-methods");
+    key = gnome_datadir_file("cddb-submit-methods");
     prefix = g_strconcat("=", key, "=/", NULL);
     g_free(key);
 
diff gnome-media-1.2.3/tcd/linux-cdrom.c gnome-media-1.2.3.ahj/tcd/linux-cdrom.c
--- gnome-media-1.2.3/tcd/linux-cdrom.c	Mon Apr 15 13:02:21 2002
+++ gnome-media-1.2.3.ahj/tcd/linux-cdrom.c	Sun Apr 14 00:26:05 2002
@@ -472,8 +472,12 @@
 {
 #ifdef TCD_BSD
     struct ioc_vol vol;
+    int tmp;
 
-    if(ioctl(cd->cd_dev, CDIOCGETVOL, &vol) < 0)
+    tcd_opencddev( cd, NULL );
+    tmp = ioctl(cd->cd_dev, CDIOCGETVOL, &vol);
+    tcd_close_disc ( cd );
+    if (tmp < 0)
 	return -1;
 
     return vol.vol[0];

-- 
Arne H Juul                       Mail:  Arne.Juul@fast.no
System administrator              Web:   http://www.fast.no/
Fast Search & Transfer            Phone: +47 7120 1219
Sverresgate 15, 7013 Trondheim    Fax:   +47 7120 1201


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10204160131160.65059-100000>