--- icon-9.5.0.ebuild.orig 2012-09-03 13:49:57.000000000 -0600 +++ icon-9.5.0.ebuild 2012-09-03 13:48:17.000000000 -0600 @@ -2,6 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-lang/icon/icon-9.5.0.ebuild,v 1.2 2010/09/19 17:42:20 armin76 Exp $ +EAPI=4 + inherit eutils flag-o-matic multilib toolchain-funcs MY_PV=${PV//./} @@ -11,7 +13,7 @@ LICENSE="as-is" SLOT="0" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="X iplsrc" S="${WORKDIR}/icon-v${MY_PV}src" @@ -21,19 +23,16 @@ x11-libs/libX11 x11-libs/libXpm x11-libs/libXt ) - sys-devel/gcc" - -src_unpack() { - unpack ${A} - cd "${S}" + || ( sys-devel/gcc sys-devel/gcc-apple )" +src_prepare() { epatch "${FILESDIR}"/${P}-flags.patch # do not prestrip files find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die } -src_compile() { +src_configure() { # select the right compile target. Note there are many platforms # available local mytarget; @@ -49,9 +48,18 @@ emake Configure name=${mytarget} -j1 || die fi + # sanitise the Makedefs file generated by Configure + sed -i \ + -e 's:-L/usr/X11R6/lib64::g' \ + -e 's:-L/usr/X11R6/lib::g' \ + -e 's:-I/usr/X11R6/include::g' \ + Makedefs || die "sed of Makedefs failed" + append-flags $(test-flags -fno-strict-aliasing -fwrapv) +} - emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "Make Failed" +src_compile() { + emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" } src_test() { @@ -73,14 +81,14 @@ cd "${S}/man/man1" doman icont.1 doman icon.1 - rm -rf "${D}"/usr/$(get_libdir)/icon/man + rm -rf "${ED}"/usr/$(get_libdir)/icon/man cd "${S}/doc" dodoc *.txt *.sed ../README # dohtml ignores all anything except .html files, no use here - mkdir -p "${D}"/usr/share/doc/${PF}/html - cp -dpR *.htm *.gif *.jpg *.css "${D}"/usr/share/doc/${PF}/html - rm -rf "${D}"/usr/$(get_libdir)/icon/{doc,README} + mkdir -p "${ED}"/usr/share/doc/${PF}/html + cp -dpR *.htm *.gif *.jpg *.css "${ED}"/usr/share/doc/${PF}/html + rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} # optional Icon Programming Library if use iplsrc; then