[arch-commits] Commit in cuda/trunk (PKGBUILD)

Sven-Hendrik Haase svenstaro at archlinux.org
Fri Mar 1 19:16:31 UTC 2019


    Date: Friday, March 1, 2019 @ 19:16:30
  Author: svenstaro
Revision: 437312

upgpkg: cuda 10.1.105-4

Fix symlinks for real

Modified:
  cuda/trunk/PKGBUILD

----------+
 PKGBUILD |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-03-01 18:59:19 UTC (rev 437311)
+++ PKGBUILD	2019-03-01 19:16:30 UTC (rev 437312)
@@ -48,13 +48,12 @@
   # We have to be weird about this since for some reason the ELF SONAME is incorrect or at least partially incorrect for some libs.
   # Best we can do is create all symlinks and hope for the best.
   # Their installer used to perform this for us but now it's all manual and I think this is what we'll be stuck with for now.
-  find builds/cuda-toolkit/targets -type f -name '*.so*' ! -path '*stubs/*' -print0 | while read -d $'\0' _lib; do
-    _base=$(echo ${_lib} | sed -r 's/(.*).so.*/\1.so/')
+  find cuda-toolkit/targets -type f -name '*.so*' ! -path '*stubs/*' -print0 | while read -rd '' _lib; do
+    _base=${_lib%.so.*}
     _current_soname=$(basename ${_lib%.*})
     while [[ $_current_soname != $(basename $_base) ]]; do
-      _full_soname=$(dirname $_base)/$_current_soname
-      echo "[[ ! -f $_full_soname ]] && ln -s $_lib $_full_soname"
-      _current_soname=$(basename ${_current_soname%.*})
+      ln -sf ${_lib##*/} ${pkgdir}/opt/cuda/lib64/$_current_soname
+      _current_soname=${_current_soname%.*}
     done
   done
 


More information about the arch-commits mailing list