[arch-commits] Commit in dtools/repos (6 files)

Михаил Страшун dicebot at archlinux.org
Sat Mar 28 20:09:55 UTC 2015


    Date: Saturday, March 28, 2015 @ 21:09:55
  Author: dicebot
Revision: 130175

archrelease: copy trunk to community-i686, community-x86_64

Added:
  dtools/repos/community-i686/PKGBUILD
    (from rev 130174, dtools/trunk/PKGBUILD)
  dtools/repos/community-i686/autodetect.diff
    (from rev 130174, dtools/trunk/autodetect.diff)
  dtools/repos/community-x86_64/PKGBUILD
    (from rev 130174, dtools/trunk/PKGBUILD)
  dtools/repos/community-x86_64/autodetect.diff
    (from rev 130174, dtools/trunk/autodetect.diff)
Deleted:
  dtools/repos/community-i686/PKGBUILD
  dtools/repos/community-x86_64/PKGBUILD

----------------------------------+
 /PKGBUILD                        |  118 +++++++++++++++++++++++++++++++++++++
 community-i686/PKGBUILD          |   56 -----------------
 community-i686/autodetect.diff   |   47 ++++++++++++++
 community-x86_64/PKGBUILD        |   56 -----------------
 community-x86_64/autodetect.diff |   47 ++++++++++++++
 5 files changed, 212 insertions(+), 112 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2015-03-28 20:09:39 UTC (rev 130174)
+++ community-i686/PKGBUILD	2015-03-28 20:09:55 UTC (rev 130175)
@@ -1,56 +0,0 @@
-# Maintainer: Mihails Strasunse <public at dicebot.lv>
-
-pkgname=('dtools')
-pkgver=2.067.0
-pkgrel=1
-pkgdesc="Ancilliary tools for the D programming language"
-license=("custom")
-groups=('dlang')
-arch=('i686' 'x86_64')
-url="http://www.dlang.org"
-# makedepends=('d-compiler' 'd-runtime' 'git')
-makedepends=('ldc' 'git')
-# depends=('d-runtime' 'curl')
-depends=('liblphobos')
-
-source=(
-    "git+http://github.com/D-Programming-Language/tools#tag=v$pkgver"
-    "git+https://github.com/Dicebot/Arch-PKGBUILDs.git"
-    "http://www.boost.org/LICENSE_1_0.txt"
-)
-sha1sums=(
-    'SKIP'
-    'SKIP'
-    '3cba29011be2b9d59f6204d6fa0a386b1b2dbd90'
-)
-
-build()
-{
-    # DMD=`$srcdir/Arch-PKGBUILDs/d-compiler.sh`
-    DMD=ldmd
-
-    cd $srcdir/tools
-
-    # rdmd is used to build others
-    $DMD -od. -ofdtools-rdmd rdmd.d
-
-    for tool in DustMite/dustmite ddemangle catdoc detab tolf dget; do
-        ./dtools-rdmd --compiler=$DMD --build-only -od. -ofdtools-`basename $tool` $tool.d
-    done
-}
-
-package()
-{
-    cd $srcdir/tools
-
-    mkdir -p $pkgdir/usr/bin
-    for tool in rdmd ddemangle catdoc detab tolf dget dustmite; do
-        install -m755 -t $pkgdir/usr/bin $pkgname-$tool
-    done
-
-    cd $pkgdir
-    ln -s dtools-rdmd usr/bin/rdmd
-    ln -s dtools-dustmite usr/bin/dustmite
-
-    install -Dm644 $srcdir/LICENSE_1_0.txt usr/share/licenses/$pkgname/LICENSE
-}

Copied: dtools/repos/community-i686/PKGBUILD (from rev 130174, dtools/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2015-03-28 20:09:55 UTC (rev 130175)
@@ -0,0 +1,59 @@
+# Maintainer: Mihails Strasunse <public at dicebot.lv>
+
+pkgname=('dtools')
+pkgver=2.067.0
+pkgrel=2
+pkgdesc="Ancilliary tools for the D programming language"
+license=("custom")
+groups=('dlang')
+arch=('i686' 'x86_64')
+url="http://www.dlang.org"
+# makedepends=('d-compiler' 'd-runtime' 'git')
+makedepends=('ldc' 'git')
+# depends=('d-runtime' 'curl')
+depends=('liblphobos')
+
+source=(
+    "git+http://github.com/D-Programming-Language/tools#tag=v$pkgver"
+    "git+https://github.com/Dicebot/Arch-PKGBUILDs.git"
+    "http://www.boost.org/LICENSE_1_0.txt"
+    "autodetect.diff"
+)
+sha1sums=(
+    'SKIP'
+    'SKIP'
+    '3cba29011be2b9d59f6204d6fa0a386b1b2dbd90'
+    '7fb5bd71d6c4e90c0ca49b292454e11169afdee8'
+)
+
+build()
+{
+    # DMD=`$srcdir/Arch-PKGBUILDs/d-compiler.sh`
+    DMD=ldmd
+
+    cd $srcdir/tools
+    git apply $srcdir/autodetect.diff
+
+    # rdmd is used to build others
+    $DMD -od. -ofdtools-rdmd rdmd.d
+
+    for tool in DustMite/dustmite ddemangle catdoc detab tolf dget; do
+        ./dtools-rdmd --compiler=$DMD --build-only -od. -ofdtools-`basename $tool` $tool.d
+    done
+}
+
+package()
+{
+    cd $srcdir/tools
+
+    mkdir -p $pkgdir/usr/bin
+    for tool in rdmd ddemangle catdoc detab tolf dget dustmite; do
+        install -m755 -t $pkgdir/usr/bin $pkgname-$tool
+    done
+
+    cd $pkgdir
+    ln -s dtools-rdmd usr/bin/rdmd
+    ln -s dtools-dustmite usr/bin/dustmite
+
+    install -Dm644 $srcdir/LICENSE_1_0.txt usr/share/licenses/$pkgname/LICENSE
+}

Copied: dtools/repos/community-i686/autodetect.diff (from rev 130174, dtools/trunk/autodetect.diff)
===================================================================
--- community-i686/autodetect.diff	                        (rev 0)
+++ community-i686/autodetect.diff	2015-03-28 20:09:55 UTC (rev 130175)
@@ -0,0 +1,47 @@
+diff --git a/rdmd.d b/rdmd.d
+index 5d66c9f..61fb86a 100644
+--- a/rdmd.d
++++ b/rdmd.d
+@@ -51,7 +51,32 @@ else version (LDC)
+ else
+     static assert(false, "Unknown compiler");
+ 
+-private string compiler = defaultCompiler;
++private string compiler;
++
++void chooseCompiler(ref string compiler)
++{
++    import std.stdio;
++
++    // if compiler is set explicitly, don't interefer
++    // otherwise find one that exists in PATH
++    if (!compiler.length)
++    {
++        import std.process : executeShell;
++        auto compilers = [ defaultCompiler, "dmd", "ldmd2", "gdmd2", "ldmd", "gdmd" ];   
++
++        foreach (candidate; compilers)
++        {
++            // dirty hack, no-arg dmd invocation will return 1
++            if (executeShell(candidate ~ "| grep Usage").status == 0)
++            {
++                compiler = candidate;
++                return;
++            }
++        }
++
++        throw new Exception("Couldn't find any D compiler");
++    }
++}
+ 
+ int main(string[] args)
+ {
+@@ -141,6 +166,8 @@ int main(string[] args)
+     if (bailout) return 0;
+     if (dryRun) chatty = true; // dry-run implies chatty
+ 
++    chooseCompiler(compiler);
++
+     /* Only -of is supported because Make is very susceptible to file names, and
+      * it doesn't do a good job resolving them. One option would be to use
+      * std.path.buildNormalizedPath(), but some corner cases will break, so it

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2015-03-28 20:09:39 UTC (rev 130174)
+++ community-x86_64/PKGBUILD	2015-03-28 20:09:55 UTC (rev 130175)
@@ -1,56 +0,0 @@
-# Maintainer: Mihails Strasunse <public at dicebot.lv>
-
-pkgname=('dtools')
-pkgver=2.067.0
-pkgrel=1
-pkgdesc="Ancilliary tools for the D programming language"
-license=("custom")
-groups=('dlang')
-arch=('i686' 'x86_64')
-url="http://www.dlang.org"
-# makedepends=('d-compiler' 'd-runtime' 'git')
-makedepends=('ldc' 'git')
-# depends=('d-runtime' 'curl')
-depends=('liblphobos')
-
-source=(
-    "git+http://github.com/D-Programming-Language/tools#tag=v$pkgver"
-    "git+https://github.com/Dicebot/Arch-PKGBUILDs.git"
-    "http://www.boost.org/LICENSE_1_0.txt"
-)
-sha1sums=(
-    'SKIP'
-    'SKIP'
-    '3cba29011be2b9d59f6204d6fa0a386b1b2dbd90'
-)
-
-build()
-{
-    # DMD=`$srcdir/Arch-PKGBUILDs/d-compiler.sh`
-    DMD=ldmd
-
-    cd $srcdir/tools
-
-    # rdmd is used to build others
-    $DMD -od. -ofdtools-rdmd rdmd.d
-
-    for tool in DustMite/dustmite ddemangle catdoc detab tolf dget; do
-        ./dtools-rdmd --compiler=$DMD --build-only -od. -ofdtools-`basename $tool` $tool.d
-    done
-}
-
-package()
-{
-    cd $srcdir/tools
-
-    mkdir -p $pkgdir/usr/bin
-    for tool in rdmd ddemangle catdoc detab tolf dget dustmite; do
-        install -m755 -t $pkgdir/usr/bin $pkgname-$tool
-    done
-
-    cd $pkgdir
-    ln -s dtools-rdmd usr/bin/rdmd
-    ln -s dtools-dustmite usr/bin/dustmite
-
-    install -Dm644 $srcdir/LICENSE_1_0.txt usr/share/licenses/$pkgname/LICENSE
-}

Copied: dtools/repos/community-x86_64/PKGBUILD (from rev 130174, dtools/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2015-03-28 20:09:55 UTC (rev 130175)
@@ -0,0 +1,59 @@
+# Maintainer: Mihails Strasunse <public at dicebot.lv>
+
+pkgname=('dtools')
+pkgver=2.067.0
+pkgrel=2
+pkgdesc="Ancilliary tools for the D programming language"
+license=("custom")
+groups=('dlang')
+arch=('i686' 'x86_64')
+url="http://www.dlang.org"
+# makedepends=('d-compiler' 'd-runtime' 'git')
+makedepends=('ldc' 'git')
+# depends=('d-runtime' 'curl')
+depends=('liblphobos')
+
+source=(
+    "git+http://github.com/D-Programming-Language/tools#tag=v$pkgver"
+    "git+https://github.com/Dicebot/Arch-PKGBUILDs.git"
+    "http://www.boost.org/LICENSE_1_0.txt"
+    "autodetect.diff"
+)
+sha1sums=(
+    'SKIP'
+    'SKIP'
+    '3cba29011be2b9d59f6204d6fa0a386b1b2dbd90'
+    '7fb5bd71d6c4e90c0ca49b292454e11169afdee8'
+)
+
+build()
+{
+    # DMD=`$srcdir/Arch-PKGBUILDs/d-compiler.sh`
+    DMD=ldmd
+
+    cd $srcdir/tools
+    git apply $srcdir/autodetect.diff
+
+    # rdmd is used to build others
+    $DMD -od. -ofdtools-rdmd rdmd.d
+
+    for tool in DustMite/dustmite ddemangle catdoc detab tolf dget; do
+        ./dtools-rdmd --compiler=$DMD --build-only -od. -ofdtools-`basename $tool` $tool.d
+    done
+}
+
+package()
+{
+    cd $srcdir/tools
+
+    mkdir -p $pkgdir/usr/bin
+    for tool in rdmd ddemangle catdoc detab tolf dget dustmite; do
+        install -m755 -t $pkgdir/usr/bin $pkgname-$tool
+    done
+
+    cd $pkgdir
+    ln -s dtools-rdmd usr/bin/rdmd
+    ln -s dtools-dustmite usr/bin/dustmite
+
+    install -Dm644 $srcdir/LICENSE_1_0.txt usr/share/licenses/$pkgname/LICENSE
+}

Copied: dtools/repos/community-x86_64/autodetect.diff (from rev 130174, dtools/trunk/autodetect.diff)
===================================================================
--- community-x86_64/autodetect.diff	                        (rev 0)
+++ community-x86_64/autodetect.diff	2015-03-28 20:09:55 UTC (rev 130175)
@@ -0,0 +1,47 @@
+diff --git a/rdmd.d b/rdmd.d
+index 5d66c9f..61fb86a 100644
+--- a/rdmd.d
++++ b/rdmd.d
+@@ -51,7 +51,32 @@ else version (LDC)
+ else
+     static assert(false, "Unknown compiler");
+ 
+-private string compiler = defaultCompiler;
++private string compiler;
++
++void chooseCompiler(ref string compiler)
++{
++    import std.stdio;
++
++    // if compiler is set explicitly, don't interefer
++    // otherwise find one that exists in PATH
++    if (!compiler.length)
++    {
++        import std.process : executeShell;
++        auto compilers = [ defaultCompiler, "dmd", "ldmd2", "gdmd2", "ldmd", "gdmd" ];   
++
++        foreach (candidate; compilers)
++        {
++            // dirty hack, no-arg dmd invocation will return 1
++            if (executeShell(candidate ~ "| grep Usage").status == 0)
++            {
++                compiler = candidate;
++                return;
++            }
++        }
++
++        throw new Exception("Couldn't find any D compiler");
++    }
++}
+ 
+ int main(string[] args)
+ {
+@@ -141,6 +166,8 @@ int main(string[] args)
+     if (bailout) return 0;
+     if (dryRun) chatty = true; // dry-run implies chatty
+ 
++    chooseCompiler(compiler);
++
+     /* Only -of is supported because Make is very susceptible to file names, and
+      * it doesn't do a good job resolving them. One option would be to use
+      * std.path.buildNormalizedPath(), but some corner cases will break, so it



More information about the arch-commits mailing list