diff options
author | nia <nia@pkgsrc.org> | 2020-03-22 07:52:59 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-03-22 07:52:59 +0000 |
commit | 1be53389132109e09b72a51e28fdd23b2bea0890 (patch) | |
tree | aeccb5a0bbf676051ebd14ca8442030bb84337f0 /audio/libgroove | |
parent | 19b86a82e9babc6b988781d86f0ea5acd05fcec7 (diff) | |
download | pkgsrc-1be53389132109e09b72a51e28fdd23b2bea0890.tar.gz |
libgroove: Clean up. Use ffmpeg4.
Diffstat (limited to 'audio/libgroove')
-rw-r--r-- | audio/libgroove/Makefile | 23 | ||||
-rw-r--r-- | audio/libgroove/distinfo | 5 | ||||
-rw-r--r-- | audio/libgroove/patches/patch-groove_encoder.c | 15 | ||||
-rw-r--r-- | audio/libgroove/patches/patch-groove_file.c | 15 | ||||
-rw-r--r-- | audio/libgroove/patches/patch-groove_playlist.c | 24 |
5 files changed, 66 insertions, 16 deletions
diff --git a/audio/libgroove/Makefile b/audio/libgroove/Makefile index 96892a45390..c6354c1edaa 100644 --- a/audio/libgroove/Makefile +++ b/audio/libgroove/Makefile @@ -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" diff --git a/audio/libgroove/distinfo b/audio/libgroove/distinfo index c0f212df7ad..cbf2d302854 100644 --- a/audio/libgroove/distinfo +++ b/audio/libgroove/distinfo @@ -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 --git a/audio/libgroove/patches/patch-groove_encoder.c b/audio/libgroove/patches/patch-groove_encoder.c new file mode 100644 index 00000000000..234a6343c44 --- /dev/null +++ b/audio/libgroove/patches/patch-groove_encoder.c @@ -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 --git a/audio/libgroove/patches/patch-groove_file.c b/audio/libgroove/patches/patch-groove_file.c new file mode 100644 index 00000000000..c7174088003 --- /dev/null +++ b/audio/libgroove/patches/patch-groove_file.c @@ -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 --git a/audio/libgroove/patches/patch-groove_playlist.c b/audio/libgroove/patches/patch-groove_playlist.c new file mode 100644 index 00000000000..757674499e8 --- /dev/null +++ b/audio/libgroove/patches/patch-groove_playlist.c @@ -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; |