devel/llvm*: Fix wrapper scripts to support symlinking to them

The wrapper scripts currently do not resolve the real path to $0:

$ install -l rs /usr/local/bin/clang50 gcc
$ ./gcc
./gcc: /usr/local/llvm50/bin/gcc: not found

Here /usr/local/llvm50/bin/clang should be called not
/usr/local/llvm50/bin/gcc.

Approved by:		brooks (maintainer)
Differential Revision:	https://reviews.freebsd.org/D14727
This commit is contained in:
Tobias Kortkamp 2018-03-31 03:28:42 +00:00
parent 08be2f3ab3
commit ef23d24eb5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=466018
18 changed files with 27 additions and 17 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= llvm
PORTVERSION= ${LLVM_MAJOR}.d${SNAPDATE}
PORTREVISION= 1
CATEGORIES= devel lang
PKGNAMESUFFIX= ${LLVM_SUFFIX}

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
PORTVERSION= 3.3
PORTREVISION= 13
PORTREVISION= 14
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION}.src

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
PORTVERSION= 3.4.2
PORTREVISION= 8
PORTREVISION= 9
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION}.src

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 3.5.2
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/3.5.2/
DISTNAME= ${PORTNAME}-${DISTVERSION}.src

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 3.8.1
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
DISTNAME= ${PORTNAME}-${DISTVERSION}.src

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 3.9.1
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
PKGNAMESUFFIX= ${LLVM_SUFFIX}

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 4.0.1
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
PKGNAMESUFFIX= ${LLVM_SUFFIX}

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 5.0.1
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= devel lang
MASTER_SITES= https://releases.llvm.org/${LLVM_RELEASE}/${RCDIR} LOCAL/brooks
PKGNAMESUFFIX= ${LLVM_SUFFIX}

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(basename $0)
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 6.0.0
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= devel lang
MASTER_SITES= http://${PRE_}releases.llvm.org/${LLVM_RELEASE}/${RCDIR}
PKGNAMESUFFIX= ${LLVM_SUFFIX}

View File

@ -4,7 +4,8 @@
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=${0##*/}
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
"${tool}" "${@}"