From 308a097968f9724b14c90be6a9ceaac68849a856 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Feb 2021 18:09:24 +0100 Subject: [PATCH] meson: update sources and dependencies Signed-off-by: Karel Zak --- disk-utils/meson.build | 9 +++++--- lib/Makemodule.am | 16 +++++++------- lib/meson.build | 48 +++++++++++++++++++++++----------------- libblkid/meson.build | 5 +++-- libsmartcols/meson.build | 1 - meson.build | 15 +++++++++---- meson_options.txt | 5 +++++ misc-utils/meson.build | 9 ++++---- sys-utils/meson.build | 13 ++++++++--- 9 files changed, 76 insertions(+), 45 deletions(-) diff --git a/disk-utils/meson.build b/disk-utils/meson.build index bbd4c820c..eb414117b 100644 --- a/disk-utils/meson.build +++ b/disk-utils/meson.build @@ -12,7 +12,8 @@ isosize_sources = files( mkswap_sources = files( 'mkswap.c', -) +) + \ + ismounted_c swaplabel_sources = files( 'swaplabel.c', @@ -27,12 +28,14 @@ fsck_sources = files( mkfs_minix_sources = files( 'mkfs.minix.c', 'minix_programs.h', -) +) + \ + ismounted_c fsck_minix_sources = files( 'fsck.minix.c', 'minix_programs.h', -) +) + \ + ismounted_c mkfs_cramfs_sources = files( 'mkfs.cramfs.c', diff --git a/lib/Makemodule.am b/lib/Makemodule.am index 6a9187e48..d845b16a5 100644 --- a/lib/Makemodule.am +++ b/lib/Makemodule.am @@ -15,13 +15,13 @@ libcommon_la_SOURCES = \ lib/blkdev.c \ lib/buffer.c \ lib/canonicalize.c \ + lib/color-names.c \ lib/crc32.c \ lib/crc32c.c \ - lib/env.c \ - lib/idcache.c \ lib/encode.c \ + lib/env.c \ lib/fileutils.c \ - lib/color-names.c \ + lib/idcache.c \ lib/jsonwrt.c \ lib/mangle.c \ lib/match.c \ @@ -31,12 +31,12 @@ libcommon_la_SOURCES = \ lib/pager.c \ lib/pwdutils.c \ lib/randutils.c \ - lib/strutils.c \ - lib/timeutils.c \ - lib/ttyutils.c \ - lib/strv.c \ lib/sha1.c \ - lib/signames.c + lib/signames.c \ + lib/strutils.c \ + lib/strv.c \ + lib/timeutils.c \ + lib/ttyutils.c if LINUX libcommon_la_SOURCES += \ diff --git a/lib/meson.build b/lib/meson.build index f9e35e861..f9549a09c 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -1,24 +1,30 @@ lib_common_sources = ''' - blkdev.c - canonicalize.c - color-names.c - crc32.c - crc32c.c - encode.c - env.c - exec_shell.c - fileutils.c - ismounted.c - mangle.c - match.c - mbsalign.c - mbsedit.c - pager.c - pwdutils.c - setproctitle.c - signames.c - timeutils.c - ttyutils.c + blkdev.c + buffer.c + canonicalize.c + color-names.c + crc32.c + crc32c.c + encode.c + env.c + fileutils.c + idcache.c + jsonwrt.c + mangle.c + match.c + mbsalign.c + mbsedit.c + md5.c + pager.c + procutils.c + pwdutils.c + randutils.c + sha1.c + signames.c + strutils.c + strv.c + timeutils.c + ttyutils.c '''.split() idcache_c = files('idcache.c') @@ -39,6 +45,8 @@ monotonic_c = files('monotonic.c') timer_c = files('timer.c') swapprober_c = files('swapprober.c') pty_session_c = files('pty-session.c') +ismounted_c = files('ismounted.c') +exec_shell_c = files('exec_shell.c') if LINUX lib_common_sources += ''' diff --git a/libblkid/meson.build b/libblkid/meson.build index 5c28f22f3..1515aa593 100644 --- a/libblkid/meson.build +++ b/libblkid/meson.build @@ -16,7 +16,6 @@ lib_blkid_sources = ''' src/encode.c src/evaluate.c src/getsize.c - src/llseek.c src/probe.c src/read.c src/resolve.c @@ -40,7 +39,7 @@ lib_blkid_sources = ''' src/partitions/sun.c src/partitions/ultrix.c src/partitions/unixware.c - + src/superblocks/adaptec_raid.c src/superblocks/apfs.c src/superblocks/bcache.c @@ -99,6 +98,8 @@ lib_blkid_sources = ''' src/superblocks/vxfs.c src/superblocks/xfs.c src/superblocks/zfs.c + src/superblocks/zonefs.c + src/superblocks/erofs.c src/topology/topology.c src/topology/topology.h diff --git a/libsmartcols/meson.build b/libsmartcols/meson.build index 7e50a4317..c362557df 100644 --- a/libsmartcols/meson.build +++ b/libsmartcols/meson.build @@ -17,7 +17,6 @@ lib_smartcols_sources = ''' src/line.c src/table.c src/print.c - src/fput.c src/print-api.c src/version.c src/buffer.c diff --git a/meson.build b/meson.build index 404a021eb..f5094f693 100644 --- a/meson.build +++ b/meson.build @@ -24,6 +24,8 @@ execprefixdir = '/usr' usrbin_exec_dir = join_paths(execprefixdir, 'bin') usrsbin_exec_dir = join_paths(execprefixdir, 'sbin') +vendordir = get_option('vendordir') + add_project_arguments('-D_GNU_SOURCE', language : 'c') cc = meson.get_compiler('c') @@ -55,10 +57,12 @@ conf.set('usrsbin_execdir', usrsbin_exec_dir) conf.set('docdir', docdir) conf.set_quoted('_PATH_SYSCONFSTATICDIR', sysconfstaticdir) conf.set_quoted('_PATH_RUNSTATEDIR', runstatedir) -conf.set_quoted('_PATH_VENDORDIR', vendordir) conf.set_quoted('CONFIG_ADJTIME_PATH', '/etc/adjtime') conf.set_quoted('ADJTIME_PATH', '/etc/adjtime') # yes, both are used :( +conf.set_quoted('_PATH_VENDORDIR', vendordir) +conf.set('USE_VENDORDIR', vendordir == '' ? false : 1) + build_libblkid = not get_option('build-libblkid').disabled() conf.set('HAVE_LIBBLKID', build_libblkid ? 1 : false) summary('libblkid', build_libblkid ? 'enabled' : 'disabled', section : 'components') @@ -701,8 +705,6 @@ conf.set_quoted('FS_SEARCH_PATH', fs_search_path) systemdsystemunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir') -vendordir = get_option('vendordir') -conf.set('USE_VENDORDIR', vendordir ? 1 : false) chfn_chsh_password = get_option('chfn-chsh-password') or lib_user.found() conf.set('CHFN_CHSH_PASSWORD', chfn_chsh_password ? 1 : false) @@ -822,6 +824,7 @@ exe = executable( 'login-utils/nologin.c', include_directories : includes, install_dir : sbindir, + link_with : [lib_common], install : opt, build_by_default : opt) if opt and not is_disabler(exe) @@ -1028,6 +1031,7 @@ opt = not get_option('build-more').disabled() exe = executable( 'more', more_sources, + link_with : [lib_common], include_directories : includes, dependencies : [lib_tinfo, curses_libs, @@ -1037,6 +1041,7 @@ exe = executable( exe2 = executable( 'test_more', more_sources, + link_with : [lib_common], include_directories : includes, c_args : '-DTEST_PROGRAM', dependencies : [lib_tinfo, @@ -1261,7 +1266,8 @@ exe = executable( 'blkdiscard', blkdiscard_sources, include_directories : includes, - link_with : [lib_common], + link_with : [lib_common, + lib_blkid], install_dir : sbindir, install : true) exes += exe @@ -2451,6 +2457,7 @@ exe = executable( 'getopt', getopt_sources, include_directories : includes, + link_with : [lib_common], install_dir : usrbin_exec_dir, install : true) exes += exe diff --git a/meson_options.txt b/meson_options.txt index bc5903929..2fb46b586 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -16,6 +16,8 @@ option('libuser', type : 'feature') option('selinux', type : 'feature', value : 'disabled') option('audit', type : 'feature', value : 'disabled') option('smack', type : 'feature', value : 'disabled') +option('magic', type : 'feature') +option('econf', type : 'feature') option('systemd', type : 'feature') option('btrfs', type : 'feature') option('widechar', type : 'feature', @@ -192,3 +194,6 @@ option('fs-search-path', option('fs-search-path-extra', type : 'string', description : 'additional search path for fs helpers') +option('vendordir', + type: 'string', + description : 'directory for distribution provided econf files') diff --git a/misc-utils/meson.build b/misc-utils/meson.build index 77a6aaf8f..317528d6e 100644 --- a/misc-utils/meson.build +++ b/misc-utils/meson.build @@ -83,7 +83,8 @@ endif blkid_sources = files( 'blkid.c', -) +) + \ + ismounted_c findfs_sources = files( 'findfs.c', @@ -118,9 +119,9 @@ getopt_1 = configure_file( install_man(getopt_1) install_data( - 'getopt-parse.bash', - 'getopt-parse.tcsh', - install_dir : 'doc/getopt', + 'getopt-example.bash', + 'getopt-example.tcsh', + install_dir : 'doc', install_mode: 'rwxr-xr-x') fincore_sources = files( diff --git a/sys-utils/meson.build b/sys-utils/meson.build index 8b0ccefbb..38712c7c7 100644 --- a/sys-utils/meson.build +++ b/sys-utils/meson.build @@ -97,7 +97,8 @@ losetup_sources = files( zramctl_sources = files( 'zramctl.c', -) +) + \ + ismounted_c prlimit_sources = files( 'prlimit.c', @@ -138,6 +139,10 @@ swapoff_sources = files( lscpu_sources = files( 'lscpu.c', 'lscpu.h', + 'lscpu-cputype.c', + 'lscpu-cpu.c', + 'lscpu-topology.c', + 'lscpu-virt.c', 'lscpu-arm.c', 'lscpu-dmi.c', ) @@ -168,11 +173,13 @@ switch_root_sources = files( unshare_sources = files( 'unshare.c', -) +) + \ + exec_shell_c nsenter_sources = files( 'nsenter.c', -) +) + \ + exec_shell_c setpriv_sources = files( 'setpriv.c',