tcl: fix TCLLIBPATH edge cases in tcl package hook
TCLLIBPATH was not actually extended if a package's path was a substring of a package already on the path. This commit fixes that behavior. Additionally, '--prefix' is now used in place of '--set', as the latter was found to break tkremind from the remind package.
This commit is contained in:
parent
1c44a44932
commit
e22fe366af
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ _addToTclLibPath() {
|
|||
if [ -z "${TCLLIBPATH-}" ]; then
|
||||
export TCLLIBPATH="$tclPkg"
|
||||
else
|
||||
if [[ "$TCLLIBPATH" != *"$tclPkg"* ]]; then
|
||||
if [[ "$TCLLIBPATH" != *"$tclPkg "* && "$TCLLIBPATH" != *"$tclPkg" ]]; then
|
||||
export TCLLIBPATH="${TCLLIBPATH} $tclPkg"
|
||||
fi
|
||||
fi
|
||||
|
@ -53,7 +53,7 @@ wrapTclBins() {
|
|||
find "$tclBinsDir" -type f -executable -print |
|
||||
while read -r someBin; do
|
||||
echo "Adding TCLLIBPATH wrapper for $someBin"
|
||||
wrapProgram "$someBin" --set TCLLIBPATH "$TCLLIBPATH"
|
||||
wrapProgram "$someBin" --prefix TCLLIBPATH ' ' "$TCLLIBPATH"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue