pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/libgroove libgroove: Clean up. Use ffmpeg4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e36b7857d810
branches:  trunk
changeset: 413718:e36b7857d810
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Mar 22 07:52:59 2020 +0000

description:
libgroove: Clean up. Use ffmpeg4.

diffstat:

 audio/libgroove/Makefile                        |  23 ++++++++---------------
 audio/libgroove/distinfo                        |   5 ++++-
 audio/libgroove/patches/patch-groove_encoder.c  |  15 +++++++++++++++
 audio/libgroove/patches/patch-groove_file.c     |  15 +++++++++++++++
 audio/libgroove/patches/patch-groove_playlist.c |  24 ++++++++++++++++++++++++
 5 files changed, 66 insertions(+), 16 deletions(-)

diffs (131 lines):

diff -r dba8f0ad0b1c -r e36b7857d810 audio/libgroove/Makefile
--- a/audio/libgroove/Makefile  Sun Mar 22 07:47:00 2020 +0000
+++ b/audio/libgroove/Makefile  Sun Mar 22 07:52:59 2020 +0000
@@ -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 @@
 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= 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 @@
 .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"
diff -r dba8f0ad0b1c -r e36b7857d810 audio/libgroove/distinfo
--- a/audio/libgroove/distinfo  Sun Mar 22 07:47:00 2020 +0000
+++ b/audio/libgroove/distinfo  Sun Mar 22 07:52:59 2020 +0000
@@ -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
diff -r dba8f0ad0b1c -r e36b7857d810 audio/libgroove/patches/patch-groove_encoder.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libgroove/patches/patch-groove_encoder.c    Sun Mar 22 07:52:59 2020 +0000
@@ -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;
+ 
diff -r dba8f0ad0b1c -r e36b7857d810 audio/libgroove/patches/patch-groove_file.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libgroove/patches/patch-groove_file.c       Sun Mar 22 07:52:59 2020 +0000
@@ -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");
diff -r dba8f0ad0b1c -r e36b7857d810 audio/libgroove/patches/patch-groove_playlist.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libgroove/patches/patch-groove_playlist.c   Sun Mar 22 07:52:59 2020 +0000
@@ -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