aboutsummaryrefslogtreecommitdiff
path: root/x11/leechcraft
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-11-25 08:45:53 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-11-25 08:45:53 +0000
commit888970bd2a1ba1e51ee6efa7a7555bdda1483b40 (patch)
tree23d696653d1b3065f345de4e16170e0e651454a9 /x11/leechcraft
parentb4bf24d419c5782817b0b36db3ff03ad116e13fc (diff)
downloadports-888970bd2a1ba1e51ee6efa7a7555bdda1483b40.tar.gz
ports-888970bd2a1ba1e51ee6efa7a7555bdda1483b40.zip
x11/leechcraft: unbreak with ffmpeg 3.x
src/plugins/musiczombie/chroma.cpp:41:10: fatal error: 'libavutil/audioconvert.h' file not found #include <libavutil/audioconvert.h> ^ src/plugins/musiczombie/chroma.cpp:125:35: error: use of undeclared identifier 'avcodec_alloc_frame' std::shared_ptr<AVFrame> frame (avcodec_alloc_frame (), ^ src/plugins/musiczombie/chroma.cpp:126:27: error: use of undeclared identifier 'avcodec_free_frame'; did you mean 'avcodec_get_name'? [] (AVFrame *frame) { avcodec_free_frame (&frame); }); ^~~~~~~~~~~~~~~~~~ avcodec_get_name /usr/local/include/libavcodec/avcodec.h:6187:13: note: 'avcodec_get_name' declared here const char *avcodec_get_name(enum AVCodecID id); ^ src/plugins/musiczombie/chroma.cpp:126:47: error: cannot initialize a parameter of type 'enum AVCodecID' with an rvalue of type 'AVFrame **' [] (AVFrame *frame) { avcodec_free_frame (&frame); }); ^~~~~~ /usr/local/include/libavcodec/avcodec.h:6187:45: note: passing argument to parameter 'id' here const char *avcodec_get_name(enum AVCodecID id); ^ PR: 207547 Obtained from: upstream Approved by: portmgr blanket
Notes
Notes: svn path=/head/; revision=427085
Diffstat (limited to 'x11/leechcraft')
-rw-r--r--x11/leechcraft/Makefile2
-rw-r--r--x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp34
2 files changed, 35 insertions, 1 deletions
diff --git a/x11/leechcraft/Makefile b/x11/leechcraft/Makefile
index b92985d5c643..4bdf5f2f4091 100644
--- a/x11/leechcraft/Makefile
+++ b/x11/leechcraft/Makefile
@@ -3,7 +3,7 @@
PORTNAME= leechcraft
PORTVERSION= 0.6.70
-PORTREVISION= 12
+PORTREVISION= 13
CATEGORIES= x11
MASTER_SITES= http://dist.leechcraft.org/LeechCraft/0.6.70/
diff --git a/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp b/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp
new file mode 100644
index 000000000000..e2a29c5860bc
--- /dev/null
+++ b/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp
@@ -0,0 +1,34 @@
+https://github.com/0xd34df00d/leechcraft/commit/307be1dd37059e49eca37f77ddc4806125a8f843
+https://github.com/0xd34df00d/leechcraft/commit/53d56cafd3a1d299601d9f3bfd4ee051ae9121ba
+https://github.com/0xd34df00d/leechcraft/commit/875e3b43b7a91656f61180b2b2179137f18e6d71
+
+--- plugins/musiczombie/chroma.cpp.orig 2014-07-28 18:35:44 UTC
++++ plugins/musiczombie/chroma.cpp
+@@ -38,7 +38,6 @@ extern "C"
+ {
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+-#include <libavutil/audioconvert.h>
+ #include <libavutil/samplefmt.h>
+ #include <libavutil/opt.h>
+ #include <libswresample/swresample.h>
+@@ -122,8 +121,8 @@ namespace MusicZombie
+ auto remaining = maxLength * codecCtx->channels * codecCtx->sample_rate;
+ chromaprint_start (Ctx_, codecCtx->sample_rate, codecCtx->channels);
+
+- std::shared_ptr<AVFrame> frame (avcodec_alloc_frame (),
+- [] (AVFrame *frame) { avcodec_free_frame (&frame); });
++ std::shared_ptr<AVFrame> frame (av_frame_alloc (),
++ [] (AVFrame *frame) { av_frame_free (&frame); });
+ auto maxDstNbSamples = 0;
+
+ uint8_t *dstData [1] = { nullptr };
+@@ -140,7 +139,7 @@ namespace MusicZombie
+ if (packet.stream_index != streamIndex)
+ continue;
+
+- avcodec_get_frame_defaults (frame.get ());
++ av_frame_unref (frame.get ());
+ int gotFrame = false;
+ auto consumed = avcodec_decode_audio4 (codecCtx.get (), frame.get (), &gotFrame, &packet);
+