# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Tools required for building xnu" WEBPAGE="http://darwinsource.opendarwin.org/10.3.4/" SRC_URI="http://darwinsource.opendarwin.org/tarballs/apsl/${P}.tar.gz" LICENSE="APSL-2" SLOT="0" KEYWORDS="~macos" IUSE="" DEPEND=">=sys-darwin/Libstreams-23 >=sys-darwin/bootstrap_cmds-44" src_unpack() { unpack ${A} cd ${S} epatch "${FILESDIR}/Makefile-gentoo.diff" } src_compile() { make RC_OS=macos || die "make failed :(" cp ${S}/misc/seg_hack.NEW /usr/bin/seg_hack cd ${S}/ld epatch "${FILESDIR}/Makefile-ld-gentoo.diff" make RC_OS=macos kld_build || die "kld_build failed" cp ${S}/ld/static_kld/libkld.a /usr/lib/ ranlib /usr/lib/libkld.a }