A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

chore: upgrade to zig 0.14

+65 -64
-1
bin/zig
··· 1 - .zig-0.13.0.pkg
+61 -62
build.zig
··· 1 1 const std = @import("std"); 2 + 2 3 const String = @import("./string.zig").String; 3 4 4 5 pub const BuildOptions = struct { ··· 137 138 .flags = &cflags, 138 139 }); 139 140 140 - exe.defineCMacro("ZIG_APP", null); 141 - exe.defineCMacro("ROCKBOX_SERVER", null); 141 + exe.root_module.addCMacro("ZIG_APP", ""); 142 + exe.root_module.addCMacro("ROCKBOX_SERVER", ""); 142 143 143 144 const libfirmware = b.addStaticLibrary(.{ 144 145 .name = "firmware", ··· 152 153 .flags = &cflags, 153 154 }); 154 155 155 - defineCMacros(libfirmware); 156 + addCMacros(libfirmware); 156 157 addIncludePaths(libfirmware); 157 158 158 159 const libspeex_voice = b.addStaticLibrary(.{ ··· 195 196 }, 196 197 }); 197 198 198 - libspeex_voice.defineCMacro("HAVE_CONFIG_H", null); 199 - libspeex_voice.defineCMacro("ROCKBOX_VOICE_CODEC", null); 200 - libspeex_voice.defineCMacro("SPEEX_DISABLE_ENCODER", null); 201 - defineCMacros(libspeex_voice); 199 + libspeex_voice.root_module.addCMacro("HAVE_CONFIG_H", ""); 200 + libspeex_voice.root_module.addCMacro("ROCKBOX_VOICE_CODEC", ""); 201 + libspeex_voice.root_module.addCMacro("SPEEX_DISABLE_ENCODER", ""); 202 + addCMacros(libspeex_voice); 202 203 addIncludePaths(libspeex_voice); 203 204 204 205 const librbcodec = b.addStaticLibrary(.{ ··· 213 214 .flags = &cflags, 214 215 }); 215 216 216 - defineCMacros(librbcodec); 217 + addCMacros(librbcodec); 217 218 addIncludePaths(librbcodec); 218 219 219 220 const libskinparser = b.addStaticLibrary(.{ ··· 228 229 .flags = &cflags, 229 230 }); 230 231 231 - defineCMacros(libskinparser); 232 + addCMacros(libskinparser); 232 233 addIncludePaths(libskinparser); 233 234 234 235 const libfixedpoint = b.addStaticLibrary(.{ ··· 244 245 .flags = &cflags, 245 246 }); 246 247 247 - defineCMacros(libfixedpoint); 248 + addCMacros(libfixedpoint); 248 249 addIncludePaths(libfixedpoint); 249 250 250 251 const libuisimulator = b.addStaticLibrary(.{ ··· 260 261 .flags = &cflags, 261 262 }); 262 263 263 - libuisimulator.defineCMacro("HAVE_CONFIG_H", null); 264 - defineCMacros(libuisimulator); 264 + libuisimulator.root_module.addCMacro("HAVE_CONFIG_H", ""); 265 + addCMacros(libuisimulator); 265 266 addIncludePaths(libuisimulator); 266 267 267 268 const libcodec = b.addStaticLibrary(.{ ··· 277 278 .flags = &cflags, 278 279 }); 279 280 280 - defineCMacros(libcodec); 281 + addCMacros(libcodec); 281 282 addIncludePaths(libcodec); 282 283 283 284 const libtlsf = b.addStaticLibrary(.{ ··· 295 296 .flags = &cflags, 296 297 }); 297 298 298 - defineCMacros(libtlsf); 299 + addCMacros(libtlsf); 299 300 addIncludePaths(libtlsf); 300 301 301 302 const opus = try build_codec(b, .{ ··· 390 391 .flags = &cflags, 391 392 }); 392 393 393 - libmad.defineCMacro("CODEC", null); 394 - defineCMacros(libmad); 394 + libmad.root_module.addCMacro("CODEC", ""); 395 + addCMacros(libmad); 395 396 addIncludePaths(libmad); 396 397 397 398 const libm4a = b.addStaticLibrary(.{ ··· 410 411 .flags = &cflags, 411 412 }); 412 413 413 - libm4a.defineCMacro("CODEC", null); 414 - defineCMacros(libm4a); 414 + libm4a.root_module.addCMacro("CODEC", ""); 415 + addCMacros(libm4a); 415 416 addIncludePaths(libm4a); 416 417 417 418 const libasf = b.addStaticLibrary(.{ ··· 429 430 .flags = &cflags, 430 431 }); 431 432 432 - libasf.defineCMacro("CODEC", null); 433 - libasf.defineCMacro("HAVE_CONFIG_H", null); 434 - defineCMacros(libasf); 433 + libasf.root_module.addCMacro("CODEC", ""); 434 + libasf.root_module.addCMacro("HAVE_CONFIG_H", ""); 435 + addCMacros(libasf); 435 436 addIncludePaths(libasf); 436 437 437 438 const mpa = try build_codec(b, .{ ··· 468 469 .flags = &cflags, 469 470 }); 470 471 471 - libffmpegFLAC.defineCMacro("CODEC", null); 472 - defineCMacros(libffmpegFLAC); 472 + libffmpegFLAC.root_module.addCMacro("CODEC", ""); 473 + addCMacros(libffmpegFLAC); 473 474 addIncludePaths(libffmpegFLAC); 474 475 475 476 const flac = try build_codec(b, .{ ··· 513 514 .flags = &cflags, 514 515 }); 515 516 516 - libpcm.defineCMacro("CODEC", null); 517 - defineCMacros(libpcm); 517 + libpcm.root_module.addCMacro("CODEC", ""); 518 + addCMacros(libpcm); 518 519 addIncludePaths(libpcm); 519 520 520 521 const wav = try build_codec(b, .{ ··· 545 546 "lib/rbcodec/codecs/librm/rm.c", 546 547 }, .flags = &cflags }); 547 548 548 - librm.defineCMacro("CODEC", null); 549 - defineCMacros(librm); 549 + librm.root_module.addCMacro("CODEC", ""); 550 + addCMacros(librm); 550 551 addIncludePaths(librm); 551 552 552 553 const a52 = try build_codec(b, .{ ··· 696 697 }, 697 698 }); 698 699 699 - libfaad.defineCMacro("CODEC", null); 700 - defineCMacros(libfaad); 700 + libfaad.root_module.addCMacro("CODEC", ""); 701 + addCMacros(libfaad); 701 702 addIncludePaths(libfaad); 702 703 703 704 const faad = try build_codec(b, .{ ··· 927 928 "lib/rbcodec/codecs/demac/libdemac/filter_64_11.c", 928 929 }, .flags = &cflags }); 929 930 930 - libdemac.defineCMacro("CODEC", null); 931 - defineCMacros(libdemac); 931 + libdemac.root_module.addCMacro("CODEC", ""); 932 + addCMacros(libdemac); 932 933 addIncludePaths(libdemac); 933 934 934 935 const ape = try build_codec(b, .{ ··· 1305 1306 .flags = &cflags, 1306 1307 }); 1307 1308 1308 - libemu2413.defineCMacro("CODEC", null); 1309 - defineCMacros(libemu2413); 1309 + libemu2413.root_module.addCMacro("CODEC", ""); 1310 + addCMacros(libemu2413); 1310 1311 addIncludePaths(libemu2413); 1311 1312 1312 1313 const nsf = try build_codec(b, .{ ··· 1393 1394 // .flags = &cflags, 1394 1395 //}); 1395 1396 1396 - // sid.defineCMacro("CODEC", null); 1397 - // defineCMacros(sid); 1397 + // sid.root_module.addCMacro("CODEC", ""); 1398 + // addCMacros(sid); 1398 1399 // addIncludePaths(sid); 1399 1400 1400 1401 const kss = try build_codec(b, .{ ··· 1478 1479 .flags = &cflags, 1479 1480 }); 1480 1481 1481 - libplugin.defineCMacro("PLUGIN", null); 1482 - defineCMacros(libplugin); 1482 + libplugin.root_module.addCMacro("PLUGIN", ""); 1483 + addCMacros(libplugin); 1483 1484 addPluginIncludePaths(libplugin); 1484 1485 1485 1486 const libpluginbitmaps = b.addStaticLibrary(.{ ··· 1561 1562 .flags = &cflags, 1562 1563 }); 1563 1564 1564 - libpluginbitmaps.defineCMacro("PLUGIN", null); 1565 - defineCMacros(libpluginbitmaps); 1565 + libpluginbitmaps.root_module.addCMacro("PLUGIN", ""); 1566 + addCMacros(libpluginbitmaps); 1566 1567 addPluginIncludePaths(libpluginbitmaps); 1567 1568 1568 1569 const chopper = try build_plugin(b, .{ ··· 2917 2918 }); 2918 2919 rocks.dependOn(wormlet); 2919 2920 2920 - defineCMacros(exe); 2921 + addCMacros(exe); 2921 2922 addIncludePaths(exe); 2922 2923 2923 2924 exe.addObjectFile(.{ ··· 3626 3627 }); 3627 3628 3628 3629 for (options.macros) |macro| { 3629 - codec.defineCMacro(macro, null); 3630 + codec.root_module.addCMacro(macro, ""); 3630 3631 } 3631 3632 3632 - defineCMacros(codec); 3633 + addCMacros(codec); 3633 3634 addIncludePaths(codec); 3634 3635 3635 3636 for (options.link_libraries) |lib| { ··· 3680 3681 .flags = &cflags, 3681 3682 }); 3682 3683 3683 - plugin.defineCMacro("PLUGIN", null); 3684 + plugin.root_module.addCMacro("PLUGIN", ""); 3684 3685 3685 3686 if (options.is_fft_plugin) { 3686 - plugin.defineCMacro("FIXED_POINT", "16"); 3687 + plugin.root_module.addCMacro("FIXED_POINT", "16"); 3687 3688 } 3688 3689 3689 3690 if (options.is_mikmod_plugin) { 3690 - plugin.defineCMacro("MIKMOD_STATIC", null); 3691 + plugin.root_module.addCMacro("MIKMOD_STATIC", ""); 3691 3692 } 3692 3693 3693 - defineCMacros(plugin); 3694 + addCMacros(plugin); 3694 3695 addPluginIncludePaths(plugin); 3695 3696 3696 3697 for (options.link_libraries) |lib| { ··· 3725 3726 return &rock_file.step; 3726 3727 } 3727 3728 3728 - fn defineCMacros(c: *std.Build.Step.Compile) void { 3729 - c.defineCMacro("_USE_MISC", null); 3730 - c.defineCMacro("ROCKBOX", null); 3731 - c.defineCMacro("MEMORYSIZE", "8"); 3732 - c.defineCMacro("SDLAPP", null); 3733 - c.defineCMacro("TARGET_ID", "73"); 3734 - c.defineCMacro("TARGET_NAME", "\"sdlapp\""); 3735 - c.defineCMacro("YEAR", "2024"); 3736 - c.defineCMacro("MONTH", "09"); 3737 - c.defineCMacro("DAY", "01"); 3738 - c.defineCMacro("OS_USE_BYTESWAP_H", null); 3739 - c.defineCMacro("APPLICATION", null); 3740 - c.defineCMacro("_GNU_SOURCE", "1"); 3741 - c.defineCMacro("_REENTRANT", null); 3729 + fn addCMacros(c: *std.Build.Step.Compile) void { 3730 + c.root_module.addCMacro("_USE_MISC", ""); 3731 + c.root_module.addCMacro("ROCKBOX", ""); 3732 + c.root_module.addCMacro("MEMORYSIZE", "8"); 3733 + c.root_module.addCMacro("SDLAPP", ""); 3734 + c.root_module.addCMacro("TARGET_ID", "73"); 3735 + c.root_module.addCMacro("TARGET_NAME", "\"sdlapp\""); 3736 + c.root_module.addCMacro("YEAR", "2024"); 3737 + c.root_module.addCMacro("MONTH", "09"); 3738 + c.root_module.addCMacro("DAY", "01"); 3739 + c.root_module.addCMacro("OS_USE_BYTESWAP_H", ""); 3740 + c.root_module.addCMacro("APPLICATION", "1"); 3741 + c.root_module.addCMacro("_GNU_SOURCE", "1"); 3742 + //c.root_module.addCMacro("_REENTRANT", ""); 3742 3743 } 3743 3744 3744 3745 fn addIncludePaths(c: *std.Build.Step.Compile) void { ··· 4277 4278 "-g", 4278 4279 "-Wno-unused-result", 4279 4280 "-D_GNU_SOURCE=1", 4280 - "-D_REENTRANT", 4281 4281 "-I/home/coder/Documents/github/rockbox/uisimulator/sdl", 4282 4282 "-Wno-pointer-sign", 4283 4283 "-Wno-override-init", ··· 4319 4319 "-O2", 4320 4320 "-Wno-tautological-compare", 4321 4321 "-Wno-expansion-to-defined", 4322 - "-DUSB_NONE", 4323 4322 };
+3 -1
build.zig.zon
··· 6 6 // 7 7 // It is redundant to include "zig" in this name because it is already 8 8 // within the Zig package namespace. 9 - .name = "rockbox", 9 + .name = .rockbox, 10 10 11 11 // This is a [Semantic Version](https://semver.org/). 12 12 // In a future version of Zig it will be used for package deduplication. 13 13 .version = "0.1.0", 14 + 15 + .fingerprint = 0xda644f44ea4cfb22, 14 16 15 17 // This field is optional. 16 18 // This is currently advisory only; Zig does not yet do anything
+1
firmware/export/config.h
··· 1415 1415 #define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...) 1416 1416 1417 1417 #endif /* __CONFIG_H__ */ 1418 +