[Buildroot] [PATCH v2] package/mpv: switch to meson from waf

Thomas Bonnefille thomas.bonnefille at bootlin.com
Fri Apr 18 08:16:09 UTC 2025


On Mon Apr 14, 2025 at 7:12 PM CEST, J. Neuschäfer wrote:
> Hello Thomas,
>
> On Mon, Jan 06, 2025 at 12:23:49AM +0100, Thomas Bonnefille via buildroot wrote:
>> Since commit fd562315, which updated waf to v2.1.1, Buildroot has
>> encountered issues building mpv, likely due to an outdated version of
>> the waf build system.
>>
>> Starting with mpv v0.35, meson was introduced as an alternative to waf,
>> and in mpv v0.37, waf was completely removed.
>>
>> This commit updates the mpv makefile to use meson, resolving the build
>> issues and simplifying future updates to newer versions of mpv.
>>
>> All options previously used for Waf have been translated to the new
>> build system by replacing `--disable-feature` with `-Dfeature=disabled`
>> (and similarly for enabling features). Some features have special
>> handling:
>>
>> - The `/usr` prefix is automatically passed to meson packages by
>>   default.
>> - The Android feature "has been removed since meson can detect if a
>>   machine is Android"[1].
>> - The `libmpv` parameter has been enabled in the makefile as `libmpv`
>>   must be built by default with mpv.
>> - Meson packages automatically set whether the library should be built
>>   statically using the `default_library` meson parameter.
>> - Meson automatically detects the presence of `libatomic` and passes the
>>   correct argument to the linker. However, it is possible to set the
>>   `stdatomic` meson parameter to specify whether `libatomic` must or
>>   must not be used.
>>
>> Fixes:
>>     https://autobuild.buildroot.org/results/68d42441fc0da34e1bf2a4247726f5f4ec3b8e77/
>>
>> [1]: https://github.com/mpv-player/mpv/blob/140ec21c89d671d392877a7f3b91d67e7d7b9239/DOCS/build-system-differences.md?plain=1#L48
>>
>> Signed-off-by: Thomas Bonnefille <thomas.bonnefille at bootlin.com>
>
> I'm trying to use this patch on top of current master (2025.02-268-g637eead755)
> and there seems to be a minor incompatibility:
>
> output/build/mpv-0.35.1/meson.build:1:0: ERROR: Option "build-date" value disabled is not boolean (true or false).
>
>> +MPV_CONF_OPTS += -Dbuild-date=disabled
>
> With that changed to -Dbuild-date=false:
>
> Tested-by: J. Neuschäfer <j.ne at posteo.net>
>
> Thanks!

Hello,
Indeed, when building with BR2_REPRODUCIBLE the build crashed, thank you
for your feedback !

I'll send a v3, soon.

Regards,
Thomas


More information about the buildroot mailing list