diff -ru a/smp_utils-0.94.ebuild b/smp_utils-0.94.ebuild --- a/smp_utils-0.94.ebuild 2009-04-05 08:08:24.000000000 +0000 +++ b/smp_utils-0.94.ebuild 2010-09-04 22:10:21.017647675 +0000 @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-block/smp_utils/smp_utils-0.94.ebuild,v 1.1 2008/11/18 02:14:30 robbat2 Exp $ -inherit eutils +EAPI="2" + +inherit eutils toolchain-funcs DESCRIPTION="Utilities for SAS management protocol (SMP)" HOMEPAGE="http://sg.danny.cz/sg/smp_utils.html" @@ -16,28 +18,32 @@ DEPEND="" RDEPEND="" -src_unpack() { - unpack ${A} - cd "${S}" - for i in Makefile */Makefile ; do +src_prepare() { sed -i \ - -e "/^CFLAGS/s:-g -O2:${CFLAGS}:g" \ + -e "/^CFLAGS /d" \ + -e "/^LDFLAGS /d" \ + -e 's/$(LDFLAGS)/$(CFLAGS) &/' \ + -e '/^\.c\.o:/,+1d' \ + -e '/^libsmp\.a/d' \ + -e 's/^\tar r libsmp\.a/libsmp.a:/' \ + -e 's/sub_mpt sub_sas_tpl sub_sgv4//' \ + -e '/^\(sub_mpt\|sub_sas_tpl\|sub_sgv4\):$/,+1d' \ + -e '$aCPPFLAGS+=$(INCLUDES) $(EXTRA_FLAGS)\nlibsmp.a:\n\t$(AR) $(ARFLAGS) $@ $?\nmpt/smp_mptctl_io.o sas_tpl/smp_portal_intf.o sgv4/smp_sgv4_io.o:\n\t$(MAKE) -C $(dir $@)' \ -e '/^PREFIX=/s:/local::' \ -e '/^INSTDIR=/s:/bin:/sbin:' \ -e 's:$(DESTDIR)/:$(DESTDIR):' \ -e "/^LIBDIR=/s:/lib$:/$(get_libdir):" \ -e '/^MANDIR=/s:)/man:)/share/man:' \ -e 's:install -s :install :' \ - $i || die "sed of $i failed" - done + Makefile */Makefile || die } src_compile() { - emake || die "emake failed" + emake CC="$(tc-getCC)" AR="$(tc-getAR)" || die "emake failed" } src_install() { dodoc AUTHORS ChangeLog COVERAGE CREDITS README* TODO dohtml doc/*html - make install DESTDIR="${D}" || die "make install failed" + emake install DESTDIR="${D}" || die "make install failed" }