Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/dvdstyler/, media-video/dvdstyler/files/
Date: Mon, 28 Feb 2022 09:48:54
Message-Id: 1646041727.eeba8be174a1d795b2a7bea5d050fd95f4751f03.aballier@gentoo
1 commit: eeba8be174a1d795b2a7bea5d050fd95f4751f03
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 28 09:48:38 2022 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 28 09:48:47 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eeba8be1
7
8 media-video/dvdstyler: bump to 3.2.1
9
10 use gtk3, fix build with ffmpeg 5
11
12 Package-Manager: Portage-3.0.30, Repoman-3.0.3
13 Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
14
15 media-video/dvdstyler/Manifest | 1 +
16 media-video/dvdstyler/dvdstyler-3.2.1.ebuild | 70 ++++++++++++++++++++++
17 media-video/dvdstyler/files/ffmpeg5.patch | 89 ++++++++++++++++++++++++++++
18 media-video/dvdstyler/files/wx30.patch | 14 +++++
19 4 files changed, 174 insertions(+)
20
21 diff --git a/media-video/dvdstyler/Manifest b/media-video/dvdstyler/Manifest
22 index 685628c2b439..1bfc852cc5dc 100644
23 --- a/media-video/dvdstyler/Manifest
24 +++ b/media-video/dvdstyler/Manifest
25 @@ -1 +1,2 @@
26 DIST DVDStyler-3.0.4.tar.bz2 8870498 BLAKE2B c1ec7651d90613cebbd8d4e62b4626b8a7e2069eadc07bfe9a91e51bf33638135ca975f4857242b3f9ff34606a4e6084200059c82ebc3aa146f446f9b77483ae SHA512 2747e6a494d331b6f35405d7d2ed47789f4452bb3d4e86b0c68cf0fafffb4e6de452b28fac0e9995c312017c7e4e8a3f89ad42bf0a0c99ce19c5d6c0ca6e351a
27 +DIST DVDStyler-3.2.1.tar.bz2 9040634 BLAKE2B f6c3ec5d6595b650ead167ae6532a0849cc6545e1531f10483a7dd2f9962ea6cd4494b7eb8224bbc6e70588b1054fc13a13a5e2f5d977b5b80692c7cc2553d53 SHA512 09124a6c8db2b8d8072bfe2f7de98474d736a36a66d5124eab1b925da9ca830901f554ca80d9a4403365616001d869237002a2cb467cf3cc11b37aea12ff9d90
28
29 diff --git a/media-video/dvdstyler/dvdstyler-3.2.1.ebuild b/media-video/dvdstyler/dvdstyler-3.2.1.ebuild
30 new file mode 100644
31 index 000000000000..b42c542e370e
32 --- /dev/null
33 +++ b/media-video/dvdstyler/dvdstyler-3.2.1.ebuild
34 @@ -0,0 +1,70 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +MY_P=${P/dvds/DVDS}
41 +WX_GTK_VER=3.0-gtk3
42 +
43 +inherit wxwidgets
44 +
45 +DESCRIPTION="A cross-platform free DVD authoring application"
46 +HOMEPAGE="https://www.dvdstyler.org/"
47 +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
48 +S="${WORKDIR}/${MY_P}"
49 +
50 +LICENSE="GPL-2"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~x86"
53 +IUSE="debug +udev"
54 +
55 +DEPEND="
56 + app-cdr/cdrtools
57 + >=app-cdr/dvd+rw-tools-7.1
58 + media-libs/libexif:=
59 + >=media-libs/wxsvg-1.5.23:=
60 + >=media-video/dvdauthor-0.7.1
61 + >=media-video/ffmpeg-2.6:0=[encode]
62 + >=media-video/xine-ui-0.99.7
63 + virtual/jpeg:0
64 + x11-libs/wxGTK:${WX_GTK_VER}=[gstreamer,X]
65 + sys-apps/dbus
66 + udev? ( >=virtual/libudev-215:= )"
67 +RDEPEND="${DEPEND}
68 + >=app-cdr/dvdisaster-0.72.4
69 + media-video/mjpegtools"
70 +BDEPEND="
71 + app-arch/zip
72 + app-text/xmlto
73 + sys-devel/gettext
74 + virtual/yacc
75 + virtual/pkgconfig"
76 +
77 +PATCHES=( "${FILESDIR}"/ffmpeg5.patch "${FILESDIR}"/wx30.patch )
78 +
79 +src_prepare() {
80 + default
81 +
82 + # disable obsolete GNOME 2.x libraries wrt #508854
83 + sed -i -e '/PKG_CONFIG/s:libgnomeui-2.0:dIsAbLeAuToMaGiC&:' configure || die
84 + # rmdir: failed to remove `tempfoobar': Directory not empty
85 + sed -i -e '/rmdir "$$t"/d' docs/Makefile.in || die
86 + # fix underlinking wrt #367863
87 + sed -i -e 's:@LIBS@:& -ljpeg:' wxVillaLib/Makefile.in || die
88 + # silence desktop-file-validate QA check
89 + sed -i \
90 + -e '/Icon/s:.png::' -e '/^Encoding/d' -e '/Categories/s:Application;::' \
91 + data/dvdstyler.desktop || die
92 +}
93 +
94 +src_configure() {
95 + setup-wxwidgets unicode
96 + econf \
97 + $(use_enable debug) \
98 + --with-wx-config="${WX_CONFIG}"
99 +}
100 +
101 +src_install() {
102 + default
103 + rm "${ED}"/usr/share/doc/${PF}/{COPYING*,INSTALL*} || die
104 +}
105
106 diff --git a/media-video/dvdstyler/files/ffmpeg5.patch b/media-video/dvdstyler/files/ffmpeg5.patch
107 new file mode 100644
108 index 000000000000..c7ef02833076
109 --- /dev/null
110 +++ b/media-video/dvdstyler/files/ffmpeg5.patch
111 @@ -0,0 +1,89 @@
112 +Index: DVDStyler-3.2.1/src/mediaenc_ffmpeg.cpp
113 +===================================================================
114 +--- DVDStyler-3.2.1.orig/src/mediaenc_ffmpeg.cpp
115 ++++ DVDStyler-3.2.1/src/mediaenc_ffmpeg.cpp
116 +@@ -26,10 +26,12 @@
117 + extern "C" {
118 + #define __STDC_CONSTANT_MACROS
119 + #define __STDC_LIMIT_MACROS
120 ++#include <libavcodec/avcodec.h>
121 + #include <libavformat/avformat.h>
122 + #include <libswscale/swscale.h>
123 + #include <libavutil/mathematics.h>
124 + #include <libavutil/avstring.h>
125 ++#include <libavutil/channel_layout.h>
126 + }
127 +
128 + #define AUDIO_BUF_SIZE 524288
129 +@@ -74,6 +76,9 @@ void print_error(const char *filename, i
130 + bool wxFfmpegMediaEncoder::BeginEncode(const wxString& fileName, VideoFormat videoFormat, AudioFormat audioFormat,
131 + AspectRatio aspectRatio, int videoBitrate, bool cbr) {
132 + EndEncode();
133 ++#if LIBAVCODEC_VERSION_MAJOR >= 59
134 ++ const
135 ++#endif
136 + AVOutputFormat* outputFormat = NULL;
137 + if (videoFormat == vfNONE || audioFormat == afNONE)
138 + outputFormat = av_guess_format(NULL, (const char*) fileName.ToUTF8(), NULL);
139 +@@ -83,13 +88,16 @@ bool wxFfmpegMediaEncoder::BeginEncode(c
140 + wxLogError(wxT("Cannot open output format"));
141 + return false;
142 + }
143 +- outputFormat->video_codec = videoFormat == vfNONE ? AV_CODEC_ID_NONE : AV_CODEC_ID_MPEG2VIDEO;
144 ++ enum AVCodecID video_codec, audio_codec;
145 ++
146 ++ video_codec = videoFormat == vfNONE ? AV_CODEC_ID_NONE : AV_CODEC_ID_MPEG2VIDEO;
147 ++
148 + if (audioFormat == afNONE)
149 +- outputFormat->audio_codec = AV_CODEC_ID_NONE;
150 ++ audio_codec = AV_CODEC_ID_NONE;
151 + else if (audioFormat == afAC3)
152 +- outputFormat->audio_codec = AV_CODEC_ID_AC3;
153 ++ audio_codec = AV_CODEC_ID_AC3;
154 + else
155 +- outputFormat->audio_codec = AV_CODEC_ID_MP2;
156 ++ audio_codec = AV_CODEC_ID_MP2;
157 +
158 + m_outputCtx = NULL;
159 + avformat_alloc_output_context2(&m_outputCtx, outputFormat, NULL, (const char*) fileName.ToUTF8());
160 +@@ -101,9 +109,9 @@ bool wxFfmpegMediaEncoder::BeginEncode(c
161 + m_outputCtx->packet_size = 2048;
162 +
163 + // add video and audio streams
164 +- if (!addVideoStream(outputFormat->video_codec, videoFormat, aspectRatio, videoBitrate, cbr))
165 ++ if (!addVideoStream(video_codec, videoFormat, aspectRatio, videoBitrate, cbr))
166 + return false;
167 +- if (!addAudioStream(outputFormat->audio_codec))
168 ++ if (!addAudioStream(audio_codec))
169 + return false;
170 +
171 + // open the output file
172 +@@ -170,6 +178,9 @@ bool wxFfmpegMediaEncoder::addVideoStrea
173 + m_videoStm->id = 0;
174 +
175 + // find the video encoder and open it
176 ++#if LIBAVCODEC_VERSION_MAJOR >= 59
177 ++ const
178 ++#endif
179 + AVCodec* encoder = avcodec_find_encoder((AVCodecID) codecId);
180 + if (!encoder) {
181 + wxLogError(wxT("Video codec not found"));
182 +@@ -235,7 +246,7 @@ bool wxFfmpegMediaEncoder::addVideoStrea
183 + return true;
184 + }
185 +
186 +-bool hasSampleFmt(AVCodec* codec, AVSampleFormat sample_fmt) {
187 ++bool hasSampleFmt(const AVCodec* codec, AVSampleFormat sample_fmt) {
188 + if (codec != NULL && codec->sample_fmts != NULL) {
189 + int fIdx = 0;
190 + while (codec->sample_fmts[fIdx] >= 0) {
191 +@@ -260,6 +271,9 @@ bool wxFfmpegMediaEncoder::addAudioStrea
192 + m_audioStm->id = 1;
193 +
194 + // find the audio encoder and open it
195 ++#if LIBAVCODEC_VERSION_MAJOR >= 59
196 ++ const
197 ++#endif
198 + AVCodec* encoder = NULL;
199 + AVSampleFormat sampleFmt = AV_SAMPLE_FMT_S16;
200 + if ((AVCodecID) codecId == AV_CODEC_ID_AC3) {
201
202 diff --git a/media-video/dvdstyler/files/wx30.patch b/media-video/dvdstyler/files/wx30.patch
203 new file mode 100644
204 index 000000000000..1ffde52696f0
205 --- /dev/null
206 +++ b/media-video/dvdstyler/files/wx30.patch
207 @@ -0,0 +1,14 @@
208 +Index: DVDStyler-3.2.1/wxVillaLib/PropDlg.cpp
209 +===================================================================
210 +--- DVDStyler-3.2.1.orig/wxVillaLib/PropDlg.cpp
211 ++++ DVDStyler-3.2.1/wxVillaLib/PropDlg.cpp
212 +@@ -760,7 +760,9 @@ void wxPropDlg::OnSelectColour(wxCommand
213 + ((wxButton*) event.GetEventObject())->GetName().Mid(12).ToLong(&index);
214 + ColourPanel* panel = ((ColourPanel*) m_controls[index]);
215 + m_colourData.SetColour(panel->GetColour());
216 ++#if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 1
217 + m_colourData.SetChooseAlpha(true);
218 ++#endif
219 + #ifdef __WXMSW__
220 + wxGenericColourDialog dialog(propWindow, &m_colourData);
221 + #else