1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00

Asunder is a graphical Audio CD ripper and encoder. You can use

it to save tracks from an Audio CD as WAV, MP3, OGG, and/or FLAC.

WWW: http://littlesvr.ca/asunder/

PR:		ports/116411
Submitted by:	Fraser Tweedale <frase@frase.id.au>
This commit is contained in:
Martin Wilke 2007-09-17 17:37:55 +00:00
parent 75a7e399c0
commit ddad398a10
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=199628
6 changed files with 139 additions and 0 deletions

View File

@ -37,6 +37,7 @@
SUBDIR += ascd
SUBDIR += asmix
SUBDIR += asmixer
SUBDIR += asunder
SUBDIR += aube
SUBDIR += audacious-crossfade
SUBDIR += audacious-dumb

22
audio/asunder/Makefile Normal file
View File

@ -0,0 +1,22 @@
# New ports collection makefile for: asunder
# Date created: 14 September 2007
# Whom: frase@frase.id.au
#
# $FreeBSD$
PORTNAME= asunder
PORTVERSION= 0.8.1
CATEGORIES= audio
MASTER_SITES= http://littlesvr.ca/asunder/releases/
MAINTAINER= frase@frase.id.au
COMMENT= A lightweight GTK+ CD ripper
LIB_DEPENDS= cddb.4:${PORTSDIR}/audio/libcddb
RUN_DEPENDS= ${LOCALBASE}/bin/cdparanoia:${PORTSDIR}/audio/cdparanoia
GNU_CONFIGURE= yes
USE_XLIB= yes
USE_GNOME= gtk20
.include <bsd.port.mk>

3
audio/asunder/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (asunder-0.8.1.tar.gz) = 75cbd3c99db2bc977b53e39946f8ea86
SHA256 (asunder-0.8.1.tar.gz) = e1d785a4fa65a3f3785be00c001135e90a531b7de45ccadce80159b130b11f3b
SIZE (asunder-0.8.1.tar.gz) = 169935

View File

@ -0,0 +1,104 @@
--- ../../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
@@ -22,7 +22,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <linux/cdrom.h>
+#include <sys/cdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -210,8 +210,8 @@
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);
+ if (status >= 0)
{
if (!alreadyKnowGood)
{
@@ -308,7 +308,7 @@
//~ {
//~ ioctl(fd, CDROMCLOSETRAY, CDSL_CURRENT);
//~ } else {
- ioctl(fd, CDROMEJECT, CDSL_CURRENT);
+ ioctl(fd, CDIOCEJECT);
//~ }
close(fd);
@@ -367,8 +367,8 @@
{
int fd;
int status;
- struct cdrom_tochdr th;
- struct cdrom_tocentry te;
+ struct ioc_toc_header th;
+ struct ioc_read_toc_single_entry te;
int i;
cddb_disc_t * disc = NULL;
@@ -385,15 +385,15 @@
}
// read disc status info
- status = ioctl(fd, CDROM_DISC_STATUS, CDSL_CURRENT);
- if ((status == CDS_AUDIO) || (status == CDS_MIXED))
+ status = ioctl(fd, CDIOREADTOCHEADER);
+ if (status >= 0)
{
// see if we can read the disc's table of contents (TOC).
- if (ioctl(fd, CDROMREADTOCHDR, &th) == 0)
+ if (ioctl(fd, CDIOREADTOCHEADER, &th) == 0)
{
#ifdef DEBUG
- printf("starting track: %d\n", th.cdth_trk0);
- printf("ending track: %d\n", th.cdth_trk1);
+ printf("starting track: %d\n", th.starting_track);
+ printf("ending track: %d\n", th.ending_track);
#endif
disc = cddb_disc_new();
if (disc == NULL)
@@ -402,13 +402,13 @@
exit(-1);
}
- te.cdte_format = CDROM_LBA;
- for (i=th.cdth_trk0; i<=th.cdth_trk1; i++)
+ te.address_format = CD_LBA_FORMAT;
+ for (i=th.starting_track; i<=th.ending_track; i++)
{
- te.cdte_track = i;
- if (ioctl(fd, CDROMREADTOCENTRY, &te) == 0)
+ te.track = i;
+ if (ioctl(fd, CDIOREADTOCENTRY, &te) == 0)
{
- if (te.cdte_ctrl & CDROM_DATA_TRACK)
+ if (te.entry.control & 0x04)
{
// track is a DATA track. make sure its "rip" box is not checked by default
track_format[i] = FALSE;
@@ -423,17 +423,17 @@
exit(-1);
}
- cddb_track_set_frame_offset(track, te.cdte_addr.lba+SECONDS_TO_FRAMES(2));
+ cddb_track_set_frame_offset(track, ntohl(te.entry.addr.lba)+SECONDS_TO_FRAMES(2));
snprintf(trackname, 9, "Track %d", i);
cddb_track_set_title(track, trackname);
cddb_track_set_artist(track, "Unknown Artist");
cddb_disc_add_track(disc, track);
}
}
- te.cdte_track = CDROM_LEADOUT;
- if (ioctl(fd, CDROMREADTOCENTRY, &te) == 0)
+ te.track = 0xAA;
+ if (ioctl(fd, CDIOREADTOCENTRY, &te) == 0)
{
- cddb_disc_set_length(disc, (te.cdte_addr.lba+SECONDS_TO_FRAMES(2))/SECONDS_TO_FRAMES(1));
+ cddb_disc_set_length(disc, (ntohl(te.entry.addr.lba)+SECONDS_TO_FRAMES(2))/SECONDS_TO_FRAMES(1));
}
}
}

4
audio/asunder/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
Asunder is a graphical Audio CD ripper and encoder. You can use
it to save tracks from an Audio CD as WAV, MP3, OGG, and/or FLAC.
WWW: http://littlesvr.ca/asunder/

5
audio/asunder/pkg-plist Normal file
View File

@ -0,0 +1,5 @@
bin/asunder
share/applications/asunder.desktop
share/pixmaps/asunder.png
@dirrmtry share/applications