Commits

Uelsk8s committed 42b32c8

update llvm to 3.2

Comments (0)

Files changed (1)

var/vabs/llvm/src/llvm.SlackBuild

 # AUTHORS = 
 
 NAME="llvm"            #Enter package Name!
-VERSION=${VERSION:-"3.1"}      #Enter package Version!
+VERSION=${VERSION:-"3.2"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"hata_ph"}   #Enter your Name!
 LINK=${LINK:-"http://llvm.org/releases/$VERSION/$NAME-$VERSION.src.tar.gz"}  #Enter URL for package here!
 #Miscellenious tweaks and things outside a normal ./configure go here #
 #######################################################################
 
+# Fix hardcoded libdir
+sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
+	  Makefile.config
+sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
+	  tools/clang/lib/Headers/Makefile
+sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
+	  tools/clang/lib/Frontend/CompilerInvocation.cpp
+sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
+	  tools/clang/lib/Driver/Tools.cpp
+sed -i "s|ActiveLibDir = ActivePrefix + \"/lib\"|ActiveLibDir = ActivePrefix + \"/lib${LIBDIRSUFFIX}\"|g" \
+	  tools/llvm-config/llvm-config.cpp
+
 if [ "$CLANG" != "no" ]; then
   # install clang-static-analyzer
   mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer
 sed -i -e "s|ABS_RUN_DIR/lib\"|ABS_RUN_DIR/lib$LIBDIRSUFFIX\"|" \
   $PKG/usr/bin/llvm-config
 
+# Fix paths in scan-build
+sed -i "s|\$RealBin/bin|/usr/bin|" \
+	  $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+sed -i "s|\$RealBin/sorttable.js|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/sorttable.js|" \
+	  $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+sed -i "s|\$RealBin/scanview.css|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/scanview.css|" \
+	  $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
 cp -a CREDITS* README* LICENSE* $PKG/usr/doc/$NAME-$VERSION
 cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild