summaryrefslogtreecommitdiff
path: root/audio/asunder
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-02-04 11:36:44 +0000
committerobache <obache@pkgsrc.org>2014-02-04 11:36:44 +0000
commitd962d95dc4f4a4423a5a0fa2274255f190a2e3f6 (patch)
tree1f0146ffdf09447fe1745cb6af2e18680a219d62 /audio/asunder
parent55751378ea5ccec7c59204eb5a423dacb0e0099e (diff)
downloadpkgsrc-d962d95dc4f4a4423a5a0fa2274255f190a2e3f6.tar.gz
Import asunder-2.4 as audio/asunder.
Based on packaged by Dave Tyson and provided via PR pkg/48542. Asunder is a GTK based graphical Audio CD ripper and encoder.
Diffstat (limited to 'audio/asunder')
-rw-r--r--audio/asunder/DESCR1
-rw-r--r--audio/asunder/MESSAGE6
-rw-r--r--audio/asunder/Makefile26
-rw-r--r--audio/asunder/PLIST43
-rw-r--r--audio/asunder/distinfo7
-rw-r--r--audio/asunder/patches/patch-src_main.c116
-rw-r--r--audio/asunder/patches/patch-src_wrappers.c17
7 files changed, 216 insertions, 0 deletions
diff --git a/audio/asunder/DESCR b/audio/asunder/DESCR
new file mode 100644
index 00000000000..f8a43916a10
--- /dev/null
+++ b/audio/asunder/DESCR
@@ -0,0 +1 @@
+Asunder is a GTK based graphical Audio CD ripper and encoder.
diff --git a/audio/asunder/MESSAGE b/audio/asunder/MESSAGE
new file mode 100644
index 00000000000..2185b4709e2
--- /dev/null
+++ b/audio/asunder/MESSAGE
@@ -0,0 +1,6 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2014/02/04 11:36:44 obache Exp $
+
+By default Asunder tries to open /dev/cdrom. This and other ripping
+options can be changed using the preferences menu.
+===========================================================================
diff --git a/audio/asunder/Makefile b/audio/asunder/Makefile
new file mode 100644
index 00000000000..d9e5630a121
--- /dev/null
+++ b/audio/asunder/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2014/02/04 11:36:44 obache Exp $
+
+DISTNAME= asunder-2.4
+CATEGORIES= audio
+MASTER_SITES= http://littlesvr.ca/asunder/releases/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= dtyson@anduin.org.uk
+HOMEPAGE= http://littlesvr.ca/asunder/
+COMMENT= Graphical CD ripper
+LICENSE= gnu-gpl-v2
+
+DEPENDS+= cdparanoia-[0-9]*:../../audio/cdparanoia
+DEPENDS+= lame-[0-9]*:../../audio/lame
+DEPENDS+= flac-[0-9]*:../../audio/flac
+
+GNU_CONFIGURE= yes
+USE_PKGLOCALEDIR= yes
+USE_TOOLS+= gmake pkg-config intltool msgfmt
+
+BUILDLINK_API_DEPENDS.libcddb+= libcddb>=0.9.5
+.include "../../audio/libcddb/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/asunder/PLIST b/audio/asunder/PLIST
new file mode 100644
index 00000000000..083ef400b58
--- /dev/null
+++ b/audio/asunder/PLIST
@@ -0,0 +1,43 @@
+@comment $NetBSD: PLIST,v 1.1 2014/02/04 11:36:44 obache Exp $
+bin/asunder
+share/applications/asunder.desktop
+share/locale/ar/LC_MESSAGES/asunder.mo
+share/locale/be@latin/LC_MESSAGES/asunder.mo
+share/locale/bg/LC_MESSAGES/asunder.mo
+share/locale/bn_IN/LC_MESSAGES/asunder.mo
+share/locale/bs_BA/LC_MESSAGES/asunder.mo
+share/locale/ca/LC_MESSAGES/asunder.mo
+share/locale/cs/LC_MESSAGES/asunder.mo
+share/locale/da/LC_MESSAGES/asunder.mo
+share/locale/de/LC_MESSAGES/asunder.mo
+share/locale/el/LC_MESSAGES/asunder.mo
+share/locale/eo/LC_MESSAGES/asunder.mo
+share/locale/es/LC_MESSAGES/asunder.mo
+share/locale/eu/LC_MESSAGES/asunder.mo
+share/locale/fi/LC_MESSAGES/asunder.mo
+share/locale/fr/LC_MESSAGES/asunder.mo
+share/locale/gl/LC_MESSAGES/asunder.mo
+share/locale/he/LC_MESSAGES/asunder.mo
+share/locale/hr/LC_MESSAGES/asunder.mo
+share/locale/hu/LC_MESSAGES/asunder.mo
+share/locale/it/LC_MESSAGES/asunder.mo
+share/locale/ja/LC_MESSAGES/asunder.mo
+share/locale/lv/LC_MESSAGES/asunder.mo
+share/locale/nb/LC_MESSAGES/asunder.mo
+share/locale/nl/LC_MESSAGES/asunder.mo
+share/locale/nn/LC_MESSAGES/asunder.mo
+share/locale/pl/LC_MESSAGES/asunder.mo
+share/locale/pt/LC_MESSAGES/asunder.mo
+share/locale/pt_BR/LC_MESSAGES/asunder.mo
+share/locale/ru/LC_MESSAGES/asunder.mo
+share/locale/sk/LC_MESSAGES/asunder.mo
+share/locale/sl/LC_MESSAGES/asunder.mo
+share/locale/sq/LC_MESSAGES/asunder.mo
+share/locale/sr/LC_MESSAGES/asunder.mo
+share/locale/sr@latin/LC_MESSAGES/asunder.mo
+share/locale/sv/LC_MESSAGES/asunder.mo
+share/locale/tr/LC_MESSAGES/asunder.mo
+share/locale/ur_PK/LC_MESSAGES/asunder.mo
+share/locale/zh_CN/LC_MESSAGES/asunder.mo
+share/locale/zh_TW/LC_MESSAGES/asunder.mo
+share/pixmaps/asunder.png
diff --git a/audio/asunder/distinfo b/audio/asunder/distinfo
new file mode 100644
index 00000000000..47b85fdafd3
--- /dev/null
+++ b/audio/asunder/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2014/02/04 11:36:44 obache Exp $
+
+SHA1 (asunder-2.4.tar.bz2) = f6b23e08891d753fe859573e805c3045d89357d3
+RMD160 (asunder-2.4.tar.bz2) = 515dcc9e2ac79611780516923072aa73c59aa1cf
+Size (asunder-2.4.tar.bz2) = 223890 bytes
+SHA1 (patch-src_main.c) = 6da17bc7775788c297ef1ae5921afc423dac8f54
+SHA1 (patch-src_wrappers.c) = 7422ef3af92eb1d809f3beea66c983982008f647
diff --git a/audio/asunder/patches/patch-src_main.c b/audio/asunder/patches/patch-src_main.c
new file mode 100644
index 00000000000..e74ccf89a46
--- /dev/null
+++ b/audio/asunder/patches/patch-src_main.c
@@ -0,0 +1,116 @@
+$NetBSD: patch-src_main.c,v 1.1 2014/02/04 11:36:44 obache Exp $
+
+insert NetBSD specific cd code
+
+--- src/main.c.orig 2013-12-27 00:51:30.000000000 +0000
++++ src/main.c
+@@ -28,7 +28,7 @@ Foundation; version 2 of the licence.
+ #include <stdbool.h>
+ #include <signal.h>
+
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ #include <sys/cdio.h>
+ #elif defined(__linux__)
+ #include <linux/cdrom.h>
+@@ -192,7 +192,7 @@ bool check_disc(char * cdrom)
+ bool ret = false;
+ int status;
+
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ struct ioc_read_subchannel cdsc;
+ struct cd_sub_channel_info data;
+ #endif
+@@ -229,7 +229,7 @@ bool check_disc(char * cdrom)
+ static bool alreadyKnowGood = false; /* check when program just started */
+ static bool alreadyCleared = true; /* no need to clear when program just started */
+
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ bzero(&cdsc, sizeof(cdsc));
+ cdsc.data = &data;
+ cdsc.data_len = sizeof(data);
+@@ -356,7 +356,7 @@ void eject_disc(char * cdrom)
+ //~ {
+ //~ ioctl(fd, CDROMCLOSETRAY, CDSL_CURRENT);
+ //~ } else {
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ ioctl(fd, CDIOCALLOW);
+ ioctl(fd, CDIOCEJECT);
+ #elif defined(__linux__)
+@@ -479,6 +479,12 @@ cddb_disc_t * read_disc(char * cdrom)
+ struct ioc_read_toc_single_entry te;
+ struct ioc_read_subchannel cdsc;
+ struct cd_sub_channel_info data;
++#elif defined(__NetBSD__)
++ struct ioc_toc_header th;
++ struct ioc_read_toc_entry te;
++ struct cd_toc_entry toc ;
++ struct ioc_read_subchannel cdsc;
++ struct cd_sub_channel_info data;
+ #elif defined(__linux__)
+ struct cdrom_tochdr th;
+ struct cdrom_tocentry te;
+@@ -549,6 +555,60 @@ cddb_disc_t * read_disc(char * cdrom)
+ }
+ }
+ }
++#elif defined(__NetBSD__)
++ // read disc status info
++ 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).
++ if (ioctl(fd, CDIOREADTOCHEADER, &th) == 0)
++ {
++ debugLog("starting track: %d\n", th.starting_track);
++ debugLog("ending track: %d\n", th.ending_track);
++
++ disc = cddb_disc_new();
++ if (disc == NULL)
++ fatalError("cddb_disc_new() failed. Out of memory?");
++
++ te.address_format = CD_LBA_FORMAT;
++ te.data = &toc ;
++ te.data_len=sizeof(struct cd_toc_entry) ;
++ for (i=th.starting_track; i<=th.ending_track; i++)
++ {
++ te.starting_track = i;
++ if ((ioctl(fd, CDIOREADTOCENTRIES, &te)) == 0)
++ {
++ if (te.data->control & 0x04)
++ {
++ // track is a DATA track. make sure its "rip" box is not checked by default
++ track_format[i] = FALSE;
++ } else {
++ track_format[i] = TRUE;
++ }
++
++ track = cddb_track_new();
++ if (track == NULL)
++ fatalError("cddb_track_new() failed. Out of memory?");
++
++ cddb_track_set_frame_offset(track, te.data->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.starting_track = 0xAA;
++ if (ioctl(fd, CDIOREADTOCENTRIES, &te) == 0)
++ {
++ cddb_disc_set_length(disc, (te.data->addr.lba+SECONDS_TO_FRAMES(2))/SECONDS_TO_FRAMES(1));
++ }
++ }
++ }
+ #elif defined(__linux__)
+ // read disc status info
+ status = ioctl(fd, CDROM_DISC_STATUS, CDSL_CURRENT);
diff --git a/audio/asunder/patches/patch-src_wrappers.c b/audio/asunder/patches/patch-src_wrappers.c
new file mode 100644
index 00000000000..29b600bf2a7
--- /dev/null
+++ b/audio/asunder/patches/patch-src_wrappers.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_wrappers.c,v 1.1 2014/02/04 11:36:44 obache Exp $
+
+skip missing WIFCONTINUED
+
+--- src/wrappers.c.orig 2013-12-18 16:17:29.000000000 +0000
++++ src/wrappers.c
+@@ -135,8 +135,10 @@ void sigchld(int signum)
+ debugLog("killed by signal %d\n", WTERMSIG(status));
+ else if (WIFSTOPPED(status))
+ debugLog("stopped by signal %d\n", WSTOPSIG(status));
++#if defined(WIFCONTINUED)
+ else if (WIFCONTINUED(status))
+ debugLog("continued\n");
++#endif
+
+ if (status != 0)
+ {