diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-01-25 16:30:41 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-25 16:30:41 -0800 |
| commit | ced9ec1fa81ffcab7c1bb417af5aa12bfe5a1869 (patch) | |
| tree | eab14b32dd717cd11d97033192cb2f902411f0f2 | |
| parent | d04e78815a82b52af8b36d14fd68703936199ce3 (diff) | |
| parent | 1380525e5f92fb0ff576a98343238389dfdd7fad (diff) | |
| download | vcpkg-ced9ec1fa81ffcab7c1bb417af5aa12bfe5a1869.tar.gz vcpkg-ced9ec1fa81ffcab7c1bb417af5aa12bfe5a1869.zip | |
Merge pull request #571 from codicodi/add-fontconfig
Add fontconfig
| -rw-r--r-- | ports/fontconfig/CMakeLists.txt | 80 | ||||
| -rw-r--r-- | ports/fontconfig/CONTROL | 4 | ||||
| -rw-r--r-- | ports/fontconfig/include/config.h | 267 | ||||
| -rw-r--r-- | ports/fontconfig/include/fcaliastail.h | 1 | ||||
| -rw-r--r-- | ports/fontconfig/include/fcftaliastail.h | 1 | ||||
| -rw-r--r-- | ports/fontconfig/include/fcobjshash.h | 328 | ||||
| -rw-r--r-- | ports/fontconfig/include/fcstdint.h | 8 | ||||
| -rw-r--r-- | ports/fontconfig/include/unistd.h | 21 | ||||
| -rw-r--r-- | ports/fontconfig/portfile.cmake | 39 |
9 files changed, 749 insertions, 0 deletions
diff --git a/ports/fontconfig/CMakeLists.txt b/ports/fontconfig/CMakeLists.txt new file mode 100644 index 000000000..f8412ac94 --- /dev/null +++ b/ports/fontconfig/CMakeLists.txt @@ -0,0 +1,80 @@ +cmake_minimum_required(VERSION 3.0) +project(fontconfig) + +add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) +add_definitions(-FI${FC_INCLUDE_DIR}/config.h) + +if(CMAKE_BUILD_TYPE STREQUAL Debug) + set(LIB_SUFFIX d) +endif() + +# find dependencies +find_path(ICONV_INCLUDE_DIR iconv.h) +find_library(ICONV_LIBRARY NAMES iconv libiconv) +find_path(FREETYPE_INCLUDE_DIR ft2build.h) +find_library(FREETYPE_LIBRARY freetype${LIB_SUFFIX}) +find_path(EXPAT_INCLUDE_DIR expat.h) +find_library(EXPAT_LIBRARY expat) + +add_library(fontconfig + src/fcatomic.c + src/fcblanks.c + src/fccache.c + src/fccfg.c + src/fccharset.c + src/fccompat.c + src/fcdbg.c + src/fcdefault.c + src/fcdir.c + src/fcformat.c + src/fcfreetype.c + src/fcfs.c + src/fcinit.c + src/fclang.c + src/fclist.c + src/fcmatch.c + src/fcmatrix.c + src/fcname.c + src/fcobjs.c + src/fcpat.c + src/fcrange.c + src/fcserialize.c + src/fcstat.c + src/fcstr.c + src/fcweight.c + src/fcxml.c + src/ftglue.c) + +target_include_directories(fontconfig PRIVATE . + ${FC_INCLUDE_DIR} + ${FREETYPE_INCLUDE_DIR} + ${EXPAT_INCLUDE_DIR} + ${ICONV_INCLUDE_DIR}) + +target_link_libraries(fontconfig + ${FREETYPE_LIBRARY} + ${ICONV_LIBRARY} + ${EXPAT_LIBRARY}) + +install(TARGETS fontconfig + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(NOT FC_SKIP_HEADERS) + install(FILES + fontconfig/fontconfig.h + fontconfig/fcfreetype.h + fontconfig/fcprivate.h + DESTINATION include/fontconfig) +endif() + +if(NOT FC_SKIP_TOOLS) + set(FC_DEFAULT_FONTS WINDOWSFONTDIR) + set(FC_FONTPATH) + set(FC_CACHEDIR WINDOWSTEMPDIR_FONTCONFIG_CACHE) + set(CONFIGDIR ./fonts/conf.d) + configure_file(fonts.conf.in ${CMAKE_SOURCE_DIR}/fonts.conf @ONLY) + install(FILES fonts.conf DESTINATION tools/fontconfig/fonts) + install(DIRECTORY conf.d DESTINATION tools/fontconfig/fonts FILES_MATCHING PATTERN "*.conf") +endif() diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL new file mode 100644 index 000000000..ecb371f15 --- /dev/null +++ b/ports/fontconfig/CONTROL @@ -0,0 +1,4 @@ +Source: fontconfig
+Version: 2.12.1
+Description: Library for configuring and customizing font access.
+Build-Depends: freetype, expat, libiconv
diff --git a/ports/fontconfig/include/config.h b/ports/fontconfig/include/config.h new file mode 100644 index 000000000..8f21dda01 --- /dev/null +++ b/ports/fontconfig/include/config.h @@ -0,0 +1,267 @@ + +#define FC_CACHEDIR "./" + +/* The normal alignment of `double', in bytes. */ +#define ALIGNOF_DOUBLE 8 + +/* Use libxml2 instead of Expat */ +/* #undef ENABLE_LIBXML2 */ + +/* Additional font directories */ +#define FC_ADD_FONTS "yes" + +/* Architecture prefix to use for cache file names */ +/* #undef FC_ARCHITECTURE */ + +/* System font directory */ +#define FC_DEFAULT_FONTS "c:/windows/fonts" + +/* Define to nothing if C supports flexible array members, and to 1 if it does + not. That way, with a declaration like `struct s { int n; double + d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 + compilers. When computing the size of such an object, don't use 'sizeof + (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' + instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with + MSVC and with C++ compilers. */ +#define FLEXIBLE_ARRAY_MEMBER /**/ + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fstatfs' function. */ +/* #undef HAVE_FSTATFS */ + +/* Define to 1 if you have the `fstatvfs' function. */ +/* #undef HAVE_FSTATVFS */ + +/* FT_Bitmap_Size structure includes y_ppem field */ +#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 + +/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ +#define HAVE_FT_GET_BDF_PROPERTY 1 + +/* Define to 1 if you have the `FT_Get_Next_Char' function. */ +#define HAVE_FT_GET_NEXT_CHAR 1 + +/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ +#define HAVE_FT_GET_PS_FONT_INFO 1 + +/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ +#define HAVE_FT_GET_X11_FONT_FORMAT 1 + +/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ +#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 + +/* Define to 1 if you have the `FT_Select_Size' function. */ +#define HAVE_FT_SELECT_SIZE 1 + +/* Define to 1 if you have the `getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Have Intel __sync_* atomic primitives */ +#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `link' function. */ +/* #undef HAVE_LINK */ + +/* Define to 1 if you have the `lrand48' function. */ +/* #undef HAVE_LRAND48 */ + +/* Define to 1 if you have the `lstat' function. */ +/* #undef HAVE_LSTAT */ + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +/* #undef HAVE_MKDTEMP */ + +/* Define to 1 if you have the `mkostemp' function. */ +/* #undef HAVE_MKOSTEMP */ + +/* Define to 1 if you have the `mkstemp' function. */ +/* #undef HAVE_MKSTEMP */ + +/* Define to 1 if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the 'posix_fadvise' function. */ +/* #undef HAVE_POSIX_FADVISE */ + +/* Have POSIX threads */ +/* #undef HAVE_PTHREAD */ + +/* Have PTHREAD_PRIO_INHERIT. */ +/* #undef HAVE_PTHREAD_PRIO_INHERIT */ + +/* Define to 1 if you have the `rand' function. */ +#define HAVE_RAND 1 + +/* Define to 1 if you have the `random' function. */ +/* #undef HAVE_RANDOM */ + +/* Define to 1 if you have the `random_r' function. */ +/* #undef HAVE_RANDOM_R */ + +/* Define to 1 if you have the `rand_r' function. */ +/* #undef HAVE_RAND_R */ + +/* Define to 1 if you have the `readlink' function. */ +/* #undef HAVE_READLINK */ + +/* Define to 1 if you have the 'scandir' function. */ +/* #undef HAVE_SCANDIR */ + +/* Define to 1 if you have the 'scandir' function with int (* compar)(const + void *, const void *) */ +/* #undef HAVE_SCANDIR_VOID_P */ + +/* Define to 1 if you have the <sched.h> header file. */ +/* #undef HAVE_SCHED_H */ + +/* Have sched_yield */ +/* #undef HAVE_SCHED_YIELD */ + +/* Have Solaris __machine_*_barrier and atomic_* operations */ +/* #undef HAVE_SOLARIS_ATOMIC_OPS */ + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if `d_type' is a member of `struct dirent'. */ +/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ + +/* Define to 1 if `st_mtim' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIM */ + +/* Define to 1 if `f_flags' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ + +/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ + +/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ + +/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the <sys/mount.h> header file. */ +/* #undef HAVE_SYS_MOUNT_H */ + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the <sys/param.h> header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the <sys/statfs.h> header file. */ +/* #undef HAVE_SYS_STATFS_H */ + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/vfs.h> header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ +/* #undef HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE */ + +/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ +/* #undef HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE */ + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Can use #warning in C files */ +#define HAVE_WARNING_CPP_DIRECTIVE 1 + +/* Use xmlparse.h instead of expat.h */ +/* #undef HAVE_XMLPARSE_H */ + +/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ +#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 + +/* Define to 1 if you have the `_mktemp_s' function. */ +#define HAVE__MKTEMP_S 1 + +/* Define to necessary symbol if this constant + uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* The size of `char', as computed by sizeof. */ +#define SIZEOF_CHAR 1 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `void*', as computed by sizeof. */ +/* The size of `void *', as computed by sizeof. */ +#if defined(_WIN64) +#define SIZEOF_VOIDP 8 +#define SIZEOF_VOID_P 8 +#else +#define SIZEOF_VOIDP 4 +#define SIZEOF_VOID_P 4 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Use iconv. */ +#define USE_ICONV 1
\ No newline at end of file diff --git a/ports/fontconfig/include/fcaliastail.h b/ports/fontconfig/include/fcaliastail.h new file mode 100644 index 000000000..a9eae81f2 --- /dev/null +++ b/ports/fontconfig/include/fcaliastail.h @@ -0,0 +1 @@ +/* intentionally empty */ diff --git a/ports/fontconfig/include/fcftaliastail.h b/ports/fontconfig/include/fcftaliastail.h new file mode 100644 index 000000000..a9eae81f2 --- /dev/null +++ b/ports/fontconfig/include/fcftaliastail.h @@ -0,0 +1 @@ +/* intentionally empty */ diff --git a/ports/fontconfig/include/fcobjshash.h b/ports/fontconfig/include/fcobjshash.h new file mode 100644 index 000000000..1fe860a2f --- /dev/null +++ b/ports/fontconfig/include/fcobjshash.h @@ -0,0 +1,328 @@ +/* ANSI-C code produced by gperf version 3.0.4 */ +/* Command-line: gperf -m 100 src/fcobjshash.gperf */ +/* Computed positions: -k'2-3' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + +#line 1 "src/fcobjshash.gperf" + +#line 13 "src/fcobjshash.gperf" +struct FcObjectTypeInfo { +int name; +int id; +}; +#include <string.h> +/* maximum key range = 56, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +FcObjectTypeHash (register const char *str, register unsigned int len) +{ + static const unsigned char asso_values[] = + { + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 21, 30, 3, + 36, 45, 60, 3, 15, 0, 60, 60, 0, 9, + 9, 0, 21, 60, 0, 0, 15, 0, 60, 60, + 0, 15, 24, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60 + }; + return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[1]]; +} + +struct FcObjectTypeNamePool_t + { + char FcObjectTypeNamePool_str4[sizeof("file")]; + char FcObjectTypeNamePool_str5[sizeof("color")]; + char FcObjectTypeNamePool_str7[sizeof("foundry")]; + char FcObjectTypeNamePool_str8[sizeof("fullname")]; + char FcObjectTypeNamePool_str9[sizeof("pixelsize")]; + char FcObjectTypeNamePool_str10[sizeof("prgname")]; + char FcObjectTypeNamePool_str12[sizeof("fullnamelang")]; + char FcObjectTypeNamePool_str13[sizeof("globaladvance")]; + char FcObjectTypeNamePool_str14[sizeof("postscriptname")]; + char FcObjectTypeNamePool_str16[sizeof("hinting")]; + char FcObjectTypeNamePool_str17[sizeof("minspace")]; + char FcObjectTypeNamePool_str18[sizeof("hintstyle")]; + char FcObjectTypeNamePool_str19[sizeof("fontformat")]; + char FcObjectTypeNamePool_str20[sizeof("fontversion")]; + char FcObjectTypeNamePool_str21[sizeof("fontfeatures")]; + char FcObjectTypeNamePool_str22[sizeof("outline")]; + char FcObjectTypeNamePool_str23[sizeof("autohint")]; + char FcObjectTypeNamePool_str24[sizeof("dpi")]; + char FcObjectTypeNamePool_str25[sizeof("hash")]; + char FcObjectTypeNamePool_str26[sizeof("slant")]; + char FcObjectTypeNamePool_str27[sizeof("aspect")]; + char FcObjectTypeNamePool_str28[sizeof("size")]; + char FcObjectTypeNamePool_str29[sizeof("scale")]; + char FcObjectTypeNamePool_str30[sizeof("symbol")]; + char FcObjectTypeNamePool_str31[sizeof("rasterizer")]; + char FcObjectTypeNamePool_str32[sizeof("scalable")]; + char FcObjectTypeNamePool_str33[sizeof("antialias")]; + char FcObjectTypeNamePool_str34[sizeof("lang")]; + char FcObjectTypeNamePool_str35[sizeof("style")]; + char FcObjectTypeNamePool_str36[sizeof("family")]; + char FcObjectTypeNamePool_str37[sizeof("rgba")]; + char FcObjectTypeNamePool_str38[sizeof("namelang")]; + char FcObjectTypeNamePool_str39[sizeof("stylelang")]; + char FcObjectTypeNamePool_str40[sizeof("familylang")]; + char FcObjectTypeNamePool_str41[sizeof("width")]; + char FcObjectTypeNamePool_str42[sizeof("matrix")]; + char FcObjectTypeNamePool_str43[sizeof("charset")]; + char FcObjectTypeNamePool_str45[sizeof("charwidth")]; + char FcObjectTypeNamePool_str46[sizeof("charheight")]; + char FcObjectTypeNamePool_str47[sizeof("embolden")]; + char FcObjectTypeNamePool_str48[sizeof("lcdfilter")]; + char FcObjectTypeNamePool_str49[sizeof("spacing")]; + char FcObjectTypeNamePool_str50[sizeof("index")]; + char FcObjectTypeNamePool_str51[sizeof("weight")]; + char FcObjectTypeNamePool_str52[sizeof("capability")]; + char FcObjectTypeNamePool_str53[sizeof("embeddedbitmap")]; + char FcObjectTypeNamePool_str58[sizeof("decorative")]; + char FcObjectTypeNamePool_str59[sizeof("verticallayout")]; + }; +static const struct FcObjectTypeNamePool_t FcObjectTypeNamePool_contents = + { + "file", + "color", + "foundry", + "fullname", + "pixelsize", + "prgname", + "fullnamelang", + "globaladvance", + "postscriptname", + "hinting", + "minspace", + "hintstyle", + "fontformat", + "fontversion", + "fontfeatures", + "outline", + "autohint", + "dpi", + "hash", + "slant", + "aspect", + "size", + "scale", + "symbol", + "rasterizer", + "scalable", + "antialias", + "lang", + "style", + "family", + "rgba", + "namelang", + "stylelang", + "familylang", + "width", + "matrix", + "charset", + "charwidth", + "charheight", + "embolden", + "lcdfilter", + "spacing", + "index", + "weight", + "capability", + "embeddedbitmap", + "decorative", + "verticallayout" + }; +#define FcObjectTypeNamePool ((const char *) &FcObjectTypeNamePool_contents) +#ifdef __GNUC__ +__inline +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +__attribute__ ((__gnu_inline__)) +#endif +#endif +const struct FcObjectTypeInfo * +FcObjectTypeLookup (register const char *str, register unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 48, + MIN_WORD_LENGTH = 3, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 4, + MAX_HASH_VALUE = 59 + }; + + static const struct FcObjectTypeInfo wordlist[] = + { + {-1}, {-1}, {-1}, {-1}, +#line 38 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str4,FC_FILE_OBJECT}, +#line 64 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str5,FC_COLOR_OBJECT}, + {-1}, +#line 31 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str7,FC_FOUNDRY_OBJECT}, +#line 22 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str8,FC_FULLNAME_OBJECT}, +#line 29 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str9,FC_PIXEL_SIZE_OBJECT}, +#line 61 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str10,FC_PRGNAME_OBJECT}, + {-1}, +#line 23 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str12,FC_FULLNAMELANG_OBJECT}, +#line 37 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str13,FC_GLOBAL_ADVANCE_OBJECT}, +#line 63 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str14,FC_POSTSCRIPT_NAME_OBJECT}, + {-1}, +#line 34 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str16,FC_HINTING_OBJECT}, +#line 46 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str17,FC_MINSPACE_OBJECT}, +#line 33 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str18,FC_HINT_STYLE_OBJECT}, +#line 54 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str19,FC_FONTFORMAT_OBJECT}, +#line 52 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str20,FC_FONTVERSION_OBJECT}, +#line 60 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str21,FC_FONT_FEATURES_OBJECT}, +#line 41 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str22,FC_OUTLINE_OBJECT}, +#line 36 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str23,FC_AUTOHINT_OBJECT}, +#line 43 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str24,FC_DPI_OBJECT}, +#line 62 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str25,FC_HASH_OBJECT}, +#line 24 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str26,FC_SLANT_OBJECT}, +#line 28 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str27,FC_ASPECT_OBJECT}, +#line 27 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str28,FC_SIZE_OBJECT}, +#line 45 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str29,FC_SCALE_OBJECT}, +#line 65 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str30,FC_SYMBOL_OBJECT}, +#line 40 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str31,FC_RASTERIZER_OBJECT}, +#line 42 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str32,FC_SCALABLE_OBJECT}, +#line 32 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str33,FC_ANTIALIAS_OBJECT}, +#line 51 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str34,FC_LANG_OBJECT}, +#line 20 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str35,FC_STYLE_OBJECT}, +#line 18 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str36,FC_FAMILY_OBJECT}, +#line 44 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str37,FC_RGBA_OBJECT}, +#line 59 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str38,FC_NAMELANG_OBJECT}, +#line 21 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str39,FC_STYLELANG_OBJECT}, +#line 19 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str40,FC_FAMILYLANG_OBJECT}, +#line 26 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str41,FC_WIDTH_OBJECT}, +#line 49 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str42,FC_MATRIX_OBJECT}, +#line 50 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT}, + {-1}, +#line 47 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT}, +#line 48 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT}, +#line 55 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str47,FC_EMBOLDEN_OBJECT}, +#line 58 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str48,FC_LCD_FILTER_OBJECT}, +#line 30 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str49,FC_SPACING_OBJECT}, +#line 39 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str50,FC_INDEX_OBJECT}, +#line 25 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str51,FC_WEIGHT_OBJECT}, +#line 53 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str52,FC_CAPABILITY_OBJECT}, +#line 56 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str53,FC_EMBEDDED_BITMAP_OBJECT}, + {-1}, {-1}, {-1}, {-1}, +#line 57 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str58,FC_DECORATIVE_OBJECT}, +#line 35 "src/fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str59,FC_VERTICAL_LAYOUT_OBJECT} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = FcObjectTypeHash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + { + register int o = wordlist[key].name; + if (o >= 0) + { + register const char *s = o + FcObjectTypeNamePool; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return &wordlist[key]; + } + } + } + return 0; +} diff --git a/ports/fontconfig/include/fcstdint.h b/ports/fontconfig/include/fcstdint.h new file mode 100644 index 000000000..1a8be6ef0 --- /dev/null +++ b/ports/fontconfig/include/fcstdint.h @@ -0,0 +1,8 @@ +#ifndef _FONTCONFIG_SRC_FCSTDINT_H +#define _FONTCONFIG_SRC_FCSTDINT_H 1 +#ifndef _GENERATED_STDINT_H +#define _GENERATED_STDINT_H "fontconfig 2.12.1" +#define _STDINT_HAVE_STDINT_H 1 +#include <stdint.h> +#endif +#endif diff --git a/ports/fontconfig/include/unistd.h b/ports/fontconfig/include/unistd.h new file mode 100644 index 000000000..7d04abe29 --- /dev/null +++ b/ports/fontconfig/include/unistd.h @@ -0,0 +1,21 @@ +/* Minimal unistd.h, just to get fontconfig to compile */ +#ifndef UNISTD_H +#define UNISTD_H + +#include <io.h> + +#ifndef R_OK +#define R_OK 4 +#endif + +#ifndef W_OK +#define W_OK 2 +#endif + +#ifndef F_OK +#define F_OK 0 +#endif + +typedef int mode_t; + +#endif
\ No newline at end of file diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake new file mode 100644 index 000000000..8755ad733 --- /dev/null +++ b/ports/fontconfig/portfile.cmake @@ -0,0 +1,39 @@ +
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fontconfig-2.12.1)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.12.1.tar.gz"
+ FILENAME "fontconfig-2.12.1.tar.gz"
+ SHA512 0959a80522e09551e49ec7b2383b7dfb319d4e1c058ad0b55bb35d3f675acbb7ff08c9c30a8798b731070687f84dd3d2ff7e28aafac6ecfa9d3f85c5847c0955)
+
+# Download single-header implementation of dirent API for Windows and it's license
+vcpkg_download_distfile(DIRENT_H
+ URLS "https://raw.githubusercontent.com/tronkko/dirent/8b1db5092479a73d47eafd3de739b27e876e6bf3/include/dirent.h"
+ FILENAME "fontconfig-dirent.h"
+ SHA512 dc9e63fd9cf4ccffdc052f92933633ef9d09dfcfe3b1d15f1f32c99349babd36a62d02283e3d8ba7766d92817be015eb211f11efc4fa52cc90d532a34d1ae785)
+vcpkg_download_distfile(DIRENT_LICENSE
+ URLS "https://raw.githubusercontent.com/tronkko/dirent/8b1db5092479a73d47eafd3de739b27e876e6bf3/LICENSE"
+ FILENAME "fontconfig-dirent-license"
+ SHA512 58c294f80b679252dbee9687ff6bda660fe1ed6f94506e1b9edc19358de98b274b25b3697bdcd34becb28a4f186c6d321a16ab616164e2fb378b37357fc71e4f)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${DIRENT_H} DESTINATION ${SOURCE_PATH})
+file(RENAME ${SOURCE_PATH}/fontconfig-dirent.h ${SOURCE_PATH}/dirent.h)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
+ -DFC_INCLUDE_DIR=${CMAKE_CURRENT_LIST_DIR}/include
+ OPTIONS_DEBUG
+ -DFC_SKIP_TOOLS=ON
+ -DFC_SKIP_HEADERS=ON)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/COPYING ${CURRENT_PACKAGES_DIR}/share/fontconfig/copyright)
+file(COPY ${DIRENT_LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/fontconfig-dirent-license ${CURRENT_PACKAGES_DIR}/share/fontconfig/dirent-for-vs-copyright)
|
