]> git.wh0rd.org - fontconfig.git/commitdiff
Remove freetype requirement for build-time applications.
authorKeith Packard <keithp@keithp.com>
Wed, 2 Jan 2008 16:47:14 +0000 (08:47 -0800)
committerKeith Packard <keithp@keithp.com>
Wed, 2 Jan 2008 16:47:14 +0000 (08:47 -0800)
This avoids requiring the freetype development files when cross compiling

fc-arch/Makefile.am
fc-case/Makefile.am
fc-glyphname/Makefile.am
fc-lang/Makefile.am
src/Makefile.am
src/fcfreetype.c
src/fcftint.h [new file with mode: 0644]
src/fcint.h
src/fclang.c
src/fcpat.c
src/makealias

index 5fedbfbc7893fd6a65ebb52eaffe88a3274643ce..7e1dd3ec01c8c1f7ede4065b5049da21fbd6c334 100644 (file)
@@ -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
index 83ca2de683de1c5c37a74e00490b5e9ff3ecf01c..d4fa12d87e893554730d79ff474d663c8507c052 100644 (file)
@@ -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}
index 8aa5ead1e619d537670494d6687311e7a3146144..412d663ad6614efea3924e509b743c04a26adaa7 100644 (file)
@@ -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}
index f152ab5fd4adafc1d30b120f5af779320cc9476d..60e4f318bc745f90e7cfc481692ca13fd15f28a4 100644 (file)
@@ -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
index e4c203c58d48f9e804aa3cc1fc530ea86b91df5d..a7d6b92f39cddc584133ad8b0ff73d4311a2dfa8 100644 (file)
@@ -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)
 
index 572e7f2a05925dee6624156c29886a165275652d..53fe86b67d8a008a88116c2023554529f1074189 100644 (file)
@@ -45,6 +45,7 @@
 */
 
 #include "fcint.h"
+#include "fcftint.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/src/fcftint.h b/src/fcftint.h
new file mode 100644 (file)
index 0000000..f32d87c
--- /dev/null
@@ -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_ */
index 922a2df0ce51ec885f2d001dcb930ef6cb87b8d8..ddeb7459b3e74432783bfcac1e451f74014a80c0 100644 (file)
 #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
index 7aa5f3cfb067f187a9d10141f94c29d3c9152c2b..dc1fb368294e48297a55973bddd0c38e639918f0 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "fcint.h"
+#include "fcftint.h"
 
 typedef struct {
     const FcChar8      lang[8];
index 4179694d87aef448013e1a9e74c5ec3c494cb6b9..c8368fc3061a419467a7ce037be9043b49bed13e 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "fcint.h"
+#include "fcftint.h"
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
index bbc90f0a8d3a2c76bb25850cbe38888126289484..1f57742d1c0c55c5278436289d33995ef1c67903 100755 (executable)
@@ -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/ *(.*$//' |