summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnant Narayanan <anant@gentoo.org>2007-09-28 00:28:31 +0000
committerAnant Narayanan <anant@gentoo.org>2007-09-28 00:28:31 +0000
commit3fc75edba6a9e1993f801017076d3f1b87931a8f (patch)
tree502cf8639b2ccb580748aa4ca3dae2872c2d4840
parentbump dmd-bin and fix tango dependencies (diff)
downloadd-master.tar.gz
d-master.tar.bz2
d-master.zip
Bump tango HEADmaster
svn path=/d/; revision=9
-rw-r--r--dev-libs/tango/Manifest8
-rw-r--r--dev-libs/tango/tango-0.99.1.ebuild220
2 files changed, 228 insertions, 0 deletions
diff --git a/dev-libs/tango/Manifest b/dev-libs/tango/Manifest
index c2817cf..807c32b 100644
--- a/dev-libs/tango/Manifest
+++ b/dev-libs/tango/Manifest
@@ -1,4 +1,5 @@
DIST tango-0.98-src.tar.gz 1061913 RMD160 812cc624844dfe9fd8e5a2c333e6cbcdfc5f915f SHA1 79a65cc52a7d2e2ac17b4f266d6d26f60c257245 SHA256 bc04b0cfc8e0c69f845eea8e2d83e7eed1d6e006d892b96103372733caa7fc74
+DIST tango-0.99.1-src.tar.gz 1203260 RMD160 829fe8b85b74aaf72c07722d6c275f6f3498206f SHA1 acb1be4e5e3f1c3cb00bb3630231c8a76be26c2a SHA256 894782d3a53179b84974f5b0487558a85ec8a04c79b2eebcde6e7b4f0c45b509
EBUILD tango-0.98-r1.ebuild 5638 RMD160 3e1b3efa5a7b68639fca136faa9128daa1dd4335 SHA1 956866d0074af24936b00af469708b12226d8ca9 SHA256 8c9817f33a9eb0fd1b5ff8ebf9484bff1436406bf7f6573af128b008c79b3062
MD5 279baacc02a33c6a5d8a0619d4b4726c tango-0.98-r1.ebuild 5638
RMD160 3e1b3efa5a7b68639fca136faa9128daa1dd4335 tango-0.98-r1.ebuild 5638
@@ -7,9 +8,16 @@ EBUILD tango-0.98.ebuild 6144 RMD160 c5f82b779f02b74d4f2be29d3bbf7f22b82b6a85 SH
MD5 87eeb40da33da1ed56ce1315894f3ef2 tango-0.98.ebuild 6144
RMD160 c5f82b779f02b74d4f2be29d3bbf7f22b82b6a85 tango-0.98.ebuild 6144
SHA256 1761f2e52a557820a86d579311521be9993ccf1d436f603e829c807c859cc41e tango-0.98.ebuild 6144
+EBUILD tango-0.99.1.ebuild 5638 RMD160 3e1b3efa5a7b68639fca136faa9128daa1dd4335 SHA1 956866d0074af24936b00af469708b12226d8ca9 SHA256 8c9817f33a9eb0fd1b5ff8ebf9484bff1436406bf7f6573af128b008c79b3062
+MD5 279baacc02a33c6a5d8a0619d4b4726c tango-0.99.1.ebuild 5638
+RMD160 3e1b3efa5a7b68639fca136faa9128daa1dd4335 tango-0.99.1.ebuild 5638
+SHA256 8c9817f33a9eb0fd1b5ff8ebf9484bff1436406bf7f6573af128b008c79b3062 tango-0.99.1.ebuild 5638
MD5 adaaaa74b3f502665772cc093697837b files/digest-tango-0.98 247
RMD160 3af5b2b52506bc248890c3955ad7ae7d0c7c9882 files/digest-tango-0.98 247
SHA256 f517a1f4d88e7cc8f6b890838d3a6f14cf9facd015fb0cb6190eab69e385aa11 files/digest-tango-0.98 247
MD5 adaaaa74b3f502665772cc093697837b files/digest-tango-0.98-r1 247
RMD160 3af5b2b52506bc248890c3955ad7ae7d0c7c9882 files/digest-tango-0.98-r1 247
SHA256 f517a1f4d88e7cc8f6b890838d3a6f14cf9facd015fb0cb6190eab69e385aa11 files/digest-tango-0.98-r1 247
+MD5 49b9d99508acae80817b4b79a4f62c55 files/digest-tango-0.99.1 253
+RMD160 e023183169f616c85114876abd51fa20fcad886b files/digest-tango-0.99.1 253
+SHA256 a2f848c1b4ec1283cf672edbaaaf548abe539815d045c2c42f6a63972b92c287 files/digest-tango-0.99.1 253
diff --git a/dev-libs/tango/tango-0.99.1.ebuild b/dev-libs/tango/tango-0.99.1.ebuild
new file mode 100644
index 0000000..725b736
--- /dev/null
+++ b/dev-libs/tango/tango-0.99.1.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Platform library for the D programming language"
+HOMEPAGE="http://www.dsource.org/projects/tango/"
+SRC_URI="http://downloads.dsource.org/projects/${PN}/${PV}/${P}-src.tar.gz"
+
+LICENSE="|| ( AFL-2.1 BSD )"
+SLOT="0"
+KEYWORDS="~x86"
+
+# Tango with GDC needs to be cleaned up
+#IUSE="gdc"
+IUSE=""
+
+RDEPEND="!dev-libs/phobos
+>=dev-lang/dmd-bin-1.020"
+DEPEND="${RDEPEND}"
+S=${WORKDIR}/${P}-src
+
+# Helper functions for compiling
+tango_filter_file() {
+ FILE=$1
+ if [ "`echo $FILE | grep win32`" -o "`echo $FILE | grep Win32`" ]; then
+ return 1
+ fi
+ if [ "`echo $FILE | grep darwin`" ]; then
+ return 1
+ fi
+ return 0
+}
+
+tango_compile_file() {
+ DC=$1
+ FILENAME=$3
+ OBJNAME=`echo $FILENAME | sed -e 's/\.d//' | sed -e 's/\//\./g'`
+ OBJNAME=${OBJNAME}.o
+
+ if tango_filter_file $OBJNAME; then
+ $DC -c -inline -release -O -version=Posix -version=Tango -of$OBJNAME $FILENAME
+ ar -r lib/$2 $OBJNAME
+ rm $OBJNAME
+ fi
+}
+
+tango_compile_library() {
+ cd ${S}
+ for fil in `find tango -name '*.d'`
+ do
+ tango_compile_file $1 $2 $fil
+ done
+ ranlib lib/$2
+}
+
+tango_compile_dmd() {
+ for f in "dmd-posix.mak common/tango/posix.mak compiler/dmd/posix.mak"
+ do
+ fperms guo=rw $f
+ sed -i -e "s:^DC=.*:DC=/opt/dmd/bin/dmd.bin:" $f
+ edos2unix $f
+ done
+
+ OLDHOME=$HOME
+ export HOME=${S}/lib
+ make clean -fdmd-posix.mak
+ make lib doc install -fdmd-posix.mak || die "Compile failed!"
+ make clean -fdmd-posix.mak
+ export HOME=$OLDHOME
+
+ tango_compile_library /opt/dmd/bin/dmd.bin libtango.a
+}
+
+tango_compile_gdc() {
+ GDC_VER="`gdc --version | grep 'gdc' | sed 's/^.*gdc \([0-9]*\.[0-9]*\).*$/\1/'`"
+ GDC_MAJOR="`echo $GDC_VER | sed 's/\..*//'`"
+ GDC_MINOR="`echo $GDC_VER | sed 's/.*\.//'`"
+
+ if [ "$GDC_MAJOR" = "0" -a "$GDC_MINOR" -lt "23" ]; then
+ eerror " "
+ eerror "This version of Tango requires GDC 0.23 or newer!"
+ eerror " "
+ die "Required version of GDC not found"
+ fi
+
+ HOST_ARCH="`./compiler/gdc/config.guess | sed 's/-.*//'`"
+ ADD_CFLAGS=
+ if [ "$HOST_ARCH" = "powerpc" -a ! "`./compiler/gdc/config.guess | grep darwin`" ]; then
+ ADD_CFLAGS="-mregnames"
+ fi
+
+ pushd ./compiler/gdc
+ ./configure || die "Configure failed!"
+ popd
+
+ OLDHOME=$HOME
+ export HOME=${S}/lib
+ make clean -fgdc-posix.mak
+ make lib doc install -fgdc-posix.mak ADD_CFLAGS="$ADD_CFLAGS" || die "Compile failed!"
+ make clean -fgdc-posix.mak
+ export HOME=$OLDHOME
+
+ tango_compile_library gdmd libgtango.a
+}
+
+# Helper functions for installing
+tango_install_dmd() {
+ LOC=/opt/dmd
+ cd ${S}
+ insinto ${LOC}/lib
+ doins ${S}/lib/*.a
+ insinto ${LOC}/include/d/tango
+ doins ${S}/object.di
+ mv ${S}/tango ${D}${LOC}/include/d/tango
+ mv ${S}/std ${D}${LOC}/include/d/tango
+
+ cat <<END > "dmd"
+#!/bin/sh
+${LOC}/bin/dmd.bin -I${LOC}/include/d/tango -L${LOC}/lib/libtango.a -version=Tango -version=Posix \$*
+END
+ fperms guo=rx dmd
+ mkdir ${D}${LOC}/bin
+ cp dmd ${D}${LOC}/bin
+}
+
+tango_install_gdc() {
+ insinto /usr/$(get_libdir)/gcc/$CHOST/$(gcc-fullversion)
+ doins ${S}/lib/*.a
+ insinto /usr/include/d/$(gcc-fullversion)
+ doins ${S}/object.di
+ doins ${S}/tango/*
+}
+
+pkg_setup() {
+ if use gdc; then
+ if ! built_with_use sys-devel/gcc d; then
+ eerror " "
+ eerror "You have enabled the gdc USE flag, but gcc was "
+ eerror "not compiled with the d USE flag. Either merge "
+ eerror "sys-devel/gcc with d enabled, or "
+ eerror "dev-lang/dmd-bin with the tango USE flag. "
+ eerror " "
+ die "No suitable D compiler found!"
+ else
+ if built_with_use dev-lang/dmd-bin tango; then
+ export ENABLE_LIBRARY="both"
+ einfo " "
+ einfo "dev-lang/dmd-bin with tango USE flag detected, "
+ einfo "the Tango standard library with be built and "
+ einfo "enabled for the DMD compiler. "
+ einfo " "
+ einfo "You have also used the gdc use flag, and "
+ einfo "Tango will be built and enabled for the GDC "
+ einfo "compiler. "
+ einfo " "
+ else
+ export ENABLE_LIBRARY="gdc"
+ einfo " "
+ einfo "The Tango standard library will be built and "
+ einfo "enabled for the GDC compiler. "
+ einfo " "
+ fi
+ fi
+ else
+ export ENABLE_LIBRARY="dmd"
+ einfo " "
+ einfo "the Tango standard library with be built and "
+ einfo "enabled for the DMD compiler. "
+ einfo " "
+ fi
+}
+
+src_compile() {
+ cd ${S}/lib
+
+ case "$ENABLE_LIBRARY" in
+
+ "dmd" )
+ tango_compile_dmd
+ ;;
+
+ "gdc" )
+ tango_compile_gdc
+ ;;
+
+ "both" )
+ tango_compile_dmd
+ tango_compile_gdc
+ ;;
+
+ esac
+}
+
+src_install() {
+ case "$ENABLE_LIBRARY" in
+
+ "dmd" )
+ tango_install_dmd
+ ;;
+
+ "gdc" )
+ tango_install_gdc
+ ;;
+
+ "both" )
+ tango_install_dmd
+ tango_install_gdc
+ ;;
+
+ esac
+}
+
+pkg_postinst() {
+ einfo " "
+ einfo "*Please* run env-update && source /etc/profile "
+ einfo "before using your D compilers! "
+ einfo " "
+}