summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/dmd/ChangeLog5
-rw-r--r--dev-lang/dmd/Manifest11
-rw-r--r--dev-lang/dmd/dmd-2.054-r1.ebuild153
-rw-r--r--dev-lang/dmd/dmd-2.055-r1.ebuild (renamed from dev-lang/dmd/dmd-2.055.ebuild)4
-rw-r--r--dev-lang/dmd/dmd-2.056.ebuild (renamed from dev-lang/dmd/dmd-2.054.ebuild)8
-rw-r--r--dev-lang/dmd/files/dmd-2.056-makefile.patch105
-rw-r--r--dev-lang/dmd/files/dmd.bashcomp25
7 files changed, 291 insertions, 20 deletions
diff --git a/dev-lang/dmd/ChangeLog b/dev-lang/dmd/ChangeLog
index 555d64dc2..23383976b 100644
--- a/dev-lang/dmd/ChangeLog
+++ b/dev-lang/dmd/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 30 Oct 2011; Marco Leise <marco.leise@gmx.de> -dmd-2.054.ebuild,
+ +dmd-2.054-r1.ebuild, -dmd-2.055.ebuild, +dmd-2.055-r1.ebuild,
+ +dmd-2.056.ebuild, +files/dmd-2.056-makefile.patch, files/dmd.bashcomp:
+ Version bump for DMD and use of bashcompletion-r1
+
14 Sep 2011; Marco Leise (mleise) <marco.leise@gmx.de>
files/dmd-2.054-makefile.patch, +dmd-2.055.ebuild,
+files/dmd-2.055-makefile.patch:
diff --git a/dev-lang/dmd/Manifest b/dev-lang/dmd/Manifest
index 6d38ebe8c..308b8661f 100644
--- a/dev-lang/dmd/Manifest
+++ b/dev-lang/dmd/Manifest
@@ -1,10 +1,13 @@
AUX dmd-2.054-makefile.patch 2701 RMD160 6fbb1e4fefe2bc0969778f1705a06c3ee339d66a SHA1 00ab197ac3013d1cac959ee3724149f5c9615501 SHA256 75b90307a570f8242aa36862192ad9b55aafb6ff2c4c14fb79e033b6bcb43c1b
AUX dmd-2.054-no-execstack.patch 3962 RMD160 849f59f9921dea1b9a9b78d6d54fdeba9df29f38 SHA1 94268fb2653cc6813ffdff7406d394bafcd1bee3 SHA256 6603dfb05beff79039f0e63a409e8237c6a271ae73ce7ec752fef3c164073423
AUX dmd-2.055-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477
-AUX dmd.bashcomp 4304 RMD160 1907b62c150f074088084141a0f10b92de17f1a0 SHA1 2bea8aef8cba4d4817b7070e7f5c8e2e0628f51e SHA256 11c1b7007ea713c60e2f65a7c25bb38fb0b88c263c064a42bf4da1250480245f
+AUX dmd-2.056-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477
+AUX dmd.bashcomp 4479 RMD160 171ed85764f59e6d09aeba21606b12825a125c56 SHA1 556e042a127698286b4662aa7a6cbfe672ebc3b2 SHA256 725e72a4da53bb5bee065cd5bf7c6a8c2ccdfc39fa928349a11f9ad24288e6c6
DIST dmd.2.054.zip 16114301 RMD160 1764ed7c64ee63857a30633c935eaceb99dc1dc5 SHA1 05dfd83c1083bb93ae43c10e3846ee7120b462fe SHA256 3347dee91d8884b2f105666f085ba0b2c27b989967cf0001b284f3da922ca0c2
DIST dmd.2.055.zip 17137571 RMD160 c418324817e7d44bc76468e6d5e79089c82ca367 SHA1 13fb220db783cb47ad4cf3614d389894e92745c6 SHA256 11901f541ab3cce2ea245c1f609f456996eab1922c976483750c90d99c49816b
-EBUILD dmd-2.054.ebuild 4135 RMD160 5d08e557de2638fdd7d1388e49a558ab5bbf90ce SHA1 ba72afc1d6908cd8b399b43f38b3381c36732b60 SHA256 c2cc9d534057c8777bfb3ce7d7744c1a0e8205d59d5c03accec6d714689be892
-EBUILD dmd-2.055.ebuild 3966 RMD160 dea1ed55c3ba666d880932437c694df72e7c52b7 SHA1 464f42f0962f8a7be211eecb8ddbc8029098406c SHA256 d4d90f003c8a69e5c751f0cf3f2470d943791278bc88bd2d27454bc2e49fa485
-MISC ChangeLog 683 RMD160 c191d6fef0461bdd6549af80a028f12c1c94bfa7 SHA1 d00a7eb0663b0604be550b79b9350532fbe1d0bb SHA256 b2b37a82e9d657e89f93da09096def08fb885c95c7ec5cfc48c551dbd20f50da
+DIST dmd.2.056.zip 19678819 RMD160 d323972e326c113b8976a494d783389f8999c34a SHA1 1b0c80c1415b9fb22e992c6c8dcb5b40674cccfb SHA256 22aea9e97f271cf64fbcb71458fa3454b6eef4bb5a2ed7061f753a4e91c9f515
+EBUILD dmd-2.054-r1.ebuild 4127 RMD160 c54ee1292875bfb39f458a42bf06ca87d97d8cba SHA1 eab6cffb411302d10bbadb5adf3214f3ba03dc70 SHA256 f2b8ec75b66c291541fbed886f96c1064180e5ffbb6869408ce7454488f730f3
+EBUILD dmd-2.055-r1.ebuild 3963 RMD160 f857cc63b917b154510687edb33fa8d9d6dcaa3e SHA1 fbcb3f0fc0e2bc907e059e9b884d88e77ce797be SHA256 61d094d8fdce5606d471321f50ac1879066485f597bd5ab5227e8b0ca10fe0a4
+EBUILD dmd-2.056.ebuild 3963 RMD160 f857cc63b917b154510687edb33fa8d9d6dcaa3e SHA1 fbcb3f0fc0e2bc907e059e9b884d88e77ce797be SHA256 61d094d8fdce5606d471321f50ac1879066485f597bd5ab5227e8b0ca10fe0a4
+MISC ChangeLog 942 RMD160 c31fd22c821a7ae5146d1054f67279ce98f2ce77 SHA1 1f656ae0095d328e302d42f687a50ed0e24c0abe SHA256 2bf839a91a7630cb8a12cc81dec8f7bc333a5c59a87166f266de32da479d2674
MISC metadata.xml 208 RMD160 c18611400760e42bdd001905be0a63c2e963bcea SHA1 595816105cac477cb85792a182e15888029118a1 SHA256 c4841c87f0c2b9b5e679a27dc72180be8d508fb3f5df0fbab2ec2c805c0a6d82
diff --git a/dev-lang/dmd/dmd-2.054-r1.ebuild b/dev-lang/dmd/dmd-2.054-r1.ebuild
new file mode 100644
index 000000000..7f5ffbaaf
--- /dev/null
+++ b/dev-lang/dmd/dmd-2.054-r1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+inherit eutils multilib bash-completion-r1
+
+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="-* ~amd64 ~x86"
+IUSE="multilib doc examples"
+
+RESTRICT="mirror"
+
+DEPEND="sys-apps/findutils
+ app-arch/unzip"
+RDEPEND="!dev-lang/dmd-bin"
+
+S="${WORKDIR}/${PN}2/src"
+
+rdos2unix() {
+ edos2unix `find . -name '*'.$1 -type f` || die "Failed to convert line-endings of all .$1 files"
+}
+
+src_prepare() {
+ cd .. || die
+
+ rm -r osx linux windows freebsd README.TXT || die "Failed to remove included binaries"
+
+ # convert line-endings of file-types that start as cr-lf and are
+ # patched or installed later on
+ rdos2unix c
+ rdos2unix d
+ rdos2unix txt
+ rdos2unix css
+
+ # misc patches for the build process
+ epatch "${FILESDIR}/${P}-makefile.patch"
+
+ # fix the compile of an assembly file in druntime and the output of
+ # DMD to produce binaries with no executable stack
+ epatch "${FILESDIR}/${P}-no-execstack.patch"
+}
+
+src_compile() {
+ # DMD
+ ln -s . "dmd/mars" || die "Failed to add recursive symbolic link to DMD sources."
+ if use x86; then
+ einfo 'Building DMD for x86 ...'
+ emake -C dmd -f posix.mak MODEL=32
+ elif use amd64; then
+ einfo 'Building DMD for amd64 ...'
+ emake -C dmd -f posix.mak MODEL=64
+ fi
+
+ # druntime & Phobos
+ if use x86 || (use amd64 && use multilib); then
+ einfo 'Building druntime for x86 ...'
+ emake -C druntime -f posix.mak MODEL=32 "DMD=../dmd/dmd"
+ einfo 'Building Phobos for x86 ...'
+ emake -C phobos -f posix.mak MODEL=32 "DMD=../dmd/dmd"
+ fi
+ if use amd64; then
+ einfo 'Building druntime for amd64 ...'
+ emake -C druntime -f posix.mak MODEL=64 "DMD=../dmd/dmd"
+ einfo 'Building Phobos for amd64 ...'
+ emake -C phobos -f posix.mak MODEL=64 "DMD=../dmd/dmd"
+ fi
+}
+
+src_test() {
+ DFLAGS="-Iphobos -Idruntime/import -L-lrt"
+ DMD="dmd/dmd"
+ if use x86 || (use amd64 && use multilib); then
+ ${DMD} -m32 ${DFLAGS} -Lphobos/generated/linux/release32/libphobos2.a ../samples/d/hello.d || die "Failed to build hello.d (32bit)"
+ ./hello 32bit || die "Failed to run test sample (32bit)"
+ fi
+ if use amd64; then
+ ${DMD} -m64 ${DFLAGS} -Lphobos/generated/linux/release64/libphobos2.a ../samples/d/hello.d || die "Failed to build hello.d (64bit)"
+ ./hello 64bit || die "Failed to run test sample (64bit)"
+ fi
+ rm hello.o hello
+}
+
+src_install() {
+ # prepeare and install config
+ cd "dmd" || die
+ cat > dmd.conf << EOF
+[Environment]
+DFLAGS=-I/usr/include/phobos2 -I/usr/include/druntime -L-L--no-warn-search-mismatch -L--export-dynamic -L-lrt
+EOF
+ insinto /etc
+ doins dmd.conf
+ dobashcomp "${FILESDIR}/${PN}.bashcomp"
+
+ # Compiler
+ dobin "dmd"
+
+ # Man pages, docs and samples
+ cd ".." || die
+ doman ../man/man1/dmd.1
+ doman ../man/man1/dmd.conf.5
+
+ use doc && dohtml -r ../html/*
+
+ if use examples; then
+ dodir /usr/share/doc/${PF}/samples
+ cp -R ../samples/d/* "${D}"/usr/share/doc/${PF}/samples/ || die
+ fi
+
+ # druntime & Phobos
+ if use amd64; then
+ dolib.a "druntime/lib64/libdruntime.a"
+ dolib.a "phobos/generated/linux/release64/libphobos2.a"
+ fi
+ if use x86 || (use amd64 && use multilib); then
+ use amd64 && multilib_toolchain_setup x86
+ dolib.a "druntime/lib32/libdruntime.a"
+ dolib.a "phobos/generated/linux/release32/libphobos2.a"
+ # TODO: restore target architecture
+ fi
+
+ # cleanup builds
+ rm -r "druntime/obj"* "druntime/lib"* || die
+ rm -r "phobos/generated" || die
+
+ # remove files that are not required
+ rm "phobos/posix.mak" || die
+ rm "phobos/win32.mak" || die
+ rm "phobos/std.ddoc" || die
+ rm "phobos/index.d" || die
+ rm -r "phobos/etc/c/zlib" || die
+
+ # includes
+ dodir /usr/include/druntime
+ mv "druntime/import"/* "${D}/usr/include/druntime/" || die
+
+ dodir /usr/include/phobos2
+ mv "phobos"/* "${D}/usr/include/phobos2/" || die
+
+}
+
+pkg_postinst() {
+ if use doc || use examples; then
+ elog "The bundled docs and/or samples may be found in "
+ elog "/usr/share/doc/${PF} "
+ fi
+}
diff --git a/dev-lang/dmd/dmd-2.055.ebuild b/dev-lang/dmd/dmd-2.055-r1.ebuild
index a5abb2d15..b09ba4ff6 100644
--- a/dev-lang/dmd/dmd-2.055.ebuild
+++ b/dev-lang/dmd/dmd-2.055-r1.ebuild
@@ -4,7 +4,7 @@
EAPI="4"
-inherit eutils multilib bash-completion
+inherit eutils multilib bash-completion-r1
DESCRIPTION="Reference compiler for the D programming language"
HOMEPAGE="http://www.digitalmars.com/d/"
@@ -94,7 +94,7 @@ DFLAGS=-I/usr/include/phobos2 -I/usr/include/druntime -L-L--no-warn-search-misma
EOF
insinto /etc
doins dmd.conf
- dobashcompletion "${FILESDIR}/${PN}.bashcomp"
+ dobashcomp "${FILESDIR}/${PN}.bashcomp"
# Compiler
dobin "dmd"
diff --git a/dev-lang/dmd/dmd-2.054.ebuild b/dev-lang/dmd/dmd-2.056.ebuild
index 1e499eb41..b09ba4ff6 100644
--- a/dev-lang/dmd/dmd-2.054.ebuild
+++ b/dev-lang/dmd/dmd-2.056.ebuild
@@ -4,7 +4,7 @@
EAPI="4"
-inherit eutils multilib bash-completion
+inherit eutils multilib bash-completion-r1
DESCRIPTION="Reference compiler for the D programming language"
HOMEPAGE="http://www.digitalmars.com/d/"
@@ -43,10 +43,6 @@ src_prepare() {
# misc patches for the build process
epatch "${FILESDIR}/${P}-makefile.patch"
-
- # fix the compile of an assembly file in druntime and the output of
- # DMD to produce binaries with no executable stack
- epatch "${FILESDIR}/${P}-no-execstack.patch"
}
src_compile() {
@@ -98,7 +94,7 @@ DFLAGS=-I/usr/include/phobos2 -I/usr/include/druntime -L-L--no-warn-search-misma
EOF
insinto /etc
doins dmd.conf
- dobashcompletion "${FILESDIR}/${PN}.bashcomp"
+ dobashcomp "${FILESDIR}/${PN}.bashcomp"
# Compiler
dobin "dmd"
diff --git a/dev-lang/dmd/files/dmd-2.056-makefile.patch b/dev-lang/dmd/files/dmd-2.056-makefile.patch
new file mode 100644
index 000000000..01474b732
--- /dev/null
+++ b/dev-lang/dmd/files/dmd-2.056-makefile.patch
@@ -0,0 +1,105 @@
+--- dmd2/src/dmd/posix.mak.orig 2011-09-08 05:10:14.000000000 +0200
++++ dmd2/src/dmd/posix.mak 2011-09-14 15:29:04.635180684 +0200
+@@ -29,7 +29,7 @@ C=backend
+ TK=tk
+ ROOT=root
+
+-MODEL=32
++MODEL?=32
+
+ ifeq (OSX,$(TARGET))
+ ## See: http://developer.apple.com/documentation/developertools/conceptual/cross_development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/20002000-1114311-BABGCAAB
+--- dmd2/src/druntime/posix.mak.orig 2011-09-01 21:22:06.000000000 +0200
++++ dmd2/src/druntime/posix.mak 2011-09-14 15:29:04.636180672 +0200
+@@ -20,21 +20,21 @@ ifeq (,$(OS))
+ endif
+ endif
+
+-DMD=dmd
++DMD?=dmd
+
+ DOCDIR=doc
+ IMPDIR=import
+
+-MODEL=32
++MODEL?=32
+
+ DFLAGS=-m$(MODEL) -O -release -inline -nofloat -w -d -Isrc -Iimport
+ UDFLAGS=-m$(MODEL) -O -release -nofloat -w -d -Isrc -Iimport
+
+ CFLAGS=-m$(MODEL) -O
+
+-OBJDIR=obj
++OBJDIR=obj$(MODEL)
+ DRUNTIME_BASE=druntime
+-DRUNTIME=lib/lib$(DRUNTIME_BASE).a
++DRUNTIME=lib$(MODEL)/lib$(DRUNTIME_BASE).a
+
+ DOCFMT=
+
+--- dmd2/src/phobos/etc/c/zlib/gzio.c.orig 2010-09-16 22:27:48.000000000 +0200
++++ dmd2/src/phobos/etc/c/zlib/gzio.c 2011-09-14 15:29:29.412870920 +0200
+@@ -8,6 +8,7 @@
+ /* @(#) $Id$ */
+
+ #include <stdio.h>
++#include <errno.h>
+
+ #include "zutil.h"
+
+--- dmd2/src/phobos/posix.mak.orig 2011-09-08 05:10:16.000000000 +0200
++++ dmd2/src/phobos/posix.mak 2011-09-14 15:29:04.638180648 +0200
+@@ -48,7 +48,7 @@ endif
+ DRUNTIME_PATH = ../druntime
+ ZIPFILE = phobos.zip
+ ROOT_OF_THEM_ALL = generated
+-ROOT = $(ROOT_OF_THEM_ALL)/$(OS)/$(BUILD)/$(MODEL)
++ROOT = $(ROOT_OF_THEM_ALL)/$(OS)/$(BUILD)$(MODEL)
+ # Documentation-related stuff
+ DOCSRC = ../d-programming-language.org
+ WEBSITE_DIR = ../web
+@@ -61,8 +61,6 @@ DDOCFLAGS=-m$(MODEL) -d -c -o- -version=
+
+ # Variable defined in an OS-dependent manner (see below)
+ CC =
+-DMD =
+-DDOC =
+ CFLAGS =
+ DFLAGS =
+
+@@ -75,7 +73,7 @@ MAKEFILE:=$(lastword $(MAKEFILE_LIST))
+
+ # Set DRUNTIME name and full path
+ ifeq (,$(findstring win,$(OS)))
+- DRUNTIME = $(DRUNTIME_PATH)/lib/libdruntime.a
++ DRUNTIME = $(DRUNTIME_PATH)/lib$(MODEL)/libdruntime.a
+ else
+ DRUNTIME = $(DRUNTIME_PATH)/lib/druntime.lib
+ endif
+@@ -83,14 +81,14 @@ endif
+ # Set CC and DMD
+ ifeq ($(OS),win32wine)
+ CC = wine dmc.exe
+- DMD = wine dmd.exe
++ DMD ?= wine dmd.exe
+ RUN = wine
+ else
+ ifeq ($(OS),win32remote)
+- DMD = ssh 206.125.170.138 "cd code/dmd/phobos && dmd"
++ DMD ?= ssh 206.125.170.138 "cd code/dmd/phobos && dmd"
+ CC = ssh 206.125.170.138 "cd code/dmd/phobos && dmc"
+ else
+- DMD = dmd
++ DMD ?= dmd
+ ifeq ($(OS),win32)
+ CC = dmc
+ else
+@@ -141,7 +139,7 @@ else
+ endif
+
+ # Set DDOC, the documentation generator
+-DDOC=dmd
++DDOC?=$(DMD)
+
+ # Set LIB, the ultimate target
+ ifeq (,$(findstring win,$(OS)))
diff --git a/dev-lang/dmd/files/dmd.bashcomp b/dev-lang/dmd/files/dmd.bashcomp
index f96437a97..fc6df0594 100644
--- a/dev-lang/dmd/files/dmd.bashcomp
+++ b/dev-lang/dmd/files/dmd.bashcomp
@@ -1,8 +1,4 @@
-_dmd_opts="$(dmd --help 2>&1 | sed -n 's/^\s*\(-\+\w*=*-*\).*/\1/p' | \
- sed 's/filename\|docdir\|directory\|path\|linkerflag\|objdir//g')"
-_ld_opts_dmd="$(ld --help 2>&1 | sed -n 's/.*\(--[-a-z0-9]\{1,\}\).*/-L\1/p')"
-_env_vars_dmd="$(printenv | cut -d = -f 1 | sort -u)"
-
+# bash completion for dmd
_filedir_dmd()
{
@@ -33,6 +29,11 @@ _filedir_dmd()
_dmd()
{
+ _dmd_opts="$(dmd --help 2>&1 | sed -n 's/^\s*\(-\+\w*=*-*\).*/\1/p' | \
+ sed 's/filename\|docdir\|directory\|path\|linkerflag\|objdir//g')"
+ _ld_opts_dmd="$(ld --help 2>&1 | sed -n 's/.*\(--[-a-z0-9]\{1,\}\).*/-L\1/p')"
+ _env_vars_dmd="$(printenv | cut -d = -f 1 | sort -u)"
+
COMPREPLY=()
local cur
_get_comp_words_by_ref -n = cur
@@ -47,7 +48,7 @@ _dmd()
COMPREPLY=( $( compgen -W "${_ld_opts_dmd}" -- ${cur} ) )
;;
-L*) # match linker options
- local opts=$(echo -e "-L-L\n-L--")
+ local opts=$(echo -e "-L-L\n-L--")
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
;;
-*) # match dmd options
@@ -98,8 +99,8 @@ _dmd()
L=$(echo -e "-cov${C}-fPIC${C}-gc${C}--help${C}-ignore\
${C}-inline${C}-lib${C}-m32${C}-m64${C}-man${C}-map\
${C}-noboundscheck${C}-nofloat${C}-O${C}-o-${C}-op\
- ${C}-profile${C}-property${C}-quiet${C}-release\
- ${C}-run${C}-unittest${C}-vtls${C}-wi" | sed 's: ::g')
+ ${C}-profile${C}-quiet${C}-release${C}-run${C}-unittest\
+ ${C}-vtls${C}-wi" | sed 's: ::g')
if test ${#COMPREPLY[@]} -eq 1 ;then
for I in ${L}
do
@@ -126,3 +127,11 @@ _dmd()
complete -F _dmd dmd
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh