commit: edc3b928463afb6e74a30f494f5351799d59ed06 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Sun Nov 2 18:53:50 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sun Nov 2 21:44:41 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edc3b928
media-video/smplayer: add 25.6.0_p20250903 Closes: https://bugs.gentoo.org/951849 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> media-video/smplayer/Manifest | 1 + ...r-25.6.0_p20250903-disable-update-checker.patch | 52 ++++++++++++ .../smplayer-25.6.0_p20250903-no-googledns.patch | 42 ++++++++++ ...smplayer-25.6.0_p20250903-no-man-compress.patch | 39 +++++++++ .../smplayer/smplayer-25.6.0_p20250903.ebuild | 92 ++++++++++++++++++++++ 5 files changed, 226 insertions(+) diff --git a/media-video/smplayer/Manifest b/media-video/smplayer/Manifest index da56855a9b78..af1c3d3bb6f4 100644 --- a/media-video/smplayer/Manifest +++ b/media-video/smplayer/Manifest @@ -1 +1,2 @@ DIST smplayer-24.5.0.tar.bz2 5221961 BLAKE2B 6c088b87508ada09fb8712610da76403fbcc9f0d3f2ce1908d99560400aac8351b08453c77f2cf64f13625b09e4d748a7f0a64458e6429aeb29ce1ae49ebcaad SHA512 0de968babbb99a92ef2721d8b30d336433bb99745212da0d7dadec9ec389da0be6cdc5b461960662b4342f80ee6407a814bc6abc3372c07a75ee6804e705851e +DIST smplayer-25.6.0_p20250903-1c32b339.tar.gz 6917415 BLAKE2B d3b858ef26e6602db19105a1aa2cb9acd7f37cec9706ee17fff43cc208aebfacfb56a3ae885bc912a865ba6da042ee1951e5b057575494434869ea26738d88b2 SHA512 09ac2603d34edc0d663141299f8c1ddc5ae2506874e73f96add33e5a96d3a4565cef81690787ba43bb431eeb4f24a5e92a48f8490e0987c5aedc382b915e66e1 diff --git a/media-video/smplayer/files/smplayer-25.6.0_p20250903-disable-update-checker.patch b/media-video/smplayer/files/smplayer-25.6.0_p20250903-disable-update-checker.patch new file mode 100644 index 000000000000..f8eb5fc50bd6 --- /dev/null +++ b/media-video/smplayer/files/smplayer-25.6.0_p20250903-disable-update-checker.patch @@ -0,0 +1,52 @@ +From cda243ccd8cffc750b286ea267ee85864d860d21 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <[email protected]> +Date: Sun, 2 Nov 2025 19:41:35 +0100 +Subject: [PATCH 1/2] Disable update checker + +Also keep CHECK_UPGRADED and SHARE_WIDGET in context even if *currently* +already upstream-disabled. + +Turned seds into patch: +``` + # Turn off online update checker, bug #479902 + sed -e 's:DEFINES += UPDATE_CHECKER:#&:' \ + -e 's:DEFINES += CHECK_UPGRADED:#&:' \ + -i src/smplayer.pro || die + + # Turn off intrusive share widget + sed -e 's:DEFINES += SHARE_WIDGET:#&:' \ + -i src/smplayer.pro || die +``` + +Signed-off-by: Andreas Sturmlechner <[email protected]> +--- + src/smplayer.pro | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/smplayer.pro b/src/smplayer.pro +index fce8553..aa1438e 100644 +--- a/src/smplayer.pro ++++ b/src/smplayer.pro +@@ -25,8 +25,8 @@ DEFINES += MINIGUI + DEFINES += MPCGUI + DEFINES += SKINS + DEFINES += MPRIS2 +-DEFINES += UPDATE_CHECKER +-#DEFINES += CHECK_UPGRADED ++#DEFINES += UPDATE_CHECKER ++##DEFINES += CHECK_UPGRADED + DEFINES += AUTO_SHUTDOWN_PC + #DEFINES += CAPTURE_STREAM + DEFINES += BOOKMARKS +@@ -49,7 +49,7 @@ DEFINES += MPLAYER_SUPPORT + + # OBSOLETE: + #DEFINES += SHARE_ACTIONS +-#DEFINES += SHARE_WIDGET ++##DEFINES += SHARE_WIDGET + + greaterThan(QT_VERSION, 0x050400) { + DEFINES += HDPI_SUPPORT +-- +2.51.2 + diff --git a/media-video/smplayer/files/smplayer-25.6.0_p20250903-no-googledns.patch b/media-video/smplayer/files/smplayer-25.6.0_p20250903-no-googledns.patch new file mode 100644 index 000000000000..02e173865788 --- /dev/null +++ b/media-video/smplayer/files/smplayer-25.6.0_p20250903-no-googledns.patch @@ -0,0 +1,42 @@ +Source: https://salsa.debian.org/multimedia-team/smplayer/-/blob/master/debian/patches/11-drop-google-dns.patch + +Description: Drop hardcodes use of Google DNS resolver +Author: Mateusz Łukasik <[email protected]> +Origin: other +Bug-Debian: https://bugs.debian.org/1023546 +Last-Update: 2023-10-01 +Forwarded: not-needed + +--- a/webserver/mongoose.c ++++ b/webserver/mongoose.c +@@ -11418,7 +11418,7 @@ int mg_dns_reply_record(struct mg_dns_re + /* Amalgamated: #include "mg_resolv.h" */ + + #ifndef MG_DEFAULT_NAMESERVER +-#define MG_DEFAULT_NAMESERVER "8.8.8.8" ++#define MG_DEFAULT_NAMESERVER "0.0.0.0" + #endif + + struct mg_resolve_async_request { +-- + +Source: https://salsa.debian.org/multimedia-team/smplayer/-/blob/master/debian/patches/12-drop-google-dns-from-chromecast.patch + +Description: Remove hardcodes use of Google DNS resolver from chromecast feature +Author: Mateusz Łukasik <[email protected]> +Bug-Debian: https://bugs.debian.org/1023547 +Origin: other +Last-Update: 2023-10-01 +Forwarded: not-needed + +--- a/src/chromecast.cpp ++++ b/src/chromecast.cpp +@@ -281,7 +281,7 @@ QString Chromecast::findLocalAddress() { + QString local_address; + + QUdpSocket s; +- s.connectToHost("8.8.8.8", 53); ++ s.connectToHost("0.0.0.0", 53); + if (s.waitForConnected(2000)) { + local_address = s.localAddress().toString(); + qDebug() << "Chromecast::findLocalAddress: connected to:" << s.peerAddress().toString() << "local address:" << local_address; diff --git a/media-video/smplayer/files/smplayer-25.6.0_p20250903-no-man-compress.patch b/media-video/smplayer/files/smplayer-25.6.0_p20250903-no-man-compress.patch new file mode 100644 index 000000000000..db59e4d0cf66 --- /dev/null +++ b/media-video/smplayer/files/smplayer-25.6.0_p20250903-no-man-compress.patch @@ -0,0 +1,39 @@ +From ebaa8b67199e7510fd3722b922fd019b20a7b320 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <[email protected]> +Date: Sun, 2 Nov 2025 19:43:16 +0100 +Subject: [PATCH 2/2] Do not compress man page + +Signed-off-by: Andreas Sturmlechner <[email protected]> +--- + Makefile | 1 - + smplayer.spec | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 571e611..7970607 100644 +--- a/Makefile ++++ b/Makefile +@@ -85,7 +85,6 @@ install: all + + -install -d $(DESTDIR)$(PREFIX)/share/man/man1/ + install -m 644 man/smplayer.1 $(DESTDIR)$(PREFIX)/share/man/man1/ +- gzip -9 -f $(DESTDIR)$(PREFIX)/share/man/man1/smplayer.1 + + uninstall: + -rm -f $(PREFIX)/bin/smplayer +diff --git a/smplayer.spec b/smplayer.spec +index d5e9e56..26daa38 100644 +--- a/smplayer.spec ++++ b/smplayer.spec +@@ -118,7 +118,7 @@ update-desktop-database &> /dev/null || : + %dir %{_datadir}/icons/hicolor/*/apps/ + %{_datadir}/icons/hicolor/*/apps/%{name}.* + %{_datadir}/smplayer/ +-%{_mandir}/man1/smplayer.1.gz ++%{_mandir}/man1/smplayer.1 + %{_docdir}/%{name}/ + %{_bindir}/simple_web_server + %dir %{_datadir}/metainfo +-- +2.51.2 + diff --git a/media-video/smplayer/smplayer-25.6.0_p20250903.ebuild b/media-video/smplayer/smplayer-25.6.0_p20250903.ebuild new file mode 100644 index 000000000000..e30db326fe1e --- /dev/null +++ b/media-video/smplayer/smplayer-25.6.0_p20250903.ebuild @@ -0,0 +1,92 @@ +# Copyright 2007-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +COMMIT=1c32b339d484d5926ddb4ddf095f2ec30b7e44ca # only qt6 branch at this point +inherit optfeature qmake-utils toolchain-funcs xdg + +DESCRIPTION="Great Qt GUI front-end for mplayer/mpv" +HOMEPAGE="https://www.smplayer.info/" +SRC_URI="https://github.com/smplayer-dev/${PN}/archive/${COMMIT}.tar.gz -> ${P}-${COMMIT:0:8}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" + +LICENSE="GPL-2+ BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux" +IUSE="bidi debug" + +DEPEND=" + dev-qt/qtbase:6=[dbus,gui,network,ssl,widgets,xml] + dev-qt/qtdeclarative:6 + sys-libs/zlib + x11-libs/libX11 +" +RDEPEND="${DEPEND} + || ( + media-video/mpv[libass(+),X] + media-video/mplayer[bidi?,libass,png,X] + ) +" +BDEPEND="dev-qt/qttools:6[linguist]" + +PATCHES=( + "${FILESDIR}/${PN}-17.1.0-advertisement_crap.patch" + "${FILESDIR}/${PN}-18.2.0-jobserver.patch" + "${FILESDIR}/${PN}-18.3.0-disable-werror.patch" + "${FILESDIR}/${P}-disable-update-checker.patch" #bug #479902 + "${FILESDIR}/${P}-no-man-compress.patch" + "${FILESDIR}/${P}-no-googledns.patch" # thx to Debian +) + +src_prepare() { + use bidi || PATCHES+=( "${FILESDIR}"/${PN}-16.4.0-zero-bidi.patch ) + + default + + # Upstream Makefile sucks + sed -i -e "/^PREFIX=/ s:/usr/local:${EPREFIX}/usr:" \ + -e "/^DOC_PATH=/ s:packages/smplayer:"${PF}":" \ + -e '/\.\/get_svn_revision\.sh/,+2c\ + cd src && $(DEFS) $(MAKE)' \ + Makefile || die + + # snapshot specialty: build wants an "SVN" revision... + # use result of $ git rev-list --count HEAD + echo "#define SVN_REVISION \"10395\"" > src/svn_revision.h + echo "10395" > svn_revision + + # Turn debug message flooding off + if ! use debug ; then + sed -e 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \ + -i src/smplayer.pro || die + fi +} + +src_configure() { + pushd src > /dev/null || die + eqmake6 QT_MAJOR_VERSION=6 + popd > /dev/null || die +} + +src_compile() { + emake CC="$(tc-getCC)" + + pushd src/translations > /dev/null || die + $(qt6_get_bindir)/lrelease ${PN}_*.ts + popd > /dev/null || die +} + +src_install() { + # remove unneeded copies of the GPL + rm Copying* docs/*/gpl.html || die + # don't install empty dirs + rmdir --ignore-fail-on-non-empty docs/* || die + + default +} + +pkg_postinst() { + xdg_pkg_postinst + optfeature "URL support with media-video/mpv" net-misc/yt-dlp +}
