SMPlayer: bump version

This commit is contained in:
Sergei Reznikov
2017-07-09 16:47:45 +03:00
parent ea688692fa
commit 335117b590
5 changed files with 294 additions and 204 deletions

View File

@@ -1,15 +1,16 @@
resource app_signature "application/x-vnd.SMPlayer";
resource app_signature "application/x-vnd.qt5-smplayer";
resource app_version {
major = 16,
middle = 4,
minor = 0,
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "SMPlayer",
long_info = "SMPlayer ©2006-2016 Ricardo Villalba"
long_info = "Great Qt GUI front-end for mplayer/mpv"
};
resource app_flags B_SINGLE_LAUNCH;

View File

@@ -1,121 +0,0 @@
From 392635547c08488b196712dde97f843ea18d982c Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:43:34 +0300
Subject: Disabling QtSingleApplication on Haiku
diff --git a/src/qtsingleapplication/qtsingleapplication.cpp b/src/qtsingleapplication/qtsingleapplication.cpp
index d0fb15d..fe60eb8 100644
--- a/src/qtsingleapplication/qtsingleapplication.cpp
+++ b/src/qtsingleapplication/qtsingleapplication.cpp
@@ -239,7 +239,11 @@ QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int
bool QtSingleApplication::isRunning()
{
+#ifdef Q_OS_HAIKU
+ return false;
+#else
return peer->isClient();
+#endif
}
@@ -258,7 +262,11 @@ bool QtSingleApplication::isRunning()
*/
bool QtSingleApplication::sendMessage(const QString &message, int timeout)
{
- return peer->sendMessage(message, timeout);
+#ifdef Q_OS_HAIKU
+ return false;
+#else
+ return peer->sendMessage(message, timeout);
+#endif
}
--
2.2.2
From 36b9c3025ed2bfdac49ff18deae802ad6c9a1ac0 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:52:48 +0300
Subject: Make haiku audio and video modules default on Haiku
diff --git a/src/prefgeneral.cpp b/src/prefgeneral.cpp
index f6f798d..c4e7608 100644
--- a/src/prefgeneral.cpp
+++ b/src/prefgeneral.cpp
@@ -190,9 +190,13 @@ void PrefGeneral::setData(Preferences * pref) {
#ifdef Q_OS_OS2
vo = "kva";
#else
+#ifdef Q_OS_HAIKU
+ vo = "haiku";
+#else
vo = "xv,";
#endif
#endif
+#endif
}
setVO( vo );
@@ -207,6 +211,11 @@ void PrefGeneral::setData(Preferences * pref) {
}
}
#endif
+#ifdef Q_OS_HAIKU
+ if (ao.isEmpty()) {
+ ao = "haiku";
+ }
+#endif
setAO( ao );
@@ -984,9 +993,13 @@ void PrefGeneral::createHelp() {
#ifdef Q_OS_OS2
.arg("<b><i>kva</i></b>")
#else
+#ifdef Q_OS_HAIKU
+ .arg("<b><i>haiku</i></b>")
+#else
.arg("<b><i>xv</i></b>")
#endif
#endif
+#endif
);
#if !defined(Q_OS_WIN) && !defined(Q_OS_OS2)
--
2.2.2
From 9d78357b5855b50d61ab4f17efeb7b0abe920768 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:54:14 +0300
Subject: Correctly identify Haiku instead of Other OS
diff --git a/src/smplayer.cpp b/src/smplayer.cpp
index 62c0a08..bccad3a 100644
--- a/src/smplayer.cpp
+++ b/src/smplayer.cpp
@@ -555,10 +555,14 @@ void SMPlayer::showInfo() {
#ifdef Q_OS_OS2
.arg("eCS (OS/2)")
#else
+#ifdef Q_OS_HAIKU
+ .arg("Haiku")
+#else
.arg("Other OS")
#endif
#endif
#endif
+#endif
;
printf("%s\n", s.toLocal8Bit().data() );
--
2.2.2

View File

@@ -0,0 +1,185 @@
From 8850cf98af94bd1e725aea1a98dccf65250d9f7b Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:43:34 +0300
Subject: Disabling QtSingleApplication on Haiku
diff --git a/src/qtsingleapplication/qtsingleapplication.cpp b/src/qtsingleapplication/qtsingleapplication.cpp
index d0fb15d..fe60eb8 100644
--- a/src/qtsingleapplication/qtsingleapplication.cpp
+++ b/src/qtsingleapplication/qtsingleapplication.cpp
@@ -239,7 +239,11 @@ QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int
bool QtSingleApplication::isRunning()
{
+#ifdef Q_OS_HAIKU
+ return false;
+#else
return peer->isClient();
+#endif
}
@@ -258,7 +262,11 @@ bool QtSingleApplication::isRunning()
*/
bool QtSingleApplication::sendMessage(const QString &message, int timeout)
{
- return peer->sendMessage(message, timeout);
+#ifdef Q_OS_HAIKU
+ return false;
+#else
+ return peer->sendMessage(message, timeout);
+#endif
}
--
2.12.2
From bb800d81042c314b92e3e5196911a09927f25e0f Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:54:14 +0300
Subject: Correctly identify Haiku instead of Other OS
diff --git a/src/smplayer.cpp b/src/smplayer.cpp
index 4f3bd88..4804b4d 100644
--- a/src/smplayer.cpp
+++ b/src/smplayer.cpp
@@ -575,10 +575,14 @@ void SMPlayer::showInfo() {
#ifdef Q_OS_OS2
.arg("eCS (OS/2)")
#else
+#ifdef Q_OS_HAIKU
+ .arg("Haiku")
+#else
.arg("Other OS")
#endif
#endif
#endif
+#endif
;
printf("%s\n", s.toLocal8Bit().data() );
--
2.12.2
From 5433cf00b5d6a0e1eb35e5b7cfa6cc3c771cd660 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 7 Jul 2017 18:58:29 +0300
Subject: Disable UPDATE_CHECKER and GLOBALSHORTCUTS
diff --git a/src/smplayer.pro b/src/smplayer.pro
index cde8dcc..216d445 100644
--- a/src/smplayer.pro
+++ b/src/smplayer.pro
@@ -24,13 +24,13 @@ DEFINES += MINIGUI
DEFINES += MPCGUI
DEFINES += SKINS
DEFINES += MPRIS2
-DEFINES += UPDATE_CHECKER
+DEFINES -= UPDATE_CHECKER
DEFINES += CHECK_UPGRADED
DEFINES += AUTO_SHUTDOWN_PC
DEFINES += CAPTURE_STREAM
DEFINES += BOOKMARKS
DEFINES += MOUSE_GESTURES
-DEFINES += GLOBALSHORTCUTS
+DEFINES -= GLOBALSHORTCUTS
DEFINES += ADD_BLACKBORDERS_FS
DEFINES += INITIAL_BLACKBORDERS
DEFINES += CHROMECAST_SUPPORT
--
2.12.2
From e23c0061a78cd61b23dd1afbc615f00533fae266 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 7 Jul 2017 19:00:30 +0300
Subject: Disable webserver
diff --git a/Makefile b/Makefile
index c88d046..e137a53 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ DEFS=DATA_PATH=\\\"$(DATA_PATH)\\\" \
DOC_PATH=\\\"$(DOC_PATH)\\\" THEMES_PATH=\\\"$(THEMES_PATH)\\\" \
SHORTCUTS_PATH=\\\"$(SHORTCUTS_PATH)\\\"
-all: src/smplayer webserver/simple_web_server
+all: src/smplayer #webserver/simple_web_server
src/smplayer:
./get_svn_revision.sh
--
2.12.2
From 24a11af6f7fa2fbce3a6d644e41f76895eaaa990 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sun, 9 Jul 2017 16:06:00 +0300
Subject: Fix PATHS on Haiku
diff --git a/Makefile b/Makefile
index e137a53..f02a1b9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,14 @@
-PREFIX=/usr/local
+PREFIX=.
#PREFIX=/tmp/smplayer
CONF_PREFIX=$(PREFIX)
-DATA_PATH=$(PREFIX)/share/smplayer
-DOC_PATH=$(PREFIX)/share/doc/packages/smplayer
-TRANSLATION_PATH=$(PREFIX)/share/smplayer/translations
-THEMES_PATH=$(PREFIX)/share/smplayer/themes
-SHORTCUTS_PATH=$(PREFIX)/share/smplayer/shortcuts
+DATA_PATH=$(PREFIX)/data
+DOC_PATH=$(PREFIX)/documentation
+TRANSLATION_PATH=$(PREFIX)/translations
+THEMES_PATH=$(PREFIX)/themes
+SHORTCUTS_PATH=$(PREFIX)/shortcuts
ICONS_DIR=$(PREFIX)/share/icons/hicolor/
APPLNK_DIR=$(PREFIX)/share/applications/
--
2.12.2
From 71e72819e3bcc2b3c99a38154130d938261d3e60 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sun, 9 Jul 2017 16:06:44 +0300
Subject: Use default style on Haiku
diff --git a/src/preferences.cpp b/src/preferences.cpp
index bd72016..83e10cc 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -389,6 +389,7 @@ void Preferences::reset() {
resize_method = Never;
+#ifndef Q_OS_HAIKU
#if STYLE_SWITCHING
#if QT_VERSION >= 0x050000
style = "Fusion";
@@ -396,6 +397,7 @@ void Preferences::reset() {
style="";
#endif
#endif
+#endif
center_window = false;
center_window_if_outside = false;
--
2.12.2

View File

@@ -1,74 +0,0 @@
SUMMARY="Great Qt GUI front-end for mplayer/mpv"
DESCRIPTION="SMPlayer intends to be a complete front-end for MPlayer, from \
basic features like playing videos, DVDs, and VCDs to more advanced features \
like support for MPlayer filters and more."
HOMEPAGE="http://smplayer.sourceforge.net"
COPYRIGHT="2006-2015 Ricardo Villalba"
LICENSE="GNU GPL v2"
REVISION="3"
SOURCE_URI="https://downloads.sf.net/smplayer/smplayer-$portVersion.tar.bz2"
CHECKSUM_SHA256="de4169c7e3a1d8bf6f3c9a77fa0a8c24c1f63db3f2b8a325bc6761c0a9d2d2ec"
PATCHES="smplayer-$portVersion.patchset"
ADDITIONAL_FILES="smplayer-$portVersion.rdef"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
smplayer$secondaryArchSuffix = $portVersion
app:SMPlayer = $portVersion
cmd:smplayer = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
libqt4$secondaryArchSuffix >= 4.8
lib:libz$secondaryArchSuffix
cmd:mplayer
cmd:smtube$commandSuffix
"
BUILD_REQUIRES="
libqt4${secondaryArchSuffix}_devel >= 4.8
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
# TODO: fix paths
# DATA_PATH
# DOC_PATH
# TRANSLATION_PATH
# THEMES_PATH
# SHORTCUTS_PATH
make $jobArgs
}
INSTALL()
{
smplayerDir=$appsDir/SMPlayer
mkdir -p $smplayerDir
cp src/smplayer $smplayerDir/SMPlayer$commandSuffix
addResourcesToBinaries $portDir/additional-files/smplayer-$portVersion.rdef \
$smplayerDir/SMPlayer$commandSuffix
mkdir -p $commandBinDir
if [ -n "$commandSuffix" ]; then
mkdir -p $prefix/bin
symlinkRelative -s $smplayerDir/SMPlayer$commandSuffix $prefix/bin
fi
symlinkRelative -s $smplayerDir/SMPlayer$commandSuffix $commandBinDir/smplayer
addAppDeskbarSymlink $smplayerDir/SMPlayer
}

View File

@@ -0,0 +1,99 @@
SUMMARY="Great Qt GUI front-end for MPlayer/mpv"
DESCRIPTION="SMPlayer is a graphical user interface (GUI) for the \
award-winning MPlayer, which is capable of playing almost all known video and \
audio formats. But apart from providing access for the most common and useful \
options of MPlayer, SMPlayer adds other interesting features like the \
possibility to play Youtube videos or download subtitles."
HOMEPAGE="http://www.smplayer.info/"
COPYRIGHT="2006-2017 Ricardo Villalba"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://downloads.sf.net/smplayer/smplayer-$portVersion.tar.bz2"
CHECKSUM_SHA256="93a7de331b72ece6f13e6a1488e4e3958a2f960afafd159be46d098d3b8265bc"
PATCHES="smplayer-$portVersion.patchset"
ADDITIONAL_FILES="smplayer.rdef"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
smplayer$secondaryArchSuffix = $portVersion
app:SMPlayer = $portVersion
cmd:smplayer = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5DBus$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Script$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
lib:libz$secondaryArchSuffix
cmd:mplayer
cmd:smtube$commandSuffix
"
BUILD_REQUIRES="
devel:libQt5Core$secondaryArchSuffix
devel:libQt5DBus$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5Script$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libQt5Xml$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
cmd:make
"
GLOBAL_WRITABLE_FILES="settings/smplayer/input.conf keep-old"
BUILD()
{
make $jobArgs
}
INSTALL()
{
smplayerDir=$appsDir/SMPlayer
mkdir -p $smplayerDir/translations $settingsDir/smplayer
cp src/translations/*.qm $smplayerDir/translations
cp src/input.conf $settingsDir/smplayer
cp src/smplayer $smplayerDir/SMPlayer$commandSuffix
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/smplayer.rdef > smplayer.rdef
addResourcesToBinaries smplayer.rdef $smplayerDir/SMPlayer$commandSuffix
mkdir -p $commandBinDir
if [ -n "$commandSuffix" ]; then
mkdir -p $prefix/bin
symlinkRelative -s $smplayerDir/SMPlayer$commandSuffix $prefix/bin
fi
symlinkRelative -s $smplayerDir/SMPlayer$commandSuffix \
$commandBinDir/smplayer
addAppDeskbarSymlink $smplayerDir/SMPlayer
}