--- astyle-1.21.ebuild.orig 2008-05-28 18:01:35.193580123 +0100 +++ astyle-1.21.ebuild 2008-05-28 18:09:29.273105988 +0100 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/astyle-1.21.ebuild,v 1.7 2008/05/24 13:38:45 maekke Exp $ -inherit eutils +inherit eutils toolchain-funcs DESCRIPTION="Artistic Style is a reindenter and reformatter of C++, C and Java source code" HOMEPAGE="http://astyle.sourceforge.net/" @@ -21,7 +21,13 @@ src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}"/${PN}-${PV}-strip.patch + epatch "${FILESDIR}"/${P}-strip.patch + + sed -i "/CFLAGS/s/-O3/${CXXFLAGS}/" build/Makefile || die "sed failed." + if use debug ; then + sed -i 's/\($(CBASEFLAGS)\)/\1 ${CXXFLAGS}/' \ + build/Makefile || die "sed failed." + fi } src_compile() { @@ -37,7 +43,7 @@ build_targets="release static shared" fi fi - emake ${build_targets} || die "build failed" + emake CXX="$(tc-getCXX)" ${build_targets} || die "build failed" } src_install() {