Gentoo Archives: gentoo-commits

From: Stefan Strogin <steils@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/avidemux/files/, media-video/avidemux/
Date: Wed, 14 Aug 2019 02:24:18
Message-Id: 1565747992.f23642e1c7e3666eb9995258cdb7c705dd998ec6.steils@gentoo
1 commit: f23642e1c7e3666eb9995258cdb7c705dd998ec6
2 Author: Stefan Strogin <steils <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 14 01:26:35 2019 +0000
4 Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 14 01:59:52 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f23642e1
7
8 media-video/avidemux: bump version to 2.7.3
9
10 Closes: https://bugs.gentoo.org/657386
11 Closes: https://bugs.gentoo.org/646796
12 Package-Manager: Portage-2.3.71, Repoman-2.3.17
13 Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
14
15 media-video/avidemux/Manifest | 1 +
16 media-video/avidemux/avidemux-2.7.3.ebuild | 141 +++++++++++++++++++++
17 .../avidemux/files/avidemux-2.7.3-desktop.patch | 20 +++
18 3 files changed, 162 insertions(+)
19
20 diff --git a/media-video/avidemux/Manifest b/media-video/avidemux/Manifest
21 index 281d961cf75..e9ad4687cc9 100644
22 --- a/media-video/avidemux/Manifest
23 +++ b/media-video/avidemux/Manifest
24 @@ -1 +1,2 @@
25 +DIST 2.7.3.tar.gz 23772654 BLAKE2B f946c267140bc8aebda2ce027ed8cb7c84a98a401255d3e0cdaf7498680e8bd9c78a33c122cb177d397ed2dd6bc3c29d7508578028c2964c2897279bf860b62d SHA512 d7761de1c40de1b824efbcf24173ea738a2e0ba7fa41cefa09e7bac3ec97f3af4b04201e36f9de50ade2b09e394aa99ed1d4907f90bb132f9896e8f1b5e82d7a
26 DIST avidemux_2.7.0.tar.gz 21474504 BLAKE2B c6e55a0b5220d6d3746fa06162bf11253145fd28f2f6f744702d5e0342fba85e546a28883eb847139eadd34c94037ebc7d68f5576e7505a85288556468d14b96 SHA512 7c92213d3bd2849dbdb5a1aff2acd6da231fd76c561b756fbf4a1d5a41e9705d609d7a35b6ca6b77ceb3bf5138f861cd24ed16d8fcec4fd713f09a2ff07e9015
27
28 diff --git a/media-video/avidemux/avidemux-2.7.3.ebuild b/media-video/avidemux/avidemux-2.7.3.ebuild
29 new file mode 100644
30 index 00000000000..753377cf0f3
31 --- /dev/null
32 +++ b/media-video/avidemux/avidemux-2.7.3.ebuild
33 @@ -0,0 +1,141 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +CMAKE_MAKEFILE_GENERATOR="emake"
40 +
41 +inherit cmake-utils desktop qmake-utils xdg
42 +
43 +DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
44 +HOMEPAGE="http://fixounet.free.fr/avidemux"
45 +SRC_URI="https://github.com/mean00/avidemux2/archive/${PV}.tar.gz"
46 +
47 +# Multiple licenses because of all the bundled stuff.
48 +LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
49 +SLOT="2.7"
50 +KEYWORDS="~amd64 ~x86"
51 +IUSE="debug nls nvenc opengl qt5 sdl vaapi vdpau xv"
52 +
53 +COMMON_DEPEND="
54 + ~media-libs/avidemux-core-${PV}:${SLOT}[nls?,sdl?,vaapi?,vdpau?,xv?,nvenc?]
55 + nvenc? ( amd64? ( media-video/nvidia_video_sdk:0 ) )
56 + opengl? ( virtual/opengl:0 )
57 + qt5? (
58 + dev-qt/qtcore:5
59 + dev-qt/qtgui:5
60 + dev-qt/qtnetwork:5
61 + dev-qt/qtopengl:5
62 + dev-qt/qtwidgets:5
63 + )
64 + vaapi? ( x11-libs/libva:0= )
65 +"
66 +DEPEND="${COMMON_DEPEND}
67 + qt5? ( dev-qt/linguist-tools:5 )
68 +"
69 +RDEPEND="${COMMON_DEPEND}
70 + nls? ( virtual/libintl:0 )
71 + !<media-video/avidemux-${PV}
72 +"
73 +PDEPEND="~media-libs/avidemux-plugins-${PV}:${SLOT}[opengl?,qt5?]"
74 +
75 +S="${WORKDIR}/avidemux2-${PV}"
76 +
77 +src_prepare() {
78 + eapply "${FILESDIR}"/${P}-desktop.patch
79 +
80 + processes="buildCli:avidemux/cli"
81 + if use qt5 ; then
82 + processes+=" buildQt4:avidemux/qt4"
83 + fi
84 +
85 + for process in ${processes} ; do
86 + CMAKE_USE_DIR="${S}"/${process#*:} cmake-utils_src_prepare
87 + done
88 +
89 + # Fix icon name -> avidemux-2.7
90 + sed -i -e "/^Icon/ s:${PN}\.png:${PN}-${SLOT}:" appImage/${PN}.desktop || \
91 + die "Icon name fix failed."
92 +
93 + # The desktop file is broken. It uses avidemux2 instead of avidemux3
94 + # so it will actually launch avidemux-2.7 if it is installed.
95 + sed -i -e "/^Exec/ s:${PN}2:${PN}3:" appImage/${PN}.desktop || \
96 + die "Desktop file fix failed."
97 + if use qt5; then
98 + sed -i -re '/^Exec/ s:(avidemux3_)gtk:\1qt5:' appImage/${PN}.desktop || \
99 + die "Desktop file fix failed."
100 + fi
101 +
102 + # QA warnings: missing trailing ';' and 'Application' is deprecated.
103 + sed -i -e 's/Application;AudioVideo/AudioVideo;/g' appImage/${PN}.desktop || \
104 + die "Desktop file fix failed."
105 +
106 + # Now rename the desktop file to not collide with 2.6.
107 + mv appImage/${PN}.desktop ${PN}-${SLOT}.desktop || die "Collision rename failed."
108 +
109 + # Remove "Build Option" dialog because it doesn't reflect
110 + # what the GUI can or has been built with. (Bug #463628)
111 + sed -i -e '/Build Option/d' avidemux/common/ADM_commonUI/myOwnMenu.h || \
112 + die "Couldn't remove \"Build Option\" dialog."
113 +}
114 +
115 +src_configure() {
116 + # See bug 432322.
117 + use x86 && replace-flags -O0 -O1
118 +
119 + # The build relies on an avidemux-core header that uses 'nullptr'
120 + # which is from >=C++11. Let's use the GCC-6 default C++ dialect.
121 + append-cxxflags -std=c++14
122 +
123 + local mycmakeargs=(
124 + -DGETTEXT="$(usex nls)"
125 + -DSDL="$(usex sdl)"
126 + -DLibVA="$(usex vaapi)"
127 + -DVDPAU="$(usex vdpau)"
128 + -DXVIDEO="$(usex xv)"
129 + )
130 +
131 + if use qt5 ; then
132 + mycmakeargs+=(
133 + -DENABLE_QT5="$(usex qt5)"
134 + -DLRELEASE_EXECUTABLE="$(qt5_get_bindir)/lrelease"
135 + )
136 + fi
137 +
138 + if use debug ; then
139 + mycmakeargs+=( -DVERBOSE=1 -DADM_DEBUG=1 )
140 + fi
141 +
142 + for process in ${processes} ; do
143 + local build="${WORKDIR}/${P}_build/${process%%:*}"
144 + CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${build}" cmake-utils_src_configure
145 + done
146 +}
147 +
148 +src_compile() {
149 + for process in ${processes} ; do
150 + local build="${WORKDIR}/${P}_build/${process%%:*}"
151 + BUILD_DIR="${build}" cmake-utils_src_compile
152 + done
153 +}
154 +
155 +src_test() {
156 + for process in ${processes} ; do
157 + local build="${WORKDIR}/${P}_build/${process%%:*}"
158 + BUILD_DIR="${build}" cmake-utils_src_test
159 + done
160 +}
161 +
162 +src_install() {
163 + for process in ${processes} ; do
164 + local build="${WORKDIR}/${P}_build/${process%%:*}"
165 + BUILD_DIR="${build}" cmake-utils_src_install
166 + done
167 +
168 + cd "${S}" || die "Can't enter source folder."
169 + newicon ${PN}_icon.png ${PN}-${SLOT}.png
170 +
171 + if use qt5 ; then
172 + domenu ${PN}-${SLOT}.desktop
173 + fi
174 +}
175
176 diff --git a/media-video/avidemux/files/avidemux-2.7.3-desktop.patch b/media-video/avidemux/files/avidemux-2.7.3-desktop.patch
177 new file mode 100644
178 index 00000000000..51416d27495
179 --- /dev/null
180 +++ b/media-video/avidemux/files/avidemux-2.7.3-desktop.patch
181 @@ -0,0 +1,20 @@
182 +From 4ea6b2e4199eddef7748de4fd58c1f4d8bfbedd2 Mon Sep 17 00:00:00 2001
183 +From: eumagga0x2a <eumagga0x2a@××××××××××××××××××××.com>
184 +Date: Sun, 4 Aug 2019 15:34:19 +0800
185 +Subject: [PATCH] [appImage] Add missing Type entry to the .desktop file
186 +
187 +Upstream-Status: Accepted
188 +[https://github.com/mean00/avidemux2/commit/4ea6b2e4199eddef7748de4fd58c1f4d8bfbedd2]
189 +---
190 + appImage/avidemux.desktop | 1 +
191 + 1 file changed, 1 insertion(+)
192 +
193 +diff --git a/appImage/avidemux.desktop b/appImage/avidemux.desktop
194 +index 3006e4335..d017ff309 100644
195 +--- a/appImage/avidemux.desktop
196 ++++ b/appImage/avidemux.desktop
197 +@@ -2,3 +2,4 @@
198 + Name=AVIDEMUX
199 + Exec=avidemux3_portable
200 + Icon=avidemux.png
201 ++Type=Application