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.

This commit is contained in:
Zed A. Shaw 2024-10-16 20:01:01 -04:00
parent 33327154ad
commit da04c5ec54
14 changed files with 146 additions and 36 deletions

View file

@ -8,11 +8,10 @@ ftxui_screen = dependency('ftxui-screen')
ftxui_dom = dependency('ftxui-dom') ftxui_dom = dependency('ftxui-dom')
ftxui_component = dependency('ftxui-component') ftxui_component = dependency('ftxui-component')
sfml = dependency('sfml') sfml = dependency('sfml')
flecs = dependency('flecs')
dependencies = [catch2, fmt, dependencies = [catch2, fmt,
ftxui_screen, ftxui_dom, ftxui_component, ftxui_screen, ftxui_dom, ftxui_component,
json, sfml, flecs] json, sfml]
runtests = executable('runtests', [ runtests = executable('runtests', [
'dbc.cpp', 'dbc.cpp',
@ -33,11 +32,6 @@ roguish = executable('roguish', [
], ],
dependencies: dependencies) dependencies: dependencies)
flectest = executable('flecstest', [
'./scratchpad/flecstest.cpp'
],
dependencies: dependencies)
myecstest = executable('myecstest', [ myecstest = executable('myecstest', [
'./scratchpad/myecstest.cpp' './scratchpad/myecstest.cpp'
], ],

View file

@ -2,19 +2,6 @@ mv .\subprojects\packagecache .
rm -recurse -force .\subprojects\,.\builddir\ rm -recurse -force .\subprojects\,.\builddir\
mkdir subprojects mkdir subprojects
mv .\packagecache .\subprojects\ mv .\packagecache .\subprojects\
cp *.wrap subprojects
mkdir builddir mkdir builddir
meson wrap install fmt cp wraps\*.wrap subprojects\
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++"
meson setup --default-library=static --prefer-static builddir meson setup --default-library=static --prefer-static builddir

View file

@ -1,21 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
mv -f ./subprojects/packagecache . || true mv -f ./subprojects/packagecache .
rm -rf subprojects builddir rm -rf subprojects builddir
mkdir subprojects mkdir subprojects
mv packagecache ./subprojects/ || true mv packagecache ./subprojects/
mkdir builddir mkdir builddir
cp *.wrap subprojects cp wraps/*.wrap subprojects/
meson wrap install fmt meson setup --default-library=static --prefer-static builddir
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

11
wraps/catch2.wrap Normal file
View file

@ -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

13
wraps/flac.wrap Normal file
View file

@ -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

13
wraps/fmt.wrap Normal file
View file

@ -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

11
wraps/freetype2.wrap Normal file
View file

@ -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

15
wraps/ftxui.wrap Normal file
View file

@ -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

13
wraps/libpng.wrap Normal file
View file

@ -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

11
wraps/nlohmann_json.wrap Normal file
View file

@ -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

13
wraps/ogg.wrap Normal file
View file

@ -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

13
wraps/openal-soft.wrap Normal file
View file

@ -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

13
wraps/sfml.wrap Normal file
View file

@ -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

14
wraps/vorbis.wrap Normal file
View file

@ -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