aboutsummaryrefslogtreecommitdiff
path: root/audio/sound-juicer
diff options
context:
space:
mode:
authorAlexander Nedotsukov <bland@FreeBSD.org>2004-01-23 02:09:43 +0000
committerAlexander Nedotsukov <bland@FreeBSD.org>2004-01-23 02:09:43 +0000
commit4489e33392e3c8d47604f404741ddfbf8ebcb08f (patch)
treee93b39700103cac3aa100a3e85c5b11a4a2eb116 /audio/sound-juicer
parent5089e1769060088323846ba4eed821bc0048a208 (diff)
downloadports-4489e33392e3c8d47604f404741ddfbf8ebcb08f.tar.gz
ports-4489e33392e3c8d47604f404741ddfbf8ebcb08f.zip
Notes
Diffstat (limited to 'audio/sound-juicer')
-rw-r--r--audio/sound-juicer/Makefile30
-rw-r--r--audio/sound-juicer/distinfo1
-rw-r--r--audio/sound-juicer/files/patch-src::Makefile.in20
-rw-r--r--audio/sound-juicer/files/patch-src::cd-drive.c70
-rw-r--r--audio/sound-juicer/files/patch-src::dvd_plus_rw_utils.cpp11
-rw-r--r--audio/sound-juicer/files/patch-src::sj-main.c31
-rw-r--r--audio/sound-juicer/files/patch-src::sj-prefs.c10
-rw-r--r--audio/sound-juicer/files/patch-src::sj-util.c85
-rw-r--r--audio/sound-juicer/files/patch-src::transport.hxx11
-rw-r--r--audio/sound-juicer/files/patch-tests::Makefile.in11
-rw-r--r--audio/sound-juicer/pkg-descr5
-rw-r--r--audio/sound-juicer/pkg-plist19
12 files changed, 304 insertions, 0 deletions
diff --git a/audio/sound-juicer/Makefile b/audio/sound-juicer/Makefile
new file mode 100644
index 000000000000..fce090c8a555
--- /dev/null
+++ b/audio/sound-juicer/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: soundjuicer
+# Date created: 20 Jan 2004
+# Whom: Alexander Nedotsukov <bland@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= sound-juicer
+PORTVERSION= 0.5.9
+CATEGORIES= audio gnome
+MASTER_SITES= http://www.burtonini.com/computing/
+DIST_SUBDIR= gnome2
+
+MAINTAINER= bland@FreeBSD.org
+COMMENT= Clean, mean and lean CD ripper for GNOME2
+
+LIB_DEPENDS= musicbrainz.3:${PORTSDIR}/audio/libmusicbrainz
+
+USE_X_PREFIX= yes
+USE_GMAKE= yes
+USE_GNOME= gnomehack gnomeprefix libgnomeui gstreamerplugins
+USE_LIBTOOL= yes
+CONFIGURE_ARGS= --enable-ignore-missing-cd
+
+pre-everything::
+ @${ECHO_MSG}
+ @${ECHO_MSG} "You must have gstreamer-plugins built with Cdparanoia support!"
+ @${ECHO_MSG}
+
+.include <bsd.port.mk>
diff --git a/audio/sound-juicer/distinfo b/audio/sound-juicer/distinfo
new file mode 100644
index 000000000000..83fbaab031a6
--- /dev/null
+++ b/audio/sound-juicer/distinfo
@@ -0,0 +1 @@
+MD5 (gnome2/sound-juicer-0.5.9.tar.gz) = 1c4b30e621e2697b8be82a47bbbf6d5e
diff --git a/audio/sound-juicer/files/patch-src::Makefile.in b/audio/sound-juicer/files/patch-src::Makefile.in
new file mode 100644
index 000000000000..a95326528a96
--- /dev/null
+++ b/audio/sound-juicer/files/patch-src::Makefile.in
@@ -0,0 +1,20 @@
+--- src/Makefile.in.orig Thu Jan 22 14:21:35 2004
++++ src/Makefile.in Thu Jan 22 14:21:56 2004
+@@ -128,7 +128,7 @@
+ am__include = @am__include@
+ am__quote = @am__quote@
+ install_sh = @install_sh@
+-AM_CFLAGS = -Wall -Werror -export-dynamic -W -Wno-unused-parameter
++AM_CFLAGS = -Wall -export-dynamic -W
+
+ AM_CPPFLAGS = \
+ @DISABLE_DEPRECATED_CFLAGS@ \
+@@ -212,7 +212,7 @@
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+ CPPFLAGS = @CPPFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lcam
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bacon-cd-selection.Po \
diff --git a/audio/sound-juicer/files/patch-src::cd-drive.c b/audio/sound-juicer/files/patch-src::cd-drive.c
new file mode 100644
index 000000000000..d08924aa3537
--- /dev/null
+++ b/audio/sound-juicer/files/patch-src::cd-drive.c
@@ -0,0 +1,70 @@
+--- src/cd-drive.c.orig Mon Dec 8 22:08:56 2003
++++ src/cd-drive.c Fri Jan 23 10:49:43 2004
+@@ -65,7 +65,7 @@
+
+ /* For dvd_plus_rw_utils.cpp */
+ int get_dvd_r_rw_profile (const char *name);
+-int get_mmc_profile (void *fd);
++int get_mmc_profile (int fd);
+
+ static void
+ add_dvd_plus (CDDrive *cdrom)
+@@ -99,7 +99,7 @@
+ return CD_MEDIA_TYPE_ERROR;
+ }
+
+- mmc_profile = get_mmc_profile ((void *)&fd);
++ mmc_profile = get_mmc_profile (fd);
+ close (fd);
+
+ switch (mmc_profile) {
+@@ -790,7 +790,11 @@
+ struct cam_device *cam_dev;
+
+ type = 0;
++#if defined(__FreeBSD__) && (__FreeBSD_version > 500000)
++ cam_path = g_strdup_printf ("/dev/%s%d", dev_type, i);
++#else
+ cam_path = g_strdup_printf ("/dev/%s%dc", dev_type, i);
++#endif
+
+ if (!g_file_test (cam_path, G_FILE_TEST_EXISTS)) {
+ g_free (cam_path);
+@@ -803,29 +807,18 @@
+ continue;
+ }
+
+- /* XXX Other controllers might need to be added. */
+- if ((strncmp (cam_dev->sim_name, "ata", 3)) == 0) {
+- dev = g_strdup_printf ("/dev/a%s%dc", dev_type, i);
+- } else {
+- dev = g_strdup (cam_path);
+- }
++ dev = g_strdup (cam_path);
+
+ g_free (cam_path);
+
+- if ((fd = open (dev, O_RDWR, 0)) < 0) {
+- g_free (dev);
+- free (cam_dev);
+- i++;
+- continue;
+- }
+-
+- type |= CDDRIVE_TYPE_CD_DRIVE;
+- if (ioctl (fd, CDRIOCWRITESPEED, &max_speed) >= 0) {
+- /* XXX is it CD-R or CD-RW ? */
+- type |= CDDRIVE_TYPE_CD_RECORDER;
++ if ((fd = open (dev, O_RDWR, 0)) >= 0) {
++ type |= CDDRIVE_TYPE_CD_DRIVE;
++ if (ioctl (fd, CDRIOCWRITESPEED, &max_speed) >= 0) {
++ /* XXX is it CD-R or CD-RW ? */
++ type |= CDDRIVE_TYPE_CD_RECORDER;
++ }
++ close (fd);
+ }
+-
+- close (fd);
+
+ if (type & CDDRIVE_TYPE_CD_RECORDER
+ || type & CDDRIVE_TYPE_CDRW_RECORDER
diff --git a/audio/sound-juicer/files/patch-src::dvd_plus_rw_utils.cpp b/audio/sound-juicer/files/patch-src::dvd_plus_rw_utils.cpp
new file mode 100644
index 000000000000..df1c7010836a
--- /dev/null
+++ b/audio/sound-juicer/files/patch-src::dvd_plus_rw_utils.cpp
@@ -0,0 +1,11 @@
+--- src/dvd_plus_rw_utils.cpp.orig Wed Jan 21 12:47:50 2004
++++ src/dvd_plus_rw_utils.cpp Wed Jan 21 12:48:04 2004
+@@ -113,7 +113,7 @@
+ }
+
+ extern "C"
+-int get_mmc_profile (void *fd)
++int get_mmc_profile (int fd)
+ { Scsi_Command cmd(fd);
+ unsigned char buf[8];
+ int profile=-1,once=1;
diff --git a/audio/sound-juicer/files/patch-src::sj-main.c b/audio/sound-juicer/files/patch-src::sj-main.c
new file mode 100644
index 000000000000..2bf4272ad2ce
--- /dev/null
+++ b/audio/sound-juicer/files/patch-src::sj-main.c
@@ -0,0 +1,31 @@
+--- src/sj-main.c.orig Wed Jan 7 20:38:00 2004
++++ src/sj-main.c Thu Jan 22 14:22:54 2004
+@@ -535,9 +535,10 @@
+ */
+ void device_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
+ {
+- g_assert (strcmp (entry->key, GCONF_DEVICE) == 0);
+ gboolean ignore_no_media = GPOINTER_TO_INT (user_data);
+
++ g_assert (strcmp (entry->key, GCONF_DEVICE) == 0);
++
+ if (entry->value == NULL) {
+ device = prefs_get_default_device();
+ if (device == NULL) {
+@@ -833,7 +834,7 @@
+ void on_contents_activate(GtkWidget *button, gpointer user_data) {
+ GError *error = NULL;
+
+- gnome_help_display ("sound-juicer", NULL, &error);
++ gnome_help_display ("sound-juicer.xml", NULL, &error);
+ if (error) {
+ GtkWidget *dialog;
+
+@@ -870,6 +871,7 @@
+ VERSION, LIBGNOMEUI_MODULE,
+ argc, argv,
+ GNOME_PARAM_POPT_TABLE, options,
++ GNOME_PARAM_APP_DATADIR, DATADIR,
+ NULL);
+ g_set_application_name (_("Sound Juicer"));
+
diff --git a/audio/sound-juicer/files/patch-src::sj-prefs.c b/audio/sound-juicer/files/patch-src::sj-prefs.c
new file mode 100644
index 000000000000..fb5ed24ae2f2
--- /dev/null
+++ b/audio/sound-juicer/files/patch-src::sj-prefs.c
@@ -0,0 +1,10 @@
+--- src/sj-prefs.c.orig Tue Jan 20 22:45:59 2004
++++ src/sj-prefs.c Wed Jan 21 14:38:24 2004
+@@ -75,7 +75,6 @@
+ CDDrive *cdrom = cdroms->data;
+ cd_drive_free (cdrom);
+ cdroms = g_list_remove (cdroms, cdrom);
+- g_free (cdrom);
+ }
+ }
+ return default_device;
diff --git a/audio/sound-juicer/files/patch-src::sj-util.c b/audio/sound-juicer/files/patch-src::sj-util.c
new file mode 100644
index 000000000000..ac2bcfbd80a6
--- /dev/null
+++ b/audio/sound-juicer/files/patch-src::sj-util.c
@@ -0,0 +1,85 @@
+--- src/sj-util.c.orig Wed Jan 7 20:38:00 2004
++++ src/sj-util.c Fri Jan 23 10:48:36 2004
+@@ -120,6 +120,9 @@
+ gtk_widget_destroy (dialog);
+ goto done;
+ }
++#ifdef __FreeBSD__
++ ioctl (fd, CDIOCALLOW);
++#endif
+ result = ioctl (fd, CDROMEJECT);
+ if (result == -1) {
+ GtkWidget *dialog;
+@@ -148,21 +151,33 @@
+ tray_is_opened (const char *device)
+ {
+ int fd, status;
+-
++
++#if defined(__linux__)
+ fd = open (device, O_RDONLY | O_NONBLOCK | O_EXCL);
+ if (fd < 0) {
+ return FALSE;
+ }
+-
++
+ status = ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
++ close (fd);
+ if (status < 0) {
+- close (fd);
+ return FALSE;
+ }
+
+- close (fd);
+-
+ return status == CDS_TRAY_OPEN;
++#elif defined(__FreeBSD__)
++ struct ioc_toc_header h;
++
++ fd = open (device, O_RDONLY | O_NONBLOCK | O_EXCL);
++ if (fd < 0) {
++ return FALSE;
++ }
++
++ status = ioctl (fd, CDIOREADTOCHEADER, &h);
++ close (fd);
++
++ return status < 0;
++#endif
+ }
+
+ gboolean is_audio_cd (const char *device)
+@@ -170,6 +185,10 @@
+ CDMediaType type;
+ int fd, status;
+
++ if (tray_is_opened (device)) {
++ return FALSE;
++ }
++
+ type = guess_media_type (device);
+ switch (type) {
+ case CD_MEDIA_TYPE_CD:
+@@ -189,15 +208,18 @@
+ return FALSE;
+ }
+
++#if defined(__linux__)
+ status = ioctl (fd, CDROM_DISC_STATUS, CDSL_CURRENT);
++ close (fd);
+ if (status < 0) {
+- close (fd);
+ return FALSE;
+ }
+-
+- close (fd);
+-
+ return status == CDS_AUDIO;
++#elif defined (__FreeBSD__)
++ return TRUE;
++#else
++ return TRUE;
++#endif
+ }
+
+ /* Pass NULL to use g_free */
diff --git a/audio/sound-juicer/files/patch-src::transport.hxx b/audio/sound-juicer/files/patch-src::transport.hxx
new file mode 100644
index 000000000000..f20977fbfa7d
--- /dev/null
+++ b/audio/sound-juicer/files/patch-src::transport.hxx
@@ -0,0 +1,11 @@
+--- src/transport.hxx.orig Wed Jan 21 12:52:37 2004
++++ src/transport.hxx Wed Jan 21 12:53:43 2004
+@@ -386,7 +386,7 @@
+ Scsi_Command(int f)
+ { char pass[32]; // periph_name is 16 chars long
+
+- cam=NULL, fd=-1, autoclose=1, filename=NULL;
++ cam=NULL, fd=fd, autoclose=1, filename=NULL;
+
+ memset (&ccb,0,sizeof(ccb));
+ ccb.ccb_h.func_code = XPT_GDEVLIST;
diff --git a/audio/sound-juicer/files/patch-tests::Makefile.in b/audio/sound-juicer/files/patch-tests::Makefile.in
new file mode 100644
index 000000000000..e3325efd909c
--- /dev/null
+++ b/audio/sound-juicer/files/patch-tests::Makefile.in
@@ -0,0 +1,11 @@
+--- tests/Makefile.in.orig Tue Jan 20 22:30:02 2004
++++ tests/Makefile.in Tue Jan 20 22:30:28 2004
+@@ -173,7 +173,7 @@
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
+ CPPFLAGS = @CPPFLAGS@
+ LDFLAGS = @LDFLAGS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lcam
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cd-drive.Po \
diff --git a/audio/sound-juicer/pkg-descr b/audio/sound-juicer/pkg-descr
new file mode 100644
index 000000000000..d2fe92826282
--- /dev/null
+++ b/audio/sound-juicer/pkg-descr
@@ -0,0 +1,5 @@
+Sound Juicer is a clean, mean and lean CD ripper for GNOME2.
+It supports a clean interface and simple preferences, aiming
+to do The Right Thing and What You Mean all of the time.
+
+WWW: http://www.burtonini.com/blog/computers/sound-juicer/
diff --git a/audio/sound-juicer/pkg-plist b/audio/sound-juicer/pkg-plist
new file mode 100644
index 000000000000..132fd4f299ee
--- /dev/null
+++ b/audio/sound-juicer/pkg-plist
@@ -0,0 +1,19 @@
+bin/sound-juicer
+etc/gconf/schemas/sound-juicer.schemas
+share/gnome/applications/sound-juicer.desktop
+share/gnome/help/sound-juicer/C/fdl-appendix.xml
+share/gnome/help/sound-juicer/C/figures/prefs.png
+share/gnome/help/sound-juicer/C/figures/startup.png
+share/gnome/help/sound-juicer/C/legal.xml
+share/gnome/help/sound-juicer/C/sound-juicer.xml
+share/gnome/omf/sound-juicer/sound-juicer-manual-C.omf
+@exec scrollkeeper-install -q %D/share/gnome/omf/sound-juicer/sound-juicer-manual-C.omf 2>/dev/null || /usr/bin/true
+share/gnome/pixmaps/sound-juicer.png
+share/gnome/sound-juicer/orange-slice.png
+share/gnome/sound-juicer/sound-juicer.glade
+@dirrm share/gnome/sound-juicer
+@dirrm share/gnome/omf/sound-juicer
+@dirrm share/gnome/help/sound-juicer/C/figures
+@dirrm share/gnome/help/sound-juicer/C
+@dirrm share/gnome/help/sound-juicer
+@unexec scrollkeeper-uninstall -q %D/share/gnome/omf/sound-juicer/sound-juicer-manual-C.omf 2>/dev/null || /usr/bin/true