Remove freetype requirement for build-time applications.
This avoids requiring the freetype development files when cross compiling
This commit is contained in:
parent
0aa5fbaa0d
commit
dbd065ad31
|
@ -26,7 +26,7 @@ CC = @CC_FOR_BUILD@
|
|||
EXEEXT = @EXEEXT_FOR_BUILD@
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
|
||||
|
||||
TMPL=fcarch.tmpl.h
|
||||
STMPL=${top_srcdir}/fc-arch/fcarch.tmpl.h
|
||||
|
|
|
@ -26,7 +26,7 @@ CC = @CC_FOR_BUILD@
|
|||
EXEEXT = @EXEEXT_FOR_BUILD@
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
|
||||
|
||||
TMPL=fccase.tmpl.h
|
||||
STMPL=${top_srcdir}/fc-case/${TMPL}
|
||||
|
|
|
@ -26,7 +26,7 @@ CC = @CC_FOR_BUILD@
|
|||
EXEEXT = @EXEEXT_FOR_BUILD@
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
|
||||
|
||||
TMPL=fcglyphname.tmpl.h
|
||||
STMPL=${top_srcdir}/fc-glyphname/${TMPL}
|
||||
|
|
|
@ -26,7 +26,7 @@ CC = @CC_FOR_BUILD@
|
|||
EXEEXT = @EXEEXT_FOR_BUILD@
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS)
|
||||
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
|
||||
|
||||
TMPL=fclang.tmpl.h
|
||||
STMPL=${top_srcdir}/fc-lang/fclang.tmpl.h
|
||||
|
|
|
@ -81,7 +81,7 @@ EXTRA_DIST = makealias
|
|||
|
||||
noinst_HEADERS=fcint.h fcdeprecate.h
|
||||
|
||||
ALIAS_FILES = fcalias.h fcaliastail.h
|
||||
ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h
|
||||
|
||||
BUILT_SOURCES = $(ALIAS_FILES)
|
||||
|
||||
|
@ -124,14 +124,21 @@ uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib
|
|||
|
||||
PUBLIC_FILES = \
|
||||
$(top_srcdir)/fontconfig/fontconfig.h \
|
||||
$(top_srcdir)/fontconfig/fcfreetype.h \
|
||||
$(top_srcdir)/src/fcdeprecate.h \
|
||||
$(top_srcdir)/fontconfig/fcprivate.h
|
||||
|
||||
PUBLIC_FT_FILES = \
|
||||
$(top_srcdir)/fontconfig/fcfreetype.h
|
||||
|
||||
fcaliastail.h: fcalias.h
|
||||
|
||||
fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES)
|
||||
sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" $(PUBLIC_FILES)
|
||||
sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES)
|
||||
|
||||
fcftaliastail.h: fcftalias.h
|
||||
|
||||
fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES)
|
||||
sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES)
|
||||
|
||||
CLEANFILES := $(ALIAS_FILES)
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
*/
|
||||
|
||||
#include "fcint.h"
|
||||
#include "fcftint.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright © 2007 Keith Packard
|
||||
*
|
||||
* 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 copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _FCFTINT_H_
|
||||
#define _FCFTINT_H_
|
||||
|
||||
#include <fontconfig/fcfreetype.h>
|
||||
|
||||
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
|
||||
#define FcPrivate __attribute__((__visibility__("hidden")))
|
||||
#define HAVE_GNUC_ATTRIBUTE 1
|
||||
#include "fcftalias.h"
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define FcPrivate __hidden
|
||||
#else /* not gcc >= 3.3 and not Sun Studio >= 8 */
|
||||
#define FcPrivate
|
||||
#endif
|
||||
|
||||
/* fcfreetype.c */
|
||||
FcPrivate FcBool
|
||||
FcFreeTypeIsExclusiveLang (const FcChar8 *lang);
|
||||
|
||||
FcPrivate FcBool
|
||||
FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang);
|
||||
|
||||
FcPrivate FcChar32
|
||||
FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map);
|
||||
|
||||
FcPrivate FcChar32
|
||||
FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
|
||||
|
||||
FcPrivate const FcCharMap *
|
||||
FcFreeTypeGetPrivateMap (FT_Encoding encoding);
|
||||
|
||||
#endif /* _FCFTINT_H_ */
|
18
src/fcint.h
18
src/fcint.h
|
@ -42,12 +42,12 @@
|
|||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#include <fontconfig/fcprivate.h>
|
||||
#include <fontconfig/fcfreetype.h>
|
||||
#include "fcdeprecate.h"
|
||||
|
||||
#ifndef FC_CONFIG_PATH
|
||||
|
@ -705,22 +705,6 @@ FcDirScanConfig (FcFontSet *set,
|
|||
FcPrivate int
|
||||
FcFontDebug (void);
|
||||
|
||||
/* fcfreetype.c */
|
||||
FcPrivate FcBool
|
||||
FcFreeTypeIsExclusiveLang (const FcChar8 *lang);
|
||||
|
||||
FcPrivate FcBool
|
||||
FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang);
|
||||
|
||||
FcPrivate FcChar32
|
||||
FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map);
|
||||
|
||||
FcPrivate FcChar32
|
||||
FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
|
||||
|
||||
FcPrivate const FcCharMap *
|
||||
FcFreeTypeGetPrivateMap (FT_Encoding encoding);
|
||||
|
||||
/* fcfs.c */
|
||||
|
||||
FcPrivate FcBool
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "fcint.h"
|
||||
#include "fcftint.h"
|
||||
|
||||
typedef struct {
|
||||
const FcChar8 lang[8];
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "fcint.h"
|
||||
#include "fcftint.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#!/bin/sh
|
||||
SRCDIR=$1
|
||||
shift
|
||||
HEAD=fcalias.h
|
||||
TAIL=fcaliastail.h
|
||||
HEAD=$1
|
||||
shift
|
||||
TAIL=$1
|
||||
shift
|
||||
rm -f $HEAD $TAIL
|
||||
echo "#if HAVE_GNUC_ATTRIBUTE" >> $TAIL
|
||||
cat "$@" | grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$//' |
|
||||
|
|
Loading…
Reference in New Issue