[arch-commits] Commit in ldc/trunk (PKGBUILD ldc2.conf)
Dan Printzell
wild at archlinux.org
Tue Oct 31 00:42:00 UTC 2017
Date: Tuesday, October 31, 2017 @ 00:41:58
Author: wild
Revision: 264829
upgpkg: ldc 1:1.5.0-1
Updated to 1.5.0 and made PKGBUILD better (fixes FS#55692)
Modified:
ldc/trunk/PKGBUILD
ldc/trunk/ldc2.conf
-----------+
PKGBUILD | 74 ++++++++++++++++++++++++++++++------------------------------
ldc2.conf | 7 +----
2 files changed, 40 insertions(+), 41 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-10-30 22:31:17 UTC (rev 264828)
+++ PKGBUILD 2017-10-31 00:41:58 UTC (rev 264829)
@@ -5,8 +5,8 @@
pkgname=('ldc' 'liblphobos')
groups=('dlang' 'dlang-ldc')
-pkgver=1.4.0
-_pkgcommit=5a79ff6abc882dd076d1a862911de288cc4ae3cd
+pkgver=1.5.0
+_pkgcommit=8f4027fa0019adcf916d5178dd919d51b3f9121f
epoch=1
pkgrel=1
pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2"
@@ -17,9 +17,9 @@
source=(
"git+https://github.com/ldc-developers/ldc#commit=$_pkgcommit"
- "git+https://github.com/ldc-developers/druntime.git"
- "git+https://github.com/ldc-developers/phobos.git"
- "git+https://github.com/ldc-developers/dmd-testsuite.git"
+ "git+https://github.com/ldc-developers/druntime.git"
+ "git+https://github.com/ldc-developers/phobos.git"
+ "git+https://github.com/ldc-developers/dmd-testsuite.git"
"ldc2.conf"
)
@@ -27,26 +27,25 @@
'SKIP'
'SKIP'
'SKIP'
- '266c1888da29715b277c2f56090b2e6dbb7531499f3434fe60938d6ad01705ae')
+ '42e540f15f0d2c561a9c576903e0e84b8cd5274aa9679364b5cf211ddd1b12df')
prepare() {
- cd "$srcdir/ldc"
+ cd "$srcdir/ldc"
- git submodule init
- git config submodule.druntime.url "$srcdir/druntime"
- git config submodule.phobos.url "$srcdir/phobos"
- git config submodule.tests/d2/dmd-testsuite.url "$srcdir/dmd-testsuite"
- git submodule update
+ git submodule init
+ git config submodule.druntime.url "$srcdir/druntime"
+ git config submodule.phobos.url "$srcdir/phobos"
+ git config submodule.tests/d2/dmd-testsuite.url "$srcdir/dmd-testsuite"
+ git submodule update
}
build() {
- mkdir -p "$srcdir/tmp_install_dir"
cd "$srcdir/ldc"
mkdir -p build && cd build
# workaround for wrong ld flag format generated by cmake:
- export LDFLAGS="-L-O1 -L--sort-common -L--as-needed -L-z -Lrelro"
+ # export LDFLAGS="-L-O1 -L--sort-common -L--as-needed -L-z -Lrelro"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -54,10 +53,9 @@
-DCMAKE_SKIP_RPATH=ON \
-DINCLUDE_INSTALL_DIR=/usr/include/dlang/ldc \
-DBUILD_SHARED_LIBS=ON \
- -DLDC_WITH_LLD=OFF \
+ -DLDC_WITH_LLD=OFF \
..
make
- make install DESTDIR="$srcdir/tmp_install_dir"
}
package_ldc() {
@@ -65,17 +63,26 @@
backup=('etc/ldc2.conf')
provides=('d-compiler')
- cd "$srcdir/tmp_install_dir"
+ cd "$srcdir/ldc/build"
+ make install DESTDIR="$pkgdir"
- # binaries
- install -D -m755 ./usr/bin/ldmd2 "$pkgdir/usr/bin/ldmd"
- ln -s /usr/bin/ldmd "$pkgdir/usr/bin/ldmd2"
- install -D -m755 ./usr/bin/ldc2 "$pkgdir/usr/bin/ldc"
- ln -s /usr/bin/ldc "$pkgdir/usr/bin/ldc2"
+ # move bash-completion
+ mkdir -p "$pkgdir/usr/share/bash-completion/completions/"
+ mv "$pkgdir/etc/bash_completion.d/ldc2" "$pkgdir/usr/share/bash-completion/completions/"
+ rm -rf "$pkgdir/etc/bash_completion.d"
- # supplementaries
- install -D -m644 "$srcdir/ldc/bash_completion.d/ldc2" "$pkgdir/usr/share/bash-completion/completions/ldc"
+ # remove liblphobos files
+ rm -rf "$pkgdir/usr/include"
+ rm -rf "$pkgdir/usr/lib"
+ # remove misc
+ rm -rf "$pkgdir/usr/bin/ldc-build-runtime"
+
+ # symlinks
+ ln -s /usr/share/bash-completion/completions/ldc2 "$pkgdir/usr/share/bash-completion/completions/ldc"
+ ln -s /usr/bin/ldc2 "$pkgdir/usr/bin/ldc"
+ ln -s /usr/bin/ldmd2 "$pkgdir/usr/bin/ldmd"
+
# licenses
install -D -m644 "$srcdir/ldc/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
@@ -87,18 +94,13 @@
provides=('d-runtime' 'd-stdlib')
depends=('curl')
+ cd "$srcdir/ldc/build"
+ make install DESTDIR="$pkgdir"
+
+ # remove ldc files
+ rm -rf "$pkgdir/usr/bin/"
+ rm -rf "$pkgdir/etc/"
+
# licenses
install -D -m644 "$srcdir/ldc/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-
- cd "$srcdir/tmp_install_dir"
-
- # libraries
- install -D -m644 ./usr/lib/libphobos2-ldc.so "$pkgdir/usr/lib/liblphobos2.so"
- install -D -m644 ./usr/lib/libdruntime-ldc.so "$pkgdir/usr/lib/libldruntime.so"
- install -D -m644 ./usr/lib/libphobos2-ldc-debug.so "$pkgdir/usr/lib/liblphobos2-debug.so"
- install -D -m644 ./usr/lib/libdruntime-ldc-debug.so "$pkgdir/usr/lib/libldruntime-debug.so"
-
- # imports
- mkdir -p "$pkgdir/usr/include/dlang"
- cp -r "./usr/include/dlang/ldc" "$pkgdir/usr/include/dlang/ldc"
}
Modified: ldc2.conf
===================================================================
--- ldc2.conf 2017-10-30 22:31:17 UTC (rev 264828)
+++ ldc2.conf 2017-10-31 00:41:58 UTC (rev 264829)
@@ -8,15 +8,12 @@
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=lphobos2,ldruntime",
- "-debuglib=lphobos2-debug,ldruntime-debug"
+ "-defaultlib=phobos2-ldc,druntime-ldc",
+ "-debuglib=phobos2-ldc-debug,druntime-ldc-debug"
];
// default switches appended after all explicit command-line switches
post-switches = [
"-L-L/usr/lib",
- "-L-L/usr/lib32",
];
};
More information about the arch-commits
mailing list