# $Id$ PNAME="attr" PVER="2.4.43" PBUILD="r1" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="attr: Extended Attributes Of Filesystem Objects." HOMEPAGE="http://xfs.org/" DEPEND="" SDEPEND=">= sys-dev/autoconf-5 >= sys-dev/gettext-0.17" SRCFILE="${PNAME}_${PVER}-1.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( ftp://oss.sgi.com/projects/xfs/cmd_tars/${SRCFILE} ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-gettext.patch mirror://${PNAME}/${PNAME}-${PVER}-only-symlink-when-needed.patch ) UP2DATE="updatecmd ftp://oss.sgi.com/projects/xfs/cmd_tars | grep ${PNAME} | sed -n 's/.*_\(.*\)-[0-9]\..*/\1/;$ p'" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} mpatch ${PNAME}-${PVER}-gettext.patch || die mpatch ${PNAME}-${PVER}-only-symlink-when-needed.patch || die sed -i \ -e "/^PKG_DOC_DIR/s:@pkg_name@:${PNAME}-${PVER}:" \ -e '/HAVE_ZIPPED_MANPAGES/s:=.*:=false:' \ include/builddefs.in \ || die # extreme dirty fix: # it complains always about: # libtool: compile: unable to infer tagged configuration # libtool: compile: specify a tag with `--tag' # make: *** [parser.o] Error 1 # # to fix that we set the needed tag to libtool: # --tag=CXX sed -i '/^LIBTOOL/s:=.*:= @LIBTOOL@ --tag=CC:g' \ include/builddefs.in || die # libtool will clobber install-sh which is really a custom file mv install-sh attr.install-sh || die autoreconf --install --force --verbose || die mv attr.install-sh install-sh || die } src_compile() { cd ${SRCDIR} # enable CFLAGS export OPTIMIZER="${CFLAGS}" # disable debug code export DEBUG="-DNDEBUG" mconfigure \ --bindir=/bin \ --libdir=/$(mlibdir) \ --libexecdir=/usr/$(mlibdir) \ --enable-gettext \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DIST_ROOT=${BINDIR} install install-dev install-lib || die minstalldocs README VERSION doc/{CHANGES,COPYING} || die # provided by man-pages rm -r ${BINDIR}/usr/share/man/man2 || die }