--- /home/portage/tree/sys-apps/util-linux/util-linux-2.24.ebuild 2013-11-09 04:31:33.000000000 -0500 +++ util-linux-2.24-r1.ebuild 2013-11-19 19:46:59.617811898 -0500 @@ -6,7 +6,7 @@ EAPI=5 PYTHON_COMPAT=( python2_7 python3_{2,3} ) -inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 python-single-r1 +inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 python-single-r1 multilib-minimal MY_PV=${PV/_/-} MY_P=${PN}-${MY_PV} @@ -38,7 +38,7 @@ RDEPEND="!sys-process/schedutils ncurses? ( >=sys-libs/ncurses-5.2-r2 ) pam? ( sys-libs/pam ) python? ( ${PYTHON_DEPS} ) - selinux? ( sys-libs/libselinux ) + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] ) slang? ( sys-libs/slang ) udev? ( virtual/udev )" DEPEND="${RDEPEND} @@ -76,48 +76,90 @@ lfs_fallocate_test() { rm -f "${T}"/fallocate.c } -src_configure() { +multilib_src_configure() { + local CPPFLAGS=${CPPFLAGS} ac_cv_func_fallocate opts lfs_fallocate_test export ac_cv_header_security_pam_misc_h=$(usex pam) #485486 + if multilib_build_binaries; then + opts=( + --enable-agetty + $(use_enable bash-completion) + $(use_enable caps setpriv) + $(use_enable cramfs) + $(use_enable cytune) + $(use_enable fdformat) + --with-ncurses=$(usex ncurses $(usex unicode auto yes) no) + $(use_enable tty-helpers mesg) + --enable-partx + $(use_with python) + --enable-raw + --enable-rename + --enable-schedutils + $(use_enable tty-helpers wall) + $(use_enable tty-helpers write) + $(use_enable suid makeinstall-chown) + $(use_enable suid makeinstall-setuid) + $(use_with slang) + $(use_with udev) + ) + else + opts=( + --disable-agetty + --disable-bash-completion + --disable-setpriv + --disable-cramfs + --disable-cytune + --disable-fdformat + --without-ncurses + --disable-mesg + --disable-partx + --without-python + --disable-raw + --disable-rename + --disable-schedutils + --disable-wall + --disable-write + --disable-makeinstall-chown + --disable-makeinstall-setuid + --without-slang + --without-udev + ) + fi + + ECONF_SOURCE="${S}" \ econf \ --enable-fs-paths-extra=/usr/sbin:/bin:/usr/bin \ $(use_enable nls) \ - --enable-agetty \ --with-bashcompletiondir="$(get_bashcompdir)" \ - $(use_enable bash-completion) \ - $(use_enable caps setpriv) \ - $(use_enable cramfs) \ - $(use_enable cytune) \ - $(use_enable fdformat) \ - --with-ncurses=$(usex ncurses $(usex unicode auto yes) no) \ --disable-kill \ --disable-last \ --disable-login \ - $(use_enable tty-helpers mesg) \ --disable-nologin \ - --enable-partx \ - $(use_with python) \ - --enable-raw \ - --enable-rename \ --disable-reset \ - --enable-schedutils \ --disable-su \ - $(use_enable tty-helpers wall) \ - $(use_enable tty-helpers write) \ - $(use_enable suid makeinstall-chown) \ - $(use_enable suid makeinstall-setuid) \ $(use_with selinux) \ - $(use_with slang) \ $(use_enable static-libs static) \ - $(use_with udev) \ - $(tc-has-tls || echo --disable-tls) + $(tc-has-tls || echo --disable-tls) \ + "${opts[@]}" } -src_install() { - default - dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} +multilib_src_compile() { + if multilib_build_binaries; then + default + else + emake libuuid.la libblkid.la libmount.la + fi +} - use python && python_optimize +multilib_src_install() { + if multilib_build_binaries; then + emake DESTDIR="${D}" install + use python && python_optimize + else + emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \ + install-pkgconfigDATA install-uuidincHEADERS \ + install-nodist_blkidincHEADERS install-nodist_mountincHEADERS + fi # need the libs in / gen_usr_ldscript -a blkid mount uuid @@ -126,6 +168,10 @@ src_install() { prune_libtool_files } +multilib_src_install_all() { + dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} +} + pkg_postinst() { if ! use tty-helpers; then elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."