# $Id$ PNAME="xfsprogs" PVER="5.2.1" PBUILD="r1" PCAT="sys-fs" DESCRIPTION="Administration and debugging tools for the XFS file system." HOMEPAGE="http://xfs.org" DEPEND=">= virtual/glibc >= sys-libs/libblkid-2.31 >= sys-libs/libuuid-2.31 >= sys-libs/readline-8.0" SDEPEND=">= sys-dev/gettext-0.18 >= virtual/sed" SRCFILE="${PNAME}-${PVER}.tar.xz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( https://www.kernel.org/pub/linux/utils/fs/xfs/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd https://www.kernel.org/pub/linux/utils/fs/xfs/${PNAME} | highesttarball xz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix CFLAGS and some install pathes sed -i "/^PKG_DOC_DIR/s:=.*:= /usr/share/doc/${PNAME}-${PVER}:" \ include/builddefs.in || die # honor usr-move sed -i -e "s:root_sbindir='/sbin':root_sbindir='/usr/sbin':" \ -e 's:root_libdir="/${base_libdir}":root_libdir="/usr/${base_libdir}":' \ configure.ac configure || die } src_compile() { cd ${SRCDIR} # enable CFLAGS export OPTIMIZER="${CFLAGS}" # disable debug code export DEBUG=-DNDEBUG # disable-lto: disable link time optimization # # do not use mconfigure: # it enables disable-static, and this messes with the makefile # which causes the --as-needed flags added 3 times to the LDFLAGS and this will break the build # to prevent this nasty bug of the makefile, call configure without --disable-static # see: https://www.spinics.net/lists/linux-xfs/msg30191.html ./configure \ --host=${CHOST} \ --build=${CHOST} \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --datadir=/usr/share \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --libdir=/usr/$(mlibdir) \ \ --libexecdir=/usr/$(mlibdir) \ --enable-gettext \ --enable-readline \ --enable-blkid \ --disable-editline \ --disable-lto \ || die mmake -j1 V=1 || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/$(mlibdir) || die make DIST_ROOT=${BINDIR} \ DK_INC_DIR=${BINDIR}/usr/include/disk \ install install-dev \ || die # we want compressed docs rm -rf ${BINDIR}/usr/share/doc || die # prune unneeded docs rm doc/{CHANGES.gz,INSTALL,Makefile} || die # sometime /var/tmp exist, remove it, to keep the right permissions [[ -d ${BINDIR}/var ]] && rm -rf ${BINDIR}/var minstalldocs doc/* || die }