Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/avidemux-plugins/
Date: Sat, 01 Aug 2020 11:29:26
Message-Id: 1596281352.05577e82a1a13de88f4b3994cebfb8da6304a9de.fordfrog@gentoo
1 commit: 05577e82a1a13de88f4b3994cebfb8da6304a9de
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 1 11:28:55 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 1 11:29:12 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05577e82
7
8 media-libs/avidemux-plugins: switched to virtual/jack
9
10 Closes: https://bugs.gentoo.org/703820
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
13
14 .../avidemux-plugins-2.7.4-r1.ebuild | 161 +++++++++++++++++++++
15 1 file changed, 161 insertions(+)
16
17 diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.7.4-r1.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.7.4-r1.ebuild
18 new file mode 100644
19 index 00000000000..ed880a38ba5
20 --- /dev/null
21 +++ b/media-libs/avidemux-plugins/avidemux-plugins-2.7.4-r1.ebuild
22 @@ -0,0 +1,161 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +CMAKE_MAKEFILE_GENERATOR="emake"
29 +PYTHON_COMPAT=( python3_6 )
30 +
31 +inherit cmake python-single-r1
32 +
33 +DESCRIPTION="Plugins for the video editor media-video/avidemux"
34 +HOMEPAGE="http://fixounet.free.fr/avidemux"
35 +SRC_URI="https://github.com/mean00/avidemux2/archive/${PV}.tar.gz -> avidemux-${PV}.tar.gz"
36 +
37 +# Multiple licenses because of all the bundled stuff.
38 +LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain"
39 +SLOT="2.7"
40 +IUSE="a52 aac aften alsa amr dcaenc debug dts fdk fontconfig fribidi jack lame libsamplerate cpu_flags_x86_mmx nvenc opengl opus oss pulseaudio qt5 truetype twolame vdpau vorbis vpx x264 x265 xv xvid"
41 +KEYWORDS="~amd64 ~x86"
42 +
43 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
44 +
45 +COMMON_DEPEND="${PYTHON_DEPS}
46 + ~media-libs/avidemux-core-${PV}:${SLOT}[vdpau?]
47 + ~media-video/avidemux-${PV}:${SLOT}[opengl?,qt5?]
48 + dev-lang/spidermonkey:0=
49 + dev-libs/libxml2:2
50 + media-libs/a52dec
51 + media-libs/libass:0=
52 + media-libs/libmad
53 + media-libs/libmp4v2
54 + media-libs/libpng:0=
55 + virtual/libiconv
56 + aac? (
57 + media-libs/faac
58 + media-libs/faad2
59 + )
60 + aften? ( media-libs/aften )
61 + alsa? ( media-libs/alsa-lib )
62 + amr? ( media-libs/opencore-amr )
63 + dcaenc? ( media-sound/dcaenc )
64 + dts? ( media-libs/libdca )
65 + fdk? ( media-libs/fdk-aac:0= )
66 + fontconfig? ( media-libs/fontconfig:1.0 )
67 + fribidi? ( dev-libs/fribidi )
68 + jack? (
69 + virtual/jack
70 + libsamplerate? ( media-libs/libsamplerate )
71 + )
72 + lame? ( media-sound/lame )
73 + nvenc? ( amd64? ( media-video/nvidia_video_sdk ) )
74 + opus? ( media-libs/opus )
75 + pulseaudio? ( media-sound/pulseaudio )
76 + qt5? (
77 + dev-qt/qtcore:5
78 + dev-qt/qtgui:5
79 + dev-qt/qtwidgets:5
80 + )
81 + truetype? ( media-libs/freetype:2 )
82 + twolame? ( media-sound/twolame )
83 + vorbis? ( media-libs/libvorbis )
84 + vpx? ( media-libs/libvpx:0= )
85 + x264? ( media-libs/x264:0= )
86 + x265? ( media-libs/x265:0= )
87 + xv? (
88 + x11-libs/libX11
89 + x11-libs/libXext
90 + x11-libs/libXv
91 + )
92 + xvid? ( media-libs/xvid )
93 +"
94 +DEPEND="${COMMON_DEPEND}
95 + oss? ( virtual/os-headers )
96 +"
97 +RDEPEND="${COMMON_DEPEND}
98 + !<media-libs/avidemux-plugins-${PV}
99 +"
100 +
101 +S="${WORKDIR}/avidemux2-${PV}"
102 +
103 +PATCHES=( "${FILESDIR}"/${PN}-2.6.20-optional-pulse.patch )
104 +
105 +src_prepare() {
106 + default
107 +
108 + # Don't reapply PATCHES during cmake_src_prepare
109 + unset PATCHES
110 +
111 + processes="buildPluginsCommon:avidemux_plugins
112 + buildPluginsCLI:avidemux_plugins"
113 + use qt5 && processes+=" buildPluginsQt4:avidemux_plugins"
114 +
115 + for process in ${processes} ; do
116 + CMAKE_USE_DIR="${S}"/${process#*:} cmake_src_prepare
117 + done
118 +}
119 +
120 +src_configure() {
121 + # See bug 432322.
122 + use x86 && replace-flags -O0 -O1
123 +
124 + for process in ${processes} ; do
125 + local build="${WORKDIR}/${P}_build/${process%%:*}"
126 +
127 + local mycmakeargs=(
128 + -DAVIDEMUX_SOURCE_DIR='${S}'
129 + -DPLUGIN_UI=$(echo ${build/buildPlugins/} | tr '[:lower:]' '[:upper:]')
130 + -DFAAC="$(usex aac)"
131 + -DFAAD="$(usex aac)"
132 + -DALSA="$(usex alsa)"
133 + -DAFTEN="$(usex aften)"
134 + -DDCAENC="$(usex dcaenc)"
135 + -DFDK_AAC="$(usex fdk)"
136 + -DOPENCORE_AMRWB="$(usex amr)"
137 + -DOPENCORE_AMRNB="$(usex amr)"
138 + -DLIBDCA="$(usex dts)"
139 + -DFONTCONFIG="$(usex fontconfig)"
140 + -DJACK="$(usex jack)"
141 + -DLAME="$(usex lame)"
142 + -DNVENC="$(usex nvenc)"
143 + -DOPENGL="$(usex opengl)"
144 + -DOPUS="$(usex opus)"
145 + -DOSS="$(usex oss)"
146 + -DPULSEAUDIOSIMPLE="$(usex pulseaudio)"
147 + -DQT4=OFF
148 + -DFREETYPE2="$(usex truetype)"
149 + -DTWOLAME="$(usex twolame)"
150 + -DX264="$(usex x264)"
151 + -DX265="$(usex x265)"
152 + -DXVIDEO="$(usex xv)"
153 + -DXVID="$(usex xvid)"
154 + -DVDPAU="$(usex vdpau)"
155 + -DVORBIS="$(usex vorbis)"
156 + -DLIBVORBIS="$(usex vorbis)"
157 + -DVPXDEC="$(usex vpx)"
158 + -DUSE_EXTERNAL_LIBA52=yes
159 + -DUSE_EXTERNAL_LIBASS=yes
160 + -DUSE_EXTERNAL_LIBMAD=yes
161 + -DUSE_EXTERNAL_LIBMP4V2=yes
162 + )
163 +
164 + use qt5 && mycmakeargs+=( -DENABLE_QT5=True )
165 + use debug && mycmakeargs+=( -DVERBOSE=1 -DADM_DEBUG=1 )
166 +
167 + CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${build}" cmake_src_configure
168 + done
169 +}
170 +
171 +src_compile() {
172 + for process in ${processes} ; do
173 + local build="${WORKDIR}/${P}_build/${process%%:*}"
174 + BUILD_DIR="${build}" cmake_src_compile
175 + done
176 +}
177 +
178 +src_install() {
179 + for process in ${processes} ; do
180 + local build="${WORKDIR}/${P}_build/${process%%:*}"
181 + BUILD_DIR="${build}" cmake_src_install
182 + done
183 +}