From a959e6cd6260e38303fdaf649f09f2dc4991d2c9 Mon Sep 17 00:00:00 2001 From: backbone Date: Sun, 20 Mar 2022 05:21:08 +0300 Subject: [PATCH] up Avidemux to 2.8.0 --- .../avidemux-core/avidemux-core-2.8.0.ebuild | 99 +++++++++++ .../avidemux-core-2.7.6-ffmpeg-flags.patch | 8 + media-libs/avidemux-core/metadata.xml | 4 +- .../avidemux-plugins-2.8.0.ebuild | 166 ++++++++++++++++++ ...videmux-plugins-2.8.0-optional-pulse.patch | 21 +++ media-libs/avidemux-plugins/metadata.xml | 3 +- media-video/avidemux/Manifest | 5 +- media-video/avidemux/avidemux-2.8.0.ebuild | 141 +++++++++++++++ .../files/avidemux-2.7.4-qt-5.15.patch | 11 ++ 9 files changed, 452 insertions(+), 6 deletions(-) create mode 100644 media-libs/avidemux-core/avidemux-core-2.8.0.ebuild create mode 100644 media-libs/avidemux-core/files/avidemux-core-2.7.6-ffmpeg-flags.patch create mode 100644 media-libs/avidemux-plugins/avidemux-plugins-2.8.0.ebuild create mode 100644 media-libs/avidemux-plugins/files/avidemux-plugins-2.8.0-optional-pulse.patch create mode 100644 media-video/avidemux/avidemux-2.8.0.ebuild create mode 100644 media-video/avidemux/files/avidemux-2.7.4-qt-5.15.patch diff --git a/media-libs/avidemux-core/avidemux-core-2.8.0.ebuild b/media-libs/avidemux-core/avidemux-core-2.8.0.ebuild new file mode 100644 index 00000000..f1b9a125 --- /dev/null +++ b/media-libs/avidemux-core/avidemux-core-2.8.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" + +inherit cmake flag-o-matic toolchain-funcs + +DESCRIPTION="Core libraries for simple video cutting, filtering and encoding tasks" +HOMEPAGE="http://fixounet.free.fr/avidemux" +SRC_URI="https://github.com/mean00/avidemux2/archive/${PV}.tar.gz -> avidemux-${PV}.tar.gz" + +# Multiple licenses because of all the bundled stuff. +LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain" +SLOT="2.7" +KEYWORDS="~amd64 ~x86" +IUSE="debug nls nvenc sdl system-ffmpeg vaapi vdpau xv" + +# Trying to use virtual; ffmpeg misses aac,cpudetection USE flags now though, are they needed? +DEPEND=" + dev-db/sqlite:3 + nvenc? ( media-video/nvidia_video_sdk ) + sdl? ( media-libs/libsdl:0 ) + system-ffmpeg? ( >=media-video/ffmpeg-9:0[mp3,theora] ) + vaapi? ( x11-libs/libva:0= ) + vdpau? ( x11-libs/libvdpau:0 ) + xv? ( x11-libs/libXv:0 ) +" +RDEPEND=" + ${DEPEND} + ! - + media-video@gentoo.org @@ -10,6 +10,6 @@ Use the ffmpeg provided by the system. - avidemux + mean00/avidemux2 diff --git a/media-libs/avidemux-plugins/avidemux-plugins-2.8.0.ebuild b/media-libs/avidemux-plugins/avidemux-plugins-2.8.0.ebuild new file mode 100644 index 00000000..96b52b6a --- /dev/null +++ b/media-libs/avidemux-plugins/avidemux-plugins-2.8.0.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +PYTHON_COMPAT=( python3_{8..10} ) + +inherit cmake flag-o-matic python-single-r1 + +DESCRIPTION="Plugins for the video editor media-video/avidemux" +HOMEPAGE="http://fixounet.free.fr/avidemux" +SRC_URI="https://github.com/mean00/avidemux2/archive/${PV}.tar.gz -> avidemux-${PV}.tar.gz" + +# Multiple licenses because of all the bundled stuff. +LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain" +SLOT="2.7" +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" +KEYWORDS="~amd64 ~x86" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# dev-lang/spidermonkey is not required anymore +# see https://github.com/mean00/avidemux2/blob/master/avidemux_plugins/ADM_scriptEngines/CMakeLists.txt +COMMON_DEPEND=" + ${PYTHON_DEPS} + ~media-libs/avidemux-core-${PV}:${SLOT}[vdpau?] + ~media-video/avidemux-${PV}:${SLOT}[opengl?,qt5?] + dev-libs/libxml2:2 + media-libs/a52dec + media-libs/libass:0= + media-libs/libmad + media-libs/libmp4v2 + media-libs/libpng:0= + virtual/libiconv + aac? ( + media-libs/faac + media-libs/faad2 + ) + aften? ( media-libs/aften ) + alsa? ( media-libs/alsa-lib ) + amr? ( media-libs/opencore-amr ) + dcaenc? ( media-sound/dcaenc ) + dts? ( media-libs/libdca ) + fdk? ( media-libs/fdk-aac:0= ) + fontconfig? ( media-libs/fontconfig:1.0 ) + fribidi? ( dev-libs/fribidi ) + jack? ( + virtual/jack + libsamplerate? ( media-libs/libsamplerate ) + ) + lame? ( media-sound/lame ) + nvenc? ( amd64? ( media-video/nvidia_video_sdk ) ) + opus? ( media-libs/opus ) + pulseaudio? ( media-sound/pulseaudio ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + truetype? ( media-libs/freetype:2 ) + twolame? ( media-sound/twolame ) + vorbis? ( media-libs/libvorbis ) + vpx? ( media-libs/libvpx:0= ) + x264? ( media-libs/x264:0= ) + x265? ( media-libs/x265:0= ) + xv? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXv + ) + xvid? ( media-libs/xvid ) +" +DEPEND=" + ${COMMON_DEPEND} + oss? ( virtual/os-headers ) +" +RDEPEND=" + ${COMMON_DEPEND} + ! - + media-video@gentoo.org @@ -12,7 +12,6 @@ Adds support for encoding AAC using media-libs/fdk-aac. Enable unicode bidirectional algorithm support via dev-libs/fribidi. Adds support for NVIDIA Encoder (NVENC) API for hardware accelerated encoding on NVIDIA cards. - Adds support for the Opus codec via media-libs/opus. Enable TwoLAME support via media-sound/twolame, an optimised MPEG Audio Layer 2 (MP2) encoder. Enable WebM VP8 Codec SDK support via media-libs/libvpx. Enables HEVC support with media-libs/x265. diff --git a/media-video/avidemux/Manifest b/media-video/avidemux/Manifest index 8effcd52..2cfc4c42 100644 --- a/media-video/avidemux/Manifest +++ b/media-video/avidemux/Manifest @@ -1,2 +1,3 @@ -DIST avidemux-2.7.8.tar.gz 22080267 SHA512 6cd5527ab34517a07bf73e46d01f15b7ff023ff34ed70ee54f1d7dbfb6cf57364a323b4ecb89bb9aadeb9bc05473aacb40d8c4eecc522840a3c1c4b3a8756d82 -DIST avidemux-i18n-2.7.8.tar.gz 2488165 SHA512 a62b06a3d95577cf805be36f991ccb63d044b7c3633ada65bd5810f0e7d8eb41aa874ef5dd63de4fcacc0be073935bed827b2f0bceba77ab735ac8673c1ad39f +DIST avidemux-2.7.8.tar.gz 22080267 SHA256 8467b4e76c4b627997e56c65ce87053eac1d80dfe49c7bbf457aa969350d81bb SHA512 6cd5527ab34517a07bf73e46d01f15b7ff023ff34ed70ee54f1d7dbfb6cf57364a323b4ecb89bb9aadeb9bc05473aacb40d8c4eecc522840a3c1c4b3a8756d82 WHIRLPOOL 33167cd8fc318bdd16c7623e924bdbd803c5db8a916941c093760773174620440ac2b983682bcf5cf3728044102c23ec23c4cdba71f45e6426cc76b352444fdb +DIST avidemux-2.8.0.tar.gz 22901276 SHA256 910c466f2bfe902f0d4750d23d3da3419bbfb846c1c411082ce8ce8f3d7b3cc4 SHA512 271209ab38c397da68542cfa28dcef8a68f97aeb94b9401111ea1f48d157f12a328518ae96142e70480beda71a19cced466bd9e0d8a627854f5c47a7fc6fe157 WHIRLPOOL 0bfca8ca6af18507e8378e873d85d4ce6cf0fadb4c70537e3996646536472f0785616a35796bb2176b589a456c60f3afc6b662b7c8a23633653036b2daedf9da +DIST avidemux-i18n-2.7.8.tar.gz 2488165 SHA256 76ca2f7ebb9f4e634cdd0f8d097ae37cbc63ce7d1ca4aacf5ca62e846fc7dea6 SHA512 a62b06a3d95577cf805be36f991ccb63d044b7c3633ada65bd5810f0e7d8eb41aa874ef5dd63de4fcacc0be073935bed827b2f0bceba77ab735ac8673c1ad39f WHIRLPOOL dddb0ee3c0cb30f5c9a4d1991f0e0091861fdf7b21f6995d13befc2431e6d6aa7c11e61cea378628fdfb6d230924cb9b8f8344f6c35a13bdb139388de11cbc4d diff --git a/media-video/avidemux/avidemux-2.8.0.ebuild b/media-video/avidemux/avidemux-2.8.0.ebuild new file mode 100644 index 00000000..3761e503 --- /dev/null +++ b/media-video/avidemux/avidemux-2.8.0.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +I18N_PV=2.7.8 + +inherit cmake desktop flag-o-matic qmake-utils xdg + +DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks" +HOMEPAGE="http://fixounet.free.fr/avidemux" +SRC_URI=" + https://github.com/mean00/avidemux2/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/mean00/avidemux2_i18n/archive/refs/tags/${I18N_PV}.tar.gz -> ${PN}-i18n-${I18N_PV}.tar.gz +" + +# Multiple licenses because of all the bundled stuff. +LICENSE="GPL-1 GPL-2 MIT PSF-2 public-domain" +SLOT="2.7" +KEYWORDS="~amd64 ~x86" +IUSE="debug nls nvenc opengl qt5 sdl vaapi vdpau xv" + +BDEPEND=" + dev-lang/yasm + qt5? ( dev-qt/linguist-tools:5 ) +" +DEPEND=" + ~media-libs/avidemux-core-${PV}:${SLOT}[nls?,sdl?,vaapi?,vdpau?,xv?,nvenc?] + nvenc? ( amd64? ( media-video/nvidia_video_sdk:0 ) ) + opengl? ( virtual/opengl:0 ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtopengl:5 + dev-qt/qtwidgets:5 + ) + vaapi? ( x11-libs/libva:0= ) +" +RDEPEND=" + ${DEPEND} + nls? ( virtual/libintl:0 ) + !/dev/null || die +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-2.7.4-qt-5.15.patch" + + processes="buildCli:avidemux/cli" + use qt5 && processes+=" buildQt4:avidemux/qt4" + + for process in ${processes} ; do + CMAKE_USE_DIR="${S}"/${process#*:} cmake_src_prepare + done + + if use qt5; then + # Fix icon name -> avidemux-2.7 + sed -i -e "/^Icon/ s:${PN}\.png:${PN}-${SLOT}:" appImage/"${PN}".desktop || die "Icon name fix failed." + + # The desktop file is broken. It uses avidemux3_portable instead of avidemux3_qt5 + sed -i -re '/^Exec/ s:(avidemux3_)portable:\1qt5:' appImage/"${PN}".desktop || die "Desktop file fix failed." + + # QA warnings: missing trailing ';' and 'Application' is deprecated. + sed -i -e 's/Application;AudioVideo/AudioVideo;/g' appImage/"${PN}".desktop || die "Desktop file fix failed." + + # Now rename the desktop file to not collide with 2.6. + mv appImage/"${PN}".desktop "${PN}-${SLOT}".desktop || die "Collision rename failed." + fi + + # Remove "Build Option" dialog because it doesn't reflect + # what the GUI can or has been built with. (Bug #463628) + sed -i -e '/Build Option/d' avidemux/common/ADM_commonUI/myOwnMenu.h || die "Couldn't remove \"Build Option\" dialog." +} + +src_configure() { + # See bug 432322. + use x86 && replace-flags -O0 -O1 + + # The build relies on an avidemux-core header that uses 'nullptr' + # which is from >=C++11. Let's use the GCC-6 default C++ dialect. + append-cxxflags -std=c++14 + + local mycmakeargs=( + -DGETTEXT="$(usex nls)" + -DSDL="$(usex sdl)" + -DLIBVA="$(usex vaapi)" + -DOPENGL="$(usex opengl)" + -DVDPAU="$(usex vdpau)" + -DXVIDEO="$(usex xv)" + -DENABLE_QT4=OFF + -DENABLE_QT6=OFF + ) + + use qt5 && mycmakeargs+=( + -DENABLE_QT5="$(usex qt5)" + ) + + use debug && mycmakeargs+=( -DVERBOSE=1 -DADM_DEBUG=1 ) + + for process in ${processes} ; do + local build="${WORKDIR}/${P}_build/${process%%:*}" + CMAKE_USE_DIR="${S}"/${process#*:} BUILD_DIR="${build}" cmake_src_configure + done +} + +src_compile() { + for process in ${processes} ; do + local build="${WORKDIR}/${P}_build/${process%%:*}" + BUILD_DIR="${build}" cmake_src_compile + done +} + +src_test() { + for process in ${processes} ; do + local build="${WORKDIR}/${P}_build/${process%%:*}" + BUILD_DIR="${build}" cmake_src_test + done +} + +src_install() { + for process in ${processes} ; do + local build="${WORKDIR}/${P}_build/${process%%:*}" + BUILD_DIR="${build}" cmake_src_install + done + + if use qt5; then + cd "${S}" || die "Can't enter source folder" + newicon "${PN}"_icon.png "${PN}-${SLOT}".png + domenu "${PN}-${SLOT}".desktop + fi +} diff --git a/media-video/avidemux/files/avidemux-2.7.4-qt-5.15.patch b/media-video/avidemux/files/avidemux-2.7.4-qt-5.15.patch new file mode 100644 index 00000000..5c92a561 --- /dev/null +++ b/media-video/avidemux/files/avidemux-2.7.4-qt-5.15.patch @@ -0,0 +1,11 @@ +diff -ur avidemux2-2.7.4.orig/avidemux/qt4/ADM_UIs/src/T_RubberControl.cpp avidemux2-2.7.4/avidemux/qt4/ADM_UIs/src/T_RubberControl.cpp +--- a/avidemux/qt4/ADM_UIs/src/T_RubberControl.cpp 2019-08-14 19:11:18.000000000 +0200 ++++ b/avidemux/qt4/ADM_UIs/src/T_RubberControl.cpp 2020-05-30 20:45:53.304702855 +0200 +@@ -8,6 +8,7 @@ + ***************************************************************************/// + + #include ++#include + #include + #include + #include