[arch-commits] Commit in ldc/trunk (PKGBUILD ldc2.conf ldc2.rebuild.conf)

Михаил Страшун dicebot at nymeria.archlinux.org
Sun Aug 25 17:56:29 UTC 2013


    Date: Sunday, August 25, 2013 @ 19:56:29
  Author: dicebot
Revision: 96329

upgpkg: ldc 1:0.11.0-1

ldc has been split into compiler package and development library package. Naming/paths match dmd style

Added:
  ldc/trunk/ldc2.conf
  ldc/trunk/ldc2.rebuild.conf
Modified:
  ldc/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   84 ++++++++++++++++++++++++++++++++++------------------
 ldc2.conf         |   18 +++++++++++
 ldc2.rebuild.conf |    2 +
 3 files changed, 75 insertions(+), 29 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-08-25 17:44:32 UTC (rev 96328)
+++ PKGBUILD	2013-08-25 17:56:29 UTC (rev 96329)
@@ -1,47 +1,73 @@
 # $Id$
-# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
-pkgname=ldc
+# Maintainer: Mihails Strasuns <public at dicebot.lv>
+# Contributor: Sven-Hendrik Haase <sh at lutzhaase.com>
+pkgname=('ldc' 'liblphobos-devel')
+groups=('dlang' 'dlang-ldc')
 pkgver=0.11.0
 epoch=1
 pkgrel=1
 pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2"
 arch=('i686' 'x86_64')
-url="http://www.dsource.org/projects/ldc"
+url="https://github.com/ldc-developers/ldc"
 license=('BSD')
-depends=('llvm' 'libconfig')
-makedepends=('git' 'cmake')
+depends=('libconfig')
+makedepends=('git' 'cmake' 'llvm')
 backup=('etc/ldc2.conf')
-source=("git://github.com/ldc-developers/ldc.git#tag=v${pkgver}")
-sha1sums=('SKIP')
+source=("git://github.com/ldc-developers/ldc.git#tag=v${pkgver}"
+        "ldc2.conf"
+        "ldc2.rebuild.conf"
+       )
+sha1sums=('SKIP'
+          'e4e2c9656a24a2433cfb00f792abdc247a845b46'
+          '0e6e5e072ccc006a200a8fc918cb1ebeb2e12b7b'
+         )
 
-[[ $CARCH == "x86_64" ]] && _multilib="ON"
-[[ $CARCH == "i686" ]] && _multilib="OFF"
-
 build() {
-  cd "$srcdir"/ldc
-  git submodule update --init --recursive
+    cd $srcdir/ldc
 
-  mkdir build && cd build
-  cmake \
-      -DCMAKE_INSTALL_PREFIX=/usr \
-      -DINCLUDE_INSTALL_DIR=/usr/include/d/std-ldc \
-      -DMULTILIB=$_multilib \
-      ..
-  make
+    git submodule update --init --recursive
+
+    mkdir build && cd build
+    cmake \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DINCLUDE_INSTALL_DIR=/usr/include/dlang/ldc \
+    ..
+    make
 }
 
-package() {
-  cd "$srcdir"/ldc
+package_ldc() {
+    optdepends=("liblphobos-devel: stadard library, static one + imports, LDC version")
+    backup=("etc/ldc2.conf"
+            "etc/ldc2.rebuild.conf"
+           )
 
-  cd build
-  make DESTDIR=$pkgdir install
-  cd ..
+    # binaries
+    install -D -m755 $srcdir/ldc/build/bin/ldmd2 $pkgdir/usr/bin/ldmd2 
+    install -D -m755 $srcdir/ldc/build/bin/ldc2 $pkgdir/usr/bin/ldc2 
 
-  mkdir -p $pkgdir/usr/share/bash-completion/
-  mv $pkgdir/etc/bash_completion.d $pkgdir/usr/share/bash-completion/completions
+    # supplementaries
+    install -D -m644 $srcdir/ldc/bash_completion.d/ldc $pkgdir/usr/share/bash-completion/completions/ldc
 
-  install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+    # licenses
+    install -D -m644 $srcdir/ldc/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE    
 
-  # We don't actually want the multilib libs in this package
-  rm -rf $pkgdir/usr/lib32
+    # default configuration files
+    install -D -m644 $srcdir/ldc2.conf $pkgdir/etc/ldc2.conf
+    install -D -m644 $srcdir/ldc2.rebuild.conf $pkgdir/etc/ldc2.rebuild.conf
 }
+
+package_liblphobos-devel() {
+    depends=("ldc")
+
+    # libraries
+    install -D -m644 $srcdir/ldc/build/lib/libphobos-ldc.a $pkgdir/usr/lib/liblphobos.a
+    install -D -m644 $srcdir/ldc/build/lib/libphobos-ldc-debug.a $pkgdir/usr/lib/liblphobos-debug.a
+
+    # imports
+    mkdir -p $pkgdir/usr/include/dlang/ldc
+    cp -r $srcdir/ldc/build/import/* $pkgdir/usr/include/dlang/ldc/
+    cp -r $srcdir/ldc/runtime/phobos/std $pkgdir/usr/include/dlang/ldc/
+
+    # licenses
+    install -D -m644 $srcdir/ldc/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE    
+}

Added: ldc2.conf
===================================================================
--- ldc2.conf	                        (rev 0)
+++ ldc2.conf	2013-08-25 17:56:29 UTC (rev 96329)
@@ -0,0 +1,18 @@
+// This configuration file uses libconfig.
+// See http://www.hyperrealm.com/libconfig/ for syntax details.
+
+// The default group is required
+default:
+{
+    // 'switches' holds array of string that are appends to the command line
+    // arguments before they are parsed.
+    switches = [
+        "-I/usr/include/dlang/ldc/ldc",
+        "-I/usr/include/dlang/ldc",
+        "-L-L/usr/lib", 
+        "-L-L/usr/lib32",
+        "-L--no-warn-search-mismatch",
+        "-defaultlib=lphobos",
+        "-debuglib=lphobos-debug"
+    ];
+};

Added: ldc2.rebuild.conf
===================================================================
--- ldc2.rebuild.conf	                        (rev 0)
+++ ldc2.rebuild.conf	2013-08-25 17:56:29 UTC (rev 96329)
@@ -0,0 +1,2 @@
+[Environment]
+DFLAGS=-I-I/usr/include/dlang/ldc/ldc -I/usr/include/dlang/ldc -L-L/usr/lib -defaultlib=lphobos -debuglib=lphobos-debug




More information about the arch-commits mailing list