From da04c5ec54b92b609b23029412d5a21e02aae8a0 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Wed, 16 Oct 2024 20:01:01 -0400 Subject: [PATCH] Not sure why I didn't think of this before, but you can just copy all the .wrap files to another directory, and then instead of meson wrap install you just copy them to subprojects. That's how you lock the versions of dependencies. --- meson.build | 8 +------- scripts/reset_build.ps1 | 15 +-------------- scripts/reset_build.sh | 19 ++++--------------- wraps/catch2.wrap | 11 +++++++++++ wraps/flac.wrap | 13 +++++++++++++ wraps/fmt.wrap | 13 +++++++++++++ wraps/freetype2.wrap | 11 +++++++++++ wraps/ftxui.wrap | 15 +++++++++++++++ wraps/libpng.wrap | 13 +++++++++++++ wraps/nlohmann_json.wrap | 11 +++++++++++ wraps/ogg.wrap | 13 +++++++++++++ wraps/openal-soft.wrap | 13 +++++++++++++ wraps/sfml.wrap | 13 +++++++++++++ wraps/vorbis.wrap | 14 ++++++++++++++ 14 files changed, 146 insertions(+), 36 deletions(-) create mode 100644 wraps/catch2.wrap create mode 100644 wraps/flac.wrap create mode 100644 wraps/fmt.wrap create mode 100644 wraps/freetype2.wrap create mode 100644 wraps/ftxui.wrap create mode 100644 wraps/libpng.wrap create mode 100644 wraps/nlohmann_json.wrap create mode 100644 wraps/ogg.wrap create mode 100644 wraps/openal-soft.wrap create mode 100644 wraps/sfml.wrap create mode 100644 wraps/vorbis.wrap diff --git a/meson.build b/meson.build index e77dd17..6d758fc 100644 --- a/meson.build +++ b/meson.build @@ -8,11 +8,10 @@ ftxui_screen = dependency('ftxui-screen') ftxui_dom = dependency('ftxui-dom') ftxui_component = dependency('ftxui-component') sfml = dependency('sfml') -flecs = dependency('flecs') dependencies = [catch2, fmt, ftxui_screen, ftxui_dom, ftxui_component, - json, sfml, flecs] + json, sfml] runtests = executable('runtests', [ 'dbc.cpp', @@ -33,11 +32,6 @@ roguish = executable('roguish', [ ], dependencies: dependencies) -flectest = executable('flecstest', [ - './scratchpad/flecstest.cpp' - ], - dependencies: dependencies) - myecstest = executable('myecstest', [ './scratchpad/myecstest.cpp' ], diff --git a/scripts/reset_build.ps1 b/scripts/reset_build.ps1 index 9b8c152..af8305b 100644 --- a/scripts/reset_build.ps1 +++ b/scripts/reset_build.ps1 @@ -2,19 +2,6 @@ mv .\subprojects\packagecache . rm -recurse -force .\subprojects\,.\builddir\ mkdir subprojects mv .\packagecache .\subprojects\ -cp *.wrap subprojects mkdir builddir -meson wrap install fmt -meson wrap install catch2 -meson wrap install ftxui -meson wrap install nlohmann_json -meson wrap install libpng -meson wrap install vorbis -meson wrap install ogg -meson wrap install flac -meson wrap install freetype2 -meson wrap install openal-soft -meson wrap install sfml -# $env:CC="clang" -# $env:CXX="clang++" +cp wraps\*.wrap subprojects\ meson setup --default-library=static --prefer-static builddir diff --git a/scripts/reset_build.sh b/scripts/reset_build.sh index 895bf23..11e8d63 100755 --- a/scripts/reset_build.sh +++ b/scripts/reset_build.sh @@ -1,21 +1,10 @@ #!/usr/bin/env bash set -e -mv -f ./subprojects/packagecache . || true +mv -f ./subprojects/packagecache . rm -rf subprojects builddir mkdir subprojects -mv packagecache ./subprojects/ || true +mv packagecache ./subprojects/ mkdir builddir -cp *.wrap subprojects -meson wrap install fmt -meson wrap install catch2 -meson wrap install ftxui -meson wrap install nlohmann_json -meson wrap install libpng -meson wrap install vorbis -meson wrap install ogg -meson wrap install flac -meson wrap install freetype2 -meson wrap install openal-soft -meson wrap install sfml -meson setup builddir +cp wraps/*.wrap subprojects/ +meson setup --default-library=static --prefer-static builddir diff --git a/wraps/catch2.wrap b/wraps/catch2.wrap new file mode 100644 index 0000000..f9bf436 --- /dev/null +++ b/wraps/catch2.wrap @@ -0,0 +1,11 @@ +[wrap-file] +directory = Catch2-3.7.1 +source_url = https://github.com/catchorg/Catch2/archive/v3.7.1.tar.gz +source_filename = Catch2-3.7.1.tar.gz +source_hash = c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/catch2_3.7.1-1/Catch2-3.7.1.tar.gz +wrapdb_version = 3.7.1-1 + +[provide] +catch2 = catch2_dep +catch2-with-main = catch2_with_main_dep diff --git a/wraps/flac.wrap b/wraps/flac.wrap new file mode 100644 index 0000000..ee36479 --- /dev/null +++ b/wraps/flac.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = flac-1.4.3 +source_url = https://github.com/xiph/flac/releases/download/1.4.3/flac-1.4.3.tar.xz +source_filename = flac-1.4.3.tar.xz +source_hash = 6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70 +patch_filename = flac_1.4.3-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/flac_1.4.3-2/get_patch +patch_hash = 3eace1bd0769d3e0d4ff099960160766a5185d391c8f583293b087a1f96c2a9c +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/flac_1.4.3-2/flac-1.4.3.tar.xz +wrapdb_version = 1.4.3-2 + +[provide] +flac = flac_dep diff --git a/wraps/fmt.wrap b/wraps/fmt.wrap new file mode 100644 index 0000000..fd50847 --- /dev/null +++ b/wraps/fmt.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = fmt-11.0.2 +source_url = https://github.com/fmtlib/fmt/archive/11.0.2.tar.gz +source_filename = fmt-11.0.2.tar.gz +source_hash = 6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f +patch_filename = fmt_11.0.2-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/fmt_11.0.2-1/get_patch +patch_hash = 90c9e3b8e8f29713d40ca949f6f93ad115d78d7fb921064112bc6179e6427c5e +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_11.0.2-1/fmt-11.0.2.tar.gz +wrapdb_version = 11.0.2-1 + +[provide] +fmt = fmt_dep diff --git a/wraps/freetype2.wrap b/wraps/freetype2.wrap new file mode 100644 index 0000000..acad6f4 --- /dev/null +++ b/wraps/freetype2.wrap @@ -0,0 +1,11 @@ +[wrap-file] +directory = freetype-2.13.3 +source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/freetype2_2.13.3-1/freetype-2.13.3.tar.xz +source_filename = freetype-2.13.3.tar.xz +source_hash = 0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 +wrapdb_version = 2.13.3-1 + +[provide] +freetype2 = freetype_dep +freetype = freetype_dep diff --git a/wraps/ftxui.wrap b/wraps/ftxui.wrap new file mode 100644 index 0000000..bec78a6 --- /dev/null +++ b/wraps/ftxui.wrap @@ -0,0 +1,15 @@ +[wrap-file] +directory = FTXUI-5.0.0 +source_url = https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v5.0.0.tar.gz +source_filename = FTXUI-5.0.0.tar.gz +source_hash = a2991cb222c944aee14397965d9f6b050245da849d8c5da7c72d112de2786b5b +patch_filename = ftxui_5.0.0-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/ftxui_5.0.0-1/get_patch +patch_hash = 21c654e82739b90b95bd98c1d321264608d37c50d29fbcc3487f790fd5412909 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/ftxui_5.0.0-1/FTXUI-5.0.0.tar.gz +wrapdb_version = 5.0.0-1 + +[provide] +ftxui-screen = screen_dep +ftxui-dom = dom_dep +ftxui-component = component_dep diff --git a/wraps/libpng.wrap b/wraps/libpng.wrap new file mode 100644 index 0000000..06044a9 --- /dev/null +++ b/wraps/libpng.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = libpng-1.6.44 +source_url = https://github.com/glennrp/libpng/archive/v1.6.44.tar.gz +source_filename = libpng-1.6.44.tar.gz +source_hash = 0ef5b633d0c65f780c4fced27ff832998e71478c13b45dfb6e94f23a82f64f7c +patch_filename = libpng_1.6.44-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.44-1/get_patch +patch_hash = 394b07614c45fbd1beac8b660386216a490fe12f841a1a445799b676c9c892fb +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libpng_1.6.44-1/libpng-1.6.44.tar.gz +wrapdb_version = 1.6.44-1 + +[provide] +libpng = libpng_dep diff --git a/wraps/nlohmann_json.wrap b/wraps/nlohmann_json.wrap new file mode 100644 index 0000000..8c46676 --- /dev/null +++ b/wraps/nlohmann_json.wrap @@ -0,0 +1,11 @@ +[wrap-file] +directory = nlohmann_json-3.11.3 +lead_directory_missing = true +source_url = https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip +source_filename = nlohmann_json-3.11.3.zip +source_hash = a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/nlohmann_json_3.11.3-1/nlohmann_json-3.11.3.zip +wrapdb_version = 3.11.3-1 + +[provide] +nlohmann_json = nlohmann_json_dep diff --git a/wraps/ogg.wrap b/wraps/ogg.wrap new file mode 100644 index 0000000..e7f23eb --- /dev/null +++ b/wraps/ogg.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = libogg-1.3.5 +source_url = https://downloads.xiph.org/releases/ogg/libogg-1.3.5.tar.xz +source_filename = libogg-1.3.5.tar.xz +source_hash = c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705 +patch_filename = ogg_1.3.5-6_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/ogg_1.3.5-6/get_patch +patch_hash = 8be6dcd5f93bbf9c0b9c8ec1fa29810226a60f846383074ca05b313a248e78b2 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/ogg_1.3.5-6/libogg-1.3.5.tar.xz +wrapdb_version = 1.3.5-6 + +[provide] +ogg = libogg_dep diff --git a/wraps/openal-soft.wrap b/wraps/openal-soft.wrap new file mode 100644 index 0000000..a46c525 --- /dev/null +++ b/wraps/openal-soft.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = openal-soft-1.23.1 +source_url = https://github.com/kcat/openal-soft/archive/refs/tags/1.23.1.tar.gz +source_filename = openal-soft-1.23.1.tar.gz +source_hash = dfddf3a1f61059853c625b7bb03de8433b455f2f79f89548cbcbd5edca3d4a4a +patch_filename = openal-soft_1.23.1-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/openal-soft_1.23.1-2/get_patch +patch_hash = e03c3afe0bb40a931d25d41d92a08b90e3c33b217d1b47210b26ca6627eb3aa3 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openal-soft_1.23.1-2/openal-soft-1.23.1.tar.gz +wrapdb_version = 1.23.1-2 + +[provide] +openal = openal_dep diff --git a/wraps/sfml.wrap b/wraps/sfml.wrap new file mode 100644 index 0000000..1d84525 --- /dev/null +++ b/wraps/sfml.wrap @@ -0,0 +1,13 @@ +[wrap-file] +directory = SFML-2.6.1 +source_url = https://github.com/SFML/SFML/archive/refs/tags/2.6.1.tar.gz +source_filename = 2.6.1.tar.gz +source_hash = 82535db9e57105d4f3a8aedabd138631defaedc593cab589c924b7d7a11ffb9d +patch_filename = sfml_2.6.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/sfml_2.6.1-1/get_patch +patch_hash = 10367d927ec489dc575491de0059945a63ba08eef3f6fc146e6ba339176c9f18 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sfml_2.6.1-1/2.6.1.tar.gz +wrapdb_version = 2.6.1-1 + +[provide] +sfml = sfml_dep diff --git a/wraps/vorbis.wrap b/wraps/vorbis.wrap new file mode 100644 index 0000000..7425c11 --- /dev/null +++ b/wraps/vorbis.wrap @@ -0,0 +1,14 @@ +[wrap-file] +directory = libvorbis-1.3.7 +source_url = https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz +source_filename = libvorbis-1.3.7.tar.xz +source_hash = b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b +patch_filename = vorbis_1.3.7-4_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/vorbis_1.3.7-4/get_patch +patch_hash = 979e22b24b16c927040700dfd8319cd6ba29bf52a14dbc66b1cb4ea60504f14a +wrapdb_version = 1.3.7-4 + +[provide] +vorbis = vorbis_dep +vorbisfile = vorbisfile_dep +vorbisenc = vorbisenc_dep