root/dev-lang/dmd/dmd-2.037.ebuild

User picture

Author: x2cast

Revision: 118 («Previous)


File Size: 1.16 KB

(December 06, 2009 11:53 UTC) Over 2 years ago

Dmd 2.037 & 1.053

 
Show/hide line numbers
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="Reference compiler for the D programming language"
HOMEPAGE="http://www.digitalmars.com/d/"
SRC_URI="http://ftp.digitalmars.com/${PN}.${PV}.zip"

LICENSE="DMD"
SLOT="2"
KEYWORDS="~x86 ~amd64"
IUSE=""
EAPI="2"

RESTRICT="mirror"

DEPEND="sys-apps/findutils
	!dev-lang/dmd-bin:2
	app-arch/unzip"
RDEPEND="dev-util/dmd-common
	amd64? ( app-emulation/emul-linux-x86-compat )"
PDEPEND="app-admin/eselect-dmd
	=dev-libs/phobos-${PV}"

S="${WORKDIR}/${PN}2/src"

src_unpack() {
	unpack $A
	cd dmd2
	rm -rf html osx linux windows samples README.TXT license.txt
	cd src/dmd
}

src_compile() {
# DMD
	cd "${S}/dmd"
	ln -s . mars
	make -f linux.mak || die "make failed"
# druntime
	cd "${S}/druntime/src/"
	(
		export PATH="${S}/dmd:${PATH}"
		export HOME="$(pwd)"
		make -f dmd-posix.mak
	)
}

src_install() {
# Compiler
	newbin "${S}/dmd/dmd" dmd2.bin || die "Install failed"
# druntime
	dolib.a "${S}/druntime/lib/libdruntime.a" || die "Install failed"
	dodir /usr/include/druntime
	mv "${S}/druntime/import"/* "${D}/usr/include/druntime/"
}