mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 23:20:08 +01:00
meson/megadriver: replace hardlinks with symlinks
The wording in the script has always (3218056e0e) been about symlinks,
and it feels like the use of `link()` instead of `symlink()` was
a typo that became fact.
These hardlinks make packaging harder (many distros have some variant of
this patch locally) especially when it comes to debug packages where gdb
expects the symbols file to have the same name as the lib the symbols
come from, and I don't think they make anything better, so let's change
to code to match the documentation :)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29731>
This commit is contained in:
parent
ac5d14c5ea
commit
d5ec3a8988
2 changed files with 5 additions and 5 deletions
|
|
@ -42,7 +42,8 @@ def main():
|
|||
else:
|
||||
to = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.libdir)
|
||||
|
||||
master = os.path.join(to, os.path.basename(args.megadriver))
|
||||
basename = os.path.basename(args.megadriver)
|
||||
master = os.path.join(to, basename)
|
||||
|
||||
if not os.path.exists(to):
|
||||
if os.path.lexists(to):
|
||||
|
|
@ -54,8 +55,8 @@ def main():
|
|||
|
||||
if os.path.lexists(abs_driver):
|
||||
os.unlink(abs_driver)
|
||||
print(f'Installing hardlink to {args.megadriver} to {abs_driver}')
|
||||
os.link(master, abs_driver)
|
||||
print(f'Installing symlink pointing to {basename} to {abs_driver}')
|
||||
os.symlink(basename, abs_driver)
|
||||
|
||||
try:
|
||||
ret = os.getcwd()
|
||||
|
|
|
|||
|
|
@ -133,9 +133,8 @@ if prog_ln.found()
|
|||
foreach d : dril_drivers
|
||||
custom_target(
|
||||
d,
|
||||
input : dril_dri,
|
||||
output : d,
|
||||
command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'],
|
||||
command : [prog_ln, '-sf', 'libdril_dri.so', '@OUTPUT@'],
|
||||
build_by_default : true,
|
||||
)
|
||||
endforeach
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue