summaryrefslogtreecommitdiff
path: root/source/d/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/llvm')
-rwxr-xr-xsource/d/llvm/llvm.SlackBuild23
1 files changed, 14 insertions, 9 deletions
diff --git a/source/d/llvm/llvm.SlackBuild b/source/d/llvm/llvm.SlackBuild
index 84533d48..4305cc18 100755
--- a/source/d/llvm/llvm.SlackBuild
+++ b/source/d/llvm/llvm.SlackBuild
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=llvm
VERSION=${VERSION:-$(echo llvm-*.tar.xz | rev | cut -f 4- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -64,6 +64,11 @@ else
LIBDIRSUFFIX=""
fi
+# Python2 short version:
+PY2=$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' | cut -f 2 -d n | cut -f 1 -d /)
+# Python3 short version:
+PY3=$(python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' | cut -f 2 -d n | cut -f 1 -d /)
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -197,21 +202,21 @@ done
rm -f $PKG/usr/lib$LIBDIRSUFFIX/libgomp.so
# Install Python bindings
-for pyver in 2.7 3.6; do
+for pyver in ${PY2} ${PY3}; do
mkdir -p "$PKG/usr/lib$LIBDIRSUFFIX/python$pyver/site-packages"
cp -a tools/clang/bindings/python/clang "$PKG/usr/lib$LIBDIRSUFFIX/python$pyver/site-packages/"
done
# Remove bundled python-six
-rm -f "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/six.py"
+rm -f "$PKG/usr/lib$LIBDIRSUFFIX/python${PY2}/site-packages/six.py"
# Compile Python scripts
-python -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/clang"
-python -O -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/clang"
-python3 -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python3.6/site-packages/clang"
-python3 -O -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python3.6/site-packages/clang"
-python -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/lldb"
-python -O -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/lldb"
+python -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python${PY2}/site-packages/clang"
+python -O -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python${PY2}/site-packages/clang"
+python3 -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python${PY3}/site-packages/clang"
+python3 -O -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python${PY3}/site-packages/clang"
+python -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python${PY2}/site-packages/lldb"
+python -O -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python${PY2}/site-packages/lldb"
python -m compileall "$PKG/usr/share/scan-view"
python -O -m compileall "$PKG/usr/share/scan-view"
python -m compileall "$PKG/usr/share/clang"