mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
gcc: fix manpage symlinks when arch tuple is in the file name
In some cases, such as when building cross compilers, the binaries and manpages contain the target architecture tuple, such as `i686-w64-mingw32-g++.1`. Ensure the symlink created to save space with the duplicated manpage (`g++.1 -> gcc.1`) properly handles such cases and generates symlinks such as `i686-w64-mingw32-g++.1 -> i686-w64-mingw32-gcc.1`. Previously in such cases, a broken `gcc.1` link would be created instead.
This commit is contained in:
parent
c54edfed06
commit
eed46887ca
@ -277,7 +277,12 @@ postInstall() {
|
||||
done
|
||||
|
||||
# Two identical man pages are shipped (moving and compressing is done later)
|
||||
ln -sf gcc.1 "$out"/share/man/man1/g++.1
|
||||
for i in "$out"/share/man/man1/*g++.1; do
|
||||
if test -e "$i"; then
|
||||
man_prefix=`echo "$i" | sed "s,.*/\(.*\)g++.1,\1,"`
|
||||
ln -sf "$man_prefix"gcc.1 "$i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
||||
|
Loading…
Reference in New Issue
Block a user