summaryrefslogtreecommitdiff
path: root/media-libs/wxsvg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /media-libs/wxsvg
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'media-libs/wxsvg')
-rw-r--r--media-libs/wxsvg/Manifest3
-rw-r--r--media-libs/wxsvg/files/ffmpeg5.patch64
-rw-r--r--media-libs/wxsvg/wxsvg-1.5.23.ebuild44
3 files changed, 111 insertions, 0 deletions
diff --git a/media-libs/wxsvg/Manifest b/media-libs/wxsvg/Manifest
index b69f34d5e7cb..d566712b009e 100644
--- a/media-libs/wxsvg/Manifest
+++ b/media-libs/wxsvg/Manifest
@@ -1,3 +1,6 @@
+AUX ffmpeg5.patch 2264 BLAKE2B 35be30758a9c2c5b8f14d28a4c54dc26b0ec843ec7f9c1dda1b49f232de19cc114e3965f712cc4a158e24da3fd0ef058122c3d523a1519c72f9b71d584c23c2f SHA512 0d130f44f4b64ce369bf92d71c82c0b06b74470114dfe5b43787dffd3098d5642beb91a6d2d3c4fbee22c04cc810e5bc1f279bbfb753e732ba8c5b5195914245
DIST wxsvg-1.5.11.tar.bz2 514919 BLAKE2B d15d3478b69c4db4bd1cfc5032ff4909d35aca45f69694dbb74db72bc9d651fae3b8948382f60abd3f93a36dd4756f8f8f2c37acf7ac0b8859a9b03cb8cfda55 SHA512 d3538969bc0dda6bab740efef6952c2ca92e0ca74780c6370e3c6daf21d641e894b570d13b6ca408839b1b37df2aca9a3cf32d6423ddbf5f9f84274cfb1b8582
+DIST wxsvg-1.5.23.tar.bz2 500351 BLAKE2B 369bd7cee8581df72712183ecb997f0cebae6e7fe942d4cad123d77472b5e3f479f604854bc267990e7ec29c9420625433a4b8a3fe799fcae0e4d6173d411c50 SHA512 c15f58fecbee595f0f981c9347f1e1b929656b7d9c9dfb699252111df927d554cb88b6d7801b323451b0f906ec8c7d6935c9e15372e213f1921f0fdd90733422
EBUILD wxsvg-1.5.11-r1.ebuild 917 BLAKE2B 73fcf2c6c52b0e81e57b019eb459f89736a92793e51aefcc4a19ddeaa691b8760a79c8a9d879fd70a5baa16bc00ae3b140fac5bab845e223ba1be3bd6d915518 SHA512 4f530f4e96ad23c06100b2fa119045a7ab825bde2d93dda74d1819d70385ce593c025e65a2e45812a2c91fd3a5c2ba763b0517cd77e76cf98ed692354dc50f7c
+EBUILD wxsvg-1.5.23.ebuild 964 BLAKE2B b199dadd10a3dcf9773b27f9c93f963be89fe9995b6cf2afe3ca10a697d005cccd3d66cb3979dedfa832dbe18d725ee073761c37fc95a4fe2e3aac55ed8fcc22 SHA512 f3320fd449d1758a9591b06049c6be776cd9de2b06ba38d33ad1beab3fce96a0e97deec540fb031fe7b5ef005cf4d0919c5e6f53750d4f6f07b1573d8b2f51d3
MISC metadata.xml 337 BLAKE2B ff3fc593430adabb8ed657f5ce0ce689614750bf503c37c8b1a81aefccb2e5abb3b64e43febd8e0678db8d9b1c79ffbbd75d9912ac39ecd06d15434861ee6487 SHA512 a6a3cb4e46411e4dce39033cdb6fbe52d731c00919553ac8e40eb6260a228c80d6122b5a542b3863f7b743ce89d4248575aedefbe6b49654207476940ee2e71b
diff --git a/media-libs/wxsvg/files/ffmpeg5.patch b/media-libs/wxsvg/files/ffmpeg5.patch
new file mode 100644
index 000000000000..3b726ec79b5f
--- /dev/null
+++ b/media-libs/wxsvg/files/ffmpeg5.patch
@@ -0,0 +1,64 @@
+Index: wxsvg-1.5.23/include/wxSVG/mediadec_ffmpeg.h
+===================================================================
+--- wxsvg-1.5.23.orig/include/wxSVG/mediadec_ffmpeg.h
++++ wxsvg-1.5.23/include/wxSVG/mediadec_ffmpeg.h
+@@ -81,6 +81,7 @@ private:
+ bool OpenVideoDecoder();
+ void CloseVideoDecoder();
+ AVStream* GetVideoStream();
++ int64_t m_cur_dts;
+ };
+
+ #endif //FFMPEG_MEDIA_DECODER_H
+Index: wxsvg-1.5.23/src/mediadec_ffmpeg.cpp
+===================================================================
+--- wxsvg-1.5.23.orig/src/mediadec_ffmpeg.cpp
++++ wxsvg-1.5.23/src/mediadec_ffmpeg.cpp
+@@ -20,6 +20,7 @@
+ #define UINT64_C(val) val##ULL
+ #endif
+ extern "C" {
++#include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libswscale/swscale.h>
+ #include <libavutil/avutil.h>
+@@ -153,6 +154,9 @@ StreamType wxFfmpegMediaDecoder::GetStre
+ }
+
+ wxString wxFfmpegMediaDecoder::GetCodecName(unsigned int streamIndex) {
++#if LIBAVCODEC_VERSION_MAJOR >= 59
++ const
++#endif
+ AVCodec *codec = avcodec_find_decoder(m_formatCtx->streams[streamIndex]->codecpar->codec_id);
+ if (codec) {
+ return wxString(codec->name, wxConvLocal);
+@@ -193,6 +197,9 @@ bool wxFfmpegMediaDecoder::OpenVideoDeco
+
+ // find and open the decoder for the video stream
+ AVStream* stream = m_formatCtx->streams[m_videoStream];
++#if LIBAVCODEC_VERSION_MAJOR >= 59
++ const
++#endif
+ AVCodec* codec = avcodec_find_decoder(stream->codecpar->codec_id);
+ if (!codec)
+ return false;
+@@ -255,7 +262,11 @@ double wxFfmpegMediaDecoder::GetPosition
+ AVStream *st = GetVideoStream();
+ if (st == NULL)
+ return -1;
++#if LIBAVCODEC_VERSION_MAJOR >= 59
++ int64_t timestamp = m_cur_dts;
++#else
+ int64_t timestamp = st->cur_dts;
++#endif
+ if (timestamp == (int64_t)AV_NOPTS_VALUE)
+ return -1;
+ timestamp = av_rescale(timestamp, AV_TIME_BASE * (int64_t)st->time_base.num, st->time_base.den);
+@@ -308,6 +319,7 @@ wxImage wxFfmpegMediaDecoder::GetNextFra
+ uint8_t *rgbSrc[3] = { img.GetData(), NULL, NULL };
+ int rgbStride[3] = { 3 * m_width, 0, 0 };
+ sws_scale(imgConvertCtx, m_frame->data, m_frame->linesize, 0, m_codecCtx->height, rgbSrc, rgbStride);
++ m_cur_dts = packet.dts;
+ av_packet_unref(&packet);
+ sws_freeContext(imgConvertCtx);
+ return img;
diff --git a/media-libs/wxsvg/wxsvg-1.5.23.ebuild b/media-libs/wxsvg/wxsvg-1.5.23.ebuild
new file mode 100644
index 000000000000..6ed6b1b15bf6
--- /dev/null
+++ b/media-libs/wxsvg/wxsvg-1.5.23.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER=3.0-gtk3
+inherit wxwidgets
+
+DESCRIPTION="C++ library to create, manipulate and render SVG files"
+HOMEPAGE="http://wxsvg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="wxWinLL-3"
+SLOT="0/3" # based on SONAME of libwxsvg.so
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=dev-libs/expat-2:=
+ media-libs/libexif:=
+ >=dev-libs/glib-2.28:2=
+ dev-libs/libxml2:=
+ media-libs/fontconfig:=
+ media-libs/freetype:2=
+ media-libs/harfbuzz:=
+ x11-libs/cairo:=
+ x11-libs/pango:=
+ x11-libs/wxGTK:${WX_GTK_VER}=[X]
+ >=media-video/ffmpeg-2.6:0="
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+PATCHES=( "${FILESDIR}/ffmpeg5.patch" )
+
+src_configure() {
+ setup-wxwidgets base-unicode
+ econf \
+ --disable-static \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install() {
+ default
+
+ # no static archives
+ find "${ED}" -name '*.la' -delete || die
+}