megadriver-symlinks.patch 857 B

1234567891011121314151617181920212223242526
  1. This converts megadriver installation to use symlinks so that we do
  2. not have to deal with skipping the strip stage for some files, as
  3. a result simplifying our template greatly.
  4. --- a/bin/install_megadrivers.py
  5. +++ b/bin/install_megadrivers.py
  6. @@ -56,7 +56,7 @@ def main():
  7. if os.path.lexists(abs_driver):
  8. os.unlink(abs_driver)
  9. print('installing {} to {}'.format(args.megadriver, abs_driver))
  10. - os.link(master, abs_driver)
  11. + os.symlink(os.path.basename(master), abs_driver)
  12. try:
  13. ret = os.getcwd()
  14. @@ -71,8 +71,7 @@ def main():
  15. finally:
  16. os.chdir(ret)
  17. - # Remove meson-created master .so and symlinks
  18. - os.unlink(master)
  19. + # Remove meson-created symlinks
  20. name, ext = os.path.splitext(master)
  21. while ext != '.so':
  22. if os.path.lexists(name):