# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 src_prepare() { default # Force static programs find -name Makefile -exec \ sed -i -r -e 's/-static(-libtool-libs)?/-all-static/' {} + } src_configure() { export DEBUG=-DNDEBUG export OPTIMIZER=${CFLAGS} unset PLATFORM # if set in user env, this breaks configure # Avoid automagic on libdevmapper, #709694 export ac_cv_search_dm_task_create=no local myconf=( --enable-blkid --disable-libicu --disable-gettext --disable-readline --disable-editline --disable-scrub ) BUILD_CC="$(tc-getBUILD_CC)" \ BUILD_LD="$(tc-getBUILD_LD)" \ gkconf "${myconf[@]}" } src_compile() { gkmake V=1 headers growfs repair } src_install() { mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" cp growfs/xfs_growfs "${D}"/sbin \ || die "Failed to copy '${S}/repair/xfs_growfs' to '${D}/sbin/'!" cp repair/xfs_repair "${D}"/sbin \ || die "Failed to copy '${S}/repair/xfs_repair' to '${D}/sbin/'!" local sbin for sbin in \ "${D}/sbin/xfs_growfs" \ "${D}/sbin/xfs_repair" \ ; do "${STRIP}" --strip-all "${sbin}" \ || die "Failed to strip '${sbin}'!" done }