Create a symlink with relative path

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/378
This commit is contained in:
Akira TAGOH 2023-08-10 20:18:37 +09:00
parent f614ec4d60
commit 5d954398d1
2 changed files with 2 additions and 9 deletions

View File

@ -109,14 +109,7 @@ README: $(srcdir)/README.in
cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) $(top_builddir)/conf.d/35-lang-normalize.conf
install-data-hook:
mkdir -p $(DESTDIR)$(configdir)
@(echo cd $(DESTDIR)$(configdir); \
cd $(DESTDIR)$(configdir); \
for i in $(CONF_LINKS); do \
echo $(RM) $$i";" ln -s $(templatedir)/$$i .; \
$(RM) $$i; \
ln -s $(templatedir)/$$i .; \
done)
$(PYTHON) $(srcdir)/link_confs.py $(templatedir) $(configdir) $(CONF_LINKS)
uninstall-local:
@(echo cd $(DESTDIR)$(configdir); \
cd $(DESTDIR)$(configdir); \

View File

@ -34,7 +34,7 @@ if __name__=='__main__':
except FileNotFoundError:
pass
try:
os.symlink(src, dst)
os.symlink(os.path.relpath(src, start=args.confpath), dst)
except NotImplementedError:
# Not supported on this version of Windows
break