summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattéo Delabre2018-07-26 16:15:57 -0400
committerMattéo Delabre2018-07-26 16:15:57 -0400
commit1b342abed0770f9bfac101d7ebded34564ed3a01 (patch)
tree81def5595f3656ec88b5852e2b225559cdad8584
parent663138361276733fb057fa926b122d0b6e16db77 (diff)
downloadaur-1b342abed0770f9bfac101d7ebded34564ed3a01.tar.gz
Workaround deprecated AVFMT_RAWPICTURE constant
New maintainer. Some code in the current Synfig version uses a deprecated & removed ffmpeg constant, thereby breaking the build. Workaround that by manually defining it to its correct value. Update the official Synfig website to use HTTPS.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD9
-rw-r--r--ffmpeg-3.0.patch61
3 files changed, 43 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19c61d282063..c0234a6caaa9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = synfig
pkgdesc = Professional vector animation program (CLI renderer only)
pkgver = 1.2.1
- pkgrel = 3
- url = http://synfig.org
+ pkgrel = 4
+ url = https://synfig.org
arch = x86_64
license = GPL2
makedepends = boost
@@ -29,7 +29,7 @@ pkgbase = synfig
source = https://downloads.sourceforge.net/project/synfig/releases/1.2.1/source/synfig-1.2.1.tar.gz
source = ffmpeg-3.0.patch
sha256sums = 4d8bada4e99f05ee16b4256fc3f5a551d00a745347944837bbd6fa158b57e457
- sha256sums = a443f7c663ec0f9969f7044e5831a4f543df5c69dfca3cc56b15259f56c516d1
+ sha256sums = 424b3cc38809038c3b015ce2a6d3a006d73aefe0445d0090fae45e8eb69b2b55
pkgname = synfig
diff --git a/PKGBUILD b/PKGBUILD
index 0d7bbe5acafd..a0f01caf0b7a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,14 @@
# $Id: PKGBUILD 276264 2017-12-27 19:52:10Z bpiotrowski $
-# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Mattéo Delabre <bonjour@matteodelabre.me>
+# Contriubtor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Franco Iacomella <yaco@gnu.org>
pkgname=synfig
pkgver=1.2.1
-pkgrel=3
+pkgrel=4
pkgdesc="Professional vector animation program (CLI renderer only)"
arch=(x86_64)
-url="http://synfig.org"
+url="https://synfig.org"
license=('GPL2')
depends=('libxml++2.6' 'libsigc++2.0' 'etl' 'libmagick6' 'ffmpeg' 'fontconfig'
'libpng' 'libtiff' 'libdv' 'libmng' 'cairo' 'pango' 'boost-libs' 'mlt'
@@ -19,7 +20,7 @@ replaces=('synfig-core')
source=(https://downloads.sourceforge.net/project/synfig/releases/$pkgver/source/synfig-$pkgver.tar.gz
ffmpeg-3.0.patch)
sha256sums=('4d8bada4e99f05ee16b4256fc3f5a551d00a745347944837bbd6fa158b57e457'
- 'a443f7c663ec0f9969f7044e5831a4f543df5c69dfca3cc56b15259f56c516d1')
+ '424b3cc38809038c3b015ce2a6d3a006d73aefe0445d0090fae45e8eb69b2b55')
prepare() {
cd $pkgname-$pkgver
diff --git a/ffmpeg-3.0.patch b/ffmpeg-3.0.patch
index b20cbf7b2d46..d6f993d1736f 100644
--- a/ffmpeg-3.0.patch
+++ b/ffmpeg-3.0.patch
@@ -1,5 +1,5 @@
diff --git a/src/modules/mod_libavcodec/mptr.cpp b/src/modules/mod_libavcodec/mptr.cpp
-index 52d9a8f..79f568d 100644
+index 52d9a8fc1..79f568d1e 100644
--- a/src/modules/mod_libavcodec/mptr.cpp
+++ b/src/modules/mod_libavcodec/mptr.cpp
@@ -57,8 +57,8 @@ SYNFIG_IMPORTER_SET_SUPPORTS_FILE_SYSTEM_WRAPPER(Importer_LibAVCodec, false);
@@ -14,7 +14,7 @@ index 52d9a8f..79f568d 100644
}
diff --git a/src/modules/mod_libavcodec/mptr.h b/src/modules/mod_libavcodec/mptr.h
-index e2ffbc1..0d5365b 100644
+index e2ffbc14f..0d5365bef 100644
--- a/src/modules/mod_libavcodec/mptr.h
+++ b/src/modules/mod_libavcodec/mptr.h
@@ -46,7 +46,7 @@ private:
@@ -27,10 +27,19 @@ index e2ffbc1..0d5365b 100644
virtual bool get_frame(synfig::Surface &surface, const synfig::RendDesc &renddesc, synfig::Time time, synfig::ProgressCallback *callback);
diff --git a/src/modules/mod_libavcodec/trgt_av.cpp b/src/modules/mod_libavcodec/trgt_av.cpp
-index d5cc54c..30ae1dd 100644
+index d5cc54cb7..fcafecb94 100644
--- a/src/modules/mod_libavcodec/trgt_av.cpp
+++ b/src/modules/mod_libavcodec/trgt_av.cpp
-@@ -58,7 +58,6 @@ extern "C"
+@@ -24,6 +24,8 @@
+
+ /* === H E A D E R S ======================================================= */
+
++#define AVFMT_RAWPICTURE 0x0020
++
+ #ifdef USING_PCH
+ # include "pch.h"
+ #else
+@@ -58,7 +60,6 @@ extern "C"
# include <ffmpeg/swscale.h>
#endif
#endif
@@ -38,7 +47,7 @@ index d5cc54c..30ae1dd 100644
}
#ifndef DISABLE_MODULE
-@@ -74,6 +73,22 @@ extern "C"
+@@ -74,6 +75,22 @@ extern "C"
#ifndef DISABLE_MODULE
@@ -61,7 +70,7 @@ index d5cc54c..30ae1dd 100644
#ifdef _WIN32
#define snprintf _snprintf
#endif
-@@ -119,17 +134,17 @@ AVFrame *alloc_picture(int pix_fmt, int width, int height)
+@@ -119,17 +136,17 @@ AVFrame *alloc_picture(int pix_fmt, int width, int height)
uint8_t *picture_buf;
int size;
@@ -82,7 +91,7 @@ index d5cc54c..30ae1dd 100644
return picture;
}
-@@ -251,10 +266,10 @@ public:
+@@ -251,10 +268,10 @@ public:
if (context->frame_size <= 1) {
audio_input_frame_size = audiobuffer.size() / context->channels;
switch(stream->codec.codec_id) {
@@ -97,7 +106,7 @@ index d5cc54c..30ae1dd 100644
audio_input_frame_size >>= 1;
break;
default:
-@@ -347,7 +362,7 @@ public:
+@@ -347,7 +364,7 @@ public:
}
//try to open the codec
@@ -106,7 +115,7 @@ index d5cc54c..30ae1dd 100644
{
synfig::warning("open_video: could not open desired codec");
return 0;
-@@ -379,7 +394,7 @@ public:
+@@ -379,7 +396,7 @@ public:
(possibly translate directly to required coordinate systems later on... less error)
*/
encodable = NULL;
@@ -115,7 +124,7 @@ index d5cc54c..30ae1dd 100644
{
encodable = alloc_picture(context->pix_fmt, context->width, context->height);
if(!encodable)
-@@ -415,12 +430,12 @@ public:
+@@ -415,12 +432,12 @@ public:
}
@@ -130,7 +139,7 @@ index d5cc54c..30ae1dd 100644
context->width, context->height, context->pix_fmt,
SWS_BICUBIC, NULL, NULL, NULL);
-@@ -432,7 +447,7 @@ public:
+@@ -432,7 +449,7 @@ public:
sws_freeContext (img_convert_ctx);
#else
img_convert((AVPicture *)encodable, context->pix_fmt,
@@ -139,7 +148,7 @@ index d5cc54c..30ae1dd 100644
context->width, context->height);
#endif
-@@ -447,7 +462,7 @@ public:
+@@ -447,7 +464,7 @@ public:
if( context->coded_frame )
pkt.pts = context->coded_frame->pts;
if( context->coded_frame && context->coded_frame->key_frame)
@@ -148,7 +157,7 @@ index d5cc54c..30ae1dd 100644
//kluge for raw picture format (they said they'd fix)
if (formatc->oformat->flags & AVFMT_RAWPICTURE)
-@@ -457,7 +472,7 @@ public:
+@@ -457,7 +474,7 @@ public:
else
{
//encode our given image
@@ -157,7 +166,7 @@ index d5cc54c..30ae1dd 100644
//if greater than zero we've got stuff to write
if (size > 0)
-@@ -469,7 +484,7 @@ public:
+@@ -469,7 +486,7 @@ public:
if( context->coded_frame )
pkt.pts = context->coded_frame->pts;
if( context->coded_frame && context->coded_frame->key_frame)
@@ -166,7 +175,7 @@ index d5cc54c..30ae1dd 100644
ret = av_write_frame(formatc, &pkt);
-@@ -572,18 +587,18 @@ public:
+@@ -572,18 +589,18 @@ public:
//guess if we have a type string, otherwise use filename
if (typestring)
{
@@ -189,7 +198,7 @@ index d5cc54c..30ae1dd 100644
}
if(!format)
-@@ -610,7 +625,7 @@ public:
+@@ -610,7 +627,7 @@ public:
//audio_st = NULL;
//video stream
@@ -198,7 +207,7 @@ index d5cc54c..30ae1dd 100644
{
video_st = add_video_stream(format->video_codec,vInfo);
if(!video_st)
-@@ -620,7 +635,7 @@ public:
+@@ -620,7 +637,7 @@ public:
}
//audio stream
@@ -207,7 +216,7 @@ index d5cc54c..30ae1dd 100644
{
audio_st = add_audio_stream(format->audio_codec,aInfo);
}*/
-@@ -630,10 +645,10 @@ public:
+@@ -630,10 +647,10 @@ public:
video_st->codec->time_base= (AVRational){1,vInfo.fps};
video_st->codec->width = vInfo.w;
video_st->codec->height = vInfo.h;
@@ -220,7 +229,7 @@ index d5cc54c..30ae1dd 100644
//open codecs and allocate buffers
if(video_st)
-@@ -657,7 +672,7 @@ public:
+@@ -657,7 +674,7 @@ public:
if(!(format->flags & AVFMT_NOFILE))
{
//use libav's file open function (what does it do differently????)
@@ -229,7 +238,7 @@ index d5cc54c..30ae1dd 100644
{
synfig::warning("Unable to open file: %s", filename);
return 0;
-@@ -666,7 +681,7 @@ public:
+@@ -666,7 +683,7 @@ public:
//allocate the picture to render to
//may have to retrieve the width, height from the codec... for resizing...
@@ -238,7 +247,7 @@ index d5cc54c..30ae1dd 100644
if(!picture)
{
synfig::warning("Unable to allocate the temporary AVFrame surface");
-@@ -678,7 +693,7 @@ public:
+@@ -678,7 +695,7 @@ public:
//vInfo.h = video_st->codec.height;
//write the stream header
@@ -247,7 +256,7 @@ index d5cc54c..30ae1dd 100644
return true;
}
-@@ -718,9 +733,9 @@ public:
+@@ -718,9 +735,9 @@ public:
{
/* close the output file */
#if LIBAVFORMAT_VERSION_INT >= (52<<16)
@@ -259,7 +268,7 @@ index d5cc54c..30ae1dd 100644
#endif
}
-@@ -750,16 +765,17 @@ public:
+@@ -750,16 +767,17 @@ public:
AVCodecContext *context;
AVStream *st;
@@ -280,7 +289,7 @@ index d5cc54c..30ae1dd 100644
//PARAMETERS MUST BE PASSED IN SOMEHOW (ANOTHER FUNCTION PARAMETER???)
-@@ -781,8 +797,8 @@ public:
+@@ -781,8 +799,8 @@ public:
context->gop_size = info.fps/4; /* emit one intra frame every twelve frames at most */
//HACK: MPEG requires b frames be set... any better way to do this?
@@ -291,7 +300,7 @@ index d5cc54c..30ae1dd 100644
{
/* just for testing, we also add B frames */
context->max_b_frames = 2;
-@@ -797,16 +813,17 @@ public:
+@@ -797,16 +815,17 @@ public:
AVCodecContext *context;
AVStream *stream;
@@ -312,7 +321,7 @@ index d5cc54c..30ae1dd 100644
/* put sample parameters */
context->bit_rate = 64000;
-@@ -828,7 +845,7 @@ Target_LibAVCodec::Target_LibAVCodec(const char *Filename,
+@@ -828,7 +847,7 @@ Target_LibAVCodec::Target_LibAVCodec(const char *Filename,
registered = true;
av_register_all();
}