meson: update sources and dependencies

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-02-16 18:09:24 +01:00
parent 6e92db54cf
commit 308a097968
9 changed files with 76 additions and 45 deletions

View File

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

View File

@ -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 += \

View File

@ -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 += '''

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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