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