More dedup

This commit is contained in:
John Ericson 2024-06-27 12:34:03 -04:00
parent 4609ab318c
commit c88f83b471
17 changed files with 88 additions and 165 deletions

View file

@ -0,0 +1,19 @@
foreach maybe_subproject_dep : deps_private_maybe_subproject
if maybe_subproject_dep.type_name() == 'internal'
deps_private_subproject += maybe_subproject_dep
# subproject sadly no good for pkg-config module
deps_other += maybe_subproject_dep
else
deps_private += maybe_subproject_dep
endif
endforeach
foreach maybe_subproject_dep : deps_public_maybe_subproject
if maybe_subproject_dep.type_name() == 'internal'
deps_public_subproject += maybe_subproject_dep
# subproject sadly no good for pkg-config module
deps_other += maybe_subproject_dep
else
deps_public += maybe_subproject_dep
endif
endforeach

View file

@ -18,32 +18,19 @@ subdir('meson-utils/deps-lists')
configdata = configuration_data()
foreach nix_dep : [
deps_private_maybe_subproject = [
dependency('nix-util'),
dependency('nix-store'),
dependency('nix-expr'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
foreach nix_dep : [
deps_public_maybe_subproject = [
dependency('nix-util-c'),
dependency('nix-store-c'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
# TODO rename, because it will conflict with downstream projects
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
config_h = configure_file(
configuration : configdata,

View file

@ -16,21 +16,16 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-util-test-support'),
dependency('nix-store'),
dependency('nix-store-test-support'),
dependency('nix-expr'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
rapidcheck = dependency('rapidcheck')
deps_public += rapidcheck

View file

@ -16,7 +16,9 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-util-c'),
dependency('nix-util-test-support'),
@ -27,14 +29,7 @@ foreach nix_dep : [
dependency('nix-expr-c'),
dependency('nix-expr-test-support'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
# Windows DLLs are stricter about symbol visibility than Unix shared

View file

@ -18,19 +18,14 @@ subdir('meson-utils/deps-lists')
configdata = configuration_data()
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-store'),
dependency('nix-fetchers'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
# This is only conditional to work around
# https://github.com/mesonbuild/meson/issues/13293. It should be

View file

@ -16,7 +16,9 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-util-c'),
dependency('nix-util-test-support'),
@ -25,14 +27,7 @@ foreach nix_dep : [
dependency('nix-store-test-support'),
dependency('nix-fetchers'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
# Windows DLLs are stricter about symbol visibility than Unix shared

View file

@ -18,18 +18,13 @@ subdir('meson-utils/deps-lists')
configdata = configuration_data()
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-store'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
nlohmann_json = dependency('nlohmann_json', version : '>= 3.9')
deps_public += nlohmann_json

View file

@ -16,7 +16,9 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-util-c'),
dependency('nix-util-test-support'),
@ -28,14 +30,7 @@ foreach nix_dep : [
dependency('nix-expr-test-support'),
dependency('nix-flake'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
# Windows DLLs are stricter about symbol visibility than Unix shared

View file

@ -16,20 +16,15 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-store'),
dependency('nix-fetchers'),
dependency('nix-expr'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
nlohmann_json = dependency('nlohmann_json', version : '>= 3.9')
deps_public += nlohmann_json

View file

@ -18,30 +18,17 @@ subdir('meson-utils/deps-lists')
configdata = configuration_data()
foreach nix_dep : [
deps_private_maybe_subproject = [
dependency('nix-util'),
dependency('nix-store'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
foreach nix_dep : [
deps_public_maybe_subproject = [
dependency('nix-util-c'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
# TODO rename, because it will conflict with downstream projects
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
config_h = configure_file(
configuration : configdata,

View file

@ -16,19 +16,14 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-util-test-support'),
dependency('nix-store'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
rapidcheck = dependency('rapidcheck')
deps_public += rapidcheck

View file

@ -16,7 +16,9 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-util-c'),
dependency('nix-util-test-support'),
@ -24,14 +26,7 @@ foreach nix_dep : [
dependency('nix-store-c'),
dependency('nix-store-test-support'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
# Windows DLLs are stricter about symbol visibility than Unix shared

View file

@ -23,17 +23,12 @@ configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
configdata.set_quoted('SYSTEM', host_machine.system())
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
run_command('ln', '-s',
meson.project_build_root() / '__nothing_link_target',

View file

@ -18,28 +18,12 @@ subdir('meson-utils/deps-lists')
configdata = configuration_data()
foreach nix_dep : [
deps_private_maybe_subproject = [
dependency('nix-util'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
foreach nix_dep : [
deps_public_maybe_subproject = [
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
# TODO rename, because it will conflict with downstream projects
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())

View file

@ -16,17 +16,12 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
]
if nix_dep.type_name() == 'internal'
deps_public_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_public += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
rapidcheck = dependency('rapidcheck')
deps_public += rapidcheck

View file

@ -16,19 +16,14 @@ cxx = meson.get_compiler('cpp')
subdir('meson-utils/deps-lists')
foreach nix_dep : [
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
dependency('nix-util'),
dependency('nix-util-c'),
dependency('nix-util-test-support'),
]
if nix_dep.type_name() == 'internal'
deps_private_subproject += nix_dep
# subproject sadly no good for pkg-config module
deps_other += nix_dep
else
deps_private += nix_dep
endif
endforeach
subdir('meson-utils/subprojects')
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
# Windows DLLs are stricter about symbol visibility than Unix shared

View file

@ -18,6 +18,12 @@ subdir('meson-utils/deps-lists')
configdata = configuration_data()
deps_private_maybe_subproject = [
]
deps_public_maybe_subproject = [
]
subdir('meson-utils/subprojects')
# Check for each of these functions, and create a define like `#define
# HAVE_LUTIMES 1`. The `#define` is unconditional, 0 for not found and 1
# for found. One therefore uses it with `#if` not `#ifdef`.