aboutsummaryrefslogtreecommitdiff
path: root/audio/goobox
diff options
context:
space:
mode:
authorAlexander Nedotsukov <bland@FreeBSD.org>2004-11-11 03:43:35 +0000
committerAlexander Nedotsukov <bland@FreeBSD.org>2004-11-11 03:43:35 +0000
commita79be15e4ca0a6290385f89b1a6a7a80a4675957 (patch)
treeb1ffa8581875d61e3752a2bc2695866c214f13d9 /audio/goobox
parent95c9d0c92c2a43dc61f498826f78375912ce65b3 (diff)
downloadports-a79be15e4ca0a6290385f89b1a6a7a80a4675957.tar.gz
ports-a79be15e4ca0a6290385f89b1a6a7a80a4675957.zip
Notes
Diffstat (limited to 'audio/goobox')
-rw-r--r--audio/goobox/Makefile30
-rw-r--r--audio/goobox/distinfo2
-rw-r--r--audio/goobox/files/patch-src::Makefile.in11
-rw-r--r--audio/goobox/files/patch-src::cd-drive.c103
-rw-r--r--audio/goobox/files/patch-src::goo-cdrom-bsd.c136
-rw-r--r--audio/goobox/pkg-descr4
-rw-r--r--audio/goobox/pkg-plist11
7 files changed, 297 insertions, 0 deletions
diff --git a/audio/goobox/Makefile b/audio/goobox/Makefile
new file mode 100644
index 000000000000..d156668d6691
--- /dev/null
+++ b/audio/goobox/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: guikachu
+# Date created: 11 Nov 2004
+# Whom: Alexander Nedotsukov <bland@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= goobox
+PORTVERSION= 0.4.0
+CATEGORIES= audio gnome
+MASTER_SITES= ${MASTER_SITE_GNOME}
+MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:R}
+DIST_SUBDIR= gnome2
+
+MAINTAINER= gnome@FreeBSD.org
+COMMENT= CD player and ripper for GNOME Desktop environment
+
+RUN_DEPENDS= cddb-slave2-properties:${PORTSDIR}/audio/gnomemedia2
+
+USE_X_PREFIX= yes
+USE_GMAKE= yes
+USE_GNOME= gnomeprefix gnomehack intlhack libgnomeui libglade2 libbonobo \
+ gstreamerplugins
+USE_LIBTOOL_VER=15
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+
+GCONF_SCEMAS= goobox.schemas
+
+.include <bsd.port.mk>
diff --git a/audio/goobox/distinfo b/audio/goobox/distinfo
new file mode 100644
index 000000000000..f027f5cdb4d5
--- /dev/null
+++ b/audio/goobox/distinfo
@@ -0,0 +1,2 @@
+MD5 (gnome2/goobox-0.4.0.tar.gz) = 16cc4164d414ef7422b4380af490d244
+SIZE (gnome2/goobox-0.4.0.tar.gz) = 554167
diff --git a/audio/goobox/files/patch-src::Makefile.in b/audio/goobox/files/patch-src::Makefile.in
new file mode 100644
index 000000000000..c1b2ce97c067
--- /dev/null
+++ b/audio/goobox/files/patch-src::Makefile.in
@@ -0,0 +1,11 @@
+--- src/Makefile.in.orig Wed Nov 10 15:56:54 2004
++++ src/Makefile.in Wed Nov 10 15:59:13 2004
+@@ -344,7 +344,7 @@
+
+
+ goobox_LDADD = \
+- $(GOO_LIBS)
++ $(GOO_LIBS) -lcam
+
+
+ EXTRA_DIST = \
diff --git a/audio/goobox/files/patch-src::cd-drive.c b/audio/goobox/files/patch-src::cd-drive.c
new file mode 100644
index 000000000000..bc5de5272429
--- /dev/null
+++ b/audio/goobox/files/patch-src::cd-drive.c
@@ -0,0 +1,103 @@
+--- src/cd-drive.c.orig Tue Nov 9 22:28:01 2004
++++ src/cd-drive.c Wed Nov 10 23:02:08 2004
+@@ -578,7 +578,49 @@
+
+ #if defined(__linux__) || defined(__FreeBSD__)
+
++#if !defined(__linux__)
++static int
++get_device_max_read_speed (char *device)
++{
++ int fd;
++ int max_speed;
++ int read_speed, write_speed;
++
++ max_speed = -1;
++
++ fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK);
++ if (fd < 0) {
++ return -1;
++ }
++
++ get_read_write_speed (fd, &read_speed, &write_speed);
++ close (fd);
++ max_speed = (int)floor (read_speed) / CD_ROM_SPEED;
++
++ return max_speed;
++}
++#endif
+
++static int
++get_device_max_write_speed (char *device)
++{
++ int fd;
++ int max_speed;
++ int read_speed, write_speed;
++
++ max_speed = -1;
++
++ fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK);
++ if (fd < 0) {
++ return -1;
++ }
++
++ get_read_write_speed (fd, &read_speed, &write_speed);
++ close (fd);
++ max_speed = (int)floor (write_speed) / CD_ROM_SPEED;
++
++ return max_speed;
++}
+
+ #endif /* __linux__ || __FreeBSD__ */
+
+@@ -780,50 +822,6 @@
+ }
+ }
+ return NULL;
+-}
+-
+-#if !defined(__linux)
+-static int
+-get_device_max_read_speed (char *device)
+-{
+- int fd;
+- int max_speed;
+- int read_speed, write_speed;
+-
+- max_speed = -1;
+-
+- fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK);
+- if (fd < 0) {
+- return -1;
+- }
+-
+- get_read_write_speed (fd, &read_speed, &write_speed);
+- close (fd);
+- max_speed = (int)floor (read_speed) / CD_ROM_SPEED;
+-
+- return max_speed;
+-}
+-#endif
+-
+-static int
+-get_device_max_write_speed (char *device)
+-{
+- int fd;
+- int max_speed;
+- int read_speed, write_speed;
+-
+- max_speed = -1;
+-
+- fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK);
+- if (fd < 0) {
+- return -1;
+- }
+-
+- get_read_write_speed (fd, &read_speed, &write_speed);
+- close (fd);
+- max_speed = (int)floor (write_speed) / CD_ROM_SPEED;
+-
+- return max_speed;
+ }
+
+ static char *
diff --git a/audio/goobox/files/patch-src::goo-cdrom-bsd.c b/audio/goobox/files/patch-src::goo-cdrom-bsd.c
new file mode 100644
index 000000000000..9963f7ecd1b2
--- /dev/null
+++ b/audio/goobox/files/patch-src::goo-cdrom-bsd.c
@@ -0,0 +1,136 @@
+--- src/goo-cdrom-bsd.c.orig Tue Nov 9 22:28:04 2004
++++ src/goo-cdrom-bsd.c Thu Nov 11 12:19:49 2004
+@@ -20,8 +20,6 @@
+ * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ */
+
+-/* FIXME: this is only a template, BSD support lacks at the moment. */
+-
+ #include <config.h>
+
+ #ifdef HAVE_BSD
+@@ -30,9 +28,7 @@
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+-#ifdef HAVE_SYS_CDIO_H
+-# include <sys/cdio.h>
+-#endif
++#include <sys/cdio.h>
+ #include <errno.h>
+
+ #include <gnome.h>
+@@ -99,6 +95,7 @@
+
+ fd = open_device (cdrom);
+ if (fd >= 0) {
++ ioctl (fd, CDIOCALLOW, 0);
+ if (ioctl (fd, CDIOCEJECT, 0) >= 0)
+ result = TRUE;
+ else
+@@ -112,52 +109,50 @@
+ return result;
+ }
+
++static int msf = 1;
++static struct cd_toc_entry toc_buffer[100];
++
++static int
++read_toc_entrys (int fd,
++ int len)
++{
++ struct ioc_read_toc_entry t;
++
++ t.address_format = msf ? CD_MSF_FORMAT : CD_LBA_FORMAT;
++ t.starting_track = 0;
++ t.data_len = len;
++ t.data = toc_buffer;
++
++ return (ioctl (fd, CDIOREADTOCENTRYS, (char *) &t));
++}
++
+
+ static int
+ update_state_from_fd (GooCdrom *cdrom,
+ int fd)
+ {
+- int state;
+- GooCdromState cdrom_state;
++ int rc, i, n;
++ struct ioc_toc_header h;
+
+- state = ioctl (fd, CDROM_DISC_STATUS, 0);
+- if (state < 0) {
++ rc = ioctl (fd, CDIOREADTOCHEADER, &h);
++ if (rc < 0) {
+ goo_cdrom_set_error_from_string (cdrom, _("Error reading CD"));
+ return -1;
+ }
+-
+- switch (state) {
+- case CDS_NO_DISC:
+- case CDS_NO_INFO:
+- cdrom_state = GOO_CDROM_STATE_NO_DISC;
+-
+- state = ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
+- if (state == -1) {
+- goo_cdrom_set_error_from_errno (cdrom);
+- return -1;
+- }
+-
+- switch (state) {
+- case CDS_TRAY_OPEN:
+- cdrom_state = GOO_CDROM_STATE_TRAY_OPEN;
+- break;
+- case CDS_DRIVE_NOT_READY:
+- cdrom_state = GOO_CDROM_STATE_DRIVE_NOT_READY;
+- break;
+- default:
+- break;
+- }
+- break;
+-
+- case CDS_AUDIO:
+- cdrom_state = GOO_CDROM_STATE_OK;
+- break;
+- default:
+- cdrom_state = GOO_CDROM_STATE_DATA_CD;
+- break;
++
++ n = h.ending_track - h.starting_track + 1;
++ rc = read_toc_entrys (fd, (n + 1) * sizeof (struct cd_toc_entry));
++ if (rc < 0) {
++ goo_cdrom_set_error_from_errno (cdrom);
++ return -1;
++ }
++
++ for (i = 0; i < n; i++) {
++ if (!(toc_buffer[i].control & 4))
++ return GOO_CDROM_STATE_OK;
+ }
+
+- return cdrom_state;
++ return GOO_CDROM_STATE_DATA_CD;
+ }
+
+
+@@ -173,6 +168,7 @@
+ if (fd >= 0) {
+ GooCdromState new_state = -1;
+
++ ioctl (fd, CDIOCALLOW, 0);
+ if (ioctl (fd, CDIOCCLOSE, 0) >= 0) {
+ new_state = update_state_from_fd (cdrom, fd);
+ result = (new_state != -1);
+@@ -202,9 +198,10 @@
+
+ fd = open_device (cdrom);
+ if (fd >= 0) {
++ unsigned long cmd = lock ? CDIOCPREVENT : CDIOCALLOW;
+ GooCdromState new_state = -1;
+
+- if (ioctl (fd, CDROM_LOCKDOOR, lock) >= 0) { /*FIXME*/
++ if (ioctl (fd, cmd) != -1) {
+ new_state = update_state_from_fd (cdrom, fd);
+ result = (new_state != -1);
+ } else
diff --git a/audio/goobox/pkg-descr b/audio/goobox/pkg-descr
new file mode 100644
index 000000000000..c263704fda75
--- /dev/null
+++ b/audio/goobox/pkg-descr
@@ -0,0 +1,4 @@
+Goobox is a CD player and ripper for the GNOME Desktop environment,
+it uses gstreamer to play and rip CDs and cddb-slave2 (distributed
+with gnome-media) to get and edit CD metadata such as track titles
+and album name.
diff --git a/audio/goobox/pkg-plist b/audio/goobox/pkg-plist
new file mode 100644
index 000000000000..280a53a335dc
--- /dev/null
+++ b/audio/goobox/pkg-plist
@@ -0,0 +1,11 @@
+bin/goobox
+etc/gconf/schemas/goobox.schemas
+libdata/bonobo/servers/GNOME_Goobox.server
+share/gnome/application-registry/goobox.applications
+share/gnome/applications/goobox.desktop
+share/gnome/goobox/glade/goo_cover_chooser.glade
+share/gnome/goobox/glade/goobox.glade
+share/gnome/pixmaps/goobox.png
+share/locale/ar/LC_MESSAGES/goobox.mo
+@dirrm share/gnome/goobox/glade
+@dirrm share/gnome/goobox