Sun Jun 16 09:58:48 2013 UTC ()
Update to 0.5.0. Changes:

- Read ISRCs and MCNs on Linux, Mac OS X and Windows.
- Add read_sparse() for faster reading again
- Added Solaris, OpenBSD and kFreeBSD support.


(shattered)
diff -r1.8 -r1.9 pkgsrc/audio/libdiscid/Makefile
diff -r1.3 -r1.4 pkgsrc/audio/libdiscid/distinfo
diff -r1.2 -r0 pkgsrc/audio/libdiscid/patches/patch-aa
diff -r1.1 -r1.2 pkgsrc/audio/libdiscid/patches/patch-ab

cvs diff -r1.8 -r1.9 pkgsrc/audio/libdiscid/Makefile (expand / switch to unified diff)

--- pkgsrc/audio/libdiscid/Makefile 2012/09/12 00:24:42 1.8
+++ pkgsrc/audio/libdiscid/Makefile 2013/06/16 09:58:48 1.9
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1# $NetBSD: Makefile,v 1.8 2012/09/12 00:24:42 asau Exp $ 1# $NetBSD: Makefile,v 1.9 2013/06/16 09:58:48 shattered Exp $
2 2
3DISTNAME= libdiscid-0.2.2 3DISTNAME= libdiscid-0.5.0
4CATEGORIES= audio 4CATEGORIES= audio
5MASTER_SITES= http://users.musicbrainz.org/~matt/ 5MASTER_SITES= http://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/
6 6
7MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= pkgsrc-users@NetBSD.org
8HOMEPAGE= http://musicbrainz.org/doc/libdiscid 8HOMEPAGE= http://musicbrainz.org/doc/libdiscid
9COMMENT= Library for creating MusicBrainz DiscIDs 9COMMENT= Library for creating MusicBrainz DiscIDs
10LICENSE= gnu-lgpl-v2.1 10LICENSE= gnu-lgpl-v2.1
11 11
12ONLY_FOR_PLATFORM= Darwin-*-* DragonFly-*-* FreeBSD-*-* Linux-*-* 12ONLY_FOR_PLATFORM= Darwin-*-* DragonFly-*-* FreeBSD-*-* Linux-*-*
13ONLY_FOR_PLATFORM+= NetBSD-*-* 13ONLY_FOR_PLATFORM+= NetBSD-*-* OpenBSD-*-* SunOS-*-*
14 14
15GNU_CONFIGURE= yes 15GNU_CONFIGURE= yes
16USE_LIBTOOL= yes 16USE_LIBTOOL= yes
17USE_TOOLS+= pkg-config 17USE_TOOLS+= pkg-config
18 18
19PKGCONFIG_OVERRIDE+= libdiscid.pc.in 19PKGCONFIG_OVERRIDE+= libdiscid.pc.in
20 20
21.include "../../mk/bsd.pkg.mk" 21.include "../../mk/bsd.pkg.mk"

cvs diff -r1.3 -r1.4 pkgsrc/audio/libdiscid/distinfo (expand / switch to unified diff)

--- pkgsrc/audio/libdiscid/distinfo 2011/03/27 07:28:24 1.3
+++ pkgsrc/audio/libdiscid/distinfo 2013/06/16 09:58:48 1.4
@@ -1,7 +1,6 @@ @@ -1,7 +1,6 @@
1$NetBSD: distinfo,v 1.3 2011/03/27 07:28:24 obache Exp $ 1$NetBSD: distinfo,v 1.4 2013/06/16 09:58:48 shattered Exp $
2 2
3SHA1 (libdiscid-0.2.2.tar.gz) = 103ead94eeb8bea04ad92ab15ed6832be9b3fad9 3SHA1 (libdiscid-0.5.0.tar.gz) = e046be72fca56bc1e5dce3568055331b58ee4dfc
4RMD160 (libdiscid-0.2.2.tar.gz) = 200703a02cb47d19f478b9a9c83e01a22737f491 4RMD160 (libdiscid-0.5.0.tar.gz) = 306e23457e191c07d906bbb5eb85fec127f1c3a7
5Size (libdiscid-0.2.2.tar.gz) = 347907 bytes 5Size (libdiscid-0.5.0.tar.gz) = 366828 bytes
6SHA1 (patch-aa) = 6dec55986fed1441c74f5be6bb9f97ef50c7cb2f 6SHA1 (patch-ab) = 6b626d5f7e2ca0b0bb231418429bdbea7b093dc4
7SHA1 (patch-ab) = 364cc81b7db9f84a82fe7dd7330f8648fa23cf21 

File Deleted: pkgsrc/audio/libdiscid/patches/Attic/patch-aa

cvs diff -r1.1 -r1.2 pkgsrc/audio/libdiscid/patches/Attic/patch-ab (expand / switch to unified diff)

--- pkgsrc/audio/libdiscid/patches/Attic/patch-ab 2009/07/07 17:44:51 1.1
+++ pkgsrc/audio/libdiscid/patches/Attic/patch-ab 2013/06/16 09:58:48 1.2
@@ -1,62 +1,60 @@ @@ -1,62 +1,60 @@
1$NetBSD: patch-ab,v 1.1 2009/07/07 17:44:51 drochner Exp $ 1$NetBSD: patch-ab,v 1.2 2013/06/16 09:58:48 shattered Exp $
2 2
3--- src/disc_freebsd.c.orig 2008-01-12 12:41:51.000000000 +0100 3--- src/disc_freebsd.c.orig 2013-04-12 11:46:44.000000000 +0000
4+++ src/disc_freebsd.c 4+++ src/disc_freebsd.c
5@@ -45,6 +45,9 @@ 5@@ -47,11 +47,19 @@
 6 #define MB_DEFAULT_DEVICE "/dev/acd0"
6  7
7 #define XA_INTERVAL ((60 + 90 + 2) * CD_FRAMES) 8 #define XA_INTERVAL ((60 + 90 + 2) * CD_FRAMES)
8  9-
 10+
9+#ifdef __NetBSD__ 11+#ifdef __NetBSD__
10+#define CDIOREADTOCENTRY CDIOREADTOCENTRIES 12+#define CDIOREADTOCENTRY CDIOREADTOCENTRIES
11+#endif 13+#endif
12  14
13 /* TODO: make sure it's available */ 
14 int snprintf(char *str, size_t size, const char *format, ...); 
15@@ -52,7 +55,12 @@ int snprintf(char *str, size_t size, con 
16  
17 static int read_toc_header(int fd, int *first, int *last) { 15 static int read_toc_header(int fd, int *first, int *last) {
18 struct ioc_toc_header th; 16 struct ioc_toc_header th;
19+#ifdef __NetBSD__ 17+#ifdef __NetBSD__
20+ struct cd_toc_entry td; 18+ struct cd_toc_entry td;
21+ struct ioc_read_toc_entry te; 19+ struct ioc_read_toc_entry te;
22+#else 20+#else
23 struct ioc_read_toc_single_entry te; 21 struct ioc_read_toc_single_entry te;
24+#endif 22+#endif
25  23
26 int ret = ioctl(fd, CDIOREADTOCHEADER, &th); 24 int ret = ioctl(fd, CDIOREADTOCHEADER, &th);
27  25
28@@ -68,10 +76,20 @@ static int read_toc_header(int fd, int * 26@@ -67,10 +75,20 @@ static int read_toc_header(int fd, int *
29 * session are handled correctly. 27 * session are handled correctly.
30 */ 28 */
31 te.address_format = CD_LBA_FORMAT; 29 te.address_format = CD_LBA_FORMAT;
32+#ifdef __NetBSD__ 30+#ifdef __NetBSD__
33+ te.starting_track = th.ending_track; 31+ te.starting_track = th.ending_track;
34+ te.data_len = sizeof(td); 32+ te.data_len = sizeof(td);
35+ te.data = &td; 33+ te.data = &td;
36+#else 34+#else
37 te.track = th.ending_track; 35 te.track = th.ending_track;
38+#endif 36+#endif
39 ret = ioctl(fd, CDIOREADTOCENTRY, &te); 37 ret = ioctl(fd, CDIOREADTOCENTRY, &te);
40  38
41+#ifdef __NetBSD__ 39+#ifdef __NetBSD__
42+ if (( td.control & CD_DATA_TRACK) != 0 ) 40+ if (( td.control & CD_DATA_TRACK) != 0 )
43+#else 41+#else
44 if (( te.entry.control & CD_DATA_TRACK) != 0 ) 42 if (( te.entry.control & CD_DATA_TRACK) != 0 )
45+#endif 43+#endif
46 (*last)--; 44 (*last)--;
47  45
48 return ret; 46 return ret;
49@@ -79,17 +97,32 @@ static int read_toc_header(int fd, int * 47@@ -78,17 +96,32 @@ static int read_toc_header(int fd, int *
50  48
51  49
52 static int read_toc_entry(int fd, int track_num, unsigned long *lba) { 50 static int read_toc_entry(int fd, int track_num, unsigned long *lba) {
53+#ifdef __NetBSD__ 51+#ifdef __NetBSD__
54+ struct cd_toc_entry td; 52+ struct cd_toc_entry td;
55+ struct ioc_read_toc_entry te; 53+ struct ioc_read_toc_entry te;
56+#else 54+#else
57 struct ioc_read_toc_single_entry te; 55 struct ioc_read_toc_single_entry te;
58+#endif 56+#endif
59 int ret; 57 int ret;
60  58
61+#ifdef __NetBSD__ 59+#ifdef __NetBSD__
62+ te.starting_track = track_num; 60+ te.starting_track = track_num;
@@ -69,27 +67,27 @@ $NetBSD: patch-ab,v 1.1 2009/07/07 17:44 @@ -69,27 +67,27 @@ $NetBSD: patch-ab,v 1.1 2009/07/07 17:44
69  67
70 ret = ioctl(fd, CDIOREADTOCENTRY, &te); 68 ret = ioctl(fd, CDIOREADTOCENTRY, &te);
71 assert( te.address_format == CD_LBA_FORMAT ); 69 assert( te.address_format == CD_LBA_FORMAT );
72  70
73 if ( ret == 0 ) 71 if ( ret == 0 )
74+#ifdef __NetBSD__ 72+#ifdef __NetBSD__
75+ *lba = td.addr.lba; 73+ *lba = td.addr.lba;
76+#else 74+#else
77 *lba = ntohl(te.entry.addr.lba); 75 *lba = ntohl(te.entry.addr.lba);
78+#endif 76+#endif
79  77
80 return ret; 78 return ret;
81 } 79 }
82@@ -97,16 +130,32 @@ static int read_toc_entry(int fd, int tr 80@@ -96,16 +129,32 @@ static int read_toc_entry(int fd, int tr
83  81
84 static int read_leadout(int fd, unsigned long *lba) { 82 static int read_leadout(int fd, unsigned long *lba) {
85 struct ioc_toc_header th; 83 struct ioc_toc_header th;
86+#ifdef __NetBSD__ 84+#ifdef __NetBSD__
87+ struct cd_toc_entry td; 85+ struct cd_toc_entry td;
88+ struct ioc_read_toc_entry te; 86+ struct ioc_read_toc_entry te;
89+#else 87+#else
90 struct ioc_read_toc_single_entry te; 88 struct ioc_read_toc_single_entry te;
91+#endif 89+#endif
92 int ret; 90 int ret;
93  91
94 ret = ioctl(fd, CDIOREADTOCHEADER, &th); 92 ret = ioctl(fd, CDIOREADTOCHEADER, &th);
95+#ifdef __NetBSD__ 93+#ifdef __NetBSD__