diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-10-08 11:50:10 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-10-08 11:50:10 +0000 |
commit | 01618ada8d4db1ec5d629224cd32554ad5acb6b5 (patch) | |
tree | b55182544c89c25f1be2e726de6fe9e0577d06de /audio/asunder | |
parent | df528e263434da0fdbceb6517f984dff13e656bd (diff) | |
download | ports-01618ada8d4db1ec5d629224cd32554ad5acb6b5.tar.gz ports-01618ada8d4db1ec5d629224cd32554ad5acb6b5.zip |
- Add missing dependes
- Add OPTIONS handling
- Fix Crash [1]
PR: 116451
Submitted by: volker@vwsoft.com
Approved by: maintainer [1]
Notes
Notes:
svn path=/head/; revision=201087
Diffstat (limited to 'audio/asunder')
-rw-r--r-- | audio/asunder/files/patch-src_main.c (renamed from audio/asunder/files/patch-src-main.c) | 49 | ||||
-rw-r--r-- | audio/asunder/files/patch-src_threads.c | 28 | ||||
-rw-r--r-- | audio/asunder/pkg-plist | 1 |
3 files changed, 67 insertions, 11 deletions
diff --git a/audio/asunder/files/patch-src-main.c b/audio/asunder/files/patch-src_main.c index 08386ac3e4cc..30add76d8803 100644 --- a/audio/asunder/files/patch-src-main.c +++ b/audio/asunder/files/patch-src_main.c @@ -1,5 +1,5 @@ ---- ../../tags/asunder-0.8.1/src/main.c Fri Sep 14 10:35:12 2007 -+++ src/main.c Fri Sep 14 14:32:54 2007 +--- src/main.c.orig 2007-08-27 04:00:08.000000000 +0200 ++++ src/main.c 2007-10-08 13:17:38.000000000 +0200 @@ -22,7 +22,7 @@ #include <sys/stat.h> #include <fcntl.h> @@ -9,27 +9,43 @@ #include <unistd.h> #include <stdlib.h> #include <string.h> -@@ -210,8 +210,8 @@ +@@ -177,6 +177,9 @@ + int fd; + bool ret = false; + int status; ++ ++ struct ioc_read_subchannel cdsc; ++ struct cd_sub_channel_info data; + + // open the device + fd = open(cdrom, O_RDONLY | O_NONBLOCK); +@@ -210,8 +213,13 @@ static bool alreadyKnowGood = false; /* check when program just started */ static bool alreadyCleared = true; /* no need to clear when program just started */ - status = ioctl(fd, CDROM_DISC_STATUS, CDSL_CURRENT); - if (status == CDS_AUDIO || status == CDS_MIXED) -+ status = ioctl(fd, CDIOREADTOCHEADER); ++ bzero(&cdsc,sizeof(cdsc)); ++ cdsc.data = &data; ++ cdsc.data_len = sizeof(data); ++ cdsc.data_format = CD_CURRENT_POSITION; ++ cdsc.address_format = CD_MSF_FORMAT; ++ status = ioctl(fd, CDIOCREADSUBCHANNEL, (char *)&cdsc); + if (status >= 0) { if (!alreadyKnowGood) { -@@ -308,7 +308,7 @@ +@@ -308,7 +316,8 @@ //~ { //~ ioctl(fd, CDROMCLOSETRAY, CDSL_CURRENT); //~ } else { - ioctl(fd, CDROMEJECT, CDSL_CURRENT); ++ ioctl(fd, CDIOCALLOW); + ioctl(fd, CDIOCEJECT); //~ } close(fd); -@@ -367,8 +367,8 @@ +@@ -367,13 +376,16 @@ { int fd; int status; @@ -40,13 +56,26 @@ int i; cddb_disc_t * disc = NULL; -@@ -385,15 +385,15 @@ + cddb_track_t * track = NULL; + ++ struct ioc_read_subchannel cdsc; ++ struct cd_sub_channel_info data; ++ + char trackname[9]; + + // open the device +@@ -385,15 +397,20 @@ } // read disc status info - status = ioctl(fd, CDROM_DISC_STATUS, CDSL_CURRENT); - if ((status == CDS_AUDIO) || (status == CDS_MIXED)) -+ status = ioctl(fd, CDIOREADTOCHEADER); ++ bzero(&cdsc,sizeof(cdsc)); ++ cdsc.data = &data; ++ cdsc.data_len = sizeof(data); ++ cdsc.data_format = CD_CURRENT_POSITION; ++ cdsc.address_format = CD_MSF_FORMAT; ++ status = ioctl(fd, CDIOCREADSUBCHANNEL, (char *)&cdsc); + if (status >= 0) { // see if we can read the disc's table of contents (TOC). @@ -61,7 +90,7 @@ #endif disc = cddb_disc_new(); if (disc == NULL) -@@ -402,13 +402,13 @@ +@@ -402,13 +419,13 @@ exit(-1); } @@ -80,7 +109,7 @@ { // track is a DATA track. make sure its "rip" box is not checked by default track_format[i] = FALSE; -@@ -423,17 +423,17 @@ +@@ -423,17 +440,17 @@ exit(-1); } diff --git a/audio/asunder/files/patch-src_threads.c b/audio/asunder/files/patch-src_threads.c new file mode 100644 index 000000000000..a81271466f67 --- /dev/null +++ b/audio/asunder/files/patch-src_threads.c @@ -0,0 +1,28 @@ +--- src/threads.c.orig 2007-08-26 12:53:58.000000000 +0200 ++++ src/threads.c 2007-10-08 13:12:44.000000000 +0200 +@@ -334,12 +334,6 @@ + gdk_threads_leave(); + } + +- // no more tracks to rip, safe to eject +- if (global_prefs->eject_on_done) +- { +- eject_disc(global_prefs->cdrom); +- } +- + return NULL; + } + +@@ -556,6 +550,12 @@ + + aborted = 1; // so the tracker thread will exit + ++ // no more tracks to rip, safe to eject ++ if (global_prefs->eject_on_done) ++ { ++ eject_disc(global_prefs->cdrom); ++ } ++ + gdk_threads_enter(); + gtk_widget_hide(win_ripping); + gdk_flush(); diff --git a/audio/asunder/pkg-plist b/audio/asunder/pkg-plist index 67d4827362a0..0615ebe61e93 100644 --- a/audio/asunder/pkg-plist +++ b/audio/asunder/pkg-plist @@ -2,4 +2,3 @@ bin/asunder share/applications/asunder.desktop share/pixmaps/asunder.png @dirrmtry share/applications - |