meson: unify pkgconfig files
merge all pkgconfig-found libraries into a single one and redirect all existing lib files to the merged variant. the clean separation between libraries is largely fictional anyway because the main config block is in libstore and cannot reasonably be moved out, or because libutil has assumptions built into its behavior that libmain later establishes, or because libexpr messes with global boehmgc configuration. nearly every kind of layering violation imaginable can be found *some*where in lix, and not pretending that this is not the case will let us clean up some of them. this will also allow us to merge these libraries at the meson level which is itself necessary to make rust code easier to integrate. Change-Id: I172f8a08d5d90ded0a0a99fd9e0fa5d804db00a7
This commit is contained in:
@@ -5,6 +5,4 @@ includedir=@includedir@
|
||||
Name: Lix (libcmd)
|
||||
Description: Lix Package Manager (libcmd)
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires: lix-base lix-util lix-store
|
||||
Requires.private: lix-fetchers lix-expr lix-main @BOEHM_IF_FOUND@ libeditline lowdown ncurses
|
||||
Libs: -L${libdir} -llixcmd
|
||||
Requires: lix
|
||||
|
||||
@@ -73,19 +73,3 @@ liblixcmd = declare_dependency(
|
||||
],
|
||||
link_with : libcmd,
|
||||
)
|
||||
meson.override_dependency('lix-cmd', liblixcmd)
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
configure_file(
|
||||
input : 'lix-cmd.pc.in',
|
||||
output : 'lix-cmd.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
'BOEHM_IF_FOUND' : boehm.found() ? 'bdw-gc' : '',
|
||||
},
|
||||
)
|
||||
|
||||
@@ -5,6 +5,4 @@ includedir=@includedir@
|
||||
Name: Lix libexpr
|
||||
Description: Lix Package Manager (libexpr)
|
||||
Version: @PACKAGE_VERSION@
|
||||
# dependencies on boost is omitted since it is optional (only required by some headers)
|
||||
Requires: lix-base lix-util lix-store lix-fetchers @BOEHM_IF_FOUND@
|
||||
Libs: -L${libdir} -llixexpr
|
||||
Requires: lix
|
||||
|
||||
@@ -349,20 +349,3 @@ liblixexpr = declare_dependency(
|
||||
],
|
||||
link_with : libexpr,
|
||||
)
|
||||
|
||||
meson.override_dependency('lix-expr', liblixexpr)
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
configure_file(
|
||||
input : 'lix-expr.pc.in',
|
||||
output : 'lix-expr.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
'BOEHM_IF_FOUND' : boehm.found() ? 'bdw-gc' : '',
|
||||
},
|
||||
)
|
||||
|
||||
@@ -5,5 +5,4 @@ includedir=@includedir@
|
||||
Name: Lix libfetchers
|
||||
Description: Lix Package Manager (libfetchers)
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires: lix-base lix-util lix-store
|
||||
Libs: -L${libdir} -llixfetchers
|
||||
Requires: lix
|
||||
|
||||
@@ -92,20 +92,6 @@ endif
|
||||
|
||||
install_headers(libfetchers_headers, subdir : 'lix/libfetchers', preserve_path : true)
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
configure_file(
|
||||
input : 'lix-fetchers.pc.in',
|
||||
output : 'lix-fetchers.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
},
|
||||
)
|
||||
|
||||
liblixfetchers = declare_dependency(
|
||||
include_directories : include_directories('../..'),
|
||||
sources : libfetchers_settings_header,
|
||||
@@ -116,5 +102,3 @@ liblixfetchers = declare_dependency(
|
||||
],
|
||||
link_with : libfetchers,
|
||||
)
|
||||
|
||||
meson.override_dependency('lix-fetchers', liblixfetchers)
|
||||
|
||||
@@ -5,6 +5,4 @@ includedir=@includedir@
|
||||
Name: Lix libmain
|
||||
Description: Lix Package Manager (libmain)
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires: lix-base lix-util
|
||||
Requires.private: lix-store
|
||||
Libs: -L${libdir} -llixmain
|
||||
Requires: lix
|
||||
|
||||
@@ -41,18 +41,3 @@ liblixmain = declare_dependency(
|
||||
],
|
||||
link_with : libmain,
|
||||
)
|
||||
meson.override_dependency('lix-main', liblixmain)
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
configure_file(
|
||||
input : 'lix-main.pc.in',
|
||||
output : 'lix-main.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -5,6 +5,4 @@ includedir=@includedir@
|
||||
Name: Lix libstore
|
||||
Description: Lix Package Manager (libstore)
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires: lix-base lix-util
|
||||
Requires.private: @AWS_SDK_IF_FOUND@ capnp-rpc libcrypto libcurl libarchive libseccomp sqlite3
|
||||
Libs: -L${libdir} -llixstore
|
||||
Requires: lix
|
||||
|
||||
@@ -404,20 +404,3 @@ liblixstore = declare_dependency(
|
||||
],
|
||||
link_with : libstore,
|
||||
)
|
||||
|
||||
meson.override_dependency('lix-store', liblixstore)
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
configure_file(
|
||||
input : 'lix-store.pc.in',
|
||||
output : 'lix-store.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
'AWS_SDK_IF_FOUND' : aws_sdk.found() ? 'aws-cpp-sdk-core aws-cpp-sdk-s3 aws-cpp-sdk-transfer' : '',
|
||||
},
|
||||
)
|
||||
|
||||
@@ -5,7 +5,4 @@ includedir=@includedir@
|
||||
Name: Lix libutil
|
||||
Description: Lix Package Manager (libutil)
|
||||
Version: @PACKAGE_VERSION@
|
||||
# dependencies on boost, libarchive, nlohmann_json are omitted since they are optional (only required by some headers)
|
||||
Requires: lix-base
|
||||
Requires.private: libbrotlidec libbrotlienc libcpuid libarchive libcrypto
|
||||
Libs: -L${libdir} -llixutil
|
||||
Requires: lix
|
||||
|
||||
@@ -399,20 +399,6 @@ endif
|
||||
|
||||
install_headers(libutil_headers, subdir : 'lix/libutil', preserve_path : true)
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
configure_file(
|
||||
input : 'lix-util.pc.in',
|
||||
output : 'lix-util.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
},
|
||||
)
|
||||
|
||||
# Used by libstore and libfetchers.
|
||||
liblixutil = declare_dependency(
|
||||
include_directories : include_directories('../..'),
|
||||
@@ -436,5 +422,3 @@ liblixutil = declare_dependency(
|
||||
],
|
||||
link_with : libutil
|
||||
)
|
||||
|
||||
meson.override_dependency('lix-util', liblixutil)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
prefix=@prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: Lix libraries
|
||||
Description: Lix Package Manager (libraries)
|
||||
Version: @PACKAGE_VERSION@
|
||||
# dependencies on boost, libarchive, nlohmann_json are omitted since they are optional (only required by some headers)
|
||||
Requires: lix-base kj-async @BOEHM_IF_FOUND@
|
||||
Requires.private: @AWS_SDK_IF_FOUND@ @BOEHM_IF_FOUND@ libeditline lowdown ncurses libbrotlidec libbrotlienc libcpuid libarchive libcrypto capnp-rpc libcurl libseccomp sqlite3
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lrust_monocrate -llixutil -llixstore -llixfetchers -llixexpr -llixmain -llixcmd
|
||||
@@ -147,6 +147,35 @@ subdir('libmain')
|
||||
# libcmd depends on everything
|
||||
subdir('libcmd')
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
foreach lib : [ 'util', 'store', 'fetchers', 'expr', 'main', 'cmd' ]
|
||||
configure_file(
|
||||
input : f'lib@lib@/lix-@lib@.pc.in',
|
||||
output : f'lix-@lib@.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
},
|
||||
)
|
||||
endforeach
|
||||
|
||||
liblix = declare_dependency(
|
||||
dependencies : [
|
||||
liblixutil,
|
||||
liblixstore,
|
||||
liblixfetchers,
|
||||
liblixexpr,
|
||||
liblixmain,
|
||||
liblixcmd,
|
||||
],
|
||||
)
|
||||
|
||||
meson.override_dependency('lix', liblix)
|
||||
|
||||
# The rest of the subdirectories aren't separate components,
|
||||
# just source files in another directory, so we process them here.
|
||||
|
||||
|
||||
+15
-11
@@ -591,17 +591,21 @@ endforeach
|
||||
|
||||
# FIXME: not using the pkg-config module because it creates way too many deps
|
||||
# while meson migration is in progress, and we want to not include boost here
|
||||
configure_file(
|
||||
input : 'lix/lix-base.pc.in',
|
||||
output : 'lix-base.pc',
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
},
|
||||
)
|
||||
foreach pkgconf : [ 'lix-base.pc', 'lix.pc' ]
|
||||
configure_file(
|
||||
input : f'lix/@pkgconf@.in',
|
||||
output : pkgconf,
|
||||
install_dir : libdir / 'pkgconfig',
|
||||
configuration : {
|
||||
'prefix' : prefix,
|
||||
'libdir' : libdir,
|
||||
'includedir' : includedir,
|
||||
'PACKAGE_VERSION' : meson.project_version(),
|
||||
'AWS_SDK_IF_FOUND' : aws_sdk.found() ? 'aws-cpp-sdk-core aws-cpp-sdk-s3 aws-cpp-sdk-transfer' : '',
|
||||
'BOEHM_IF_FOUND' : boehm.found() ? 'bdw-gc' : '',
|
||||
},
|
||||
)
|
||||
endforeach
|
||||
|
||||
add_project_arguments(
|
||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||
|
||||
@@ -8,11 +8,7 @@ project('nix-eval-jobs', 'cpp',
|
||||
],
|
||||
)
|
||||
|
||||
nix_main_dep = dependency('lix-main', required: true)
|
||||
nix_store_dep = dependency('lix-store', required: true)
|
||||
nix_expr_dep = dependency('lix-expr', required: true)
|
||||
nix_cmd_dep = dependency('lix-cmd', required: true)
|
||||
nix_util_dep = dependency('lix-util', required: true)
|
||||
lix_dep = dependency('lix', required: true)
|
||||
threads_dep = dependency('threads', required: true)
|
||||
nlohmann_json_dep = dependency('nlohmann_json', required: true)
|
||||
boost_dep = dependency('boost', required: true)
|
||||
|
||||
@@ -37,11 +37,7 @@ configure_file(
|
||||
|
||||
executable('nix-eval-jobs', src,
|
||||
dependencies : [
|
||||
nix_util_dep,
|
||||
nix_main_dep,
|
||||
nix_store_dep,
|
||||
nix_expr_dep,
|
||||
nix_cmd_dep,
|
||||
lix_dep,
|
||||
boost_dep,
|
||||
nlohmann_json_dep,
|
||||
threads_dep,
|
||||
|
||||
Reference in New Issue
Block a user