commit:     0881b7b161541942b63c289d464f34b0d5d7a324
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Sun Nov  9 05:13:45 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Nov 10 22:24:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0881b7b1

media-libs/avidemux-core: add 2.8.1_p20251019

* rm sdl, only for win here
* deps :
    add x11-libs/libXext for xv
    add x11-libs/X11 for vaapi and vdpau
* bundled-ffmpeg :
    CC and AR are now defined as CMAKE_C_COMPILER/CMAKE_AR
    export PKG_CONFIG
    avoid automagic with --disable-autodetect
    disable lto, handled by user-flags (patch)
    enable ffnvcodec if required, autodetect by default (patch)
    fix gcc15 with -std=gnu17

Thanks to MeisterP/Poncho:
* add snapshot, switch to qt6
* drop gcc workaround
* remove cmake phase functions run by default
* drop system-ffmpeg use flag (masked since 2013)

Closes: https://bugs.gentoo.org/911926
Co-authored-by: Poncho <poncho <AT> spahan.ch>
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/44572
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/avidemux-core/Manifest                  |  1 +
 .../avidemux-core-2.8.1_p20251019.ebuild           | 89 ++++++++++++++++++++++
 ...videmux-core-2.8.1_p20251019-ffmpeg-flags.patch | 32 ++++++++
 3 files changed, 122 insertions(+)

diff --git a/media-libs/avidemux-core/Manifest 
b/media-libs/avidemux-core/Manifest
index 49e9b54b3bbf..0f2afc1b081f 100644
--- a/media-libs/avidemux-core/Manifest
+++ b/media-libs/avidemux-core/Manifest
@@ -1 +1,2 @@
 DIST avidemux-2.8.1.tar.gz 23207741 BLAKE2B 
766ae9b159d2e48a3d14bdfccf9c665b95ed056831b515d53837bf2bae20baf9b01d15d551b62fb96f3c0cf50b0138448a133bc62e6202af744de558e0fbfe4f
 SHA512 
e7105e555e04dd6768336bdb246037e91045de2e1f572ae362d985424def65499c7f25d92d376ea98af09b436d89e9eb4a5424e93b11df14f2d67ac35661a8a3
+DIST avidemux-2.8.1_p20251019.tar.gz 25080573 BLAKE2B 
a9c25bf6549ceeefc4259a5483de74edc87e30e6c6c0cbc739df254e7e1b5a07b5cb364073c642a2a64d384725ce84a88c5e4178a3d06007e4b697460223ac02
 SHA512 
ef28dc79b6fd2ab0492132292f066c2b0985364bbd9b3555d9813b0919ff63ba0b05b2c15419037fa67345831068bb2a85a1778b10cff5a40407a64aed114878

diff --git a/media-libs/avidemux-core/avidemux-core-2.8.1_p20251019.ebuild 
b/media-libs/avidemux-core/avidemux-core-2.8.1_p20251019.ebuild
new file mode 100644
index 000000000000..4957ce9a0d2d
--- /dev/null
+++ b/media-libs/avidemux-core/avidemux-core-2.8.1_p20251019.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake flag-o-matic toolchain-funcs
+
+MY_COMMIT="376c1469eebedcc724dbbcc0d45030f32c9d13f5"
+
+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/${MY_COMMIT}.tar.gz -> 
avidemux-${PV}.tar.gz"
+S="${WORKDIR}/avidemux2-${MY_COMMIT}"
+CMAKE_USE_DIR="${S}/${PN/-/_}"
+
+# Multiple licenses because of all the bundled stuff.
+# See License.txt.
+LICENSE="GPL-2 MIT PSF-2 LGPL-2 OFL-1.1"
+SLOT="2.7"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug nls nvenc vaapi vdpau xv"
+
+DEPEND="
+       dev-db/sqlite:3
+       virtual/zlib:=
+       nvenc? ( media-libs/nv-codec-headers )
+       vaapi? (
+               media-libs/libva:=[X]
+               x11-libs/libX11
+       )
+       vdpau? (
+               x11-libs/libvdpau
+               x11-libs/libX11
+       )
+       xv? (
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/libXv
+       )
+"
+RDEPEND="
+       ${DEPEND}
+       !<media-libs/avidemux-core-${PV}
+       !<media-video/avidemux-${PV}
+       nls? ( virtual/libintl )
+"
+BDEPEND="
+       dev-lang/yasm[nls=]
+       virtual/pkgconfig
+       nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+       "${FILESDIR}"/avidemux-core-2.8.1_p20251019-ffmpeg-flags.patch
+)
+
+src_prepare() {
+       cmake_src_prepare
+
+       local ffmpeg_args=(
+               --cxx=$(tc-getCXX)
+               --nm=$(tc-getNM)
+               --ranlib=$(tc-getRANLIB)
+               --pkg-config=$(tc-getPKG_CONFIG)
+               # avoid automagic with libdrm, vaapi, vdpau ...
+               --disable-autodetect
+               "--optflags='${CFLAGS} -std=gnu17'"
+       )
+
+       sed -i -e "s#@@GENTOO_FFMPEG_FLAGS@@#${ffmpeg_args[*]}#" 
avidemux_core/cmake/ffmpeg_configure.sh.cmake || die
+}
+
+src_configure() {
+       # See bug 432322.
+       use x86 && replace-flags -O0 -O1
+
+       local mycmakeargs=(
+               -DADM_DEBUG="$(usex debug)"
+               -DVERBOSE=ON
+               -DGETTEXT="$(usex nls)"
+               -DLIBVA="$(usex vaapi)"
+               -DNVENC="$(usex nvenc)"
+               -DVDPAU="$(usex vdpau)"
+               -DXVIDEO="$(usex xv)"
+       )
+
+       cmake_src_configure
+}

diff --git 
a/media-libs/avidemux-core/files/avidemux-core-2.8.1_p20251019-ffmpeg-flags.patch
 
b/media-libs/avidemux-core/files/avidemux-core-2.8.1_p20251019-ffmpeg-flags.patch
new file mode 100644
index 000000000000..a7e126e32308
--- /dev/null
+++ 
b/media-libs/avidemux-core/files/avidemux-core-2.8.1_p20251019-ffmpeg-flags.patch
@@ -0,0 +1,32 @@
+add user-flags
+add ffnvcodec if required, because autodetect is disabled
+disable lto, handled by user-flags
+--- a/avidemux_core/cmake/ffmpeg_configure.sh.cmake
++++ b/avidemux_core/cmake/ffmpeg_configure.sh.cmake
+@@ -1,2 +1,2 @@
+ export PATH=${FF_ENV_PATH}:$PATH
+-${FFMPEG_SOURCE_DIR}/configure ${FFMPEG_FLAGS}
+\ No newline at end of file
++${FFMPEG_SOURCE_DIR}/configure ${FFMPEG_FLAGS} @@GENTOO_FFMPEG_FLAGS@@
+\ No newline at end of file
+--- a/avidemux_core/cmake/admFFmpegBuild_native.cmake
++++ b/avidemux_core/cmake/admFFmpegBuild_native.cmake
+@@ -8,6 +8,7 @@ ADM_FF_SET_DEFAULT()
+ IF(USE_NVENC)
+   SET(FFMPEG_ENCODERS ${FFMPEG_ENCODERS} nvenc)
+   SET(FFMPEG_DECODERS ${FFMPEG_DECODERS} nvdec)
++  xadd("--enable-ffnvcodec")
+   xadd("--enable-nvenc")
+   xadd("--enable-nvdec")
+   xadd("--extra-cflags=-I${NVENC_INCLUDE_DIR}")
+@@ -44,10 +45,6 @@ IF(APPLE AND "$ENV{MACOSX_DEPLOYMENT_TARGET}" VERSION_EQUAL 
"10.15")
+   xadd(--extra-cflags="-fno-stack-check") # see 
https://trac.ffmpeg.org/ticket/8073
+ ENDIF()
+ 
+-IF(NOT APPLE AND NOT ADM_CPU_X86_32 AND NOT "${CMAKE_C_COMPILER}" MATCHES 
".*[cC]lang.*")
+-  xadd(--enable-lto)
+-ENDIF()
+-
+ #@@
+ ADM_FF_ADD_OPTIONS()
+ 

Reply via email to