forked from pool/smplayer
- Add 0001-Adapt-MPV-s-renaming-sub-forced-only-to-sub-forced-e.patch:
Adapt MPV's option change to fix error (bsc#1227841, gh#smplayer-dev/smplayer!1029). OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/smplayer?expand=0&rev=90
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
@@ -0,0 +1,46 @@
|
||||
From a35524d8f58e5efec42a3f00e4d5de5446f7abb4 Mon Sep 17 00:00:00 2001
|
||||
From: Alynx Zhou <alynx.zhou@gmail.com>
|
||||
Date: Fri, 16 Aug 2024 13:49:44 +0800
|
||||
Subject: [PATCH] Adapt MPV's renaming --sub-forced-only to
|
||||
--sub-forced-events-only
|
||||
|
||||
See <https://github.com/mpv-player/mpv/commit/9b9475e21809fbb4736b4290c2648900d9c49e2e>.
|
||||
---
|
||||
src/mpvoptions.cpp | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/mpvoptions.cpp b/src/mpvoptions.cpp
|
||||
index 4cbdfd564..7a1265cca 100644
|
||||
--- a/src/mpvoptions.cpp
|
||||
+++ b/src/mpvoptions.cpp
|
||||
@@ -398,7 +398,12 @@ void MPVProcess::setOption(const QString & option_name, const QVariant & value)
|
||||
}
|
||||
else
|
||||
if (option_name == "forcedsubsonly") {
|
||||
- arg << "--sub-forced-only";
|
||||
+ // See <https://github.com/mpv-player/mpv/commit/9b9475e21809fbb4736b4290c2648900d9c49e2e>.
|
||||
+ if (isOptionAvailable("--sub-forced-events-only")) {
|
||||
+ arg << "--sub-forced-events-only";
|
||||
+ } else {
|
||||
+ arg << "--sub-forced-only";
|
||||
+ }
|
||||
}
|
||||
else
|
||||
if (option_name == "prefer-ipv4" || option_name == "prefer-ipv6" ||
|
||||
@@ -1065,7 +1070,12 @@ void MPVProcess::seekSub(int value) {
|
||||
}
|
||||
|
||||
void MPVProcess::setSubForcedOnly(bool b) {
|
||||
- sendCommand(QString("set sub-forced-only %1").arg(b ? "yes" : "no"));
|
||||
+ // See <https://github.com/mpv-player/mpv/commit/9b9475e21809fbb4736b4290c2648900d9c49e2e>.
|
||||
+ if (isOptionAvailable("--sub-forced-events-only")) {
|
||||
+ sendCommand(QString("set sub-forced-events-only %1").arg(b ? "yes" : "no"));
|
||||
+ } else {
|
||||
+ sendCommand(QString("set sub-forced-only %1").arg(b ? "yes" : "no"));
|
||||
+ }
|
||||
}
|
||||
|
||||
void MPVProcess::setSpeed(double value) {
|
||||
--
|
||||
2.45.2
|
||||
|
3
smplayer-24.5.0.tar.bz2
Normal file
3
smplayer-24.5.0.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b9550f17c0bf09141ca6ce2770fccde80e17a50f21bb74e69bb4a7f37db1fd72
|
||||
size 5221961
|
12
smplayer-add_kde_protocols_to_desktop_file.patch
Normal file
12
smplayer-add_kde_protocols_to_desktop_file.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
Index: smplayer-23.6.0/smplayer.desktop
|
||||
===================================================================
|
||||
--- smplayer-23.6.0.orig/smplayer.desktop
|
||||
+++ smplayer-23.6.0/smplayer.desktop
|
||||
@@ -8,6 +8,7 @@ MimeType=audio/ac3;audio/mp4;audio/mpeg;
|
||||
Name=SMPlayer
|
||||
Type=Application
|
||||
X-KDE-StartupNotify=false
|
||||
+X-KDE-Protocols=http,ftp,smb
|
||||
|
||||
# Translations
|
||||
Comment[ar]=واجهة-طرفية ممتازة للمشغل MPlayer
|
48
smplayer-defaults.patch
Normal file
48
smplayer-defaults.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
Index: smplayer-23.6.0/src/preferences.cpp
|
||||
===================================================================
|
||||
--- smplayer-23.6.0.orig/src/preferences.cpp
|
||||
+++ smplayer-23.6.0/src/preferences.cpp
|
||||
@@ -417,11 +417,7 @@ void Preferences::reset() {
|
||||
resize_method = Never;
|
||||
|
||||
#if STYLE_SWITCHING
|
||||
- #if QT_VERSION >= 0x050000
|
||||
- style = "Fusion";
|
||||
- #else
|
||||
style="";
|
||||
- #endif
|
||||
#endif
|
||||
|
||||
center_window = false;
|
||||
@@ -494,7 +490,7 @@ void Preferences::reset() {
|
||||
allow_video_movement = false;
|
||||
|
||||
gui = "DefaultGUI";
|
||||
- iconset = "H2O";
|
||||
+ iconset = "Papirus";
|
||||
|
||||
|
||||
#if USE_MINIMUMSIZE
|
||||
@@ -664,7 +660,7 @@ void Preferences::reset() {
|
||||
|
||||
#ifdef CHECK_UPGRADED
|
||||
smplayer_stable_version = "";
|
||||
- check_if_upgraded = true;
|
||||
+ check_if_upgraded = false;
|
||||
#endif
|
||||
#ifdef FONTCACHE_DIALOG
|
||||
smplayer_version = "";
|
||||
Index: smplayer-23.6.0/src/prefgeneral.cpp
|
||||
===================================================================
|
||||
--- smplayer-23.6.0.orig/src/prefgeneral.cpp
|
||||
+++ smplayer-23.6.0/src/prefgeneral.cpp
|
||||
@@ -664,6 +664,9 @@ void PrefGeneral::setVO( QString vo_driv
|
||||
}
|
||||
|
||||
void PrefGeneral::setAO( QString ao_driver ) {
|
||||
+ if (ao_driver.isEmpty())
|
||||
+ ao_driver = "pulse";
|
||||
+
|
||||
int idx = ao_combo->findData( ao_driver );
|
||||
if (idx != -1) {
|
||||
ao_combo->setCurrentIndex(idx);
|
21
smplayer-makeflags.patch
Normal file
21
smplayer-makeflags.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
Index: smplayer-23.6.0/Makefile
|
||||
===================================================================
|
||||
--- smplayer-23.6.0.orig/Makefile
|
||||
+++ smplayer-23.6.0/Makefile
|
||||
@@ -26,7 +26,7 @@ all: src/smplayer webserver/simple_web_s
|
||||
|
||||
src/smplayer:
|
||||
./get_svn_revision.sh
|
||||
- +cd src && $(QMAKE) $(QMAKE_OPTS) && $(DEFS) make
|
||||
+ +cd src && $(QMAKE) $(QMAKE_OPTS) && $(DEFS) make $(MAKEFLAGS)
|
||||
cd src && $(LRELEASE) smplayer.pro
|
||||
|
||||
webserver/simple_web_server:
|
||||
@@ -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
|
1218
smplayer.changes
Normal file
1218
smplayer.changes
Normal file
File diff suppressed because it is too large
Load Diff
129
smplayer.spec
Normal file
129
smplayer.spec
Normal file
@@ -0,0 +1,129 @@
|
||||
#
|
||||
# spec file for package smplayer
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: smplayer
|
||||
Version: 24.5.0
|
||||
Release: 0
|
||||
Summary: Complete frontend for MPV
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://smplayer.info/
|
||||
Source: https://github.com/smplayer-dev/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
|
||||
# PATCH-FIX-OPENSUSE smplayer-makeflags.patch
|
||||
Patch0: %{name}-makeflags.patch
|
||||
# PATCH-FEATURE-OPENSUSE smplayer-defaults.patch sor.alexei@meowr.ru -- Use PulseAudio, system Qt5 theme, and "Papirus" icon theme by default.
|
||||
Patch1: %{name}-defaults.patch
|
||||
# PATCH-FIX-UPSTREAM smplayer-add_kde_protocols_to_desktop_file.patch -- To play network shared video correctly: #PM-48.
|
||||
Patch2: %{name}-add_kde_protocols_to_desktop_file.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-Adapt-MPV-s-renaming-sub-forced-only-to-sub-forced-e.patch bsc#1227841, gh#smplayer-dev/smplayer!1029 alynx.zhou@suse.com -- Adapt MPV's option renaming.
|
||||
Patch3: 0001-Adapt-MPV-s-renaming-sub-forced-only-to-sub-forced-e.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libQt5Gui-private-headers-devel
|
||||
BuildRequires: libqt5-qttools-devel
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: cmake(Qt5Concurrent)
|
||||
BuildRequires: cmake(Qt5Core)
|
||||
BuildRequires: cmake(Qt5DBus)
|
||||
BuildRequires: cmake(Qt5Gui)
|
||||
BuildRequires: cmake(Qt5Network)
|
||||
BuildRequires: cmake(Qt5PrintSupport)
|
||||
BuildRequires: cmake(Qt5Qml)
|
||||
BuildRequires: cmake(Qt5Script)
|
||||
BuildRequires: cmake(Qt5Sql)
|
||||
BuildRequires: cmake(Qt5Widgets)
|
||||
BuildRequires: cmake(Qt5Xml)
|
||||
BuildRequires: pkgconfig(xext)
|
||||
# Either mpv >= 0.6.2 or MPlayer >= 1.0rc4_r32607.
|
||||
Requires: mpv >= 0.6.2
|
||||
Recommends: smplayer-lang
|
||||
Recommends: smplayer-skins
|
||||
Recommends: yt-dlp
|
||||
Suggests: smplayer-themes
|
||||
|
||||
%description
|
||||
SMPlayer is a front-end for MPV/MPlayer, from basic features like
|
||||
playing videos, DVDs, and VCDs to more advanced features like support
|
||||
for MPV filters and more.
|
||||
|
||||
SMPlayer remembers the settings of all files you play. Opening a
|
||||
movie again will resume at the same point it was left, and with the
|
||||
same chosen audio track, subtitles and volume level.
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
# Fix CRLF in .txt files.
|
||||
sed -i 's/\r$//' *.txt
|
||||
|
||||
find . -type f -name '*.pro' | while read f; do
|
||||
cat << EOF >> "$f"
|
||||
|
||||
DEFINES += NO_DEBUG_ON_CONSOLE
|
||||
# I really dislike networks such as Facebook, Twitter.
|
||||
DEFINES -= SHARE_WIDGET
|
||||
DEFINES -= UPDATE_CHECKER
|
||||
QMAKE_CFLAGS += %{optflags}
|
||||
QMAKE_CXXFLAGS += %{optflags}
|
||||
EOF
|
||||
done
|
||||
|
||||
%build
|
||||
make \
|
||||
MAKEFLAGS="%{?_smp_mflags} V=1" \
|
||||
QMAKE=%{_libqt5_bindir}/qmake \
|
||||
LRELEASE=%{_libqt5_bindir}/lrelease \
|
||||
PREFIX=%{_prefix}
|
||||
|
||||
%install
|
||||
%make_install \
|
||||
DOC_PATH=%{_docdir}/%{name} \
|
||||
PREFIX=%{_prefix}
|
||||
rm -r %{buildroot}%{_docdir}/%{name}/*
|
||||
|
||||
mv %{buildroot}%{_bindir}/{,%{name}-}simple_web_server
|
||||
|
||||
%suse_update_desktop_file %{name}
|
||||
%suse_update_desktop_file %{name}_enqueue
|
||||
|
||||
%find_lang %{name} --with-qt
|
||||
%fdupes %{buildroot}%{_datadir}/
|
||||
|
||||
%files
|
||||
%license Copying*.txt
|
||||
%doc Readme.txt Release_notes.md
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/%{name}-simple_web_server
|
||||
%{_datadir}/applications/%{name}*.desktop
|
||||
%dir %{_datadir}/icons/hicolor/*/
|
||||
%dir %{_datadir}/icons/hicolor/*/apps/
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.*
|
||||
%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
%{_datadir}/%{name}/
|
||||
%exclude %{_datadir}/%{name}/translations/
|
||||
%{_mandir}/man?/%{name}.?%{?ext_man}
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
%dir %{_datadir}/%{name}/translations/
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user