summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorpingplug2018-02-14 22:10:47 +0800
committerpingplug2018-02-14 22:10:47 +0800
commitfbd4ef61cd260b6a5337638f90ad7fae24476935 (patch)
tree64873207d6a8339aae78d167213fa2b9b0fa0a1b /PKGBUILD
parent9da5c9298f05a87f1617d995e7ea609541aa4112 (diff)
downloadaur-fbd4ef61cd260b6a5337638f90ad7fae24476935.tar.gz
fix cargo/config
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD23
1 files changed, 18 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index afd9661c44ed..8caa9b89c428 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=mingw-w64-rust-bin
_pkgname=rust
pkgver=1.23.0
-pkgrel=1
+pkgrel=2
pkgdesc="rust language prebuilt toolchain with mingw target (mingw-w64)"
arch=('any')
url='https://www.rust-lang.org/'
@@ -87,14 +87,20 @@ EOF
runner = "wine"
EOF
fi
+ cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
+rustflags = [
+EOF
if [[ ! -f "/usr/i686-w64-mingw32/bin/libgcc_s_dw2-1.dll" ]] ; then
cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
-rustflags = ["-C", "panic=abort"]
+ "-C", "panic=abort",
EOF
fi
-
cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
+ ]
+EOF
+
+ cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
[target.x86_64-pc-windows-gnu]
linker = "/usr/bin/x86_64-w64-mingw32-gcc"
ar = "/usr/x86_64-w64-mingw32/bin/ar"
@@ -104,16 +110,23 @@ EOF
runner = "wine"
EOF
fi
+ cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
+rustflags = [
+EOF
if [[ ! -f "/usr/x86_64-w64-mingw32/bin/libgcc_s_seh-1.dll" ]] ; then
cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
-rustflags = ["-C", "panic=abort"]
+ "-C", "panic=abort",
EOF
fi
if pacman -T "mingw-w64-crt>5.0.3.20171219" ; then
cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
-rustflags = ["-C", "link-arg=-lmsvcrt"]
+ "-C", "link-arg=-lmsvcrt",
EOF
fi
+ cat << EOF >> "${pkgdir}/opt/${_pkgname}/cargo/config"
+ ]
+
+EOF
}
# vim:set ts=2 sw=2 et: