pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/ices-mp3



Module Name:    pkgsrc
Committed By:   kim
Date:           Tue Dec  3 09:57:13 UTC 2024

Modified Files:
        pkgsrc/audio/ices-mp3: Makefile distinfo
Added Files:
        pkgsrc/audio/ices-mp3/patches: patch-configure.ac patch-src_in_flac.c
Removed Files:
        pkgsrc/audio/ices-mp3/patches: patch-aa

Log Message:
audio/ices-mp3: Bring back FLAC support

Thanks to Dan Engholm


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 pkgsrc/audio/ices-mp3/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/audio/ices-mp3/distinfo
cvs rdiff -u -r1.3 -r0 pkgsrc/audio/ices-mp3/patches/patch-aa
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ices-mp3/patches/patch-configure.ac \
    pkgsrc/audio/ices-mp3/patches/patch-src_in_flac.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/ices-mp3/Makefile
diff -u pkgsrc/audio/ices-mp3/Makefile:1.57 pkgsrc/audio/ices-mp3/Makefile:1.58
--- pkgsrc/audio/ices-mp3/Makefile:1.57 Sat Nov 16 12:03:10 2024
+++ pkgsrc/audio/ices-mp3/Makefile      Tue Dec  3 09:57:13 2024
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.57 2024/11/16 12:03:10 wiz Exp $
+# $NetBSD: Makefile,v 1.58 2024/12/03 09:57:13 kim Exp $
 #
 
 DISTNAME=              ices-${ICES_VERSION}
 PKGNAME=               ices-mp3-${ICES_VERSION}
-PKGREVISION=           38
+PKGREVISION=           39
 ICES_VERSION=          0.4
 CATEGORIES=            audio
 MASTER_SITES=          https://svn.xiph.org/releases/ices/
@@ -57,8 +57,7 @@ do-install:
        done
        ${INSTALL_DATA_DIR} ${DESTDIR}${MODDIR}
 
-# does not support flac-1.1.3 API
-#.include "../../audio/flac/buildlink3.mk"
+.include "../../audio/flac/buildlink3.mk"
 .include "../../audio/lame/buildlink3.mk"
 .include "../../audio/libshout/buildlink3.mk"
 .include "../../audio/libvorbis/buildlink3.mk"

Index: pkgsrc/audio/ices-mp3/distinfo
diff -u pkgsrc/audio/ices-mp3/distinfo:1.7 pkgsrc/audio/ices-mp3/distinfo:1.8
--- pkgsrc/audio/ices-mp3/distinfo:1.7  Tue Oct 26 09:59:02 2021
+++ pkgsrc/audio/ices-mp3/distinfo      Tue Dec  3 09:57:13 2024
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.7 2021/10/26 09:59:02 nia Exp $
+$NetBSD: distinfo,v 1.8 2024/12/03 09:57:13 kim Exp $
 
 BLAKE2s (ices-0.4.tar.gz) = 4d107b7de5591d0e92dd48cc44f64aa7dcfff2714c8b115578ebc4f93c952d93
 SHA512 (ices-0.4.tar.gz) = a66c811c4156b92efb615c6024477ae979cdca69701b44853bbd1e6c2696d0ddc618f9ee16b0c7c83591ee50b365210c17732c170dca5266d7cebe2bcd5767d3
 Size (ices-0.4.tar.gz) = 372837 bytes
-SHA1 (patch-aa) = 4b1734579176a76dc3de27985b505d631c140ee4
+SHA1 (patch-configure.ac) = 4b1734579176a76dc3de27985b505d631c140ee4
+SHA1 (patch-src_in_flac.c) = d7aa28c15b55d424e67fa6052570b8ea7f6007fe

Added files:

Index: pkgsrc/audio/ices-mp3/patches/patch-configure.ac
diff -u /dev/null pkgsrc/audio/ices-mp3/patches/patch-configure.ac:1.1
--- /dev/null   Tue Dec  3 09:57:13 2024
+++ pkgsrc/audio/ices-mp3/patches/patch-configure.ac    Tue Dec  3 09:57:13 2024
@@ -0,0 +1,25 @@
+$NetBSD: patch-configure.ac,v 1.1 2024/12/03 09:57:13 kim Exp $
+
+First chunk: automake-1.13 compat.
+Rest: ?
+
+--- configure.ac.orig  2004-08-28 18:54:44.000000000 +0000
++++ configure.ac
+@@ -73,7 +73,7 @@ dnl -- Build system init --
+ 
+ AM_INIT_AUTOMAKE([1.6 foreign])
+ AM_MAINTAINER_MODE
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AC_PROG_LIBTOOL
+ AC_SUBST(LIBTOOL_DEPS)
+ 
+@@ -367,7 +367,7 @@ then
+     LDFLAGS="$LDFLAGS -L$with_flac/lib"
+   fi
+ 
+-  AC_CHECK_HEADER(faad.h, have_flac="maybe")
++  AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac="maybe")
+   if test "$have_flac" != "no"
+   then
+     AC_CHECK_LIB(FLAC, FLAC__stream_decoder_new, [
Index: pkgsrc/audio/ices-mp3/patches/patch-src_in_flac.c
diff -u /dev/null pkgsrc/audio/ices-mp3/patches/patch-src_in_flac.c:1.1
--- /dev/null   Tue Dec  3 09:57:13 2024
+++ pkgsrc/audio/ices-mp3/patches/patch-src_in_flac.c   Tue Dec  3 09:57:13 2024
@@ -0,0 +1,66 @@
+$NetBSD: patch-src_in_flac.c,v 1.1 2024/12/03 09:57:13 kim Exp $
+
+Adapt to latest libFLAC API.
+
+--- src/in_flac.c.orig 2004-07-31 17:52:24.000000000 +0000
++++ src/in_flac.c
+@@ -76,18 +76,10 @@ ices_flac_open (input_stream_t* self, ch
+     return -1;
+   }
+ 
+-  FLAC__stream_decoder_set_read_callback(decoder, flac_read_cb);
+-  FLAC__stream_decoder_set_write_callback(decoder, flac_write_cb);
+-  FLAC__stream_decoder_set_metadata_callback(decoder, flac_metadata_cb);
+-  FLAC__stream_decoder_set_error_callback(decoder, flac_error_cb);
+-
+-  FLAC__stream_decoder_set_metadata_respond(decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
+-
+   if (!(flac_data = (flac_in_t*)malloc (sizeof (flac_in_t)))) {
+     ices_log_error ("Malloc failed in ices_flac_open");
+     goto errDecoder;
+   }
+-  FLAC__stream_decoder_set_client_data(decoder, self);
+ 
+   flac_data->decoder = decoder;
+   flac_data->parsed = 0;
+@@ -96,8 +88,13 @@ ices_flac_open (input_stream_t* self, ch
+ 
+   self->data = flac_data;
+ 
+-  switch (FLAC__stream_decoder_init(decoder)) {
+-  case FLAC__STREAM_DECODER_SEARCH_FOR_METADATA:
++  /* This needs to be called before initializing the decoder. */
++  FLAC__stream_decoder_set_metadata_respond(decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT);
++
++  switch (FLAC__stream_decoder_init_stream(decoder,
++      flac_read_cb, NULL, NULL, NULL, NULL, /* seek, tell, length, eof */
++      flac_write_cb, flac_metadata_cb, flac_error_cb, self)) {
++  case FLAC__STREAM_DECODER_INIT_STATUS_OK:
+     break;
+   case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
+     ices_log_error("Could not allocate memory during FLAC decoder init");
+@@ -193,8 +190,10 @@ flac_read_cb(const FLAC__StreamDecoder* 
+     }
+     if ((len = read(self->fd, buffer, *bytes)) > 0)
+       return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+-    if (!len)
++    if (!len) {
++      *bytes = 0;
+       return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
++    }
+     ices_log_error("Error reading FLAC stream: %s", ices_util_strerror(errno, errbuf, sizeof(errbuf)));
+     return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+   }
+@@ -251,10 +250,10 @@ flac_metadata_cb(const FLAC__StreamDecod
+     for (i = 0; i < metadata->data.vorbis_comment.num_comments; i++) {
+       comment = metadata->data.vorbis_comment.comments + i;
+ 
+-      if (comment->length >= 6 && !strncasecmp("artist", comment->entry, 6)) {
++      if (comment->length >= 7 && !strncasecmp("artist=", comment->entry, 7)) {
+       if ((artist = malloc(comment->length - 6)))
+         snprintf(artist, comment->length - 6, "%s", comment->entry + 7);
+-      } else if (comment->length >= 5 && !strncasecmp("title", comment->entry, 5)) {
++      } else if (comment->length >= 6 && !strncasecmp("title=", comment->entry, 6)) {
+       if ((title = malloc(comment->length - 5)))
+         snprintf(title, comment->length - 5, "%s", comment->entry + 6);
+       }



Home | Main Index | Thread Index | Old Index