pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/libgroove



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun Mar 22 07:53:00 UTC 2020

Modified Files:
        pkgsrc/audio/libgroove: Makefile distinfo
Added Files:
        pkgsrc/audio/libgroove/patches: patch-groove_encoder.c
            patch-groove_file.c patch-groove_playlist.c

Log Message:
libgroove: Clean up. Use ffmpeg4.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 pkgsrc/audio/libgroove/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/audio/libgroove/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/libgroove/patches/patch-groove_encoder.c \
    pkgsrc/audio/libgroove/patches/patch-groove_file.c \
    pkgsrc/audio/libgroove/patches/patch-groove_playlist.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/libgroove/Makefile
diff -u pkgsrc/audio/libgroove/Makefile:1.24 pkgsrc/audio/libgroove/Makefile:1.25
--- pkgsrc/audio/libgroove/Makefile:1.24        Sun Mar  8 16:48:45 2020
+++ pkgsrc/audio/libgroove/Makefile     Sun Mar 22 07:52:59 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2020/03/08 16:48:45 wiz Exp $
+# $NetBSD: Makefile,v 1.25 2020/03/22 07:52:59 nia Exp $
 
 DISTNAME=      libgroove-4.3.0
 PKGREVISION=   6
@@ -11,7 +11,7 @@ COMMENT=      Audio dispatching library
 LICENSE=       mit
 
 USE_CMAKE=     yes
-USE_TOOLS+=    gmake pkg-config perl:build
+USE_TOOLS+=    pkg-config
 USE_LANGUAGES= c c++
 
 .include "../../mk/bsd.prefs.mk"
@@ -22,20 +22,13 @@ SOEXT=      dylib
 SOEXT= so
 .endif
 
-CMAKE_ARGS+=   -DAVFILTER_INCLUDE_DIRS:PATH=${BUILDLINK_PREFIX.ffmpeg3}/include/ffmpeg3
-CMAKE_ARGS+=   -DAVFILTER_LIBRARIES:PATH=${BUILDLINK_PREFIX.ffmpeg3}/lib/ffmpeg3/libavfilter.${SOEXT}
-
-CMAKE_ARGS+=   -DAVFORMAT_INCLUDE_DIRS:PATH=${BUILDLINK_PREFIX.ffmpeg3}/include/ffmpeg3
-CMAKE_ARGS+=   -DAVFORMAT_LIBRARIES:PATH=${BUILDLINK_PREFIX.ffmpeg3}/lib/ffmpeg3/libavformat.${SOEXT}
-
-CMAKE_ARGS+=   -DAVCODEC_INCLUDE_DIRS:PATH=${BUILDLINK_PREFIX.ffmpeg3}/include/ffmpeg3
-CMAKE_ARGS+=   -DAVCODEC_LIBRARIES:PATH=${BUILDLINK_PREFIX.ffmpeg3}/lib/ffmpeg3/libavcodec.${SOEXT}
-
-CMAKE_ARGS+=   -DAVUTIL_INCLUDE_DIRS:PATH=${BUILDLINK_PREFIX.ffmpeg3}/include/ffmpeg3
-CMAKE_ARGS+=   -DAVUTIL_LIBRARIES:PATH=${BUILDLINK_PREFIX.ffmpeg3}/lib/ffmpeg3/libavutil.${SOEXT}
+.for lib in AVCODEC AVFILTER AVFORMAT AVUTIL
+CMAKE_ARGS+=   -D${lib}_INCLUDE_DIRS=${BUILDLINK_PREFIX.ffmpeg4}/include/ffmpeg4
+CMAKE_ARGS+=   -D${lib}_LIBRARIES=${BUILDLINK_PREFIX.ffmpeg4}/lib/ffmpeg4/lib${lib:tl}.${SOEXT}
+.endfor
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-BUILD_DEPENDS+=        yasm-[0-9]*:../../devel/yasm
+TOOL_DEPENDS+= yasm-[0-9]*:../../devel/yasm
 .endif
 
 BUILDLINK_TRANSFORM+=  rm:-Werror
@@ -47,5 +40,5 @@ CFLAGS.NetBSD+=       -D_NETBSD_SOURCE
 .include "../../audio/libebur128/buildlink3.mk"
 .include "../../audio/speexdsp/buildlink3.mk"
 .include "../../devel/SDL2/buildlink3.mk"
-.include "../../multimedia/ffmpeg3/buildlink3.mk"
+.include "../../multimedia/ffmpeg4/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/audio/libgroove/distinfo
diff -u pkgsrc/audio/libgroove/distinfo:1.4 pkgsrc/audio/libgroove/distinfo:1.5
--- pkgsrc/audio/libgroove/distinfo:1.4 Tue Feb 20 05:17:31 2018
+++ pkgsrc/audio/libgroove/distinfo     Sun Mar 22 07:52:59 2020
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.4 2018/02/20 05:17:31 kamil Exp $
+$NetBSD: distinfo,v 1.5 2020/03/22 07:52:59 nia Exp $
 
 SHA1 (libgroove-4.3.0.tar.gz) = 3d64b6bb5ba14043ae1924b8e8f96bb0716f469d
 RMD160 (libgroove-4.3.0.tar.gz) = af4b30b7fbc887bc030d3bb18f34576ce7a0a16f
 SHA512 (libgroove-4.3.0.tar.gz) = 30d75a3b1b3efa9b33687bb146648b66f8f4c718551c0db2c24c0259f09cf355a7c7bbac40d60d7a97bbbd7f83401d09464c6ac2b18cdfcd6198220cefc8a705
 Size (libgroove-4.3.0.tar.gz) = 48857 bytes
+SHA1 (patch-groove_encoder.c) = 2a351fe67428256300cbaaef97d009dbbed659ea
+SHA1 (patch-groove_file.c) = ae89be22e18481b8b312aa55eee0bab523a80874
+SHA1 (patch-groove_playlist.c) = 31049d013d3635779c825184534cc40d4b683c6a

Added files:

Index: pkgsrc/audio/libgroove/patches/patch-groove_encoder.c
diff -u /dev/null pkgsrc/audio/libgroove/patches/patch-groove_encoder.c:1.1
--- /dev/null   Sun Mar 22 07:53:00 2020
+++ pkgsrc/audio/libgroove/patches/patch-groove_encoder.c       Sun Mar 22 07:52:59 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-groove_encoder.c,v 1.1 2020/03/22 07:52:59 nia Exp $
+
+Fix build with ffmpeg4.
+
+--- groove/encoder.c.orig      2015-05-26 01:32:01.000000000 +0000
++++ groove/encoder.c
+@@ -616,7 +616,7 @@ int groove_encoder_attach(struct GrooveE
+ 
+     e->sink->audio_format = encoder->actual_audio_format;
+     e->sink->buffer_size = encoder->sink_buffer_size;
+-    e->sink->buffer_sample_count = (codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) ?
++    e->sink->buffer_sample_count = (codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) ?
+         0 : e->stream->codec->frame_size;
+     e->sink->gain = encoder->gain;
+ 
Index: pkgsrc/audio/libgroove/patches/patch-groove_file.c
diff -u /dev/null pkgsrc/audio/libgroove/patches/patch-groove_file.c:1.1
--- /dev/null   Sun Mar 22 07:53:00 2020
+++ pkgsrc/audio/libgroove/patches/patch-groove_file.c  Sun Mar 22 07:52:59 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-groove_file.c,v 1.1 2020/03/22 07:52:59 nia Exp $
+
+Fix build with ffmpeg4.
+
+--- groove/file.c.orig 2015-05-26 01:32:01.000000000 +0000
++++ groove/file.c
+@@ -281,7 +281,7 @@ int groove_file_save(struct GrooveFile *
+         ocodec->rc_buffer_size = icodec->rc_buffer_size;
+         ocodec->field_order    = icodec->field_order;
+ 
+-        uint64_t extra_size = (uint64_t)icodec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE;
++        uint64_t extra_size = (uint64_t)icodec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE;
+         if (extra_size > INT_MAX) {
+             cleanup_save(file);
+             av_log(NULL, AV_LOG_ERROR, "codec extra size too big\n");
Index: pkgsrc/audio/libgroove/patches/patch-groove_playlist.c
diff -u /dev/null pkgsrc/audio/libgroove/patches/patch-groove_playlist.c:1.1
--- /dev/null   Sun Mar 22 07:53:00 2020
+++ pkgsrc/audio/libgroove/patches/patch-groove_playlist.c      Sun Mar 22 07:52:59 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-groove_playlist.c,v 1.1 2020/03/22 07:52:59 nia Exp $
+
+Fix build with ffmpeg4.
+
+--- groove/playlist.c.orig     2015-05-26 01:32:01.000000000 +0000
++++ groove/playlist.c
+@@ -186,7 +186,7 @@ static int audio_decode_frame(struct Gro
+ 
+         if (!got_frame) {
+             // stop sending empty packets if the decoder is finished
+-            if (!pkt_temp->data && dec->codec->capabilities & CODEC_CAP_DELAY)
++            if (!pkt_temp->data && dec->codec->capabilities & AV_CODEC_CAP_DELAY)
+                 return 0;
+             continue;
+         }
+@@ -571,7 +571,7 @@ static int decode_one_frame(struct Groov
+     pthread_mutex_unlock(&f->seek_mutex);
+ 
+     if (f->eof) {
+-        if (f->audio_st->codec->codec->capabilities & CODEC_CAP_DELAY) {
++        if (f->audio_st->codec->codec->capabilities & AV_CODEC_CAP_DELAY) {
+             av_init_packet(pkt);
+             pkt->data = NULL;
+             pkt->size = 0;



Home | Main Index | Thread Index | Old Index