From 498a0c611d32136b93b30c6954fd27960b400ecf Mon Sep 17 00:00:00 2001 From: "Marco Leise (mleise)" Date: Thu, 16 Feb 2012 20:09:52 +0000 Subject: dev-lang/dmd: version bump; changed to new upstream way of compiling 32-bit and 64-bit in one source tree; optionally installs pre-compiled, bundled tools svn path=/sunrise/; revision=12757 --- dev-lang/dmd/ChangeLog | 10 +- dev-lang/dmd/Manifest | 11 +- dev-lang/dmd/Manifest.edited | 25 +++++ dev-lang/dmd/dmd-2.055-r1.ebuild | 151 ------------------------- dev-lang/dmd/dmd-2.058.ebuild | 167 ++++++++++++++++++++++++++++ dev-lang/dmd/files/dmd-2.055-makefile.patch | 105 ----------------- dev-lang/dmd/files/dmd-2.058-makefile.patch | 80 +++++++++++++ dev-lang/dmd/metadata.xml | 3 +- 8 files changed, 289 insertions(+), 263 deletions(-) create mode 100644 dev-lang/dmd/Manifest.edited delete mode 100644 dev-lang/dmd/dmd-2.055-r1.ebuild create mode 100644 dev-lang/dmd/dmd-2.058.ebuild delete mode 100644 dev-lang/dmd/files/dmd-2.055-makefile.patch create mode 100644 dev-lang/dmd/files/dmd-2.058-makefile.patch (limited to 'dev-lang') diff --git a/dev-lang/dmd/ChangeLog b/dev-lang/dmd/ChangeLog index ad571eb6a..72967bed6 100644 --- a/dev-lang/dmd/ChangeLog +++ b/dev-lang/dmd/ChangeLog @@ -1,7 +1,15 @@ # ChangeLog for dev-lang/dmd -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*dmd-2.058 (16 Feb 2012) + + 16 Feb 2012; Marco Leise (mleise) -dmd-2.055-r1.ebuild, + -files/dmd-2.055-makefile.patch, +dmd-2.058.ebuild, + +files/dmd-2.058-makefile.patch, +Manifest.edited, metadata.xml: + version bump; changed to new upstream way of compiling 32-bit and 64-bit in + one source tree; optionally installs pre-compiled, bundled tools + *dmd-1.066 (23 Dec 2011) 23 Dec 2011; hasufell +dmd-1.066.ebuild, diff --git a/dev-lang/dmd/Manifest b/dev-lang/dmd/Manifest index 97eec8ca3..4cfaab89d 100644 --- a/dev-lang/dmd/Manifest +++ b/dev-lang/dmd/Manifest @@ -1,17 +1,18 @@ AUX dmd-1.066-makefile.patch 16530 RMD160 b7196c46933dc0493a69340743fa74cbe48da20b SHA1 65960f6613393f35366da80767f39625eda246eb SHA256 df0c6db1578747b9cc5bbc9ccb14ab53599d7e2456d68f60d40ee98daa61dbb6 -AUX dmd-2.055-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477 AUX dmd-2.056-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477 AUX dmd-2.057-makefile.patch 2727 RMD160 64d9ea8c7172e6297d4f76bf92a9b274b922882f SHA1 4cee7d9ae5a582b6af4e76a23feec47404447ee0 SHA256 54d25d5715457b90908f6d9642cd10c23f56fa9a9f1db7874b08a69a209d7a5a +AUX dmd-2.058-makefile.patch 2081 RMD160 e2951100f37f18d701e9d2e5991c2659a7a89b3b SHA1 2a7439aa75388ca536a171d3668651d7c648d14c SHA256 930e7ccf958cfa2192939fdb476d42f1f44d3df7417730dd98382b88d4a18c17 AUX dmd.bashcomp 4486 RMD160 9d68ac6e7df0d6698decbcdf49b6b1625aa05546 SHA1 06fc9eb9e9a9070e5e0a13c046abfc5648319b34 SHA256 b679b0c676035eda48948eeb6c2a8184c6effdc97d8c98d1ca4b071f345e4ac6 AUX slot-compat.patch 376 RMD160 f8a2770f6994ebf056e40bbb6ecc6fd3cbec798e SHA1 6e25821964199378f568c601bbdf18c2ad1d7d00 SHA256 d9f1f19b158c3cc52e133751e834460b12a0fa003192d50ba40421bf9ff56763 AUX stackelf.patch 3527 RMD160 efa17b66952649e0fa64bb7fe73f58f7c01c6d4d SHA1 e723fefaaaa35122cc45b3882cea17b499fc9926 SHA256 56835f1bb5b5f33edbb2bdf650bdb9e459f3670db205b2aeb0a367a868517a96 DIST dmd.1.066.zip 8958349 RMD160 c65c32750b1bce9192d955f392de70ddf9667023 SHA1 9197d0a4ffda2021e860396e9a1c7f9225b678d8 SHA256 26c421fdeaa3f81397cb9be858b8829eb01ebe11d6874c133b2ba2de249775fb -DIST dmd.2.055.zip 17137571 RMD160 c418324817e7d44bc76468e6d5e79089c82ca367 SHA1 13fb220db783cb47ad4cf3614d389894e92745c6 SHA256 11901f541ab3cce2ea245c1f609f456996eab1922c976483750c90d99c49816b DIST dmd.2.056.zip 19678819 RMD160 d323972e326c113b8976a494d783389f8999c34a SHA1 1b0c80c1415b9fb22e992c6c8dcb5b40674cccfb SHA256 22aea9e97f271cf64fbcb71458fa3454b6eef4bb5a2ed7061f753a4e91c9f515 DIST dmd.2.057.zip 21798644 RMD160 e1d5e80c935123373a2fc037cc6118bc12e0503b SHA1 8b3124206669c7285b8081aa745187e27d3d01c7 SHA256 424878440f36a74a31486dd69ef154cc938307ae78b25b7fa4a9296c54436d1b +DIST dmd.2.058.zip 26266462 RMD160 63a67a91ae887a5eadc683e9ed70cfb9121602d5 SHA1 a8324d2c5da0616f609bd7dd4f3457bdff405fd2 SHA256 3bbfebf8d1288f6a6f021814680e77f0287fff45436dfe8e86117371d5557fea EBUILD dmd-1.066.ebuild 2252 RMD160 70fe6d6bfb5ccba7018a0665364e58f5f5fa0296 SHA1 c061eff99d6df75234439ea49d7ad4cfffd5f9fe SHA256 36f7f66aca610cbd15c22d8f1da4b99eea5f506c5fabc84b161a07b90683d889 -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 EBUILD dmd-2.057.ebuild 3963 RMD160 f857cc63b917b154510687edb33fa8d9d6dcaa3e SHA1 fbcb3f0fc0e2bc907e059e9b884d88e77ce797be SHA256 61d094d8fdce5606d471321f50ac1879066485f597bd5ab5227e8b0ca10fe0a4 -MISC ChangeLog 1412 RMD160 d6ba6edc9607e55640dacc9898dcf785a16d45cf SHA1 b290dd92b4a9c38ccf737ebac095e580dff738fc SHA256 98b847fd4ced2940deebedde40d8d617eca4cca138befdf778904d02e474d19d -MISC metadata.xml 332 RMD160 c37d44264a461109c3140ee764a96c40dd8c9826 SHA1 355e7fdc8d61d7b156ebe27f05ba184b64438e18 SHA256 ca3965824cec545a7ba488604bd8ac54a80035fe1b17d3984e4bcc454d60fbe6 +EBUILD dmd-2.058.ebuild 4367 RMD160 e2fe0e9bc1119ddc9c18b07a1d1f2098dfc47a3a SHA1 f31b57af2191ccdc7a31e200e7e17f3d5ec043e7 SHA256 779496298f67daf17f395efe8aff371bd44b445da9e99d04cd0018c3589311c6 +MISC ChangeLog 1784 RMD160 91d61a7b8592d8638973893e3106807902d90e46 SHA1 038e6f4280a457564a4ef4a0eb70bcb9d5564f9b SHA256 4355e0490850afb8e0674059095b918529b29cc7840dbf1a8b768a71493d9132 +MISC Manifest.edited 3767 RMD160 131290aca493aa0b3afa8b84b702f9e437b0985a SHA1 4f9f909d3c2606e42f73090623fd04b93ceb2907 SHA256 a15e020f4751b64276ac98190e0ea1f9fa68355352ecd44a2ef9c995ca034521 +MISC metadata.xml 377 RMD160 5d6a0b9eb68275408943f0805dac078ecb41afee SHA1 3fa2a4ed5043b4a3c3ae317927b4598ba91e419c SHA256 5edc28143917c389d89a0af6623313c5f7ef81bf55dba92b39c611014fa6ed9e diff --git a/dev-lang/dmd/Manifest.edited b/dev-lang/dmd/Manifest.edited new file mode 100644 index 000000000..74a3fb498 --- /dev/null +++ b/dev-lang/dmd/Manifest.edited @@ -0,0 +1,25 @@ +AUX dmd-1.066-makefile.patch 16530 RMD160 b7196c46933dc0493a69340743fa74cbe48da20b SHA1 65960f6613393f35366da80767f39625eda246eb SHA256 df0c6db1578747b9cc5bbc9ccb14ab53599d7e2456d68f60d40ee98daa61dbb6 +AUX dmd-2.055-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477 +AUX dmd-2.056-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477 +AUX dmd-2.057-makefile.patch 2727 RMD160 64d9ea8c7172e6297d4f76bf92a9b274b922882f SHA1 4cee7d9ae5a582b6af4e76a23feec47404447ee0 SHA256 54d25d5715457b90908f6d9642cd10c23f56fa9a9f1db7874b08a69a209d7a5a +AUX dmd.bashcomp 4486 RMD160 9d68ac6e7df0d6698decbcdf49b6b1625aa05546 SHA1 06fc9eb9e9a9070e5e0a13c046abfc5648319b34 SHA256 b679b0c676035eda48948eeb6c2a8184c6effdc97d8c98d1ca4b071f345e4ac6 +<<<<<<< .mine +DIST dmd.1.066.zip 8958349 RMD160 c65c32750b1bce9192d955f392de70ddf9667023 SHA1 9197d0a4ffda2021e860396e9a1c7f9225b678d8 SHA256 26c421fdeaa3f81397cb9be858b8829eb01ebe11d6874c133b2ba2de249775fb +======= +AUX slot-compat.patch 376 RMD160 f8a2770f6994ebf056e40bbb6ecc6fd3cbec798e SHA1 6e25821964199378f568c601bbdf18c2ad1d7d00 SHA256 d9f1f19b158c3cc52e133751e834460b12a0fa003192d50ba40421bf9ff56763 +AUX stackelf.patch 3527 RMD160 efa17b66952649e0fa64bb7fe73f58f7c01c6d4d SHA1 e723fefaaaa35122cc45b3882cea17b499fc9926 SHA256 56835f1bb5b5f33edbb2bdf650bdb9e459f3670db205b2aeb0a367a868517a96 +DIST dmd.1.066.zip 8958349 RMD160 c65c32750b1bce9192d955f392de70ddf9667023 SHA1 9197d0a4ffda2021e860396e9a1c7f9225b678d8 SHA256 26c421fdeaa3f81397cb9be858b8829eb01ebe11d6874c133b2ba2de249775fb +>>>>>>> .r12755 +DIST dmd.2.055.zip 17137571 RMD160 c418324817e7d44bc76468e6d5e79089c82ca367 SHA1 13fb220db783cb47ad4cf3614d389894e92745c6 SHA256 11901f541ab3cce2ea245c1f609f456996eab1922c976483750c90d99c49816b +DIST dmd.2.056.zip 19678819 RMD160 d323972e326c113b8976a494d783389f8999c34a SHA1 1b0c80c1415b9fb22e992c6c8dcb5b40674cccfb SHA256 22aea9e97f271cf64fbcb71458fa3454b6eef4bb5a2ed7061f753a4e91c9f515 +DIST dmd.2.057.zip 21798644 RMD160 e1d5e80c935123373a2fc037cc6118bc12e0503b SHA1 8b3124206669c7285b8081aa745187e27d3d01c7 SHA256 424878440f36a74a31486dd69ef154cc938307ae78b25b7fa4a9296c54436d1b +<<<<<<< .mine +EBUILD dmd-1.066.ebuild 2556 RMD160 45089660fcbfedeca2aa0c7d60a1b1c627e62ad8 SHA1 3b739ed153bb20d5a274ceaf2f018c68a58ac539 SHA256 7ad2238df8188378210c08e96d3d37c348525a81e0bef713075c327a98ff6043 +======= +EBUILD dmd-1.066.ebuild 2252 RMD160 70fe6d6bfb5ccba7018a0665364e58f5f5fa0296 SHA1 c061eff99d6df75234439ea49d7ad4cfffd5f9fe SHA256 36f7f66aca610cbd15c22d8f1da4b99eea5f506c5fabc84b161a07b90683d889 +>>>>>>> .r12755 +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 +EBUILD dmd-2.057.ebuild 3963 RMD160 f857cc63b917b154510687edb33fa8d9d6dcaa3e SHA1 fbcb3f0fc0e2bc907e059e9b884d88e77ce797be SHA256 61d094d8fdce5606d471321f50ac1879066485f597bd5ab5227e8b0ca10fe0a4 +MISC ChangeLog 1412 RMD160 d6ba6edc9607e55640dacc9898dcf785a16d45cf SHA1 b290dd92b4a9c38ccf737ebac095e580dff738fc SHA256 98b847fd4ced2940deebedde40d8d617eca4cca138befdf778904d02e474d19d +MISC metadata.xml 332 RMD160 c37d44264a461109c3140ee764a96c40dd8c9826 SHA1 355e7fdc8d61d7b156ebe27f05ba184b64438e18 SHA256 ca3965824cec545a7ba488604bd8ac54a80035fe1b17d3984e4bcc454d60fbe6 diff --git a/dev-lang/dmd/dmd-2.055-r1.ebuild b/dev-lang/dmd/dmd-2.055-r1.ebuild deleted file mode 100644 index b09ba4ff6..000000000 --- a/dev-lang/dmd/dmd-2.055-r1.ebuild +++ /dev/null @@ -1,151 +0,0 @@ -# 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" - -# DMD supports amd64/x86 exclusively -KEYWORDS="-* ~amd64 ~x86" -SLOT="2" -IUSE="multilib doc examples" - -# License doesn't allow redistribution -LICENSE="DMD" -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" -} - -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() { - local DFLAGS="-Iphobos -Idruntime/import -L-lrt" - local 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/* - - docompress -x /usr/share/doc/${PF}/samples/ - insinto /usr/share/doc/${PF}/samples/ - if use examples; then - doins -r ../samples/d/* - 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 - - # imports - insinto /usr/include/druntime/ - doins -r druntime/import/* - - insinto /usr/include/phobos2 - doins -r phobos/* -} - -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.058.ebuild b/dev-lang/dmd/dmd-2.058.ebuild new file mode 100644 index 000000000..c9ae4f769 --- /dev/null +++ b/dev-lang/dmd/dmd-2.058.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2012 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" + +# DMD supports amd64/x86 exclusively +KEYWORDS="-* ~amd64 ~x86" +SLOT="2" +IUSE="multilib doc examples tools" + +# License doesn't allow redistribution +LICENSE="DMD" +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 README.TXT windows freebsd osx linux/{lib32,lib64} \ + linux/{bin32,bin64}/{README.TXT,dmd,dmd.conf} \ + || 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" +} + +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() { + local DFLAGS="-Iphobos -Idruntime/import -L-lrt" + local 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--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 tools; then + doman ../man/man1/dumpobj.1 + doman ../man/man1/obj2asm.1 + doman ../man/man1/rdmd.1 + + # Bundled pre-compiled tools + if use amd64; then + dobin ../linux/bin64/{dumpobj,obj2asm,rdmd} + fi + if use x86; then + dobin ../linux/bin32/{dumpobj,obj2asm,rdmd} + fi + fi + + docompress -x /usr/share/doc/${PF}/samples/ + insinto /usr/share/doc/${PF}/samples/ + if use examples; then + doins -r ../samples/d/* + fi + + # druntime & Phobos + if use amd64; then + newlib.a "druntime/lib/libdruntime-linux64.a" "libdruntime.a" + dolib.a "phobos/generated/linux/release/64/libphobos2.a" + fi + if use x86 || (use amd64 && use multilib); then + use amd64 && multilib_toolchain_setup x86 + newlib.a "druntime/lib/libdruntime-linux32.a" "libdruntime.a" + dolib.a "phobos/generated/linux/release/32/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 + + # imports + insinto /usr/include/druntime/ + doins -r druntime/import/* + + insinto /usr/include/phobos2 + doins -r phobos/* +} + +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/files/dmd-2.055-makefile.patch b/dev-lang/dmd/files/dmd-2.055-makefile.patch deleted file mode 100644 index 01474b732..000000000 --- a/dev-lang/dmd/files/dmd-2.055-makefile.patch +++ /dev/null @@ -1,105 +0,0 @@ ---- 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 -+#include - - #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-2.058-makefile.patch b/dev-lang/dmd/files/dmd-2.058-makefile.patch new file mode 100644 index 000000000..6a14b9bf8 --- /dev/null +++ b/dev-lang/dmd/files/dmd-2.058-makefile.patch @@ -0,0 +1,80 @@ +diff -Nur src/dmd/posix.mak src.new/dmd/posix.mak +--- src/dmd/posix.mak 2012-02-14 22:49:44.000000000 +0100 ++++ src.new/dmd/posix.mak 2012-02-16 17:25:53.583285148 +0100 +@@ -29,7 +29,7 @@ + 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 +diff -Nur src/druntime/posix.mak src.new/druntime/posix.mak +--- src/druntime/posix.mak 2012-02-07 22:44:58.000000000 +0100 ++++ src.new/druntime/posix.mak 2012-02-16 17:26:44.912643441 +0100 +@@ -20,12 +20,12 @@ + 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 -property + UDFLAGS=-m$(MODEL) -O -release -nofloat -w -d -Isrc -Iimport -property +diff -Nur src/phobos/etc/c/zlib/gzio.c src.new/phobos/etc/c/zlib/gzio.c +--- src/phobos/etc/c/zlib/gzio.c 2012-02-16 17:01:01.525938431 +0100 ++++ src.new/phobos/etc/c/zlib/gzio.c 2012-02-16 16:32:35.975260749 +0100 +@@ -8,6 +8,7 @@ + /* @(#) $Id$ */ + + #include ++#include + + #include "zutil.h" + +diff -Nur src/phobos/posix.mak src.new/phobos/posix.mak +--- src/phobos/posix.mak 2012-02-14 22:49:46.000000000 +0100 ++++ src.new/phobos/posix.mak 2012-02-16 17:30:58.843468871 +0100 +@@ -61,8 +61,6 @@ + + # Variable defined in an OS-dependent manner (see below) + CC = +-DMD = +-DDOC = + CFLAGS = + DFLAGS = + +@@ -83,14 +81,14 @@ + # 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 @@ + 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/metadata.xml b/dev-lang/dmd/metadata.xml index d96ab388b..a0633955f 100644 --- a/dev-lang/dmd/metadata.xml +++ b/dev-lang/dmd/metadata.xml @@ -6,6 +6,7 @@ - Install optional tools, leave disabled if you use "dmd-common" from d-overlay + Install optional, precompiled tools (rdmd, obj2asm and dumpobj); + leave disabled if you use "dmd-common" from d-overlay -- cgit v1.2.3-18-g5258