diff options
author | drochner <drochner@pkgsrc.org> | 2009-07-07 17:44:50 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2009-07-07 17:44:50 +0000 |
commit | 87b67596b5879412392d9c82858105543eb7963e (patch) | |
tree | 6676e6e385cf7c95772059b926ba5ea2f937c197 /audio | |
parent | 3ced7caf97f265e02437b36bcc2e819bfecaf6d9 (diff) | |
download | pkgsrc-87b67596b5879412392d9c82858105543eb7963e.tar.gz |
update to 0.2.2
changes:
-Addded the discid_get_webservice_url() function
-portability improvements
pkgsrc change: add NetBSD support
Diffstat (limited to 'audio')
-rw-r--r-- | audio/libdiscid/Makefile | 6 | ||||
-rw-r--r-- | audio/libdiscid/distinfo | 10 | ||||
-rw-r--r-- | audio/libdiscid/patches/patch-aa | 13 | ||||
-rw-r--r-- | audio/libdiscid/patches/patch-ab | 114 |
4 files changed, 136 insertions, 7 deletions
diff --git a/audio/libdiscid/Makefile b/audio/libdiscid/Makefile index 7874c3313db..9d2f76e5b66 100644 --- a/audio/libdiscid/Makefile +++ b/audio/libdiscid/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2007/06/08 06:42:32 wiz Exp $ +# $NetBSD: Makefile,v 1.4 2009/07/07 17:44:50 drochner Exp $ -DISTNAME= libdiscid-0.1.0 +DISTNAME= libdiscid-0.2.2 CATEGORIES= audio MASTER_SITES= http://users.musicbrainz.org/~matt/ @@ -8,7 +8,7 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://musicbrainz.org/doc/libdiscid COMMENT= Library for creating MusicBrainz DiscIDs -ONLY_FOR_PLATFORM= Darwin-*-* Linux-*-* +ONLY_FOR_PLATFORM= Darwin-*-* Linux-*-* NetBSD-*-* GNU_CONFIGURE= yes USE_LIBTOOL= yes diff --git a/audio/libdiscid/distinfo b/audio/libdiscid/distinfo index ab9370edd8d..13e82784594 100644 --- a/audio/libdiscid/distinfo +++ b/audio/libdiscid/distinfo @@ -1,5 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2006/10/13 02:31:56 epg Exp $ +$NetBSD: distinfo,v 1.2 2009/07/07 17:44:50 drochner Exp $ -SHA1 (libdiscid-0.1.0.tar.gz) = fbd4494155086206a717e0ef94e08d0f2978b317 -RMD160 (libdiscid-0.1.0.tar.gz) = f18b21bdb33eb0f4471b5e68a3b7bff295c70ab7 -Size (libdiscid-0.1.0.tar.gz) = 327716 bytes +SHA1 (libdiscid-0.2.2.tar.gz) = 103ead94eeb8bea04ad92ab15ed6832be9b3fad9 +RMD160 (libdiscid-0.2.2.tar.gz) = 200703a02cb47d19f478b9a9c83e01a22737f491 +Size (libdiscid-0.2.2.tar.gz) = 347907 bytes +SHA1 (patch-aa) = da67f45f26672a5c4e08d81954696bc0a5907022 +SHA1 (patch-ab) = 364cc81b7db9f84a82fe7dd7330f8648fa23cf21 diff --git a/audio/libdiscid/patches/patch-aa b/audio/libdiscid/patches/patch-aa new file mode 100644 index 00000000000..d4fa05a7e21 --- /dev/null +++ b/audio/libdiscid/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD: patch-aa,v 1.1 2009/07/07 17:44:51 drochner Exp $ + +--- configure.orig 2009-06-16 19:05:52.000000000 +0200 ++++ configure +@@ -2474,7 +2474,7 @@ case "${host_cpu}-${host_os}" in + *-freebsd*) os=freebsd ;; + *-darwin*) os=darwin; LIBS='-framework CoreFoundation -framework IOKit';; + *-linux*) os=linux ;; +- #*-netbsd*) os=netbsd ;; ++ *-netbsd*) os=freebsd ;; + #*-openbsd*) os=openbsd ;; + #*-os2_emx*) os=os2 ;; + #*-solaris*) os=solaris; LIBS='-lsocket -lnsl' ;; diff --git a/audio/libdiscid/patches/patch-ab b/audio/libdiscid/patches/patch-ab new file mode 100644 index 00000000000..0edad29f1bb --- /dev/null +++ b/audio/libdiscid/patches/patch-ab @@ -0,0 +1,114 @@ +$NetBSD: patch-ab,v 1.1 2009/07/07 17:44:51 drochner Exp $ + +--- src/disc_freebsd.c.orig 2008-01-12 12:41:51.000000000 +0100 ++++ src/disc_freebsd.c +@@ -45,6 +45,9 @@ + + #define XA_INTERVAL ((60 + 90 + 2) * CD_FRAMES) + ++#ifdef __NetBSD__ ++#define CDIOREADTOCENTRY CDIOREADTOCENTRIES ++#endif + + /* TODO: make sure it's available */ + int snprintf(char *str, size_t size, const char *format, ...); +@@ -52,7 +55,12 @@ int snprintf(char *str, size_t size, con + + static int read_toc_header(int fd, int *first, int *last) { + struct ioc_toc_header th; ++#ifdef __NetBSD__ ++ struct cd_toc_entry td; ++ struct ioc_read_toc_entry te; ++#else + struct ioc_read_toc_single_entry te; ++#endif + + int ret = ioctl(fd, CDIOREADTOCHEADER, &th); + +@@ -68,10 +76,20 @@ static int read_toc_header(int fd, int * + * session are handled correctly. + */ + te.address_format = CD_LBA_FORMAT; ++#ifdef __NetBSD__ ++ te.starting_track = th.ending_track; ++ te.data_len = sizeof(td); ++ te.data = &td; ++#else + te.track = th.ending_track; ++#endif + ret = ioctl(fd, CDIOREADTOCENTRY, &te); + ++#ifdef __NetBSD__ ++ if (( td.control & CD_DATA_TRACK) != 0 ) ++#else + if (( te.entry.control & CD_DATA_TRACK) != 0 ) ++#endif + (*last)--; + + return ret; +@@ -79,17 +97,32 @@ static int read_toc_header(int fd, int * + + + static int read_toc_entry(int fd, int track_num, unsigned long *lba) { ++#ifdef __NetBSD__ ++ struct cd_toc_entry td; ++ struct ioc_read_toc_entry te; ++#else + struct ioc_read_toc_single_entry te; ++#endif + int ret; + ++#ifdef __NetBSD__ ++ te.starting_track = track_num; ++ te.data_len = sizeof(td); ++ te.data = &td; ++#else + te.track = track_num; ++#endif + te.address_format = CD_LBA_FORMAT; + + ret = ioctl(fd, CDIOREADTOCENTRY, &te); + assert( te.address_format == CD_LBA_FORMAT ); + + if ( ret == 0 ) ++#ifdef __NetBSD__ ++ *lba = td.addr.lba; ++#else + *lba = ntohl(te.entry.addr.lba); ++#endif + + return ret; + } +@@ -97,16 +130,32 @@ static int read_toc_entry(int fd, int tr + + static int read_leadout(int fd, unsigned long *lba) { + struct ioc_toc_header th; ++#ifdef __NetBSD__ ++ struct cd_toc_entry td; ++ struct ioc_read_toc_entry te; ++#else + struct ioc_read_toc_single_entry te; ++#endif + int ret; + + ret = ioctl(fd, CDIOREADTOCHEADER, &th); ++#ifdef __NetBSD__ ++ te.starting_track = th.ending_track; ++ te.data_len = sizeof(td); ++ te.data = &td; ++#else + te.track = th.ending_track; ++#endif + te.address_format = CD_LBA_FORMAT; + ret = ioctl(fd, CDIOREADTOCENTRY, &te); + ++#ifdef __NetBSD__ ++ if (( td.control & CD_DATA_TRACK) != 0 ) { ++ *lba = td.addr.lba - 11400; ++#else + if (( te.entry.control & CD_DATA_TRACK) != 0 ) { + *lba = ntohl(te.entry.addr.lba) - 11400; ++#endif + return ret; + } + |