diff options
author | root <root@rshg054.dnsready.net> | 2013-08-26 01:41:32 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-26 01:41:32 -0700 |
commit | 1d0d7aa1e250616385bce94b4d23f53b3d7b29e2 (patch) | |
tree | 1fe52c044982f2f66ae5b0045b7c5c5fae1f2f29 /community/ldc | |
parent | eed3b2a218be9aa9d9d8256f6b8ccd06d04b8804 (diff) |
Mon Aug 26 01:39:20 PDT 2013
Diffstat (limited to 'community/ldc')
-rw-r--r-- | community/ldc/PKGBUILD | 90 | ||||
-rw-r--r-- | community/ldc/ldc2.conf | 18 | ||||
-rw-r--r-- | community/ldc/ldc2.rebuild.conf | 2 |
3 files changed, 78 insertions, 32 deletions
diff --git a/community/ldc/PKGBUILD b/community/ldc/PKGBUILD index e03404d17..035275fed 100644 --- a/community/ldc/PKGBUILD +++ b/community/ldc/PKGBUILD @@ -1,47 +1,73 @@ -# $Id: PKGBUILD 92773 2013-06-15 01:02:41Z svenstaro $ -# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> -pkgname=ldc +# $Id: PKGBUILD 96332 2013-08-25 18:27:42Z dicebot $ +# Maintainer: Mihails Strasuns <public@dicebot.lv> +# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com> +pkgname=('ldc' 'liblphobos-devel') +groups=('dlang' 'dlang-ldc') pkgver=0.11.0 epoch=1 -pkgrel=1 +pkgrel=2 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') - -[[ $CARCH == "x86_64" ]] && _multilib="ON" -[[ $CARCH == "i686" ]] && _multilib="OFF" +source=("git://github.com/ldc-developers/ldc.git#tag=v${pkgver}" + "ldc2.conf" + "ldc2.rebuild.conf" + ) +sha1sums=('SKIP' + 'e4e2c9656a24a2433cfb00f792abdc247a845b46' + '0e6e5e072ccc006a200a8fc918cb1ebeb2e12b7b' + ) build() { - cd "$srcdir"/ldc - git submodule update --init --recursive - - mkdir build && cd build - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DINCLUDE_INSTALL_DIR=/usr/include/d/std-ldc \ - -DMULTILIB=$_multilib \ - .. - make + cd $srcdir/ldc + + 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" + ) + + # 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 + + # supplementaries + install -D -m644 $srcdir/ldc/bash_completion.d/ldc $pkgdir/usr/share/bash-completion/completions/ldc + + # licenses + install -D -m644 $srcdir/ldc/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE + + # 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 +} - cd build - make DESTDIR=$pkgdir install - cd .. +package_liblphobos-devel() { + depends=("ldc") - mkdir -p $pkgdir/usr/share/bash-completion/ - mv $pkgdir/etc/bash_completion.d $pkgdir/usr/share/bash-completion/completions + # 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 - install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE + # 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/ - # We don't actually want the multilib libs in this package - rm -rf $pkgdir/usr/lib32 + # licenses + install -D -m644 $srcdir/ldc/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE } diff --git a/community/ldc/ldc2.conf b/community/ldc/ldc2.conf new file mode 100644 index 000000000..8fe82063c --- /dev/null +++ b/community/ldc/ldc2.conf @@ -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" + ]; +}; diff --git a/community/ldc/ldc2.rebuild.conf b/community/ldc/ldc2.rebuild.conf new file mode 100644 index 000000000..e9683d1ee --- /dev/null +++ b/community/ldc/ldc2.rebuild.conf @@ -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 |