# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Maintainer: Stephan Wienczny inherit eutils toolchain-funcs GCC_PV=`gcc-version` GCC_PVS=`gcc-major-version`.`gcc-minor-version`.`gcc-micro-version` GCC_PVF=`gcc-fullversion` GCC_LIBS="`gcc-config --get-lib-path`" # GCC_LIBS must be saved before we inherit toolchain # toolchain makes gcc-config not work # toolchain is used to patch the version inherit toolchain DESCRIPTION="Runtime lib for GDC" SRC_URI="http://home.earthlink.net/~dvdfrdmn/d/gdc-0.10.tar.bz2 ftp://ftp.gnu.org/pub/gcc/releases/gcc-${GCC_PVS}/gcc-${GCC_PVS}.tar.bz2" HOMEPAGE="http:/home.earthlink.net/~dvdfrdmn/d" LICENSE="Artistic" DEPEND=">=sys-libs/glibc-2.3.0 >=sys-devel/gcc-3.3.2 >=dev-lang/gdc-0.10" GCC_ROOT="${WORKDIR}/gcc-${GCC_PVS}" SOURCE="${GCC_ROOT}/gcc/d/phobos" BUILD="${GCC_ROOT}/phobos-build" KEYWORDS="~x86" SLOT="0" IUSE="" src_unpack() { unpack "gcc-${GCC_PVS}.tar.bz2" cd "${GCC_ROOT}/gcc" unpack "gdc-${PV}.tar.bz2" mkdir ${BUILD} } src_compile() { unset CC unset CXX unset CFLAGS unset CXXFLAGS unset LDFLAGS cd ${BUILD} ${SOURCE}/configure --prefix=/usr || die "configure failed" gmake } src_install () { cd ${BUILD} dodir /usr/include/d/ cp phobos-ver-syms ${D}/usr/include/d/ dolib.a libphobos.a dodir "${GCC_LIBS}" cp libphobos.spec ${D}"${GCC_LIBS}" #Delete object files for file in `find | grep "\.o"` do rm $file; done cp -fr *.d etc gcc internal std ${D}/usr/include/d/ # the .d-files is not moved to build directory, so go to source dir to install those cd ${SOURCE} cp -fr *.d etc gcc internal std ${D}/usr/include/d/ }