Let make expand fc_cachedir/FC_CACHEDIR (bug #18675)
configure replaces a NONE prefix with the default prefix too late. So we move fonts.conf creation to Makefile, such that prefix is correctly expanded. Ugly, but works.
This commit is contained in:
parent
98d765a53b
commit
c08216c6f4
13
Makefile.am
13
Makefile.am
|
@ -32,6 +32,7 @@ EXTRA_DIST = \
|
|||
fontconfig.spec.in \
|
||||
fontconfig.spec \
|
||||
fontconfig-zip.in
|
||||
CLEANFILES = fonts.conf
|
||||
DISTCLEANFILES = config.cache ChangeLog doltcompile
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/aclocal.m4 \
|
||||
|
@ -81,7 +82,17 @@ ChangeLog:
|
|||
|
||||
.PHONY: ChangeLog
|
||||
|
||||
install-data-local:
|
||||
fonts.conf: fonts.conf.in Makefile
|
||||
sed \
|
||||
-e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
|
||||
-e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \
|
||||
-e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
|
||||
-e 's,@PACKAGE\@,$(PACKAGE),g' \
|
||||
-e 's,@VERSION\@,$(VERSION),g' \
|
||||
$< > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
install-data-local: fonts.conf
|
||||
$(mkinstalldirs) $(DESTDIR)$(configdir) $(DESTDIR)$(fc_cachedir)
|
||||
if [ -f $(DESTDIR)$(configdir)/fonts.conf ]; then \
|
||||
echo "backing up existing $(DESTDIR)$(configdir)/fonts.conf"; \
|
||||
|
|
|
@ -455,7 +455,7 @@ no|yes)
|
|||
if test "$os_win32" = "yes"; then
|
||||
fc_cachedir="WINDOWSTEMPDIR_FONTCONFIG_CACHE"
|
||||
else
|
||||
fc_cachedir=`eval echo "${localstatedir}/cache/"${PACKAGE}`
|
||||
fc_cachedir='${localstatedir}/cache/${PACKAGE}'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
@ -571,6 +571,5 @@ doc/version.sgml
|
|||
test/Makefile
|
||||
fontconfig.spec
|
||||
fontconfig.pc
|
||||
fonts.conf
|
||||
fontconfig-zip
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue