fontconfig/fc-cache/Makefile.am

70 lines
1.9 KiB
Makefile
Raw Normal View History

2003-02-24 18:18:50 +01:00
#
2008-08-13 09:30:23 +02:00
# fontconfig/fc-cache/Makefile.am
2003-02-24 18:18:50 +01:00
#
2004-12-07 02:14:46 +01:00
# Copyright © 2003 Keith Packard
2003-02-24 18:18:50 +01:00
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of the author(s) not be used in
2003-02-24 18:18:50 +01:00
# advertising or publicity pertaining to distribution of the software without
# specific, written prior permission. The authors make no
2003-02-24 18:18:50 +01:00
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
2003-02-24 18:18:50 +01:00
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
2003-02-24 18:18:50 +01:00
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
DOC2MAN = docbook2man
FC_CACHE_SRC=${top_srcdir}/fc-cache
SGML = ${FC_CACHE_SRC}/fc-cache.sgml
Workaround for stat() brokenness in Microsoft's C library (bug 8526) Fix a couple of longstanding problems with fontconfig on Windows that manifest themselves especially in GIMP. The root cause to the problems is in Microsoft's incredibly stupid stat() implementation. Basically, stat() returns wrong timestamp fields for files on NTFS filesystems on machines that use automatic DST switching. See for instance http://bugzilla.gnome.org/show_bug.cgi?id=154968 and http://www.codeproject.com/datetime/dstbugs.asp As fccache.c now looks at more fields in the stat struct I fill in them all. I noticed that fstat() is used only on a fd just after opening it, so on Win32 I just call my stat() replacement before opening instead... Implementing a good replacement for fstat() would be harder because the code in fccache.c wants to compare inode numbers. There are no (readily accessible) inode numbers on Win32, so I fake it with the hash of the full file name, in the case as it is on disk. And fstat() doesn't know the full file name, so it would be rather hard to come up with a inode number to identify the file. The patch also adds similar handling for the cache directory as for the fonts directory: If a cachedir element in fonts.conf contains the magic string "WINDOWSTEMPDIR_FONTCONFIG_CACHE" it is replaced at runtime with a path under the machine's (or user's) temp folder as returned by GetTempPath(). I don't want to hardcode any pathnames in a fonts.conf intended to be distributed to end-users, most of which who wouldn't know how to edit it anyway. And requiring an installer to edit it gets complicated.
2007-11-14 01:41:55 +01:00
if OS_WIN32
else
install-data-local:
-$(mkinstalldirs) "$(DESTDIR)$(fc_cachedir)"
uninstall-local:
-$(RM) -rf "$(DESTDIR)$(fc_cachedir)"
Workaround for stat() brokenness in Microsoft's C library (bug 8526) Fix a couple of longstanding problems with fontconfig on Windows that manifest themselves especially in GIMP. The root cause to the problems is in Microsoft's incredibly stupid stat() implementation. Basically, stat() returns wrong timestamp fields for files on NTFS filesystems on machines that use automatic DST switching. See for instance http://bugzilla.gnome.org/show_bug.cgi?id=154968 and http://www.codeproject.com/datetime/dstbugs.asp As fccache.c now looks at more fields in the stat struct I fill in them all. I noticed that fstat() is used only on a fd just after opening it, so on Win32 I just call my stat() replacement before opening instead... Implementing a good replacement for fstat() would be harder because the code in fccache.c wants to compare inode numbers. There are no (readily accessible) inode numbers on Win32, so I fake it with the hash of the full file name, in the case as it is on disk. And fstat() doesn't know the full file name, so it would be rather hard to come up with a inode number to identify the file. The patch also adds similar handling for the cache directory as for the fonts directory: If a cachedir element in fonts.conf contains the magic string "WINDOWSTEMPDIR_FONTCONFIG_CACHE" it is replaced at runtime with a path under the machine's (or user's) temp folder as returned by GetTempPath(). I don't want to hardcode any pathnames in a fonts.conf intended to be distributed to end-users, most of which who wouldn't know how to edit it anyway. And requiring an installer to edit it gets complicated.
2007-11-14 01:41:55 +01:00
endif
AM_CPPFLAGS=-I${top_srcdir} -I${top_srcdir}/src $(WARN_CFLAGS)
2003-02-24 18:18:50 +01:00
bin_PROGRAMS=fc-cache
BUILT_MANS=fc-cache.1
if ENABLE_DOCS
man_MANS=${BUILT_MANS}
endif
EXTRA_DIST=fc-cache.sgml $(BUILT_MANS)
2003-03-07 21:04:13 +01:00
CLEANFILES =
fc_cache_LDADD = ${top_builddir}/src/libfontconfig.la
if USEDOCBOOK
${man_MANS}: ${SGML}
$(AM_V_GEN) $(RM) $@; \
$(DOC2MAN) ${SGML}; \
$(RM) manpage.*
all-local: $(man_MANS)
CLEANFILES += ${man_MANS}
else
all-local:
endif
2012-10-06 23:52:39 +02:00
-include $(top_srcdir)/git.mk