commit:     fd3bf15247edf01608052f569a56b60c06609a35
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  8 06:06:58 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 22 07:30:55 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd3bf152

sys-apps/util-linux: port live to meson

This still has some rough edges and TODOs.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/util-linux-9999-meson-disabler.patch     | 405 +++++++++++++++++++++
 sys-apps/util-linux/util-linux-9999.ebuild         | 274 +++++++-------
 2 files changed, 537 insertions(+), 142 deletions(-)

diff --git a/sys-apps/util-linux/files/util-linux-9999-meson-disabler.patch 
b/sys-apps/util-linux/files/util-linux-9999-meson-disabler.patch
new file mode 100644
index 000000000000..956199a4dc32
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-9999-meson-disabler.patch
@@ -0,0 +1,405 @@
+https://github.com/util-linux/util-linux/pull/3351
+
+From 528dbe18854fb16dba41af620ee2ca295936a550 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Wed, 8 Jan 2025 06:49:40 +0000
+Subject: [PATCH] meson: add missing `is_disabler` checks
+
+Noticed this when looking at why the `check` target isn't created
+with `-Dauto_features=disabled`. This doesn't fix that but it does
+fix a bunch of issues I noticed along the way after a hint from Eli Schwartz.
+---
+ meson.build | 133 +++++++++++++++++++++++++++++++++++++---------------
+ 1 file changed, 95 insertions(+), 38 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 462ceaae224..b87362c757c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -2026,7 +2026,7 @@ if opt and not is_disabler(exe)
+ endif
+ 
+ opt = not get_option('build-switch_root').disabled()
+-if opt and  not have_dirfd and not have_ddfd
++if opt and not have_dirfd and not have_ddfd
+   error('neither dirfd nor ddfd are available')
+ endif
+ exe = executable(
+@@ -2520,7 +2520,7 @@ exe4 = executable(
+   install_dir : usrsbin_exec_dir,
+   install : opt,
+   build_by_default : opt)
+-if opt
++if opt and not is_disabler(exe)
+   exes += [exe, exe2, exe3, exe4]
+   manadocs += ['disk-utils/addpart.8.adoc',
+                   'disk-utils/delpart.8.adoc',
+@@ -2568,7 +2568,7 @@ exe4 = executable(
+   install : opt,
+   build_by_default : opt)
+ 
+-if opt
++if opt and not is_disabler(exe)
+   exes += [exe, exe2, exe3, exe4]
+ endif
+ 
+@@ -2651,7 +2651,7 @@ exe = executable(
+   install_dir : sbindir,
+   install : opt,
+   build_by_default : opt)
+-if opt
++if opt and not is_disabler(exe)
+   exes += exe
+   manadocs += ['term-utils/agetty.8.adoc']
+ endif
+@@ -2666,7 +2666,7 @@ exe = executable(
+   install_dir : usrbin_exec_dir,
+   install : opt,
+   build_by_default : opt)
+-if opt
++if opt and not is_disabler(exe)
+   exes += exe
+   manadocs += ['term-utils/setterm.1.adoc']
+   bashcompletions += ['setterm']
+@@ -2681,7 +2681,7 @@ exe = executable(
+   install_dir : usrbin_exec_dir,
+   install : opt,
+   build_by_default : opt)
+-if opt
++if opt and not is_disabler(exe)
+   exes += exe
+   manadocs += ['term-utils/mesg.1.adoc']
+   bashcompletions += ['mesg']
+@@ -2705,7 +2705,7 @@ exe = executable(
+   install_mode : tty_install_mode,
+   install : opt,
+   build_by_default : opt)
+-if opt
++if opt and not is_disabler(exe)
+   exes += exe
+   manadocs += ['term-utils/wall.1.adoc']
+   bashcompletions += ['wall']
+@@ -2725,7 +2725,7 @@ exe = executable(
+   install_mode : tty_install_mode,
+   install : opt,
+   build_by_default : opt)
+-if opt
++if opt and not is_disabler(exe)
+   exes += exe
+   manadocs += ['term-utils/write.1.adoc']
+   bashcompletions += ['write']
+@@ -3384,7 +3384,9 @@ exe = executable(
+   include_directories : dir_include,
+   link_with : lib_common,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_blkdev',
+@@ -3393,7 +3395,9 @@ exe = executable(
+   include_directories : dir_include,
+   link_with : lib_common,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_ismounted',
+@@ -3402,7 +3406,9 @@ exe = executable(
+   include_directories : dir_include,
+   link_with : lib_common,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_mangle',
+@@ -3410,7 +3416,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_MANGLE'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_strutils',
+@@ -3418,7 +3426,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_STRUTILS'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_colors',
+@@ -3428,7 +3438,9 @@ exe = executable(
+   include_directories : dir_include,
+   link_with : [lib_common, lib_tcolors],
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_randutils',
+@@ -3436,7 +3448,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_RANDUTILS'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ if conf.get('HAVE_OPENAT').to_string() == '1' \
+    and conf.get('HAVE_DIRFD').to_string() == '1'
+@@ -3447,7 +3461,9 @@ if conf.get('HAVE_OPENAT').to_string() == '1' \
+     include_directories : dir_include,
+     link_with : lib_common,
+     build_by_default: program_tests)
+-  exes += exe
++  if not is_disabler(exe)
++    exes += exe
++  endif
+ 
+   exe = executable(
+     'test_path',
+@@ -3458,7 +3474,9 @@ if conf.get('HAVE_OPENAT').to_string() == '1' \
+     include_directories : dir_include,
+     link_with : lib_common,
+     build_by_default: program_tests)
+-  exes += exe
++  if not is_disabler(exe)
++    exes += exe
++  endif
+ endif
+ 
+ if have_pty
+@@ -3473,7 +3491,9 @@ if have_pty
+                     realtime_libs,
+                     lib_util],
+     build_by_default: program_tests)
+-  exes += exe
++  if not is_disabler(exe)
++    exes += exe
++  endif
+ endif
+ 
+ if LINUX
+@@ -3483,7 +3503,9 @@ if LINUX
+     c_args : ['-DTEST_PROGRAM_CPUSET'],
+     include_directories : dir_include,
+     build_by_default: program_tests)
+-  exes += exe
++  if not is_disabler(exe)
++    exes += exe
++  endif
+ endif
+ 
+ exe = executable(
+@@ -3497,7 +3519,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_SYSFS'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_pager',
+@@ -3505,7 +3529,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_PAGER'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_linux_version',
+@@ -3513,7 +3539,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_LINUXVERSION'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_fileutils',
+@@ -3521,7 +3549,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_FILEUTILS'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_canonicalize',
+@@ -3529,7 +3559,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_CANONICALIZE'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_timeutils',
+@@ -3538,7 +3570,9 @@ exe = executable(
+   c_args : ['-DTEST_PROGRAM_TIMEUTILS'],
+   include_directories : dir_include,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_pwdutils',
+@@ -3547,7 +3581,9 @@ exe = executable(
+   include_directories : dir_include,
+   link_with : lib_common,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_logindefs',
+@@ -3556,8 +3592,9 @@ exe = executable(
+   include_directories : dir_include,
+   link_with : [lib_common, logindefs_c],
+   build_by_default: program_tests)
+-exes += exe
+-
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ ############################################################
+ 
+@@ -3699,14 +3736,18 @@ exe = executable(
+   include_directories : includes,
+   link_with : lib_common,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_byteswap',
+   'tests/helpers/test_byteswap.c',
+   include_directories : includes,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_md5',
+@@ -3714,7 +3755,9 @@ exe = executable(
+   md5_c,
+   include_directories : includes,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_sha1',
+@@ -3722,28 +3765,36 @@ exe = executable(
+   sha1_c,
+   include_directories : includes,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_pathnames',
+   'tests/helpers/test_pathnames.c',
+   include_directories : includes,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_strerror',
+   'tests/helpers/test_strerror.c',
+   include_directories : includes,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_sysinfo',
+   'tests/helpers/test_sysinfo.c',
+   include_directories : includes,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_sigreceive',
+@@ -3751,7 +3802,9 @@ exe = executable(
+   include_directories : includes,
+   link_with : lib_common,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_sigstate',
+@@ -3759,14 +3812,18 @@ exe = executable(
+   include_directories : includes,
+   link_with : lib_common,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_tiocsti',
+   'tests/helpers/test_tiocsti.c',
+   include_directories : includes,
+   build_by_default: program_tests)
+-exes += exe
++if not is_disabler(exe)
++  exes += exe
++endif
+ 
+ exe = executable(
+   'test_uuid_namespace',

diff --git a/sys-apps/util-linux/util-linux-9999.ebuild 
b/sys-apps/util-linux/util-linux-9999.ebuild
index 199d340e51aa..c1a2571d2016 100644
--- a/sys-apps/util-linux/util-linux-9999.ebuild
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -6,8 +6,7 @@ EAPI=8
 PYTHON_COMPAT=( python3_{10..13} )
 TMPFILES_OPTIONAL=1
 
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
-       pam python-r1 multilib-minimal multiprocessing systemd tmpfiles
+inherit pam python-r1 meson-multilib tmpfiles toolchain-funcs
 
 MY_PV="${PV/_/-}"
 MY_P="${PN}-${MY_PV}"
@@ -17,7 +16,7 @@ HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ 
https://github.com/
 
 if [[ ${PV} == 9999 ]] ; then
        
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git";
-       inherit autotools git-r3
+       inherit git-r3
 else
        VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc
        inherit verify-sig
@@ -102,6 +101,10 @@ fi
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
 RESTRICT="!test? ( test )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-9999-meson-disabler.patch
+)
+
 pkg_pretend() {
        if use su && ! use suid ; then
                elog "su will be installed as suid despite USE=-suid (bug 
#832092)"
@@ -141,6 +144,15 @@ src_prepare() {
                        lsfd/mkfds-inotify
                        lsfd/mkfds-symlink
                        lsfd/mkfds-rw-character-device
+                       lsns/filter
+                       findmnt/df-options
+                       findmnt/target
+                       findmnt/outputs
+                       findmnt/filterQ
+                       findmnt/filter
+                       misc/mountpoint
+                       lsblk/lsblk
+                       lslocks/lslocks
                        # Fails with network-sandbox at least in nspawn
                        lsfd/option-inet
                        utmp/last-ipv6
@@ -151,6 +163,14 @@ src_prepare() {
                        # Permission issues on /dev/random
                        lsfd/mkfds-eventpoll
                        lsfd/column-xmode
+
+                       # bashism
+                       kill/decode
+
+                       # Format changes?
+                       lslogins/checkuser
+                       misc/swaplabel
+                       misc/setarch
                )
 
                # debug prints confuse the tests which look for a diff
@@ -188,175 +208,148 @@ src_prepare() {
 
        if [[ ${PV} == 9999 ]] ; then
                po/update-potfiles
-               eautoreconf
-       else
-               elibtoolize
        fi
 }
 
 python_configure() {
-       local myeconfargs=(
-               "${commonargs[@]}"
-               --disable-all-programs
-               --disable-bash-completion
-               --without-systemdsystemunitdir
-               --with-python
-               --enable-libblkid
-               --enable-libmount
-               --enable-pylibmount
+       local emesonargs=(
+               -Dauto_features=disabled
+               -Dbuild-python=enabled
+               -Dpython="${EPYTHON}"
+
+               # XXX: The 'check' target doesn't get created with
+               # -Dauto_features=disabled, but there's no Python-specific
+               # tests anyway, so it's not a big deal.
+               # See https://github.com/util-linux/util-linux/pull/3351 for
+               # an incomplete fix.
+               #$(meson_use test program-tests)
+
+               -Dbuild-libblkid=enabled
+               -Dbuild-libmount=enabled
        )
 
        mkdir "${BUILD_DIR}" || die
        pushd "${BUILD_DIR}" >/dev/null || die
-       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+       meson_src_configure
        popd >/dev/null || die
 }
 
 multilib_src_configure() {
-       # The scanf test in a run-time test which fails while cross-compiling.
-       # Blindly assume a POSIX setup since we require libmount, and libmount
-       # itself fails when the scanf test fails. bug #531856
-       tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
-
-       # bug #485486
-       export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
-       # bug #545042
-       export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
-
-       # Undo bad ncurses handling by upstream. Fall back to pkg-config.
-       # bug #601530
-       export NCURSES6_CONFIG=false NCURSES5_CONFIG=false
-       export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false
-
-       # Avoid automagic dependency on ppc*
-       export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas)
-
-       # configure args shared by python and non-python builds
-       local commonargs=(
-               --localstatedir="${EPREFIX}/var"
-               --runstatedir="${EPREFIX}/run"
-               
--enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
-       )
+       local emesonargs=(
+               -Dbuild-python=disabled
+               
-Dfs-search-path-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+               -Duse-tls=$(tc-has-tls && echo true || echo false)
+
+               $(meson_use test program-tests)
 
-       local myeconfargs=(
-               "${commonargs[@]}"
-               --with-bashcompletiondir="$(get_bashcompdir)"
-               --without-python
-               $(multilib_native_use_enable suid makeinstall-chown)
-               $(multilib_native_use_enable suid makeinstall-setuid)
-               $(multilib_native_use_with readline)
-               $(multilib_native_use_with slang)
-               $(multilib_native_usex ncurses "$(use_with magic libmagic)" 
'--without-libmagic')
-               $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" 
'--without-ncursesw')
-               $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" 
'--without-ncurses')
-               $(multilib_native_use_with audit)
-               $(tc-has-tls || echo --disable-tls)
-               $(use_enable nls)
-               $(use_enable nls poman)
-               $(use_enable unicode widechar)
-               $(use_enable static-libs static)
-               $(use_with ncurses tinfo)
-               $(use_with selinux)
-               $(multilib_native_use_enable uuidd)
+               $(meson_native_use_feature audit)
+               $(meson_native_use_feature readline)
+               $(meson_native_use_feature slang)
+               $(meson_native_use_feature magic)
+               $(meson_feature unicode widechar)
+               $(meson_native_use_feature uuidd build-uuidd)
+
+               $(meson_feature nls)
+               $(meson_feature selinux)
+               $(meson_feature ncurses tinfo)
+               -Ddefault_library=$(multilib_native_usex static-libs both 
shared)
 
                # TODO: Wire this up (bug #931118)
-               --without-econf
+               -Deconf=disabled
 
                # TODO: Wire this up (bug #931297)
-               # TODO: investigate build failure w/ 2.40.1_rc1
-               --disable-liblastlog2
-               --disable-pam-lastlog2
+               -Dbuild-liblastlog2=disabled
+               -Dbuild-pam-lastlog2=disabled
+
+               # Provided by sys-apps/shadow
+               -Dbuild-chfn-chsh=disabled
+               -Dbuild-login=disabled
+               -Dbuild-newgrp=disabled
+               -Dbuild-nologin=disabled
+               -Dbuild-vipw=disabled
+
+               -Dbuild-pylibmount=disabled
+               -Dbuild-raw=disabled
+
+               $(meson_native_enabled build-agetty)
+               $(meson_native_enabled build-bash-completion)
+               $(meson_native_enabled build-line)
+               $(meson_native_enabled build-partx)
+               $(meson_native_enabled build-rename)
+               $(meson_native_enabled build-rfkill)
+               $(meson_native_enabled build-schedutils)
+
+               $(meson_native_use_feature caps build-setpriv)
+               $(meson_native_use_feature cramfs build-cramfs)
+               $(meson_native_use_feature fdformat build-fdformat)
+               $(meson_native_use_feature hardlink build-hardlink)
+               $(meson_native_use_feature kill build-kill)
+               $(meson_native_use_feature logger build-logger)
+               $(meson_native_use_feature ncurses build-pg)
+               $(meson_native_use_feature su build-su)
+               $(meson_native_use_feature tty-helpers build-mesg)
+               $(meson_native_use_feature tty-helpers build-wall)
+               $(meson_native_use_feature tty-helpers build-write)
+               $(meson_native_use_feature cryptsetup)
+
+               # Libraries
+               -Dbuild-libuuid=enabled
+               -Dbuild-libblkid=enabled
+               -Dbuild-libsmartcols=enabled
+               -Dbuild-libfdisk=enabled
+               -Dbuild-libmount=enabled
+
+               # TODO: Support uuidd for non-native libuuid (do we want this 
still?)
+               #$(use_enable uuidd libuuid-force-uuidd)
        )
 
+       # TODO: udev (which seems to be controlled by just the systemd option 
right now?)
        if use build ; then
-               myeconfargs+=(
-                       --without-systemd
-                       --without-udev
+               emesonargs+=(
+                       -Dsystemd=disabled
                )
        else
-               myeconfargs+=(
-                       $(multilib_native_use_with systemd)
-                       $(multilib_native_use_with udev)
+               emesonargs+=(
+                       $(meson_native_use_feature systemd)
                )
        fi
 
-       if multilib_is_native_abi ; then
-               myeconfargs+=(
-                       --disable-chfn-chsh
-                       --disable-login
-                       --disable-newgrp
-                       --disable-nologin
-                       --disable-pylibmount
-                       --disable-raw
-                       --disable-vipw
-                       --enable-agetty
-                       --enable-bash-completion
-                       --enable-line
-                       --enable-partx
-                       --enable-rename
-                       --enable-rfkill
-                       --enable-schedutils
-                       
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-                       --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d
-                       $(use_enable caps setpriv)
-                       $(use_enable cramfs)
-                       $(use_enable fdformat)
-                       $(use_enable hardlink)
-                       $(use_enable kill)
-                       $(use_enable logger)
-                       $(use_enable ncurses pg)
-                       $(use_enable su)
-                       $(use_enable tty-helpers mesg)
-                       $(use_enable tty-helpers wall)
-                       $(use_enable tty-helpers write)
-                       $(use_with cryptsetup)
-               )
-               if [[ ${PV} == *9999 ]] ; then
-                       myeconfargs+=( --enable-asciidoc )
-               else
-                       # Upstream is shipping pre-generated man-pages for 
releases
-                       myeconfargs+=( --disable-asciidoc )
-               fi
-       else
-               myeconfargs+=(
-                       --disable-all-programs
-                       --disable-asciidoc
-                       --disable-bash-completion
-                       --without-systemdsystemunitdir
-                       --disable-poman
-
-                       # build libraries
-                       --enable-libuuid
-                       --enable-libblkid
-                       --enable-libsmartcols
-                       --enable-libfdisk
-                       --enable-libmount
-
-                       # Support uuidd for non-native libuuid
-                       $(use_enable uuidd libuuid-force-uuidd)
+       local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
+       cat >> ${native_file} <<-EOF || die
+       [binaries]
+       asciidoctor='asciidoctor-falseified'
+       EOF
+       # TODO: Verify this does the right thing for releases (may need to
+       # manually install).
+       if [[ ${PV} != *9999 ]] ; then
+               # Upstream is shipping pre-generated man-pages for releases
+               emesonargs+=(
+                       --native-file "${native_file}"
                )
        fi
 
-       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+       # TODO: check pam automagic (bug #485486, bug #545042)
+       #export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
+       #export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
+       #
+       # TODO: check librtas automagic to avoid automagic dependency on ppc*
+       #export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas)
+
+       meson_src_configure
 
        if multilib_is_native_abi && use python ; then
                python_foreach_impl python_configure
        fi
 }
 
-src_configure() {
-       append-lfs-flags
-       multilib-minimal_src_configure
-}
-
 python_compile() {
        pushd "${BUILD_DIR}" >/dev/null || die
-       emake all
+       meson_src_compile
        popd >/dev/null || die
 }
 
 multilib_src_compile() {
-       emake all
+       meson_src_compile
 
        if multilib_is_native_abi && use python ; then
                python_foreach_impl python_compile
@@ -365,12 +358,14 @@ multilib_src_compile() {
 
 python_test() {
        pushd "${BUILD_DIR}" >/dev/null || die
-       emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+       # XXX: See python_configure
+       #eninja check
        popd >/dev/null || die
 }
 
 multilib_src_test() {
-       emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+       eninja check
+
        if multilib_is_native_abi && use python ; then
                python_foreach_impl python_test
        fi
@@ -378,7 +373,7 @@ multilib_src_test() {
 
 python_install() {
        pushd "${BUILD_DIR}" >/dev/null || die
-       emake DESTDIR="${D}" install
+       meson_src_install
        python_optimize
        popd >/dev/null || die
 }
@@ -388,9 +383,7 @@ multilib_src_install() {
                python_foreach_impl python_install
        fi
 
-       # This needs to be called AFTER python_install call, bug #689190
-       # XXX: -j1 as temporary workaround for bug #931301
-       emake DESTDIR="${D}" install -j1
+       meson_src_install
 }
 
 multilib_src_install_all() {
@@ -399,9 +392,6 @@ multilib_src_install_all() {
        dosym hexdump /usr/bin/hd
        newman - hd.1 <<< '.so man1/hexdump.1'
 
-       # e2fsprogs-libs didn't install .la files, and .pc work fine
-       find "${ED}" -name "*.la" -delete || die
-
        if use pam ; then
                # See 
https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
                newpamd "${FILESDIR}/runuser.pamd" runuser

Reply via email to