mpv: update to 0.35.1, minor fixups. (#8630)

* mpv: update to 0.35.1, minor fixups.

- Added an .hvif file. Converted from "etc/mpv-gradient.svg".
- Added application resources (signature, icon, etc).
- Build/install man pages.

Prompted by #8626. Still not working with Tracker's "Open with",
as our mpv needs further patching to handle that usage.

Thus, the "resource file_types message" in the ".rdef.in" file has been
left commented out for now (to avoid misleading users into thinking it
will work).

* mpv: move binary to $commandBinDir

So we have /bin/mpv instead of /bin/mpv-x86 symlinking to /bin/x86/mpv

Also: remove an unneeded "metainfo" data folder.
This commit is contained in:
OscarL
2023-05-14 13:58:14 -03:00
committed by GitHub
parent 7dbd0b080a
commit 328b8b89b9
4 changed files with 87 additions and 19 deletions

Binary file not shown.

View File

@@ -0,0 +1,40 @@
resource app_signature "application/x-vnd.mpv.io-mpv";
resource app_flags B_MULTIPLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "@SHORT_INFO@",
long_info = "@LONG_INFO@"
};
resource vector_icon array {
$"6E63696605020016023CB31C3BBF37BBBF373CB31C481D914B5B7300FAFFBA02"
$"0006023B6BCE3C9552BC95523B6BCE46B7E04AD861006B3C74FF461B4D020006"
$"023B06853B3F1FBB3F1F3B068548A8174AA97500320F38FF5A2963020006023A"
$"12403A241FBA241F3A124048DC384A8C6A00E6E2E8FFAAA3AD020006023567B8"
$"36822BB6822B3567B84980854A14590065376EFF4C2354050606FF07CAE240CA"
$"E240CAE2C5E640CAE2C5E6CAE2B999CAE2B49D40B49DC5E6B49DB99940B49DB9"
$"99B49DC5E6B49DCAE240CAE2B999CAE240400606FF07CA61BF68CA61BF68CA61"
$"C51EC00AC9BFC5C0C9BFBA54C9BFB5B3BF68B5B3C51EB5B3B9B2C00AB511BA54"
$"B511C5C0B511CA61BF68CA61B9B2CA61BF68BF680606FF07C89ABEBAC89ABEBA"
$"C89AC320C0A2C6B2C509C6B2BC3CC6B2B8AABEBAB8AAC320B8AABA53C0A2B6C2"
$"BC3CB6C2C509B6C2C89ABEBAC89ABA53C89ABEBABEBA0606FF07C4B9BFCCC4B9"
$"BFCCC4B9C29FBF9AC4EAC26EC4EABCC6C4EABA7BBFCCBA7BC29FBA7BBCF8BF9A"
$"BAADBCC6BAADC26EBAADC4B9BFCCC4B9BCF8C4B9BFCCBFCC0204BE4EBD7FBE4E"
$"BD7FBE4EBF04BE4EC20FBE4EC089BF87C147C1FABFB9C0C0C080C0C0BEFBBE4E"
$"BD7FBF87BE3DBE4EBD7F050A000100000A010101000A020102000A030103000A"
$"04010400"
};
/* Commented out for now, as mpv doesn't works with Tracker's "Open with" yet
resource file_types message {
"types" = "audio",
"types" = "video"
};
*/

View File

@@ -3,26 +3,34 @@ DESCRIPTION="mpv is a media player based on MPlayer and mplayer2. It supports \
a wide variety of video file formats, audio and video codecs, and subtitle \
types."
HOMEPAGE="https://mpv.io/"
COPYRIGHT="2013-2021 MPV Developers"
COPYRIGHT="2013-2023 MPV Developers"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/mpv-player/mpv/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="f654fb6275e5178f57e055d20918d7d34e19949bc98ebbf4a7371902e88ce309"
CHECKSUM_SHA256="41df981b7b84e33a2ef4478aaf81d6f4f5c8b9cd2c0d337ac142fc20b387d1a9"
SOURCE_FILENAME="mpv-$portVersion.tar.gz"
wafVersion="2.0.20"
wafVersion="2.0.25"
SOURCE_URI_2="https://waf.io/waf-$wafVersion#noarchive"
CHECKSUM_SHA256_2="bf971e98edc2414968a262c6aa6b88541a26c3cd248689c89f4c57370955ee7f"
CHECKSUM_SHA256_2="21199cd220ccf60434133e1fd2ab8c8e5217c3799199c82722543970dc8e38d5"
SOURCE_FILENAME_2="waf-$wafVersion"
PATCHES="mpv-$portVersion.patchset"
ADDITIONAL_FILES="mpv.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="settings/mpv/encoding-profiles.conf keep-old"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
mpv$secondaryArchSuffix = $portVersion
cmd:mpv$secondaryArchSuffix = $portVersion compat >= 0.30
cmd:mpv$commandSuffix = $portVersion compat >= 0.30
lib:libmpv$secondaryArchSuffix = 1.106.0 compat >= 1
"
REQUIRES="
@@ -92,6 +100,7 @@ BUILD_PREREQUIRES="
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:rst2man
cmd:yasm
"
@@ -114,12 +123,13 @@ BUILD()
--enable-libmpv-shared \
--enable-sdl2 \
--enable-cdda \
--bindir=$binDir \
--bindir=$commandBinDir \
--confdir=$settingsDir/mpv \
--disable-gl \
--datadir=$dataDir \
--libdir=$libDir \
--includedir=$includeDir
--includedir=$includeDir \
--mandir=$manDir
python3 waf build
}
@@ -129,6 +139,23 @@ INSTALL()
python3 waf install
rm -rf $dataDir/applications
rm -rf $dataDir/icons
rm -rf $dataDir/metainfo
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local SHORT_INFO="mpv"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@SHORT_INFO@|$SHORT_INFO|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/mpv.rdef.in > mpv.rdef
addResourcesToBinaries mpv.rdef $commandBinDir/mpv
mimeset -f $commandBinDir/mpv
prepareInstalledDevelLibs libmpv

View File

@@ -1,11 +1,11 @@
From 010c0d38a54c7da2deeeb9efdfaf7239172caf7d Mon Sep 17 00:00:00 2001
From 2151433a8dd46a2be590b1c94eb4b8b9b4b94caf Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 2 Jan 2020 21:16:37 +0300
Subject: disable setlocale for haiku
diff --git a/player/main.c b/player/main.c
index e039f61..b4e941c 100644
index 1c1cdf9..c10288d 100644
--- a/player/main.c
+++ b/player/main.c
@@ -235,6 +235,7 @@ static bool check_locale(void)
@@ -26,28 +26,29 @@ index e039f61..b4e941c 100644
if (!enable_talloc)
enable_talloc = HAVE_TA_LEAK_REPORT ? "1" : "0";
--
2.30.2
2.37.3
From 4b9b3b1d07674b92d371ee3c784571ad82459f5f Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Tue, 2 Nov 2021 12:19:55 +0300
From 7f6dee804e9571b35f72431b8da3e77f6cc04224 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Thu, 11 May 2023 21:00:50 -0300
Subject: Fix build on Haiku
Just adapting previous patch from Sergei Reznikov.
diff --git a/common/stats.c b/common/stats.c
index ce50bdc..79f1343 100644
index 4b40938..4f80aba 100644
--- a/common/stats.c
+++ b/common/stats.c
@@ -69,7 +69,7 @@ struct stat_entry {
// Overflows only after I'm dead.
@@ -70,7 +70,7 @@ struct stat_entry {
static int64_t get_thread_cpu_time_ns(pthread_t thread)
{
-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_THREAD_CPUTIME)
+#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_THREAD_CPUTIME) && !defined(__HAIKU__)
#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_THREAD_CPUTIME) && \
- !HAVE_WIN32_INTERNAL_PTHREADS
+ !HAVE_WIN32_INTERNAL_PTHREADS && !defined(__HAIKU__)
clockid_t id;
struct timespec tv;
if (pthread_getcpuclockid(thread, &id) == 0 &&
--
2.30.2
2.37.3