diff --git a/media-video/mpv/mpv-0.37.0.recipe b/media-video/mpv/mpv-0.38.0.recipe similarity index 73% rename from media-video/mpv/mpv-0.37.0.recipe rename to media-video/mpv/mpv-0.38.0.recipe index fa17442f4..5c7c723ec 100644 --- a/media-video/mpv/mpv-0.37.0.recipe +++ b/media-video/mpv/mpv-0.38.0.recipe @@ -5,9 +5,9 @@ types." HOMEPAGE="https://mpv.io/" COPYRIGHT="2013-2024 MPV Developers" LICENSE="GNU GPL v2" -REVISION="2" +REVISION="1" SOURCE_URI="https://github.com/mpv-player/mpv/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="1d2d4adbaf048a2fa6ee134575032c4b2dad9a7efafd5b3e69b88db935afaddf" +CHECKSUM_SHA256="86d9ef40b6058732f67b46d0bbda24a074fae860b3eaae05bab3145041303066" SOURCE_FILENAME="mpv-$portVersion.tar.gz" PATCHES="mpv-$portVersion.patchset" ADDITIONAL_FILES="mpv.rdef.in" @@ -24,10 +24,14 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then commandBinDir=$prefix/bin fi +portVersionCompat="$portVersion compat >= ${portVersion%.*}" +libVersion="2.3.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + PROVIDES=" mpv$secondaryArchSuffix = $portVersion - cmd:mpv$commandSuffix = $portVersion compat >= 0.37 - lib:libmpv$secondaryArchSuffix = 2.2.0 compat >= 2 + cmd:mpv$commandSuffix = $portVersionCompat + lib:libmpv$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix @@ -46,9 +50,10 @@ REQUIRES=" lib:libiconv$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:liblcms2$secondaryArchSuffix + lib:liblua$secondaryArchSuffix lib:libopenal$secondaryArchSuffix lib:libplacebo$secondaryArchSuffix - lib:librubberband$secondaryArchSuffix + lib:librubberband$secondaryArchSuffix lib:libswresample$secondaryArchSuffix lib:libswscale$secondaryArchSuffix lib:libuchardet$secondaryArchSuffix @@ -57,33 +62,41 @@ REQUIRES=" " PROVIDES_devel=" - mpv${secondaryArchSuffix}_devel = $portVersion compat >= 0.37 - devel:libmpv$secondaryArchSuffix = 2.2.0 compat >= 2 + mpv${secondaryArchSuffix}_devel = $portVersionCompat + devel:libmpv$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" haiku$secondaryArchSuffix mpv$secondaryArchSuffix == $portVersion base - devel:libass$secondaryArchSuffix - devel:libavcodec$secondaryArchSuffix >= 59 +# devel:libass$secondaryArchSuffix + devel:libavcodec$secondaryArchSuffix >= 60 + devel:libavdevice$secondaryArchSuffix >= 60 + devel:libavfilter$secondaryArchSuffix >= 9 + devel:libavformat$secondaryArchSuffix >= 60 + devel:libavutil$secondaryArchSuffix >= 58 devel:libbluray$secondaryArchSuffix - devel:libcdio_paranoia$secondaryArchSuffix - devel:libdvdcss$secondaryArchSuffix +# devel:libcdio_paranoia$secondaryArchSuffix +# devel:libdvdcss$secondaryArchSuffix devel:libdvdnav$secondaryArchSuffix devel:libdvdread$secondaryArchSuffix - devel:libenca$secondaryArchSuffix - devel:libfontconfig$secondaryArchSuffix - devel:libfreetype$secondaryArchSuffix - devel:libfribidi$secondaryArchSuffix - devel:libgl$secondaryArchSuffix - devel:libglib_2.0$secondaryArchSuffix - devel:libharfbuzz$secondaryArchSuffix - devel:libiconv$secondaryArchSuffix +# devel:libenca$secondaryArchSuffix +# devel:libfontconfig$secondaryArchSuffix +# devel:libfreetype$secondaryArchSuffix +# devel:libfribidi$secondaryArchSuffix +# devel:libgl$secondaryArchSuffix + devel:libEGL$secondaryArchSuffix +# devel:libglib_2.0$secondaryArchSuffix +# devel:libharfbuzz$secondaryArchSuffix +# devel:libiconv$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:liblcms2$secondaryArchSuffix + devel:liblua$secondaryArchSuffix >= 5.2 devel:libopenal$secondaryArchSuffix - devel:libmpg123$secondaryArchSuffix +# devel:libmpg123$secondaryArchSuffix devel:libplacebo$secondaryArchSuffix devel:librubberband$secondaryArchSuffix + devel:libswresample$secondaryArchSuffix >= 4 + devel:libswscale$secondaryArchSuffix >= 7 devel:libuchardet$secondaryArchSuffix devel:libvulkan$secondaryArchSuffix devel:libz$secondaryArchSuffix @@ -92,7 +105,7 @@ REQUIRES_devel=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libass$secondaryArchSuffix - devel:libavcodec$secondaryArchSuffix >= 59 + devel:libavcodec$secondaryArchSuffix >= 60 devel:libbluray$secondaryArchSuffix devel:libcdio_paranoia$secondaryArchSuffix devel:libdvdcss$secondaryArchSuffix @@ -108,6 +121,7 @@ BUILD_REQUIRES=" devel:libiconv$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:liblcms2$secondaryArchSuffix + devel:liblua$secondaryArchSuffix >= 5.2 devel:libopenal$secondaryArchSuffix devel:libmpg123$secondaryArchSuffix devel:libplacebo$secondaryArchSuffix @@ -140,8 +154,11 @@ BUILD() --mandir="$manDir" \ -Dlibmpv=true \ -Dhaiku=enabled \ + -Ddvdnav=enabled \ + -Dlua=lua5.2 \ -Dopenal=enabled \ - -Dvulkan=enabled + -Dvulkan=enabled \ + --auto-features auto ninja -C Build } diff --git a/media-video/mpv/patches/mpv-0.37.0.patchset b/media-video/mpv/patches/mpv-0.38.0.patchset similarity index 81% rename from media-video/mpv/patches/mpv-0.37.0.patchset rename to media-video/mpv/patches/mpv-0.38.0.patchset index da836ed5f..4d2a33abc 100644 --- a/media-video/mpv/patches/mpv-0.37.0.patchset +++ b/media-video/mpv/patches/mpv-0.38.0.patchset @@ -1,14 +1,14 @@ -From 97b042bfbd0a5f49b2339fb88908a37a88e908c8 Mon Sep 17 00:00:00 2001 +From d6a7cefc41f74d062d6487b642c4375113fe5213 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Wed, 6 Mar 2024 21:40:44 +1000 Subject: disable setlocale for haiku diff --git a/player/main.c b/player/main.c -index 27cf9b4..cdad83e 100644 +index 48d29b5..45ef5e6 100644 --- a/player/main.c +++ b/player/main.c -@@ -233,8 +233,12 @@ static int cfg_include(void *ctx, char *filename, int flags) +@@ -234,8 +234,12 @@ static int cfg_include(void *ctx, char *filename, int flags) // Other locale stuff might break too, but probably isn't too bad. static bool check_locale(void) { @@ -22,10 +22,10 @@ index 27cf9b4..cdad83e 100644 struct MPContext *mp_create(void) -- -2.43.2 +2.45.2 -From 6279671a31df31efb0a4c2871586c53792860148 Mon Sep 17 00:00:00 2001 +From b40045bd89d35307ed0de124c1777e34fe726ff7 Mon Sep 17 00:00:00 2001 From: Oscar Lesta Date: Thu, 11 May 2023 21:00:50 -0300 Subject: Fix build on Haiku @@ -33,10 +33,10 @@ Subject: Fix build on Haiku Just adapting previous patch from Sergei Reznikov. diff --git a/osdep/threads-posix.h b/osdep/threads-posix.h -index 482e4a8..5675921 100644 +index 4b3bb90..6ff96ea 100644 --- a/osdep/threads-posix.h +++ b/osdep/threads-posix.h -@@ -237,7 +237,7 @@ static inline void mp_thread_set_name(const char *name) +@@ -242,7 +242,7 @@ static inline void mp_thread_set_name(const char *name) static inline int64_t mp_thread_cpu_time_ns(mp_thread_id thread) { @@ -46,17 +46,17 @@ index 482e4a8..5675921 100644 struct timespec ts; if (pthread_getcpuclockid(thread, &id) == 0 && clock_gettime(id, &ts) == 0) -- -2.43.2 +2.45.2 -From 7ef22621b8ca9bc422d79b546cb772059a8a09e3 Mon Sep 17 00:00:00 2001 +From d8864f0ffa9efb3c18b614529bb78b6daa543fe8 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 31 Mar 2024 00:52:47 +1000 Subject: Add Haiku video output module diff --git a/meson.build b/meson.build -index fdfc526..2806960 100644 +index 2c2246b..d828418 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ @@ -66,36 +66,36 @@ index fdfc526..2806960 100644 license: ['GPL2+', 'LGPL2.1+'], version: files('./VERSION'), meson_version: '>=0.62.0', -@@ -933,6 +933,12 @@ if features['sdl2-video'] +@@ -959,6 +959,12 @@ if features['sdl2-video'] sources += files('video/out/vo_sdl.c') endif +features += {'haiku': get_option('haiku').allowed()} +if features['haiku'] -+ dependencies += meson.get_compiler('cpp').find_library('be', required: true) ++ dependencies += meson.get_compiler('cpp').find_library('be', required: true) + sources += files('video/out/vo_haiku.cpp') +endif + - shaderc = dependency('shaderc', required: get_option('shaderc')) + shaderc = dependency('shaderc', required: + get_option('shaderc').require(features['win32-desktop'])) features += {'shaderc': shaderc.found()} - if features['shaderc'] diff --git a/meson_options.txt b/meson_options.txt -index b0edb80..8844a03 100644 +index e488f6e..d094132 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -76,6 +76,7 @@ option('gl-x11', type: 'feature', value: 'disabled', description: 'OpenGL X11/GL - option('jpeg', type: 'feature', value: 'auto', description: 'JPEG support') - option('rpi', type: 'feature', value: 'disabled', description: 'Raspberry Pi support') +@@ -76,6 +76,7 @@ option('gl-dxinterop', type: 'feature', value: 'auto', description: 'OpenGL/Dire + option('gl-win32', type: 'feature', value: 'auto', description: 'OpenGL Win32 backend') + option('gl-x11', type: 'feature', value: 'disabled', description: 'OpenGL X11/GLX (deprecated/legacy)') option('sdl2-video', type: 'feature', value: 'auto', description: 'SDL2 video output') +option('haiku', type: 'feature', value: 'enabled', description: 'Haiku video output') option('shaderc', type: 'feature', value: 'auto', description: 'libshaderc SPIR-V compiler') - option('sixel', type: 'feature', value:'auto', description: 'Sixel') + option('sixel', type: 'feature', value:'auto', description: 'Sixel video output') option('spirv-cross', type: 'feature', value: 'auto', description: 'SPIRV-Cross SPIR-V shader converter') diff --git a/options/m_option.h b/options/m_option.h -index e62fa0f..f66fe9d 100644 +index 530c0a3..5285dd9 100644 --- a/options/m_option.h +++ b/options/m_option.h -@@ -259,7 +259,11 @@ union m_option_value { +@@ -264,8 +264,11 @@ union m_option_value { // Keep fully zeroed instance of m_option_value to use as a default value, before // any specific union member is used. C standard says that `= {0}` activates and // initializes only the first member of the union, leaving padding bits undefined. @@ -103,25 +103,13 @@ index e62fa0f..f66fe9d 100644 +static const union m_option_value m_option_value_default = {0}; +#else static const union m_option_value m_option_value_default; +- +#endif - //////////////////////////////////////////////////////////////////////////// -diff --git a/video/csputils.h b/video/csputils.h -index 3a904cb..cf7c93a 100644 ---- a/video/csputils.h -+++ b/video/csputils.h -@@ -159,7 +159,7 @@ struct mp_colorspace { - #define MP_REF_WHITE_HLG 3.17955 - - // Replaces unknown values in the first struct by those of the second struct --void mp_colorspace_merge(struct mp_colorspace *orig, struct mp_colorspace *new); -+void mp_colorspace_merge(struct mp_colorspace *orig, struct mp_colorspace *newscpace); - - struct mp_csp_params { - struct mp_colorspace color; // input colorspace + struct m_option_action { diff --git a/video/out/vo.c b/video/out/vo.c -index 50129fb..fda0b78 100644 +index db29690..5761a75 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -54,6 +54,7 @@ extern const struct vo_driver video_out_gpu; @@ -132,12 +120,12 @@ index 50129fb..fda0b78 100644 extern const struct vo_driver video_out_image; extern const struct vo_driver video_out_lavc; extern const struct vo_driver video_out_caca; -@@ -97,6 +98,9 @@ static const struct vo_driver *const video_out_drivers[] = +@@ -95,6 +96,9 @@ static const struct vo_driver *const video_out_drivers[] = #if HAVE_VAAPI_X11 && HAVE_GPL &video_out_vaapi, #endif +#ifdef __HAIKU__ -+ &video_out_haiku, ++ &video_out_haiku, +#endif #if HAVE_X11 &video_out_x11, @@ -650,20 +638,20 @@ index 0000000..cc3c4a9 + }; +} -- -2.43.2 +2.45.2 -From 65b7590fdfef29df1baf1d8835120328fb9268a2 Mon Sep 17 00:00:00 2001 +From 32ffd041d9156e1eb7841967f6f64281cc0fc965 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 31 Mar 2024 04:03:26 +0000 Subject: Use _Static_assert diff --git a/audio/out/ao_audiotrack.c b/audio/out/ao_audiotrack.c -index 1392699..088cb9a 100644 +index db1da9c..7c132bc 100644 --- a/audio/out/ao_audiotrack.c +++ b/audio/out/ao_audiotrack.c -@@ -704,7 +704,7 @@ static int init(struct ao *ao) +@@ -690,7 +690,7 @@ static int init(struct ao *ao) AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER, AudioFormat.CHANNEL_OUT_7POINT1_SURROUND, }; @@ -673,10 +661,10 @@ index 1392699..088cb9a 100644 p->channel_config = AudioFormat.CHANNEL_OUT_STEREO; } else { diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c -index 1dc1b18..a887be9 100644 +index 0a93f63..a162ba2 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c -@@ -1402,14 +1402,14 @@ done: +@@ -1470,14 +1470,14 @@ done: static inline void copy_frame_info_to_mp(struct frame_info *pl, struct mp_frame_perf *mp) { @@ -694,7 +682,7 @@ index 1dc1b18..a887be9 100644 struct mp_pass_perf *perf = &mp->perf[i]; diff --git a/video/zimg.c b/video/zimg.c -index 5ff300c..627db51 100644 +index 907e81d..24f733c 100644 --- a/video/zimg.c +++ b/video/zimg.c @@ -32,7 +32,7 @@ @@ -707,5 +695,77 @@ index 5ff300c..627db51 100644 #define HAVE_ZIMG_ALPHA (ZIMG_API_VERSION >= ZIMG_MAKE_API_VERSION(2, 4)) -- -2.43.2 +2.45.2 + + +From 3a8b15620cf338f72f449dbad49eae86d004d1d3 Mon Sep 17 00:00:00 2001 +From: Schrijvers Luc +Date: Tue, 21 May 2024 13:57:25 +0200 +Subject: More build fixes + + +diff --git a/options/m_option.c b/options/m_option.c +index 4646510..c4b4be9 100644 +--- a/options/m_option.c ++++ b/options/m_option.c +@@ -3786,7 +3786,7 @@ static void dup_node(void *ta_parent, struct mpv_node *node) + + static void copy_node(const m_option_t *opt, void *dst, const void *src) + { +- static_assert(sizeof(struct mpv_node) <= sizeof(union m_option_value), ""); ++ _Static_assert(sizeof(struct mpv_node) <= sizeof(union m_option_value), ""); + + if (!(dst && src)) + return; +diff --git a/osdep/threads-posix.h b/osdep/threads-posix.h +index 6ff96ea..62b3fd9 100644 +--- a/osdep/threads-posix.h ++++ b/osdep/threads-posix.h +@@ -227,7 +227,7 @@ static inline int mp_cond_timedwait_until(mp_cond *cond, mp_mutex *mutex, int64_ + + static inline void mp_thread_set_name(const char *name) + { +-#if HAVE_GLIBC_THREAD_NAME ++#if HAVE_GLIBC_THREAD_NAME && !defined(__HAIKU__) + if (pthread_setname_np(pthread_self(), name) == ERANGE) { + char tname[16] = {0}; // glibc-checked kernel limit + strncpy(tname, name, sizeof(tname) - 1); +diff --git a/sub/osd.c b/sub/osd.c +index d33aabd..96a4773 100644 +--- a/sub/osd.c ++++ b/sub/osd.c +@@ -119,7 +119,7 @@ bool osd_res_equals(struct mp_osd_res a, struct mp_osd_res b) + + struct osd_state *osd_create(struct mpv_global *global) + { +- static_assert(MAX_OSD_PARTS >= OSDTYPE_COUNT, ""); ++ _Static_assert(MAX_OSD_PARTS >= OSDTYPE_COUNT, ""); + + struct osd_state *osd = talloc_zero(NULL, struct osd_state); + *osd = (struct osd_state) { +-- +2.45.2 + + +From 349652a6c6877d3379c753e6fa36598d8e7505ef Mon Sep 17 00:00:00 2001 +From: Schrijvers Luc +Date: Fri, 16 Aug 2024 11:42:47 +0200 +Subject: Fix building support for dvdnav + + +diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c +index 5dba92a..fd7f373 100644 +--- a/stream/stream_dvdnav.c ++++ b/stream/stream_dvdnav.c +@@ -497,7 +497,7 @@ static int control(stream_t *stream, int cmd, void *arg) + struct stream_dvd_info_req *req = arg; + memset(req, 0, sizeof(*req)); + req->num_subs = mp_dvdnav_number_of_subs(stream); +- static_assert(sizeof(uint32_t) == sizeof(unsigned int), ""); ++ _Static_assert(sizeof(uint32_t) == sizeof(unsigned int), ""); + memcpy(req->palette, priv->spu_clut, sizeof(req->palette)); + return STREAM_OK; + } +-- +2.45.2