diff options
Diffstat (limited to 'freetype/builds')
98 files changed, 2322 insertions, 782 deletions
diff --git a/freetype/builds/amiga/README b/freetype/builds/amiga/README index c55252776..4ec8770ba 100644 --- a/freetype/builds/amiga/README +++ b/freetype/builds/amiga/README @@ -1,7 +1,7 @@ README for the builds/amiga subdirectory. -Copyright (C) 2005-2020 by +Copyright (C) 2005-2021 by Werner Lemberg and Detlef Würkner. This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/amiga/include/config/ftconfig.h b/freetype/builds/amiga/include/config/ftconfig.h index 4976c75fa..6deea6b7e 100644 --- a/freetype/builds/amiga/include/config/ftconfig.h +++ b/freetype/builds/amiga/include/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific configuration file (specification only). */ /* */ -/* Copyright (C) 2005-2020 by */ +/* Copyright (C) 2005-2021 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/freetype/builds/amiga/include/config/ftmodule.h b/freetype/builds/amiga/include/config/ftmodule.h index 6035bf016..873537cab 100644 --- a/freetype/builds/amiga/include/config/ftmodule.h +++ b/freetype/builds/amiga/include/config/ftmodule.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType module selection. */ /* */ -/* Copyright (C) 2005-2020 by */ +/* Copyright (C) 2005-2021 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/freetype/builds/amiga/makefile b/freetype/builds/amiga/makefile index 50315f381..ed7c780b3 100644 --- a/freetype/builds/amiga/makefile +++ b/freetype/builds/amiga/makefile @@ -5,7 +5,7 @@ # -# Copyright (C) 2005-2020 by +# Copyright (C) 2005-2021 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/amiga/makefile.os4 b/freetype/builds/amiga/makefile.os4 index cd5151c6c..58c89208b 100644 --- a/freetype/builds/amiga/makefile.os4 +++ b/freetype/builds/amiga/makefile.os4 @@ -4,7 +4,7 @@ # -# Copyright (C) 2005-2020 by +# Copyright (C) 2005-2021 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/amiga/smakefile b/freetype/builds/amiga/smakefile index fa4167658..aaddd1995 100644 --- a/freetype/builds/amiga/smakefile +++ b/freetype/builds/amiga/smakefile @@ -3,7 +3,7 @@ # -# Copyright (C) 2005-2020 by +# Copyright (C) 2005-2021 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/amiga/src/base/ftdebug.c b/freetype/builds/amiga/src/base/ftdebug.c index 6510d206a..dc7e968db 100644 --- a/freetype/builds/amiga/src/base/ftdebug.c +++ b/freetype/builds/amiga/src/base/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for amiga (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, Werner Lemberg, and Detlef Wuerkner. * * This file is part of the FreeType project, and may only be used, diff --git a/freetype/builds/amiga/src/base/ftsystem.c b/freetype/builds/amiga/src/base/ftsystem.c index 1dfbd6615..5c69e3ac9 100644 --- a/freetype/builds/amiga/src/base/ftsystem.c +++ b/freetype/builds/amiga/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType low-level system interface (body). */ /* */ -/* Copyright (C) 1996-2020 by */ +/* Copyright (C) 1996-2021 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -264,7 +264,7 @@ Free_VecPooled( APTR poolHeader, stream->descriptor.pointer = NULL; stream->size = 0; - stream->base = 0; + stream->base = NULL; } diff --git a/freetype/builds/ansi/ansi-def.mk b/freetype/builds/ansi/ansi-def.mk index 9642098da..218d5c0d1 100644 --- a/freetype/builds/ansi/ansi-def.mk +++ b/freetype/builds/ansi/ansi-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -13,11 +13,11 @@ # fully. -DELETE := rm -f -CAT := cat -SEP := / -BUILD_DIR := $(TOP_DIR)/builds/ansi -PLATFORM := ansi +DELETE := rm -f +CAT := cat +SEP := / +PLATFORM_DIR := $(TOP_DIR)/builds/ansi +PLATFORM := ansi # This is used for `make refdoc' and `make refdoc-venv' # @@ -64,14 +64,14 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := +ANSIFLAGS ?= # EOF diff --git a/freetype/builds/ansi/ansi.mk b/freetype/builds/ansi/ansi.mk index c24480303..b36c64e2f 100644 --- a/freetype/builds/ansi/ansi.mk +++ b/freetype/builds/ansi/ansi.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/atari/README.TXT b/freetype/builds/atari/README.TXT index ffe65456d..1300817b2 100644 --- a/freetype/builds/atari/README.TXT +++ b/freetype/builds/atari/README.TXT @@ -15,7 +15,7 @@ To compile FreeType 2 as a library the following changes must be applied: INCLUDE;E:\freetype2\include -- The file `freetype2/include/Ft2build.h' must be patched as follows to +- The file `freetype/include/Ft2build.h' must be patched as follows to include ATARI.H: #ifndef FT2_BUILD_GENERIC_H_ @@ -40,7 +40,7 @@ ge„ndert werden: INCLUDE;E:\freetype2\include -- In der Datei freetype2/include/Ft2build.h muss zu Beginn +- In der Datei freetype/include/Ft2build.h muss zu Beginn ein #include "ATARI.H" wie folgt eingefgt werden: #ifndef FT2_BUILD_GENERIC_H_ diff --git a/freetype/builds/beos/beos-def.mk b/freetype/builds/beos/beos-def.mk index 5ae7ed8fd..d7d63b37c 100644 --- a/freetype/builds/beos/beos-def.mk +++ b/freetype/builds/beos/beos-def.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,11 +15,11 @@ # fully. -DELETE := rm -f -CAT := cat -SEP := / -BUILD_DIR := $(TOP_DIR)/builds/beos -PLATFORM := beos +DELETE := rm -f +CAT := cat +SEP := / +PLATFORM_DIR := $(TOP_DIR)/builds/beos +PLATFORM := beos # This is used for `make refdoc' and `make refdoc-venv' # @@ -66,14 +66,14 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := +ANSIFLAGS ?= # EOF diff --git a/freetype/builds/beos/beos.mk b/freetype/builds/beos/beos.mk index 1a082c182..f3e3fbbe9 100644 --- a/freetype/builds/beos/beos.mk +++ b/freetype/builds/beos/beos.mk @@ -2,7 +2,7 @@ # FreeType 2 configuration rules for a BeOS system # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/beos/detect.mk b/freetype/builds/beos/detect.mk index 5b92512a4..521ecae98 100644 --- a/freetype/builds/beos/detect.mk +++ b/freetype/builds/beos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -27,11 +27,11 @@ endif ifeq ($(PLATFORM),beos) - DELETE := rm -f - CAT := cat - SEP := / - BUILD_DIR := $(TOP_DIR)/builds/beos - CONFIG_FILE := beos.mk + DELETE := rm -f + CAT := cat + SEP := / + PLATFORM_DIR := $(TOP_DIR)/builds/beos + CONFIG_FILE := beos.mk setup: std_setup diff --git a/freetype/builds/cmake/FindBrotliDec.cmake b/freetype/builds/cmake/FindBrotliDec.cmake index 7c484c7df..46356b1fd 100644 --- a/freetype/builds/cmake/FindBrotliDec.cmake +++ b/freetype/builds/cmake/FindBrotliDec.cmake @@ -1,6 +1,6 @@ # FindBrotliDec.cmake # -# Copyright (C) 2019-2020 by +# Copyright (C) 2019-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by Werner Lemberg <wl@gnu.org> @@ -19,7 +19,8 @@ # BROTLIDEC_INCLUDE_DIRS # BROTLIDEC_LIBRARIES -include(FindPkgConfig) +find_package(PkgConfig QUIET) + pkg_check_modules(PC_BROTLIDEC QUIET libbrotlidec) if (PC_BROTLIDEC_VERSION) @@ -41,7 +42,7 @@ find_library(BROTLIDEC_LIBRARIES include(FindPackageHandleStandardArgs) find_package_handle_standard_args( - brotlidec + BrotliDec REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES FOUND_VAR BROTLIDEC_FOUND VERSION_VAR BROTLIDEC_VERSION) diff --git a/freetype/builds/cmake/FindHarfBuzz.cmake b/freetype/builds/cmake/FindHarfBuzz.cmake index d489613fd..b481fa415 100644 --- a/freetype/builds/cmake/FindHarfBuzz.cmake +++ b/freetype/builds/cmake/FindHarfBuzz.cmake @@ -1,4 +1,5 @@ # Copyright (c) 2012, Intel Corporation +# Copyright (c) 2019 Sony Interactive Entertainment Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -23,65 +24,180 @@ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. - - -# Try to find HarfBuzz include and library directories. # -# After successful discovery, this will set for inclusion where needed: +# Try to find Harfbuzz include and library directories. # -# HARFBUZZ_INCLUDE_DIRS - containg the HarfBuzz headers -# HARFBUZZ_LIBRARIES - containg the HarfBuzz library +# After successful discovery, this will set for inclusion where needed: +# HarfBuzz_INCLUDE_DIRS - containg the HarfBuzz headers +# HarfBuzz_LIBRARIES - containg the HarfBuzz library + +#[=======================================================================[.rst: +FindHarfBuzz +-------------- + +Find HarfBuzz headers and libraries. + +Imported Targets +^^^^^^^^^^^^^^^^ + +``HarfBuzz::HarfBuzz`` + The HarfBuzz library, if found. + +``HarfBuzz::ICU`` + The HarfBuzz ICU library, if found. -include(FindPkgConfig) +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables in your project: + +``HarfBuzz_FOUND`` + true if (the requested version of) HarfBuzz is available. +``HarfBuzz_VERSION`` + the version of HarfBuzz. +``HarfBuzz_LIBRARIES`` + the libraries to link against to use HarfBuzz. +``HarfBuzz_INCLUDE_DIRS`` + where to find the HarfBuzz headers. +``HarfBuzz_COMPILE_OPTIONS`` + this should be passed to target_compile_options(), if the + target is not used for linking + +#]=======================================================================] + +find_package(PkgConfig QUIET) pkg_check_modules(PC_HARFBUZZ QUIET harfbuzz) +set(HarfBuzz_COMPILE_OPTIONS ${PC_HARFBUZZ_CFLAGS_OTHER}) +set(HarfBuzz_VERSION ${PC_HARFBUZZ_CFLAGS_VERSION}) + +find_path(HarfBuzz_INCLUDE_DIR + NAMES hb.h + HINTS ${PC_HARFBUZZ_INCLUDEDIR} ${PC_HARFBUZZ_INCLUDE_DIRS} + PATH_SUFFIXES harfbuzz +) + +find_library(HarfBuzz_LIBRARY + NAMES ${HarfBuzz_NAMES} harfbuzz + HINTS ${PC_HARFBUZZ_LIBDIR} ${PC_HARFBUZZ_LIBRARY_DIRS} +) + +if (HarfBuzz_INCLUDE_DIR AND NOT HarfBuzz_VERSION) + if (EXISTS "${HarfBuzz_INCLUDE_DIR}/hb-version.h") + file(READ "${HarfBuzz_INCLUDE_DIR}/hb-version.h" _harfbuzz_version_content) + + string(REGEX MATCH "#define +HB_VERSION_STRING +\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" _dummy "${_harfbuzz_version_content}") + set(HarfBuzz_VERSION "${CMAKE_MATCH_1}") + endif () +endif () -find_path(HARFBUZZ_INCLUDE_DIRS - NAMES hb.h - HINTS ${PC_HARFBUZZ_INCLUDEDIR} - ${PC_HARFBUZZ_INCLUDE_DIRS} - PATH_SUFFIXES harfbuzz) - -find_library(HARFBUZZ_LIBRARIES - NAMES harfbuzz - HINTS ${PC_HARFBUZZ_LIBDIR} - ${PC_HARFBUZZ_LIBRARY_DIRS}) - -if (HARFBUZZ_INCLUDE_DIRS) - if (EXISTS "${HARFBUZZ_INCLUDE_DIRS}/hb-version.h") - file(READ "${HARFBUZZ_INCLUDE_DIRS}/hb-version.h" _harfbuzz_version_content) - - string(REGEX MATCH - "#define +HB_VERSION_STRING +\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" - _dummy "${_harfbuzz_version_content}") - set(HARFBUZZ_VERSION "${CMAKE_MATCH_1}") +if ("${HarfBuzz_FIND_VERSION}" VERSION_GREATER "${HarfBuzz_VERSION}") + if (HarfBuzz_FIND_REQUIRED) + message(FATAL_ERROR + "Required version (" ${HarfBuzz_FIND_VERSION} ")" + " is higher than found version (" ${HarfBuzz_VERSION} ")") + else () + message(WARNING + "Required version (" ${HarfBuzz_FIND_VERSION} ")" + " is higher than found version (" ${HarfBuzz_VERSION} ")") + unset(HarfBuzz_VERSION) + unset(HarfBuzz_INCLUDE_DIRS) + unset(HarfBuzz_LIBRARIES) + return () endif () endif () -if ("${harfbuzz_FIND_VERSION}" VERSION_GREATER "${HARFBUZZ_VERSION}") - message(FATAL_ERROR - "Required version (" ${harfbuzz_FIND_VERSION} ")" - " is higher than found version (" ${HARFBUZZ_VERSION} ")") +# Find components +if (HarfBuzz_INCLUDE_DIR AND HarfBuzz_LIBRARY) + set(_HarfBuzz_REQUIRED_LIBS_FOUND ON) + set(HarfBuzz_LIBS_FOUND "HarfBuzz (required): ${HarfBuzz_LIBRARY}") +else () + set(_HarfBuzz_REQUIRED_LIBS_FOUND OFF) + set(HarfBuzz_LIBS_NOT_FOUND "HarfBuzz (required)") endif () -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - harfbuzz - REQUIRED_VARS HARFBUZZ_INCLUDE_DIRS HARFBUZZ_LIBRARIES - VERSION_VAR HARFBUZZ_VERSION) +if (NOT CMAKE_VERSION VERSION_LESS 3.3) + if ("ICU" IN_LIST HarfBuzz_FIND_COMPONENTS) + pkg_check_modules(PC_HARFBUZZ_ICU QUIET harfbuzz-icu) + set(HarfBuzz_ICU_COMPILE_OPTIONS ${PC_HARFBUZZ_ICU_CFLAGS_OTHER}) -mark_as_advanced( - HARFBUZZ_INCLUDE_DIRS - HARFBUZZ_LIBRARIES) + find_path(HarfBuzz_ICU_INCLUDE_DIR + NAMES hb-icu.h + HINTS ${PC_HARFBUZZ_ICU_INCLUDEDIR} ${PC_HARFBUZZ_ICU_INCLUDE_DIRS} + PATH_SUFFIXES harfbuzz + ) + + find_library(HarfBuzz_ICU_LIBRARY + NAMES ${HarfBuzz_ICU_NAMES} harfbuzz-icu + HINTS ${PC_HARFBUZZ_ICU_LIBDIR} ${PC_HARFBUZZ_ICU_LIBRARY_DIRS} + ) + + if (HarfBuzz_ICU_LIBRARY) + if (HarfBuzz_FIND_REQUIRED_ICU) + list(APPEND HarfBuzz_LIBS_FOUND "ICU (required): ${HarfBuzz_ICU_LIBRARY}") + else () + list(APPEND HarfBuzz_LIBS_FOUND "ICU (optional): ${HarfBuzz_ICU_LIBRARY}") + endif () + else () + if (HarfBuzz_FIND_REQUIRED_ICU) + set(_HarfBuzz_REQUIRED_LIBS_FOUND OFF) + list(APPEND HarfBuzz_LIBS_NOT_FOUND "ICU (required)") + else () + list(APPEND HarfBuzz_LIBS_NOT_FOUND "ICU (optional)") + endif () + endif () + endif () +endif () + +if (NOT HarfBuzz_FIND_QUIETLY) + if (HarfBuzz_LIBS_FOUND) + message(STATUS "Found the following HarfBuzz libraries:") + foreach (found ${HarfBuzz_LIBS_FOUND}) + message(STATUS " ${found}") + endforeach () + endif () + if (HarfBuzz_LIBS_NOT_FOUND) + message(STATUS "The following HarfBuzz libraries were not found:") + foreach (found ${HarfBuzz_LIBS_NOT_FOUND}) + message(STATUS " ${found}") + endforeach () + endif () +endif () + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(HarfBuzz + FOUND_VAR HarfBuzz_FOUND + REQUIRED_VARS HarfBuzz_INCLUDE_DIR HarfBuzz_LIBRARY _HarfBuzz_REQUIRED_LIBS_FOUND + VERSION_VAR HarfBuzz_VERSION +) -# Allow easy linking as in -# -# target_link_libraries(freetype PRIVATE Harfbuzz::Harfbuzz) -# if (NOT CMAKE_VERSION VERSION_LESS 3.1) - if (HARFBUZZ_FOUND AND NOT TARGET Harfbuzz::Harfbuzz) - add_library(Harfbuzz::Harfbuzz INTERFACE IMPORTED) - set_target_properties( - Harfbuzz::Harfbuzz PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${HARFBUZZ_INCLUDE_DIRS}") + if (HarfBuzz_LIBRARY AND NOT TARGET HarfBuzz::HarfBuzz) + add_library(HarfBuzz::HarfBuzz UNKNOWN IMPORTED GLOBAL) + set_target_properties(HarfBuzz::HarfBuzz PROPERTIES + IMPORTED_LOCATION "${HarfBuzz_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${HarfBuzz_COMPILE_OPTIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${HarfBuzz_INCLUDE_DIR}" + ) + endif () + + if (HarfBuzz_ICU_LIBRARY AND NOT TARGET HarfBuzz::ICU) + add_library(HarfBuzz::ICU UNKNOWN IMPORTED GLOBAL) + set_target_properties(HarfBuzz::ICU PROPERTIES + IMPORTED_LOCATION "${HarfBuzz_ICU_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${HarfBuzz_ICU_COMPILE_OPTIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${HarfBuzz_ICU_INCLUDE_DIR}" + ) endif () endif () + +mark_as_advanced( + HarfBuzz_INCLUDE_DIR + HarfBuzz_ICU_INCLUDE_DIR + HarfBuzz_LIBRARY + HarfBuzz_ICU_LIBRARY +) + +if (HarfBuzz_FOUND) + set(HarfBuzz_LIBRARIES ${HarfBuzz_LIBRARY} ${HarfBuzz_ICU_LIBRARY}) + set(HarfBuzz_INCLUDE_DIRS ${HarfBuzz_INCLUDE_DIR} ${HarfBuzz_ICU_INCLUDE_DIR}) +endif () diff --git a/freetype/builds/cmake/iOS.cmake b/freetype/builds/cmake/iOS.cmake index 6f46836ad..258654d4c 100644 --- a/freetype/builds/cmake/iOS.cmake +++ b/freetype/builds/cmake/iOS.cmake @@ -1,6 +1,6 @@ # iOS.cmake # -# Copyright (C) 2014-2020 by +# Copyright (C) 2014-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by David Wimsey <david@wimsey.us> diff --git a/freetype/builds/cmake/testbuild.sh b/freetype/builds/cmake/testbuild.sh index cc67abd46..c6c637206 100755 --- a/freetype/builds/cmake/testbuild.sh +++ b/freetype/builds/cmake/testbuild.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -# Copyright (C) 2015-2020 by +# Copyright (C) 2015-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/compiler/ansi-cc.mk b/freetype/builds/compiler/ansi-cc.mk index 78b13a490..e73e6fca3 100644 --- a/freetype/builds/compiler/ansi-cc.mk +++ b/freetype/builds/compiler/ansi-cc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -59,7 +59,7 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c @@ -68,7 +68,7 @@ CFLAGS ?= -c # # we assume the compiler is already strictly ANSI # -ANSIFLAGS := +ANSIFLAGS ?= # Library linking diff --git a/freetype/builds/compiler/bcc-dev.mk b/freetype/builds/compiler/bcc-dev.mk index 5f6f161c7..71804529b 100644 --- a/freetype/builds/compiler/bcc-dev.mk +++ b/freetype/builds/compiler/bcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -60,14 +60,14 @@ TE := -e # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := -A +ANSIFLAGS ?= -A # Library linking diff --git a/freetype/builds/compiler/bcc.mk b/freetype/builds/compiler/bcc.mk index f5e2e8a8d..321db1089 100644 --- a/freetype/builds/compiler/bcc.mk +++ b/freetype/builds/compiler/bcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -60,14 +60,14 @@ TE := -e # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := -A +ANSIFLAGS ?= -A # Library linking diff --git a/freetype/builds/compiler/emx.mk b/freetype/builds/compiler/emx.mk index bbb76049a..b3b6047e5 100644 --- a/freetype/builds/compiler/emx.mk +++ b/freetype/builds/compiler/emx.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2020 by +# Copyright (C) 2003-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -58,14 +58,14 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c -g -O6 -Wall # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := +ANSIFLAGS ?= # Library linking diff --git a/freetype/builds/compiler/gcc-dev.mk b/freetype/builds/compiler/gcc-dev.mk index 95b5f50de..f01192f7e 100644 --- a/freetype/builds/compiler/gcc-dev.mk +++ b/freetype/builds/compiler/gcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -59,7 +59,7 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # ifndef CFLAGS @@ -82,8 +82,9 @@ ifndef CFLAGS endif # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. +# You can override this on the command line. # -ANSIFLAGS := -ansi -pedantic +ANSIFLAGS ?= -std=c99 -pedantic # Library linking diff --git a/freetype/builds/compiler/gcc.mk b/freetype/builds/compiler/gcc.mk index 63cd93b26..ede20b2fc 100644 --- a/freetype/builds/compiler/gcc.mk +++ b/freetype/builds/compiler/gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -58,14 +58,14 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c -g -O3 -Wall # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := -ansi -pedantic +ANSIFLAGS ?= -std=c99 -pedantic # Library linking diff --git a/freetype/builds/compiler/intelc.mk b/freetype/builds/compiler/intelc.mk index b3c69b041..e5dcf90b3 100644 --- a/freetype/builds/compiler/intelc.mk +++ b/freetype/builds/compiler/intelc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -61,7 +61,7 @@ TE := /Fe # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # # Note that the Intel C/C++ compiler version 4.5 complains about @@ -74,7 +74,7 @@ CFLAGS ?= /nologo /c /Ox /G5 /W3 /Qwd32 # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := /Qansi_alias /Za +ANSIFLAGS ?= /Qansi_alias /Za # Library linking # diff --git a/freetype/builds/compiler/unix-lcc.mk b/freetype/builds/compiler/unix-lcc.mk index 26f8e7b7b..40322b4be 100644 --- a/freetype/builds/compiler/unix-lcc.mk +++ b/freetype/builds/compiler/unix-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -60,7 +60,7 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c -g @@ -71,7 +71,7 @@ CFLAGS ?= -c -g # # the "-A" flag simply increments verbosity about non ANSI code # -ANSIFLAGS := -A +ANSIFLAGS ?= -A # library linking diff --git a/freetype/builds/compiler/visualage.mk b/freetype/builds/compiler/visualage.mk index 4a8c8ac14..ebc3e48cf 100644 --- a/freetype/builds/compiler/visualage.mk +++ b/freetype/builds/compiler/visualage.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/compiler/visualc.mk b/freetype/builds/compiler/visualc.mk index a9cf71d8e..dc6998ad1 100644 --- a/freetype/builds/compiler/visualc.mk +++ b/freetype/builds/compiler/visualc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -63,14 +63,14 @@ TE := /Fe # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= /nologo /c /Ox /W3 /WX # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := /Za /D_CRT_SECURE_NO_DEPRECATE +ANSIFLAGS ?= /Za /D_CRT_SECURE_NO_DEPRECATE # Library linking diff --git a/freetype/builds/compiler/watcom.mk b/freetype/builds/compiler/watcom.mk index 43a9e0668..c1d1b6651 100644 --- a/freetype/builds/compiler/watcom.mk +++ b/freetype/builds/compiler/watcom.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -60,14 +60,14 @@ T := -FO= # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -zq # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # -ANSIFLAGS := -za +ANSIFLAGS ?= -za # Library linking diff --git a/freetype/builds/compiler/win-lcc.mk b/freetype/builds/compiler/win-lcc.mk index 00d9d31da..27fbc3034 100644 --- a/freetype/builds/compiler/win-lcc.mk +++ b/freetype/builds/compiler/win-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -60,7 +60,7 @@ T := -Fo # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # CFLAGS ?= -c -g2 -O @@ -69,7 +69,7 @@ CFLAGS ?= -c -g2 -O # # LCC is pure ANSI anyway! # -ANSIFLAGS := +ANSIFLAGS ?= # library linking diff --git a/freetype/builds/detect.mk b/freetype/builds/detect.mk index 94627fc05..78e9e750e 100644 --- a/freetype/builds/detect.mk +++ b/freetype/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -16,7 +16,7 @@ # This sub-Makefile is in charge of detecting the current platform. It sets # the following variables: # -# BUILD_DIR The configuration and system-specific directory. Usually +# PLATFORM_DIR The configuration and system-specific directory. Usually # `builds/$(PLATFORM)' but can be different for custom builds # of the library. # @@ -49,8 +49,8 @@ SEP := / BUILD_CONFIG := $(TOP_DIR)/builds # These two assignments must be delayed. -BUILD_DIR = $(BUILD_CONFIG)/$(PLATFORM) -CONFIG_RULES = $(BUILD_DIR)/$(CONFIG_FILE) +PLATFORM_DIR = $(BUILD_CONFIG)/$(PLATFORM) +CONFIG_RULES = $(PLATFORM_DIR)/$(CONFIG_FILE) # We define the BACKSLASH variable to hold a single back-slash character. # This is needed because a line like @@ -113,7 +113,7 @@ std_setup: $(info ) $(info $(empty) platform $(PLATFORM)) $(info $(empty) compiler $(CC)) - $(info $(empty) configuration directory $(subst /,$(SEP),$(BUILD_DIR))) + $(info $(empty) configuration directory $(subst /,$(SEP),$(PLATFORM_DIR))) $(info $(empty) configuration rules $(subst /,$(SEP),$(CONFIG_RULES))) $(info ) $(info If this does not correspond to your system or settings please remove the file) diff --git a/freetype/builds/dos/detect.mk b/freetype/builds/dos/detect.mk index f59879478..d95a2caa5 100644 --- a/freetype/builds/dos/detect.mk +++ b/freetype/builds/dos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/dos/dos-def.mk b/freetype/builds/dos/dos-def.mk index 067d1d42b..f7fbc4d65 100644 --- a/freetype/builds/dos/dos-def.mk +++ b/freetype/builds/dos/dos-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -13,11 +13,11 @@ # fully. -DELETE := del -CAT := type -SEP := $(strip \ ) -BUILD_DIR := $(TOP_DIR)/builds/dos -PLATFORM := dos +DELETE := del +CAT := type +SEP := $(strip \ ) +PLATFORM_DIR := $(TOP_DIR)/builds/dos +PLATFORM := dos # This is used for `make refdoc' and `make refdoc-venv' # diff --git a/freetype/builds/dos/dos-emx.mk b/freetype/builds/dos/dos-emx.mk index 517320837..dd9947962 100644 --- a/freetype/builds/dos/dos-emx.mk +++ b/freetype/builds/dos/dos-emx.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2020 by +# Copyright (C) 2003-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/dos/dos-gcc.mk b/freetype/builds/dos/dos-gcc.mk index 638892dbf..9abdabea1 100644 --- a/freetype/builds/dos/dos-gcc.mk +++ b/freetype/builds/dos/dos-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/dos/dos-wat.mk b/freetype/builds/dos/dos-wat.mk index 4e39d21a5..7ab82afeb 100644 --- a/freetype/builds/dos/dos-wat.mk +++ b/freetype/builds/dos/dos-wat.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2020 by +# Copyright (C) 2003-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/exports.mk b/freetype/builds/exports.mk index eba966875..67c7c9935 100644 --- a/freetype/builds/exports.mk +++ b/freetype/builds/exports.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2005-2020 by +# Copyright (C) 2005-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/freetype.mk b/freetype/builds/freetype.mk index 1d7eeb601..bae814556 100644 --- a/freetype/builds/freetype.mk +++ b/freetype/builds/freetype.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -20,8 +20,8 @@ # The following variables (set by other Makefile components, in the # environment, or on the command line) are used: # -# BUILD_DIR The architecture dependent directory, -# e.g. `$(TOP_DIR)/builds/unix'. Added to INCLUDES also. +# PLATFORM_DIR The architecture-dependent directory, +# e.g., `$(TOP_DIR)/builds/unix'. Added to INCLUDES also. # # OBJ_DIR The directory in which object files are created. # @@ -121,7 +121,7 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A # INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \ $(DEVEL_DIR) \ - $(BUILD_DIR) \ + $(PLATFORM_DIR) \ $(TOP_DIR)/include) INCLUDE_FLAGS := $(INCLUDES:%=$I%) @@ -150,9 +150,9 @@ endif # # `CPPFLAGS' might be specified by the user in the environment. # -FT_CFLAGS = $(CPPFLAGS) \ - $(CFLAGS) \ - $DFT2_BUILD_LIBRARY +FT_CFLAGS = $(CPPFLAGS) \ + $(CFLAGS) \ + $DFT2_BUILD_LIBRARY FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS) @@ -175,16 +175,16 @@ OBJECTS_LIST := # changes, the whole library is recompiled. # ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),) - FTOPTION_H := $(OBJ_DIR)/ftoption.h -else ifneq ($(wildcard $(BUILD_DIR)/ftoption.h),) - FTOPTION_H := $(BUILD_DIR)/ftoption.h + FTOPTION_H := $(OBJ_DIR)/ftoption.h +else ifneq ($(wildcard $(PLATFORM_DIR)/ftoption.h),) + FTOPTION_H := $(PLATFORM_DIR)/ftoption.h endif PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h) INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \ $(wildcard $(SERVICES_DIR)/*.h) CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \ - $(wildcard $(BUILD_DIR)/config/*.h) \ + $(wildcard $(PLATFORM_DIR)/config/*.h) \ $(FTMODULE_H) \ $(FTOPTION_H) DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h) @@ -220,6 +220,7 @@ $(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H) # include $(SRC_DIR)/base/rules.mk include $(patsubst %,$(SRC_DIR)/%/rules.mk,$(MODULES)) +include $(SRC_DIR)/dlg/rules.mk # ftinit component @@ -260,8 +261,8 @@ endif # All FreeType library objects. # -OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) -OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) +OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) $(DLG_OBJS_M) +OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) $(DLG_OBJS_S) # The target `multi' on the Make command line indicates that we want to diff --git a/freetype/builds/link_dos.mk b/freetype/builds/link_dos.mk index c1ed1507a..8716be51b 100644 --- a/freetype/builds/link_dos.mk +++ b/freetype/builds/link_dos.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/link_std.mk b/freetype/builds/link_std.mk index 940e67484..03f77721f 100644 --- a/freetype/builds/link_std.mk +++ b/freetype/builds/link_std.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/mac/ftmac.c b/freetype/builds/mac/ftmac.c index 2cb30468c..cd3f4844b 100644 --- a/freetype/builds/mac/ftmac.c +++ b/freetype/builds/mac/ftmac.c @@ -5,7 +5,7 @@ /* Mac FOND support. Written by just@letterror.com. */ /* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */ /* */ -/* Copyright (C) 1996-2020 by */ +/* Copyright (C) 1996-2021 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -447,7 +447,7 @@ typedef short ResourceIndex; stream->descriptor.pointer = NULL; stream->size = 0; - stream->base = 0; + stream->base = NULL; } @@ -939,7 +939,7 @@ typedef short ResourceIndex; if ( lwfn_file_name[0] ) { err = lookup_lwfn_by_fond( pathname, lwfn_file_name, - buff, sizeof ( buff ) ); + buff, sizeof ( buff ) ); if ( !err ) have_lwfn = 1; } @@ -1011,7 +1011,7 @@ typedef short ResourceIndex; old_total_size = total_size; } - if ( FT_ALLOC( buffer, (FT_Long)total_size ) ) + if ( FT_QALLOC( buffer, (FT_Long)total_size ) ) goto Error; /* Second pass: append all POST data to the buffer, add PFB fields. */ @@ -1127,7 +1127,7 @@ typedef short ResourceIndex; return FT_THROW( Invalid_Handle ); sfnt_size = (FT_ULong)GetHandleSize( sfnt ); - if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) ) + if ( FT_QALLOC( sfnt_data, (FT_Long)sfnt_size ) ) { ReleaseResource( sfnt ); return error; diff --git a/freetype/builds/meson/extract_freetype_version.py b/freetype/builds/meson/extract_freetype_version.py index 15e87dbcc..ab79fdb3b 100644 --- a/freetype/builds/meson/extract_freetype_version.py +++ b/freetype/builds/meson/extract_freetype_version.py @@ -1,4 +1,14 @@ #!/usr/bin/env python +# +# Copyright (C) 2020-2021 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. + """Extract the FreeType version numbers from `<freetype/freetype.h>`. This script parses the header to extract the version number defined there. diff --git a/freetype/builds/meson/extract_libtool_version.py b/freetype/builds/meson/extract_libtool_version.py index 0569481b3..4527f11b2 100644 --- a/freetype/builds/meson/extract_libtool_version.py +++ b/freetype/builds/meson/extract_libtool_version.py @@ -1,4 +1,14 @@ #!/usr/bin/env python +# +# Copyright (C) 2020-2021 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. + """Extract the libtool version from `configure.raw`. This script parses the `configure.raw` file to extract the libtool version diff --git a/freetype/builds/meson/generate_reference_docs.py b/freetype/builds/meson/generate_reference_docs.py index 219017c9d..15d9b0660 100644 --- a/freetype/builds/meson/generate_reference_docs.py +++ b/freetype/builds/meson/generate_reference_docs.py @@ -1,4 +1,14 @@ #!/usr/bin/env python +# +# Copyright (C) 2020-2021 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. + """Generate FreeType reference documentation.""" from __future__ import print_function diff --git a/freetype/builds/meson/parse_modules_cfg.py b/freetype/builds/meson/parse_modules_cfg.py index e0f760561..aa6e9e176 100644 --- a/freetype/builds/meson/parse_modules_cfg.py +++ b/freetype/builds/meson/parse_modules_cfg.py @@ -1,4 +1,14 @@ #!/usr/bin/env python +# +# Copyright (C) 2020-2021 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. + """Parse modules.cfg and dump its output either as ftmodule.h or a list of base extensions. """ diff --git a/freetype/builds/meson/process_ftoption_h.py b/freetype/builds/meson/process_ftoption_h.py index b5f80c314..fe6088785 100644 --- a/freetype/builds/meson/process_ftoption_h.py +++ b/freetype/builds/meson/process_ftoption_h.py @@ -1,4 +1,14 @@ -#!/usr/bin/python +#!/usr/bin/env python +# +# Copyright (C) 2020-2021 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. + """Toggle settings in `ftoption.h` file based on command-line arguments. This script takes an `ftoption.h` file as input and rewrites @@ -82,7 +92,7 @@ def main(): line = "#define " + option_name new_lines.append(line) - result = "\n".join(new_lines) + result = "\n".join(new_lines) + "\n" # Sanity check that all command-line options were actually processed. cmdline_options = set(args.enable) | set(args.disable) diff --git a/freetype/builds/modules.mk b/freetype/builds/modules.mk index ae2e238f1..33fccdf96 100644 --- a/freetype/builds/modules.mk +++ b/freetype/builds/modules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/os2/detect.mk b/freetype/builds/os2/detect.mk index 659b6c4a5..7b8962b19 100644 --- a/freetype/builds/os2/detect.mk +++ b/freetype/builds/os2/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/os2/os2-def.mk b/freetype/builds/os2/os2-def.mk index b09765403..08aab9573 100644 --- a/freetype/builds/os2/os2-def.mk +++ b/freetype/builds/os2/os2-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -13,11 +13,11 @@ # fully. -DELETE := del -CAT := type -SEP := $(strip \ ) -BUILD_DIR := $(TOP_DIR)/builds/os2 -PLATFORM := os2 +DELETE := del +CAT := type +SEP := $(strip \ ) +PLATFORM_DIR := $(TOP_DIR)/builds/os2 +PLATFORM := os2 # This is used for `make refdoc' and `make refdoc-venv' # diff --git a/freetype/builds/os2/os2-dev.mk b/freetype/builds/os2/os2-dev.mk index 8e2a4eb65..40591ffe3 100644 --- a/freetype/builds/os2/os2-dev.mk +++ b/freetype/builds/os2/os2-dev.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/os2/os2-gcc.mk b/freetype/builds/os2/os2-gcc.mk index 2bd39ae52..854c46df8 100644 --- a/freetype/builds/os2/os2-gcc.mk +++ b/freetype/builds/os2/os2-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/symbian/bld.inf b/freetype/builds/symbian/bld.inf index 9739da1c4..b9d000b1a 100644 --- a/freetype/builds/symbian/bld.inf +++ b/freetype/builds/symbian/bld.inf @@ -2,7 +2,7 @@ // FreeType 2 project for the symbian platform // -// Copyright (C) 2008-2020 by +// Copyright (C) 2008-2021 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/symbian/freetype.mmp b/freetype/builds/symbian/freetype.mmp index 90fc6bb88..fa49157ab 100644 --- a/freetype/builds/symbian/freetype.mmp +++ b/freetype/builds/symbian/freetype.mmp @@ -2,7 +2,7 @@ // FreeType 2 makefile for the symbian platform // -// Copyright (C) 2008-2020 by +// Copyright (C) 2008-2021 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/toplevel.mk b/freetype/builds/toplevel.mk index 5de61c113..53b6d6fc1 100644 --- a/freetype/builds/toplevel.mk +++ b/freetype/builds/toplevel.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -103,6 +103,7 @@ ifneq ($(findstring setup,$(MAKECMDGOALS)),) check_platform := 1 endif + # Include the automatic host platform detection rules when we need to # check the platform. # @@ -112,6 +113,17 @@ ifdef check_platform include $(TOP_DIR)/builds/detect.mk + # For builds directly from the git repository we need to copy files + # from `subprojects/dlg' to `src/dlg' and `include/dlg'. + # + ifeq ($(wildcard $(TOP_DIR)/src/dlg/dlg.*),) + ifeq ($(wildcard $(TOP_DIR)/subprojects/dlg/*),) + copy_submodule: check_out_submodule + endif + + setup: copy_submodule + endif + # This rule makes sense for Unix only to remove files created by a run of # the configure script which hasn't been successful (so that no # `config.mk' has been created). It uses the built-in $(RM) command of @@ -154,6 +166,23 @@ else endif # test check_platform +.PHONY: check_out_submodule copy_submodule + +check_out_submodule: + $(info Checking out submodule in `subprojects/dlg') + git submodule init + git submodule update + +copy_submodule: + $(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg') + ifeq ($(wildcard include/dlg),) + mkdir $(subst /,$(SEP),include/dlg) + endif + $(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/output.h include/dlg) + $(COPY) $(subst /,$(SEP),subprojects/dlg/include/dlg/dlg.h include/dlg) + $(COPY) $(subst /,$(SEP),subprojects/dlg/src/dlg/dlg.c src/dlg) + + # We always need the list of modules in ftmodule.h. # all setup: $(FTMODULE_H) @@ -197,6 +226,7 @@ patch := $(firstword $(patch)) # else version := $(major).$(minor).$(patch) winversion := $(major)$(minor)$(patch) + version_tag := VER-$(major)-$(minor)-$(patch) # endif @@ -219,7 +249,10 @@ dist: currdir=`pwd` ; \ for f in `find . -wholename '*/.git' -prune \ + -o -name .gitattributes \ -o -name .gitignore \ + -o -name .gitlab-ci.yml \ + -o -name .gitmodules \ -o -name .mailmap \ -o -type d \ -o -print` ; do \ @@ -250,6 +283,10 @@ dist: CONFIG_GUESS = ~/git/config/config.guess CONFIG_SUB = ~/git/config/config.sub +# We also use this repository to access the gnulib script that converts git +# commit messages to a ChangeLog file. +CHANGELOG_SCRIPT = ~/git/config/gitlog-to-changelog + # Don't say `make do-dist'. Always use `make dist' instead. # @@ -267,8 +304,20 @@ do-dist: distclean refdoc cp $(CONFIG_GUESS) builds/unix cp $(CONFIG_SUB) builds/unix + @# Generate `ChangeLog' file with commits since previous release. + $(CHANGELOG_SCRIPT) \ + --format='%B%n' \ + --no-cluster \ + -- `git describe --tags \ + --abbrev=0 \ + $(version_tag)^`..$(version_tag) \ + > ChangeLog + @# Remove intermediate files created by the `refdoc' target. rm -rf docs/markdown rm -f docs/mkdocs.yml + @# Remove more stuff related to git. + rm -rf subprojects + # EOF diff --git a/freetype/builds/unix/aclocal.m4 b/freetype/builds/unix/aclocal.m4 index adad988eb..96c1cc7fd 100644 --- a/freetype/builds/unix/aclocal.m4 +++ b/freetype/builds/unix/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8359,120 +8359,6 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS -# longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug is not important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include <limits.h> - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [], - [ac_cv_type_long_long_int=no], - [:]) - fi - fi]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [], - [ac_cv_type_unsigned_long_long_int=no]) - fi]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) - # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software @@ -9156,5 +9042,6 @@ m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) m4_include([ax_compare_version.m4]) m4_include([ax_prog_python_version.m4]) +m4_include([ax_pthread.m4]) m4_include([ft-munmap.m4]) m4_include([pkg.m4]) diff --git a/freetype/builds/unix/ax_pthread.m4 b/freetype/builds/unix/ax_pthread.m4 new file mode 100644 index 000000000..e5858e50c --- /dev/null +++ b/freetype/builds/unix/ax_pthread.m4 @@ -0,0 +1,522 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also to link with them as well. For example, you might link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threaded programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> +# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG> +# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <https://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 30 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_TARGET]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) + AC_MSG_RESULT([$ax_pthread_ok]) + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $target_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) + + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $target_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) + + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $target_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $target_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" + +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff --git a/freetype/builds/unix/configure.ac b/freetype/builds/unix/configure.ac index f54b94631..d1b7f1a78 100644 --- a/freetype/builds/unix/configure.ac +++ b/freetype/builds/unix/configure.ac @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright (C) 2001-2020 by +# Copyright (C) 2001-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -11,13 +11,13 @@ # indicate that you have read the license and understand and accept it # fully. -AC_INIT([FreeType], [2.10.4], [freetype@nongnu.org], [freetype]) +AC_INIT([FreeType], [2.11.1], [freetype@nongnu.org], [freetype]) AC_CONFIG_SRCDIR([ftconfig.h.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='23:4:17' +version_info='24:1:18' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -97,85 +97,12 @@ esac # checks for header files -AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h unistd.h]) # checks for typedefs, structures, and compiler characteristics AC_C_CONST -AC_CHECK_SIZEOF([int]) -AC_CHECK_SIZEOF([long]) -AC_TYPE_LONG_LONG_INT - - -# check whether cpp computation of size of int and long in ftconfig.h.in works - -AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.h.in works]) -orig_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include ${CPPFLAGS}" - -ac_clean_files= -if test ! -f ft2build.h; then - ac_clean_files=ft2build.h - touch ft2build.h -fi - -cat > conftest.c <<\_ACEOF -#include <limits.h> -#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> -#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> -#define FT_UINT_MAX UINT_MAX -#define FT_ULONG_MAX ULONG_MAX -#include "ftconfig.h.in" -_ACEOF -echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int} -echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int} -echo >> conftest.c "#endif" -echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long} -echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long} -echo >> conftest.c "#endif" - -${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh -eval `cat conftest.sh` -rm -f conftest.* $ac_clean_files - -if test x != "x${ac_cpp_ft_sizeof_int}" \ - -a x != x"${ac_cpp_ft_sizeof_long}"; then - unset ft_use_autoconf_sizeof_types -else - ft_use_autoconf_sizeof_types=yes -fi - -AC_ARG_ENABLE(biarch-config, -[ --enable-biarch-config install biarch ftconfig.h to support multiple - architectures by single file], [], []) - -case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in - :yes:yes:) - AC_MSG_RESULT([broken but use it]) - unset ft_use_autoconf_sizeof_types - ;; - ::no:) - AC_MSG_RESULT([works but ignore it]) - ft_use_autoconf_sizeof_types=yes - ;; - ::yes: | :::) - AC_MSG_RESULT([yes]) - unset ft_use_autoconf_sizeof_types - ;; - *) - AC_MSG_RESULT([no]) - ft_use_autoconf_sizeof_types=yes - ;; -esac - -if test x"${ft_use_autoconf_sizeof_types}" = xyes; then - AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [], - [Define if autoconf sizeof types should be used.]) -fi - -CPPFLAGS="${orig_CPPFLAGS}" AC_ARG_ENABLE([freetype-config], AS_HELP_STRING([--enable-freetype-config], [install freetype-config]), @@ -192,53 +119,59 @@ AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config]) AC_SYS_LARGEFILE # Here we check whether we can use our mmap file component. +# +# Note that `ftsystem.c` for Windows has its own mmap-like implementation +# not covered by `AC_FUNC_MMAP` and/or `FT_UNMAP_PARAM`. AC_ARG_ENABLE([mmap], AS_HELP_STRING([--disable-mmap], [do not check mmap() and do not use]), [enable_mmap="no"], [enable_mmap="yes"]) if test "x${enable_mmap}" != "xno"; then - AC_FUNC_MMAP -fi -if test "x${enable_mmap}" = "xno" \ - -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then - FTSYS_SRC='$(BASE_DIR)/ftsystem.c' -else - FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' + case "$host" in + *-*-mingw*) + AC_MSG_CHECKING([for working mmap]) + AC_MSG_RESULT([using MapViewOfFile in Windows]) + FTSYS_SRC='$(TOP_DIR)/builds/windows/ftsystem.c' + ;; + *) + AC_FUNC_MMAP + if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then + FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c' - AC_CHECK_DECLS([munmap], - [], - [], - [ + AC_CHECK_DECLS([munmap], + [], + [], + [ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #include <sys/mman.h> - ]) + ]) - FT_MUNMAP_PARAM + FT_MUNMAP_PARAM + fi + ;; + esac +fi + +if test -z "$FTSYS_SRC"; then + FTSYS_SRC='$(BASE_DIR)/ftsystem.c' fi AC_SUBST([FTSYS_SRC]) + AC_CHECK_FUNCS([memcpy memmove]) # get compiler flags right # -# We try to make the compiler work for C89-strict source. Even if the -# C compiler is gcc and C89 flags are available, some system headers -# (e.g., Android Bionic libc) are broken in C89 mode. We have to check -# whether the compilation finishes successfully. -# -# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW. -# -# To avoid zillions of -# -# ISO C90 does not support 'long long' -# -# warnings, we disable `-pedantic' for gcc version < 4.6. +# We try to make the compiler work for C99-strict source. Even if the +# C compiler is gcc and C99 flags are available, some system headers +# might be broken in C99 mode. We have to check whether compilation +# finishes successfully. # if test "x$GCC" = xyes; then XX_CFLAGS="-Wall" @@ -250,23 +183,11 @@ if test "x$GCC" = xyes; then XX_ANSIFLAGS="-pedantic" ;; *) - GCC_VERSION=`$CC -dumpversion` - GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'` - GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` - - XX_PEDANTIC=-pedantic - if test $GCC_MAJOR -lt 4; then - XX_PEDANTIC= - else - if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then - XX_PEDANTIC= - fi - fi - XX_ANSIFLAGS="" - for a in $XX_PEDANTIC -ansi + + for a in "-pedantic" "-std=c99" do - AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly]) + AC_MSG_CHECKING([$CC compiler flag ${a} to assure ANSI C99 works correctly]) orig_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}" AC_COMPILE_IFELSE([ @@ -508,7 +429,7 @@ AC_ARG_WITH([harfbuzz], have_harfbuzz=no if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then - harfbuzz_pkg="harfbuzz >= 1.8.0" + harfbuzz_pkg="harfbuzz >= 2.0.0" have_harfbuzz_pkg=no if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then @@ -1012,6 +933,10 @@ case "$CFLAGS" in ;; esac +# Check for pthreads + +AX_PTHREAD([have_pthread=yes], [have_pthread=no]) + # Check for Python and docwriter have_py3=no @@ -1024,7 +949,7 @@ if test "x$PYTHON" != "xmissing"; then if test "x$have_py3" = "xyes"; then PIP="$PYTHON -m $PIP" - AC_MSG_CHECKING([for \`docwriter' Python module]) + AC_MSG_CHECKING([for `docwriter' Python module]) $PYTHON -m docwriter -h > /dev/null 2>&1 if test "x$?" = "x0"; then have_docwriter=yes @@ -1142,6 +1067,11 @@ else ftoption_unset FT_CONFIG_OPTION_USE_BROTLI fi +if test "$have_pthread" != no; then + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS $PTHREAD_LIBS" +fi + AC_SUBST([CFLAGS]) AC_SUBST([LDFLAGS]) @@ -1176,16 +1106,27 @@ Library configuration: libpng: $have_libpng harfbuzz: $have_harfbuzz brotli: $have_brotli + pthread: $have_pthread ]) # Warn if docwriter is not installed if test $have_docwriter = no; then AC_MSG_WARN([ - \`make refdoc' will fail since pip package \`docwriter' is not installed. - To install, run \`$PIP install docwriter', or to use a Python - virtual environment, run \`make refdoc-venv' (requires pip package - \`virtualenv'). These operations require Python >= 3.5. + `make refdoc' will fail since pip package `docwriter' is not installed. + To install, run `$PIP install docwriter', or to use a Python + virtual environment, run `make refdoc-venv' (requires pip package + `virtualenv'). These operations require Python >= 3.5. + ]) +fi + +# Warn if pthread is not available + +if test $have_pthread = no; then + AC_MSG_WARN([ + `FT_DEBUG_LOGGING' will not work since the `pthread' library is not + available. This warning can be safely ignored if you don't plan to use + this configuration macro. ]) fi diff --git a/freetype/builds/unix/configure.raw b/freetype/builds/unix/configure.raw index bc65e452a..f326872cb 100644 --- a/freetype/builds/unix/configure.raw +++ b/freetype/builds/unix/configure.raw @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright (C) 2001-2020 by +# Copyright (C) 2001-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.h.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='23:4:17' +version_info='24:1:18' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -97,85 +97,12 @@ esac # checks for header files -AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h unistd.h]) # checks for typedefs, structures, and compiler characteristics AC_C_CONST -AC_CHECK_SIZEOF([int]) -AC_CHECK_SIZEOF([long]) -AC_TYPE_LONG_LONG_INT - - -# check whether cpp computation of size of int and long in ftconfig.h.in works - -AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.h.in works]) -orig_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include ${CPPFLAGS}" - -ac_clean_files= -if test ! -f ft2build.h; then - ac_clean_files=ft2build.h - touch ft2build.h -fi - -cat > conftest.c <<\_ACEOF -#include <limits.h> -#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> -#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> -#define FT_UINT_MAX UINT_MAX -#define FT_ULONG_MAX ULONG_MAX -#include "ftconfig.h.in" -_ACEOF -echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int} -echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int} -echo >> conftest.c "#endif" -echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long} -echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long} -echo >> conftest.c "#endif" - -${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh -eval `cat conftest.sh` -rm -f conftest.* $ac_clean_files - -if test x != "x${ac_cpp_ft_sizeof_int}" \ - -a x != x"${ac_cpp_ft_sizeof_long}"; then - unset ft_use_autoconf_sizeof_types -else - ft_use_autoconf_sizeof_types=yes -fi - -AC_ARG_ENABLE(biarch-config, -[ --enable-biarch-config install biarch ftconfig.h to support multiple - architectures by single file], [], []) - -case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in - :yes:yes:) - AC_MSG_RESULT([broken but use it]) - unset ft_use_autoconf_sizeof_types - ;; - ::no:) - AC_MSG_RESULT([works but ignore it]) - ft_use_autoconf_sizeof_types=yes - ;; - ::yes: | :::) - AC_MSG_RESULT([yes]) - unset ft_use_autoconf_sizeof_types - ;; - *) - AC_MSG_RESULT([no]) - ft_use_autoconf_sizeof_types=yes - ;; -esac - -if test x"${ft_use_autoconf_sizeof_types}" = xyes; then - AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [], - [Define if autoconf sizeof types should be used.]) -fi - -CPPFLAGS="${orig_CPPFLAGS}" AC_ARG_ENABLE([freetype-config], AS_HELP_STRING([--enable-freetype-config], [install freetype-config]), @@ -192,53 +119,59 @@ AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config]) AC_SYS_LARGEFILE # Here we check whether we can use our mmap file component. +# +# Note that `ftsystem.c` for Windows has its own mmap-like implementation +# not covered by `AC_FUNC_MMAP` and/or `FT_UNMAP_PARAM`. AC_ARG_ENABLE([mmap], AS_HELP_STRING([--disable-mmap], [do not check mmap() and do not use]), [enable_mmap="no"], [enable_mmap="yes"]) if test "x${enable_mmap}" != "xno"; then - AC_FUNC_MMAP -fi -if test "x${enable_mmap}" = "xno" \ - -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then - FTSYS_SRC='$(BASE_DIR)/ftsystem.c' -else - FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' + case "$host" in + *-*-mingw*) + AC_MSG_CHECKING([for working mmap]) + AC_MSG_RESULT([using MapViewOfFile in Windows]) + FTSYS_SRC='$(TOP_DIR)/builds/windows/ftsystem.c' + ;; + *) + AC_FUNC_MMAP + if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then + FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c' - AC_CHECK_DECLS([munmap], - [], - [], - [ + AC_CHECK_DECLS([munmap], + [], + [], + [ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #include <sys/mman.h> - ]) + ]) - FT_MUNMAP_PARAM + FT_MUNMAP_PARAM + fi + ;; + esac +fi + +if test -z "$FTSYS_SRC"; then + FTSYS_SRC='$(BASE_DIR)/ftsystem.c' fi AC_SUBST([FTSYS_SRC]) + AC_CHECK_FUNCS([memcpy memmove]) # get compiler flags right # -# We try to make the compiler work for C89-strict source. Even if the -# C compiler is gcc and C89 flags are available, some system headers -# (e.g., Android Bionic libc) are broken in C89 mode. We have to check -# whether the compilation finishes successfully. -# -# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW. -# -# To avoid zillions of -# -# ISO C90 does not support 'long long' -# -# warnings, we disable `-pedantic' for gcc version < 4.6. +# We try to make the compiler work for C99-strict source. Even if the +# C compiler is gcc and C99 flags are available, some system headers +# might be broken in C99 mode. We have to check whether compilation +# finishes successfully. # if test "x$GCC" = xyes; then XX_CFLAGS="-Wall" @@ -250,23 +183,11 @@ if test "x$GCC" = xyes; then XX_ANSIFLAGS="-pedantic" ;; *) - GCC_VERSION=`$CC -dumpversion` - GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'` - GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` - - XX_PEDANTIC=-pedantic - if test $GCC_MAJOR -lt 4; then - XX_PEDANTIC= - else - if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then - XX_PEDANTIC= - fi - fi - XX_ANSIFLAGS="" - for a in $XX_PEDANTIC -ansi + + for a in "-pedantic" "-std=c99" do - AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly]) + AC_MSG_CHECKING([$CC compiler flag ${a} to assure ANSI C99 works correctly]) orig_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}" AC_COMPILE_IFELSE([ @@ -508,7 +429,7 @@ AC_ARG_WITH([harfbuzz], have_harfbuzz=no if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then - harfbuzz_pkg="harfbuzz >= 1.8.0" + harfbuzz_pkg="harfbuzz >= 2.0.0" have_harfbuzz_pkg=no if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then @@ -1012,6 +933,10 @@ case "$CFLAGS" in ;; esac +# Check for pthreads + +AX_PTHREAD([have_pthread=yes], [have_pthread=no]) + # Check for Python and docwriter have_py3=no @@ -1024,7 +949,7 @@ if test "x$PYTHON" != "xmissing"; then if test "x$have_py3" = "xyes"; then PIP="$PYTHON -m $PIP" - AC_MSG_CHECKING([for \`docwriter' Python module]) + AC_MSG_CHECKING([for `docwriter' Python module]) $PYTHON -m docwriter -h > /dev/null 2>&1 if test "x$?" = "x0"; then have_docwriter=yes @@ -1142,6 +1067,11 @@ else ftoption_unset FT_CONFIG_OPTION_USE_BROTLI fi +if test "$have_pthread" != no; then + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS $PTHREAD_LIBS" +fi + AC_SUBST([CFLAGS]) AC_SUBST([LDFLAGS]) @@ -1176,16 +1106,27 @@ Library configuration: libpng: $have_libpng harfbuzz: $have_harfbuzz brotli: $have_brotli + pthread: $have_pthread ]) # Warn if docwriter is not installed if test $have_docwriter = no; then AC_MSG_WARN([ - \`make refdoc' will fail since pip package \`docwriter' is not installed. - To install, run \`$PIP install docwriter', or to use a Python - virtual environment, run \`make refdoc-venv' (requires pip package - \`virtualenv'). These operations require Python >= 3.5. + `make refdoc' will fail since pip package `docwriter' is not installed. + To install, run `$PIP install docwriter', or to use a Python + virtual environment, run `make refdoc-venv' (requires pip package + `virtualenv'). These operations require Python >= 3.5. + ]) +fi + +# Warn if pthread is not available + +if test $have_pthread = no; then + AC_MSG_WARN([ + `FT_DEBUG_LOGGING' will not work since the `pthread' library is not + available. This warning can be safely ignored if you don't plan to use + this configuration macro. ]) fi diff --git a/freetype/builds/unix/detect.mk b/freetype/builds/unix/detect.mk index c7e8408de..862b43219 100644 --- a/freetype/builds/unix/detect.mk +++ b/freetype/builds/unix/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/unix/freetype-config.in b/freetype/builds/unix/freetype-config.in index 3918ddb92..4edb092d0 100644 --- a/freetype/builds/unix/freetype-config.in +++ b/freetype/builds/unix/freetype-config.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (C) 2000-2020 by +# Copyright (C) 2000-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/unix/freetype2.m4 b/freetype/builds/unix/freetype2.m4 index 207c263fb..478a42210 100644 --- a/freetype/builds/unix/freetype2.m4 +++ b/freetype/builds/unix/freetype2.m4 @@ -1,7 +1,7 @@ # Configure paths for FreeType2 -# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor +# Marcelo Magallon 2001-10-26, based on `gtk.m4` by Owen Taylor # -# Copyright (C) 2001-2020 by +# Copyright (C) 2001-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,32 +15,32 @@ # generated by Autoconf, under the same distribution terms as the rest of # that program. # -# serial 5 +# serial 6 # AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) # Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS. -# MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is +# MINIMUM-VERSION is what libtool reports; the default is '7.0.1' (this is # FreeType 2.0.4). # +# To make this code work with older autoconf versions, `AS_HELP_STRING` is +# not quoted. +# AC_DEFUN([AC_CHECK_FT2], [# Get the cflags and libraries from the freetype-config script # AC_ARG_WITH([ft-prefix], - dnl don't quote AS_HELP_STRING! AS_HELP_STRING([--with-ft-prefix=PREFIX], [Prefix where FreeType is installed (optional)]), [ft_config_prefix="$withval"], [ft_config_prefix=""]) AC_ARG_WITH([ft-exec-prefix], - dnl don't quote AS_HELP_STRING! AS_HELP_STRING([--with-ft-exec-prefix=PREFIX], [Exec prefix where FreeType is installed (optional)]), [ft_config_exec_prefix="$withval"], [ft_config_exec_prefix=""]) AC_ARG_ENABLE([freetypetest], - dnl don't quote AS_HELP_STRING! AS_HELP_STRING([--disable-freetypetest], [Do not try to compile and run a test FreeType program]), [], diff --git a/freetype/builds/unix/ft-munmap.m4 b/freetype/builds/unix/ft-munmap.m4 index a1aea2ba1..275481ba1 100644 --- a/freetype/builds/unix/ft-munmap.m4 +++ b/freetype/builds/unix/ft-munmap.m4 @@ -1,6 +1,6 @@ ## FreeType specific autoconf tests # -# Copyright (C) 2002-2020 by +# Copyright (C) 2002-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/unix/ftconfig.h.in b/freetype/builds/unix/ftconfig.h.in index 00b5a8226..b42fe42f9 100644 --- a/freetype/builds/unix/ftconfig.h.in +++ b/freetype/builds/unix/ftconfig.h.in @@ -4,7 +4,7 @@ * * UNIX-specific configuration file (specification only). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -42,16 +42,6 @@ #undef HAVE_UNISTD_H #undef HAVE_FCNTL_H -#undef FT_USE_AUTOCONF_SIZEOF_TYPES -#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES - -#undef SIZEOF_INT -#undef SIZEOF_LONG -#define FT_SIZEOF_INT SIZEOF_INT -#define FT_SIZEOF_LONG SIZEOF_LONG - -#endif /* FT_USE_AUTOCONF_SIZEOF_TYPES */ - #include <freetype/config/integer-types.h> #include <freetype/config/public-macros.h> #include <freetype/config/mac-support.h> diff --git a/freetype/builds/unix/ftsystem.c b/freetype/builds/unix/ftsystem.c index b4d71d40e..81ed92858 100644 --- a/freetype/builds/unix/ftsystem.c +++ b/freetype/builds/unix/ftsystem.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftsystem.c */ -/* */ -/* Unix-specific FreeType low-level system interface (body). */ -/* */ -/* Copyright (C) 1996-2020 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftsystem.c + * + * Unix-specific FreeType low-level system interface (body). + * + * Copyright (C) 1996-2021 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include <ft2build.h> @@ -70,29 +70,40 @@ #include <errno.h> - /*************************************************************************/ - /* */ - /* MEMORY MANAGEMENT INTERFACE */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_alloc */ - /* */ - /* <Description> */ - /* The memory allocation function. */ - /* */ - /* <Input> */ - /* memory :: A pointer to the memory object. */ - /* */ - /* size :: The requested size in bytes. */ - /* */ - /* <Return> */ - /* The address of newly allocated block. */ - /* */ + /************************************************************************** + * + * MEMORY MANAGEMENT INTERFACE + * + */ + + + /************************************************************************** + * + * It is not necessary to do any error checking for the + * allocation-related functions. This will be done by the higher level + * routines like ft_mem_alloc() or ft_mem_realloc(). + * + */ + + + /************************************************************************** + * + * @Function: + * ft_alloc + * + * @Description: + * The memory allocation function. + * + * @Input: + * memory :: + * A pointer to the memory object. + * + * size :: + * The requested size in bytes. + * + * @Return: + * The address of newly allocated block. + */ FT_CALLBACK_DEF( void* ) ft_alloc( FT_Memory memory, long size ) @@ -103,26 +114,30 @@ } - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_realloc */ - /* */ - /* <Description> */ - /* The memory reallocation function. */ - /* */ - /* <Input> */ - /* memory :: A pointer to the memory object. */ - /* */ - /* cur_size :: The current size of the allocated memory block. */ - /* */ - /* new_size :: The newly requested size in bytes. */ - /* */ - /* block :: The current address of the block in memory. */ - /* */ - /* <Return> */ - /* The address of the reallocated memory block. */ - /* */ + /************************************************************************** + * + * @Function: + * ft_realloc + * + * @Description: + * The memory reallocation function. + * + * @Input: + * memory :: + * A pointer to the memory object. + * + * cur_size :: + * The current size of the allocated memory block. + * + * new_size :: + * The newly requested size in bytes. + * + * block :: + * The current address of the block in memory. + * + * @Return: + * The address of the reallocated memory block. + */ FT_CALLBACK_DEF( void* ) ft_realloc( FT_Memory memory, long cur_size, @@ -136,19 +151,21 @@ } - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_free */ - /* */ - /* <Description> */ - /* The memory release function. */ - /* */ - /* <Input> */ - /* memory :: A pointer to the memory object. */ - /* */ - /* block :: The address of block in memory to be freed. */ - /* */ + /************************************************************************** + * + * @Function: + * ft_free + * + * @Description: + * The memory release function. + * + * @Input: + * memory :: + * A pointer to the memory object. + * + * block :: + * The address of block in memory to be freed. + */ FT_CALLBACK_DEF( void ) ft_free( FT_Memory memory, void* block ) @@ -159,19 +176,19 @@ } - /*************************************************************************/ - /* */ - /* RESOURCE MANAGEMENT INTERFACE */ - /* */ - /*************************************************************************/ + /************************************************************************** + * + * RESOURCE MANAGEMENT INTERFACE + * + */ - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ + /************************************************************************** + * + * The macro FT_COMPONENT is used in trace mode. It is an implicit + * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log + * messages during execution. + */ #undef FT_COMPONENT #define FT_COMPONENT io @@ -180,17 +197,17 @@ #define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer ) - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_close_stream_by_munmap */ - /* */ - /* <Description> */ - /* The function to close a stream which is opened by mmap. */ - /* */ - /* <Input> */ - /* stream :: A pointer to the stream object. */ - /* */ + /************************************************************************** + * + * @Function: + * ft_close_stream_by_munmap + * + * @Description: + * The function to close a stream which is opened by mmap. + * + * @Input: + * stream :: A pointer to the stream object. + */ FT_CALLBACK_DEF( void ) ft_close_stream_by_munmap( FT_Stream stream ) { @@ -198,29 +215,29 @@ stream->descriptor.pointer = NULL; stream->size = 0; - stream->base = 0; + stream->base = NULL; } - /*************************************************************************/ - /* */ - /* <Function> */ - /* ft_close_stream_by_free */ - /* */ - /* <Description> */ - /* The function to close a stream which is created by ft_alloc. */ - /* */ - /* <Input> */ - /* stream :: A pointer to the stream object. */ - /* */ + /************************************************************************** + * + * @Function: + * ft_close_stream_by_free + * + * @Description: + * The function to close a stream which is created by ft_alloc. + * + * @Input: + * stream :: A pointer to the stream object. + */ FT_CALLBACK_DEF( void ) ft_close_stream_by_free( FT_Stream stream ) { - ft_free( NULL, stream->descriptor.pointer ); + ft_free( stream->memory, stream->descriptor.pointer ); stream->descriptor.pointer = NULL; stream->size = 0; - stream->base = 0; + stream->base = NULL; } @@ -296,8 +313,7 @@ file, 0 ); - /* on some RTOS, mmap might return 0 */ - if ( (long)stream->base != -1 && stream->base != NULL ) + if ( stream->base != MAP_FAILED ) stream->close = ft_close_stream_by_munmap; else { @@ -307,7 +323,7 @@ FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not `mmap' file `%s'\n", filepathname )); - stream->base = (unsigned char*)ft_alloc( NULL, stream->size ); + stream->base = (unsigned char*)ft_alloc( stream->memory, stream->size ); if ( !stream->base ) { @@ -348,7 +364,7 @@ stream->descriptor.pointer = stream->base; stream->pathname.pointer = (char*)filepathname; - stream->read = 0; + stream->read = NULL; FT_TRACE1(( "FT_Stream_Open:" )); FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n", @@ -357,7 +373,7 @@ return FT_Err_Ok; Fail_Read: - ft_free( NULL, stream->base ); + ft_free( stream->memory, stream->base ); Fail_Map: close( file ); @@ -392,7 +408,7 @@ memory = (FT_Memory)malloc( sizeof ( *memory ) ); if ( memory ) { - memory->user = 0; + memory->user = NULL; memory->alloc = ft_alloc; memory->realloc = ft_realloc; memory->free = ft_free; diff --git a/freetype/builds/unix/install.mk b/freetype/builds/unix/install.mk index aa2518769..45b761d53 100644 --- a/freetype/builds/unix/install.mk +++ b/freetype/builds/unix/install.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -62,7 +62,7 @@ endif $(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h $(INSTALL_DATA) $(OBJ_BUILD)/ftoption.h \ $(DESTDIR)$(includedir)/freetype2/freetype/config/ftoption.h - $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \ + $(INSTALL_SCRIPT) -m 644 $(PLATFORM_DIR)/freetype2.m4 \ $(DESTDIR)$(datadir)/aclocal/freetype2.m4 $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \ $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc diff --git a/freetype/builds/unix/unix-cc.in b/freetype/builds/unix/unix-cc.in index 30d097b23..89be45016 100644 --- a/freetype/builds/unix/unix-cc.in +++ b/freetype/builds/unix/unix-cc.in @@ -2,7 +2,7 @@ # FreeType 2 template for Unix-specific compiler definitions # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -14,7 +14,7 @@ CC := @CC@ COMPILER_SEP := $(SEP) -FT_LIBTOOL_DIR ?= $(BUILD_DIR) +FT_LIBTOOL_DIR ?= $(PLATFORM_DIR) LIBTOOL := $(FT_LIBTOOL_DIR)/libtool @@ -73,7 +73,7 @@ T := -o$(space) # # These should concern: debug output, optimization & warnings. # -# Use the ANSIFLAGS variable to define the compiler flags used to enfore +# Use the ANSIFLAGS variable to define the compiler flags used to enforce # ANSI compliance. # # We use our own FreeType configuration files overriding defaults. diff --git a/freetype/builds/unix/unix-def.in b/freetype/builds/unix/unix-def.in index 5e04f1c6a..d0c758d03 100644 --- a/freetype/builds/unix/unix-def.in +++ b/freetype/builds/unix/unix-def.in @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -27,7 +27,7 @@ PYTHON := @PYTHON@ BIN := bin # this is used for `make distclean' and `make install' -OBJ_BUILD ?= $(BUILD_DIR) +OBJ_BUILD ?= $(PLATFORM_DIR) # don't use `:=' here since the path stuff will be included after this file # diff --git a/freetype/builds/unix/unix-dev.mk b/freetype/builds/unix/unix-dev.mk index 135257522..0b572a034 100644 --- a/freetype/builds/unix/unix-dev.mk +++ b/freetype/builds/unix/unix-dev.mk @@ -6,7 +6,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/unix/unix-lcc.mk b/freetype/builds/unix/unix-lcc.mk index a6579db9e..db57835a0 100644 --- a/freetype/builds/unix/unix-lcc.mk +++ b/freetype/builds/unix/unix-lcc.mk @@ -6,7 +6,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/unix/unix.mk b/freetype/builds/unix/unix.mk index e08727d94..262fafb74 100644 --- a/freetype/builds/unix/unix.mk +++ b/freetype/builds/unix/unix.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -13,8 +13,8 @@ # fully. # We need these declarations here since unix-def.mk is a generated file. -BUILD_DIR := $(TOP_DIR)/builds/unix -PLATFORM := unix +PLATFORM_DIR := $(TOP_DIR)/builds/unix +PLATFORM := unix have_mk := $(wildcard $(OBJ_DIR)/unix-def.mk) ifneq ($(have_mk),) @@ -22,8 +22,8 @@ ifneq ($(have_mk),) include $(OBJ_DIR)/unix-def.mk include $(OBJ_DIR)/unix-cc.mk else - include $(BUILD_DIR)/unix-def.mk - include $(BUILD_DIR)/unix-cc.mk + include $(PLATFORM_DIR)/unix-def.mk + include $(PLATFORM_DIR)/unix-cc.mk endif ifdef BUILD_PROJECT diff --git a/freetype/builds/unix/unixddef.mk b/freetype/builds/unix/unixddef.mk index b8e321762..77c2a0df5 100644 --- a/freetype/builds/unix/unixddef.mk +++ b/freetype/builds/unix/unixddef.mk @@ -4,7 +4,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -27,9 +27,6 @@ SEP := / # BIN := bin -# we use a special devel ftoption.h -DEVEL_DIR := $(TOP_DIR)/devel - # library file name # diff --git a/freetype/builds/vms/ftconfig.h b/freetype/builds/vms/ftconfig.h index 07e5f83d7..2445b7d79 100644 --- a/freetype/builds/vms/ftconfig.h +++ b/freetype/builds/vms/ftconfig.h @@ -4,7 +4,7 @@ * * VMS-specific configuration file (specification only). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/freetype/builds/vms/ftsystem.c b/freetype/builds/vms/ftsystem.c index 177481ab2..31b08708f 100644 --- a/freetype/builds/vms/ftsystem.c +++ b/freetype/builds/vms/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* VMS-specific FreeType low-level system interface (body). */ /* */ -/* Copyright (C) 1996-2020 by */ +/* Copyright (C) 1996-2021 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -197,7 +197,7 @@ stream->descriptor.pointer = NULL; stream->size = 0; - stream->base = 0; + stream->base = NULL; } @@ -246,7 +246,7 @@ file, 0 ); - if ( (long)stream->base == -1 ) + if ( stream->base == MAP_FAILED ) { FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not `mmap' file `%s'\n", filepathname )); @@ -259,7 +259,7 @@ stream->pathname.pointer = (char*)filepathname; stream->close = ft_close_stream; - stream->read = 0; + stream->read = NULL; FT_TRACE1(( "FT_Stream_Open:" )); FT_TRACE1(( " opened `%s' (%d bytes) successfully\n", @@ -300,7 +300,7 @@ memory = (FT_Memory)malloc( sizeof ( *memory ) ); if ( memory ) { - memory->user = 0; + memory->user = NULL; memory->alloc = ft_alloc; memory->realloc = ft_realloc; memory->free = ft_free; diff --git a/freetype/builds/wince/ftdebug.c b/freetype/builds/wince/ftdebug.c index 734c4f0a5..9e1777661 100644 --- a/freetype/builds/wince/ftdebug.c +++ b/freetype/builds/wince/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for WinCE (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -230,7 +230,7 @@ /* const char* ft2_debug = getenv( "FT2_DEBUG" ); */ - const char* ft2_debug = 0; + const char* ft2_debug = NULL; if ( ft2_debug ) diff --git a/freetype/builds/wince/vc2005-ce/index.html b/freetype/builds/wince/vc2005-ce/index.html index 6936a8909..3e42cf992 100644 --- a/freetype/builds/wince/vc2005-ce/index.html +++ b/freetype/builds/wince/vc2005-ce/index.html @@ -21,7 +21,7 @@ the following targets: <li>PPC/SP WM6 (Windows Mobile 6)</li> </ul> -It compiles the following libraries from the FreeType 2.10.4 sources:</p> +It compiles the following libraries from the FreeType 2.11.1 sources:</p> <ul> <pre> diff --git a/freetype/builds/wince/vc2008-ce/index.html b/freetype/builds/wince/vc2008-ce/index.html index ee385af86..645675c72 100644 --- a/freetype/builds/wince/vc2008-ce/index.html +++ b/freetype/builds/wince/vc2008-ce/index.html @@ -21,7 +21,7 @@ the following targets: <li>PPC/SP WM6 (Windows Mobile 6)</li> </ul> -It compiles the following libraries from the FreeType 2.10.4 sources:</p> +It compiles the following libraries from the FreeType 2.11.1 sources:</p> <ul> <pre> diff --git a/freetype/builds/windows/detect.mk b/freetype/builds/windows/detect.mk index 303dc8b98..3eef47aaa 100644 --- a/freetype/builds/windows/detect.mk +++ b/freetype/builds/windows/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -81,9 +81,9 @@ ifeq ($(PLATFORM),windows) # (2004-11-11), and then in the devel mailing list (2004-11-20 to -23). # ifeq ($(OS),Windows_NT) - COPY := cmd.exe /c copy + COPY := >nul cmd.exe /c copy else - COPY := copy + COPY := >nul copy endif # test NT diff --git a/freetype/builds/windows/ftdebug.c b/freetype/builds/windows/ftdebug.c index d58949003..94c22da75 100644 --- a/freetype/builds/windows/ftdebug.c +++ b/freetype/builds/windows/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for Win32 (body). * - * Copyright (C) 1996-2020 by + * Copyright (C) 1996-2021 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -42,33 +42,108 @@ #include <freetype/freetype.h> +#include <freetype/ftlogging.h> #include <freetype/internal/ftdebug.h> +#include <freetype/internal/ftobjs.h> -#ifdef FT_DEBUG_LEVEL_ERROR +#ifdef FT_DEBUG_LOGGING -#include <stdarg.h> -#include <stdlib.h> -#include <string.h> + /************************************************************************** + * + * Variables used to control logging. + * + * 1. `ft_default_trace_level` stores the value of trace levels, which are + * provided to FreeType using the `FT2_DEBUG` environment variable. + * + * 2. `ft_fileptr` stores the `FILE*` handle. + * + * 3. `ft_component` is a string that holds the name of `FT_COMPONENT`. + * + * 4. The flag `ft_component_flag` prints the name of `FT_COMPONENT` along + * with the actual log message if set to true. + * + * 5. The flag `ft_timestamp_flag` prints time along with the actual log + * message if set to ture. + * + * 6. `ft_have_newline_char` is used to differentiate between a log + * message with and without a trailing newline character. + * + * 7. `ft_custom_trace_level` stores the custom trace level value, which + * is provided by the user at run-time. + * + * We use `static` to avoid 'unused variable' warnings. + * + */ + static const char* ft_default_trace_level = NULL; + static FILE* ft_fileptr = NULL; + static const char* ft_component = NULL; + static FT_Bool ft_component_flag = FALSE; + static FT_Bool ft_timestamp_flag = FALSE; + static FT_Bool ft_have_newline_char = TRUE; + static const char* ft_custom_trace_level = NULL; + /* declared in ftdebug.h */ + + dlg_handler ft_default_log_handler = NULL; + FT_Custom_Log_Handler custom_output_handler = NULL; + +#endif /* FT_DEBUG_LOGGING */ + + +#ifdef FT_DEBUG_LEVEL_ERROR + +#define WIN32_LEAN_AND_MEAN #include <windows.h> +#ifdef _WIN32_WCE + + FT_LOACAL_DEF( void ) + OutputDebugStringA( LPCSTR lpOutputString ) + { + int len; + LPWSTR lpOutputStringW; + + + /* allocate memory space for converted string */ + len = MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS, + lpOutputString, -1, NULL, 0 ); + + lpOutputStringW = (LPWSTR)_alloca( len * sizeof ( WCHAR ) ); + + if ( !len || !lpOutputStringW ) + return; + + /* now it is safe to do the translation */ + MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS, + lpOutputString, -1, lpOutputStringW, len ); + + OutputDebugStringW( lpOutputStringW ); + } + +#endif /* _WIN32_WCE */ + + /* documentation is in ftdebug.h */ FT_BASE_DEF( void ) FT_Message( const char* fmt, ... ) { - static char buf[8192]; - va_list ap; + va_list ap; va_start( ap, fmt ); vfprintf( stderr, fmt, ap ); - /* send the string to the debugger as well */ - vsprintf( buf, fmt, ap ); - OutputDebugStringA( buf ); + if ( IsDebuggerPresent() ) + { + static char buf[1024]; + + + vsnprintf( buf, sizeof buf, fmt, ap ); + OutputDebugStringA( buf ); + } va_end( ap ); } @@ -79,13 +154,19 @@ FT_Panic( const char* fmt, ... ) { - static char buf[8192]; - va_list ap; + va_list ap; va_start( ap, fmt ); - vsprintf( buf, fmt, ap ); - OutputDebugStringA( buf ); + vfprintf( stderr, fmt, ap ); + if ( IsDebuggerPresent() ) + { + static char buf[1024]; + + + vsnprintf( buf, sizeof buf, fmt, ap ); + OutputDebugStringA( buf ); + } va_end( ap ); exit( EXIT_FAILURE ); @@ -207,9 +288,18 @@ FT_BASE_DEF( void ) ft_debug_init( void ) { - const char* ft2_debug = getenv( "FT2_DEBUG" ); + const char* ft2_debug = NULL; +#ifdef FT_DEBUG_LOGGING + if ( ft_custom_trace_level != NULL ) + ft2_debug = ft_custom_trace_level; + else + ft2_debug = ft_default_trace_level; +#else + ft2_debug = ft_getenv( "FT2_DEBUG" ); +#endif + if ( ft2_debug ) { const char* p = ft2_debug; @@ -222,6 +312,49 @@ if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' ) continue; +#ifdef FT_DEBUG_LOGGING + + /* check extra arguments for logging */ + if ( *p == '-' ) + { + const char* r = ++p; + + + if ( *r == 'v' ) + { + const char* s = ++r; + + + ft_component_flag = TRUE; + + if ( *s == 't' ) + { + ft_timestamp_flag = TRUE; + p++; + } + + p++; + } + + else if ( *r == 't' ) + { + const char* s = ++r; + + + ft_timestamp_flag = TRUE; + + if ( *s == 'v' ) + { + ft_component_flag = TRUE; + p++; + } + + p++; + } + } + +#endif /* FT_DEBUG_LOGGING */ + /* read toggle name, followed by ':' */ q = p; while ( *p && *p != ':' ) @@ -323,8 +456,237 @@ /* nothing */ } - #endif /* !FT_DEBUG_LEVEL_TRACE */ +#ifdef FT_DEBUG_LOGGING + + /************************************************************************** + * + * Initialize and de-initialize 'dlg' library. + * + */ + + FT_BASE_DEF( void ) + ft_logging_init( void ) + { + ft_default_log_handler = ft_log_handler; + ft_default_trace_level = ft_getenv( "FT2_DEBUG" ); + + if ( ft_getenv( "FT_LOGGING_FILE" ) ) + ft_fileptr = ft_fopen( ft_getenv( "FT_LOGGING_FILE" ), "w" ); + else + ft_fileptr = stderr; + + ft_debug_init(); + + /* Set the default output handler for 'dlg'. */ + dlg_set_handler( ft_default_log_handler, NULL ); + } + + + FT_BASE_DEF( void ) + ft_logging_deinit( void ) + { + if ( ft_fileptr != stderr ) + ft_fclose( ft_fileptr ); + } + + + /************************************************************************** + * + * An output log handler for FreeType. + * + */ + FT_BASE_DEF( void ) + ft_log_handler( const struct dlg_origin* origin, + const char* string, + void* data ) + { + char features_buf[128]; + char* bufp = features_buf; + + FT_UNUSED( data ); + + + if ( ft_have_newline_char ) + { + const char* features = NULL; + size_t features_length = 0; + + +#define FEATURES_TIMESTAMP "[%h:%m] " +#define FEATURES_COMPONENT "[%t] " +#define FEATURES_TIMESTAMP_COMPONENT "[%h:%m %t] " + + if ( ft_timestamp_flag && ft_component_flag ) + { + features = FEATURES_TIMESTAMP_COMPONENT; + features_length = sizeof ( FEATURES_TIMESTAMP_COMPONENT ); + } + else if ( ft_timestamp_flag ) + { + features = FEATURES_TIMESTAMP; + features_length = sizeof ( FEATURES_TIMESTAMP ); + } + else if ( ft_component_flag ) + { + features = FEATURES_COMPONENT; + features_length = sizeof ( FEATURES_COMPONENT ); + } + + if ( ft_component_flag || ft_timestamp_flag ) + { + ft_strncpy( features_buf, features, features_length ); + bufp += features_length - 1; + } + + if ( ft_component_flag ) + { + size_t tag_length = ft_strlen( *origin->tags ); + size_t i; + + + /* To vertically align tracing messages we compensate the */ + /* different FT_COMPONENT string lengths by inserting an */ + /* appropriate amount of space characters. */ + for ( i = 0; + i < FT_MAX_TRACE_LEVEL_LENGTH - tag_length; + i++ ) + *bufp++ = ' '; + } + } + + /* Finally add the format string for the tracing message. */ + *bufp++ = '%'; + *bufp++ = 'c'; + *bufp = '\0'; + + dlg_generic_outputf_stream( ft_fileptr, + (const char*)features_buf, + origin, + string, + dlg_default_output_styles, + true ); + + if ( ft_strrchr( string, '\n' ) ) + ft_have_newline_char = TRUE; + else + ft_have_newline_char = FALSE; + } + + + /* documentation is in ftdebug.h */ + FT_BASE_DEF( void ) + ft_add_tag( const char* tag ) + { + ft_component = tag; + + dlg_add_tag( tag, NULL ); + } + + + /* documentation is in ftdebug.h */ + FT_BASE_DEF( void ) + ft_remove_tag( const char* tag ) + { + dlg_remove_tag( tag, NULL ); + } + + + /* documentation is in ftlogging.h */ + + FT_EXPORT_DEF( void ) + FT_Trace_Set_Level( const char* level ) + { + ft_component_flag = FALSE; + ft_timestamp_flag = FALSE; + ft_custom_trace_level = level; + + ft_debug_init(); + } + + + /* documentation is in ftlogging.h */ + + FT_EXPORT_DEF( void ) + FT_Trace_Set_Default_Level( void ) + { + ft_component_flag = FALSE; + ft_timestamp_flag = FALSE; + ft_custom_trace_level = NULL; + + ft_debug_init(); + } + + + /************************************************************************** + * + * Functions to handle a custom log handler. + * + */ + + /* documentation is in ftlogging.h */ + + FT_EXPORT_DEF( void ) + FT_Set_Log_Handler( FT_Custom_Log_Handler handler ) + { + custom_output_handler = handler; + } + + + /* documentation is in ftlogging.h */ + + FT_EXPORT_DEF( void ) + FT_Set_Default_Log_Handler( void ) + { + custom_output_handler = NULL; + } + + + /* documentation is in ftdebug.h */ + FT_BASE_DEF( void ) + FT_Logging_Callback( const char* fmt, + ... ) + { + va_list ap; + + + va_start( ap, fmt ); + custom_output_handler( ft_component, fmt, ap ); + va_end( ap ); + } + +#else /* !FT_DEBUG_LOGGING */ + + FT_EXPORT_DEF( void ) + FT_Trace_Set_Level( const char* level ) + { + FT_UNUSED( level ); + } + + + FT_EXPORT_DEF( void ) + FT_Trace_Set_Default_Level( void ) + { + /* nothing */ + } + + + FT_EXPORT_DEF( void ) + FT_Set_Log_Handler( FT_Custom_Log_Handler handler ) + { + FT_UNUSED( handler ); + } + + + FT_EXPORT_DEF( void ) + FT_Set_Default_Log_Handler( void ) + { + /* nothing */ + } + +#endif /* !FT_DEBUG_LOGGING */ + + /* END */ diff --git a/freetype/builds/windows/ftsystem.c b/freetype/builds/windows/ftsystem.c new file mode 100644 index 000000000..1ebadd49f --- /dev/null +++ b/freetype/builds/windows/ftsystem.c @@ -0,0 +1,436 @@ +/**************************************************************************** + * + * ftsystem.c + * + * Windows-specific FreeType low-level system interface (body). + * + * Copyright (C) 2021 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + +#include <ft2build.h> + /* we use our special ftconfig.h file, not the standard one */ +#include FT_CONFIG_CONFIG_H +#include <freetype/internal/ftdebug.h> +#include <freetype/ftsystem.h> +#include <freetype/fterrors.h> +#include <freetype/fttypes.h> +#include <freetype/internal/ftstream.h> + + /* memory mapping and allocation includes and definitions */ +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + + + /************************************************************************** + * + * MEMORY MANAGEMENT INTERFACE + * + */ + + + /************************************************************************** + * + * It is not necessary to do any error checking for the + * allocation-related functions. This will be done by the higher level + * routines like ft_mem_alloc() or ft_mem_realloc(). + * + */ + + + /************************************************************************** + * + * @Function: + * ft_alloc + * + * @Description: + * The memory allocation function. + * + * @Input: + * memory :: + * A pointer to the memory object. + * + * size :: + * The requested size in bytes. + * + * @Return: + * The address of newly allocated block. + */ + FT_CALLBACK_DEF( void* ) + ft_alloc( FT_Memory memory, + long size ) + { + return HeapAlloc( memory->user, 0, size ); + } + + + /************************************************************************** + * + * @Function: + * ft_realloc + * + * @Description: + * The memory reallocation function. + * + * @Input: + * memory :: + * A pointer to the memory object. + * + * cur_size :: + * The current size of the allocated memory block. + * + * new_size :: + * The newly requested size in bytes. + * + * block :: + * The current address of the block in memory. + * + * @Return: + * The address of the reallocated memory block. + */ + FT_CALLBACK_DEF( void* ) + ft_realloc( FT_Memory memory, + long cur_size, + long new_size, + void* block ) + { + FT_UNUSED( cur_size ); + + return HeapReAlloc( memory->user, 0, block, new_size ); + } + + + /************************************************************************** + * + * @Function: + * ft_free + * + * @Description: + * The memory release function. + * + * @Input: + * memory :: + * A pointer to the memory object. + * + * block :: + * The address of block in memory to be freed. + */ + FT_CALLBACK_DEF( void ) + ft_free( FT_Memory memory, + void* block ) + { + HeapFree( memory->user, 0, block ); + } + + + /************************************************************************** + * + * RESOURCE MANAGEMENT INTERFACE + * + */ + + + /************************************************************************** + * + * The macro FT_COMPONENT is used in trace mode. It is an implicit + * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log + * messages during execution. + */ +#undef FT_COMPONENT +#define FT_COMPONENT io + + /* We use the macro STREAM_FILE for convenience to extract the */ + /* system-specific stream handle from a given FreeType stream object */ +#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer ) + + + /************************************************************************** + * + * @Function: + * ft_close_stream_by_munmap + * + * @Description: + * The function to close a stream which is opened by mmap. + * + * @Input: + * stream :: A pointer to the stream object. + */ + FT_CALLBACK_DEF( void ) + ft_close_stream_by_munmap( FT_Stream stream ) + { + UnmapViewOfFile( (LPCVOID)stream->descriptor.pointer ); + + stream->descriptor.pointer = NULL; + stream->size = 0; + stream->base = NULL; + } + + + /************************************************************************** + * + * @Function: + * ft_close_stream_by_free + * + * @Description: + * The function to close a stream which is created by ft_alloc. + * + * @Input: + * stream :: A pointer to the stream object. + */ + FT_CALLBACK_DEF( void ) + ft_close_stream_by_free( FT_Stream stream ) + { + ft_free( stream->memory, stream->descriptor.pointer ); + + stream->descriptor.pointer = NULL; + stream->size = 0; + stream->base = NULL; + } + + +#ifdef _WIN32_WCE + + FT_LOCAL_DEF( HANDLE ) + CreateFileA( LPCSTR lpFileName, + DWORD dwDesiredAccess, + DWORD dwShareMode, + LPSECURITY_ATTRIBUTES lpSecurityAttributes, + DWORD dwCreationDisposition, + DWORD dwFlagsAndAttributes, + HANDLE hTemplateFile ) + { + int len; + LPWSTR lpFileNameW; + + + /* allocate memory space for converted path name */ + len = MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS, + lpFileName, -1, NULL, 0 ); + + lpFileNameW = (LPWSTR)_alloca( len * sizeof ( WCHAR ) ); + + if ( !len || !lpFileNameW ) + { + FT_ERROR(( "FT_Stream_Open: cannot convert file name to LPWSTR\n" )); + return INVALID_HANDLE_VALUE; + } + + /* now it is safe to do the translation */ + MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS, + lpFileName, -1, lpFileNameW, len ); + + /* open the file */ + return CreateFileW( lpFileNameW, dwDesiredAccess, dwShareMode, + lpSecurityAttributes, dwCreationDisposition, + dwFlagsAndAttributes, hTemplateFile ); + } + + + FT_LOCAL_DEF( BOOL ) + GetFileSizeEx( HANDLE hFile, + PLARGE_INTEGER lpFileSize ) + { + lpFileSize->u.LowPart = GetFileSize( hFile, + (DWORD *)&lpFileSize->u.HighPart ); + + if ( lpFileSize->u.LowPart == INVALID_FILE_SIZE && + GetLastError() != NO_ERROR ) + return FALSE; + else + return TRUE; + } + +#endif /* _WIN32_WCE */ + + + /* documentation is in ftobjs.h */ + + FT_BASE_DEF( FT_Error ) + FT_Stream_Open( FT_Stream stream, + const char* filepathname ) + { + HANDLE file; + HANDLE fm; + LARGE_INTEGER size; + + + if ( !stream ) + return FT_THROW( Invalid_Stream_Handle ); + + /* open the file */ + file = CreateFileA( (LPCSTR)filepathname, GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 ); + if ( file == INVALID_HANDLE_VALUE ) + { + FT_ERROR(( "FT_Stream_Open:" )); + FT_ERROR(( " could not open `%s'\n", filepathname )); + return FT_THROW( Cannot_Open_Resource ); + } + + if ( GetFileSizeEx( file, &size ) == FALSE ) + { + FT_ERROR(( "FT_Stream_Open:" )); + FT_ERROR(( " could not retrieve size of file `%s'\n", filepathname )); + goto Fail_Open; + } + + /* `stream->size' is typedef'd to unsigned long (in `ftsystem.h'); */ + /* So avoid overflow caused by fonts in huge files larger than */ + /* 2GB, do a test. */ + if ( size.QuadPart > LONG_MAX ) + { + FT_ERROR(( "FT_Stream_Open: file is too big\n" )); + goto Fail_Open; + } + else if ( size.QuadPart == 0 ) + { + FT_ERROR(( "FT_Stream_Open: zero-length file\n" )); + goto Fail_Open; + } + + fm = CreateFileMapping( file, NULL, PAGE_READONLY, 0, 0, NULL ); + if ( fm == NULL ) + { + FT_ERROR(( "FT_Stream_Open: can not map file\n" )); + goto Fail_Open; + } + + /* Store only the low part of this 64 bits integer because long is */ + /* a 32 bits type. Anyway, a check has been done above to forbid */ + /* a size greater than LONG_MAX */ + stream->size = size.LowPart; + stream->pos = 0; + stream->base = (unsigned char *) + MapViewOfFile( fm, FILE_MAP_READ, 0, 0, 0 ); + + CloseHandle( fm ); + + if ( stream->base != NULL ) + stream->close = ft_close_stream_by_munmap; + else + { + DWORD total_read_count; + + + FT_ERROR(( "FT_Stream_Open:" )); + FT_ERROR(( " could not `mmap' file `%s'\n", filepathname )); + + stream->base = (unsigned char*)ft_alloc( stream->memory, stream->size ); + + if ( !stream->base ) + { + FT_ERROR(( "FT_Stream_Open:" )); + FT_ERROR(( " could not `alloc' memory\n" )); + goto Fail_Open; + } + + total_read_count = 0; + do + { + DWORD read_count; + + + if ( ReadFile( file, + stream->base + total_read_count, + stream->size - total_read_count, + &read_count, NULL ) == FALSE ) + { + FT_ERROR(( "FT_Stream_Open:" )); + FT_ERROR(( " error while `read'ing file `%s'\n", filepathname )); + goto Fail_Read; + } + + total_read_count += read_count; + + } while ( total_read_count != stream->size ); + + stream->close = ft_close_stream_by_free; + } + + CloseHandle( file ); + + stream->descriptor.pointer = stream->base; + stream->pathname.pointer = (char*)filepathname; + + stream->read = NULL; + + FT_TRACE1(( "FT_Stream_Open:" )); + FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n", + filepathname, stream->size )); + + return FT_Err_Ok; + + Fail_Read: + ft_free( stream->memory, stream->base ); + + Fail_Open: + CloseHandle( file ); + + stream->base = NULL; + stream->size = 0; + stream->pos = 0; + + return FT_THROW( Cannot_Open_Stream ); + } + + +#ifdef FT_DEBUG_MEMORY + + extern FT_Int + ft_mem_debug_init( FT_Memory memory ); + + extern void + ft_mem_debug_done( FT_Memory memory ); + +#endif + + + /* documentation is in ftobjs.h */ + + FT_BASE_DEF( FT_Memory ) + FT_New_Memory( void ) + { + HANDLE heap; + FT_Memory memory; + + + heap = GetProcessHeap(); + memory = heap ? (FT_Memory)HeapAlloc( heap, 0, sizeof ( *memory ) ) + : NULL; + + if ( memory ) + { + memory->user = heap; + memory->alloc = ft_alloc; + memory->realloc = ft_realloc; + memory->free = ft_free; +#ifdef FT_DEBUG_MEMORY + ft_mem_debug_init( memory ); +#endif + } + + return memory; + } + + + /* documentation is in ftobjs.h */ + + FT_BASE_DEF( void ) + FT_Done_Memory( FT_Memory memory ) + { +#ifdef FT_DEBUG_MEMORY + ft_mem_debug_done( memory ); +#endif + memory->free( memory, memory ); + } + + +/* END */ diff --git a/freetype/builds/windows/vc2010/freetype.sln b/freetype/builds/windows/vc2010/freetype.sln index 1bea194c7..5f3b1141d 100644 --- a/freetype/builds/windows/vc2010/freetype.sln +++ b/freetype/builds/windows/vc2010/freetype.sln @@ -4,34 +4,49 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype.vcxpro EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 - Debug Static|Win32 = Debug Static|Win32 + Debug|ARM64 = Debug|ARM64 + Debug|Win32 = Debug|Win32 Debug Static|x64 = Debug Static|x64 - Release|Win32 = Release|Win32 + Debug Static|ARM64 = Debug Static|ARM64 + Debug Static|Win32 = Debug Static|Win32 Release|x64 = Release|x64 - Release Static|Win32 = Release Static|Win32 + Release|ARM64 = Release|ARM64 + Release|Win32 = Release|Win32 Release Static|x64 = Release Static|x64 + Release Static|ARM64 = Release Static|ARM64 + Release Static|Win32 = Release Static|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.Build.0 = Debug Static|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|ARM64.Build.0 = Debug|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.ActiveCfg = Debug Static|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|x64.Build.0 = Debug Static|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|ARM64.ActiveCfg = Debug Static|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|ARM64.Build.0 = Debug Static|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Static|Win32.Build.0 = Debug Static|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.ActiveCfg = Release Static|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.Build.0 = Release Static|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|ARM64.ActiveCfg = Release|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|ARM64.Build.0 = Release|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.ActiveCfg = Release Static|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|x64.Build.0 = Release Static|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|ARM64.ActiveCfg = Release Static|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|ARM64.Build.0 = Release Static|ARM64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.ActiveCfg = Release Static|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Static|Win32.Build.0 = Release Static|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {90811697-0889-4381-80BC-C3FE8FA4931F} + EndGlobalSection EndGlobal diff --git a/freetype/builds/windows/vc2010/freetype.vcxproj b/freetype/builds/windows/vc2010/freetype.vcxproj index f249e5af7..284110613 100644 --- a/freetype/builds/windows/vc2010/freetype.vcxproj +++ b/freetype/builds/windows/vc2010/freetype.vcxproj @@ -1,10 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<!-- + You can use this file to build FreeType with MSBuild as follows + + MSBuild.exe -t:Rebuild + -p:Configuration=Debug + -p:Platform=x64 + -p:UserDefines=FT_DEBUG_LOGGING + builds/windows/vc2010/freetype.vcxproj + + or with different appropriate switches. It also works with Visual Studio. + Additional customization can be made in `freetype.user.props`. +--> +<Project DefaultTargets="DlgCopy;Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> @@ -13,6 +29,10 @@ <Configuration>Debug Static</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Debug Static|ARM64"> + <Configuration>Debug Static</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug Static|x64"> <Configuration>Debug Static</Configuration> <Platform>x64</Platform> @@ -21,6 +41,10 @@ <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> @@ -29,6 +53,10 @@ <Configuration>Release Static</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Release Static|ARM64"> + <Configuration>Release Static</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release Static|x64"> <Configuration>Release Static</Configuration> <Platform>x64</Platform> @@ -44,35 +72,51 @@ </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|ARM64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|ARM64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> @@ -93,7 +137,7 @@ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <DisableLanguageExtensions>true</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> @@ -106,11 +150,39 @@ <PreprocessorDefinitions>_DEBUG;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> - <Lib> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> <TargetMachine>MachineX86</TargetMachine> <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> - </Lib> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <DisableSpecificWarnings>4001</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> + <InlineFunctionExpansion>Disabled</InlineFunctionExpansion> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <TargetMachine>MachineARM64</TargetMachine> + <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> @@ -119,7 +191,7 @@ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <DisableLanguageExtensions>true</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> @@ -132,11 +204,12 @@ <PreprocessorDefinitions>_DEBUG;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> - <Lib> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> <TargetMachine>MachineX64</TargetMachine> <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> - </Lib> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|Win32'"> <ClCompile> @@ -145,7 +218,7 @@ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <DisableLanguageExtensions>true</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> @@ -164,6 +237,32 @@ <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> </Lib> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|ARM64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <DisableSpecificWarnings>4001</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> + <InlineFunctionExpansion>Disabled</InlineFunctionExpansion> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Lib> + <TargetMachine>MachineARM64</TargetMachine> + <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Static|x64'"> <ClCompile> <Optimization>Disabled</Optimization> @@ -171,7 +270,7 @@ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <DisableLanguageExtensions>true</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> @@ -210,12 +309,41 @@ <PreprocessorDefinitions>NDEBUG;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> - <Lib> - <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration> + <Link> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> <TargetMachine>MachineX86</TargetMachine> <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> - </Lib> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <DisableLanguageExtensions>true</DisableLanguageExtensions> + <WarningLevel>Level4</WarningLevel> + <CompileAs>Default</CompileAs> + <DisableSpecificWarnings>4001</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> + <IntrinsicFunctions>true</IntrinsicFunctions> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <TargetMachine>MachineARM64</TargetMachine> + <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> @@ -230,19 +358,19 @@ <CompileAs>Default</CompileAs> <DisableSpecificWarnings>4001</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> - <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <IntrinsicFunctions>true</IntrinsicFunctions> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;DLL_EXPORT;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> - <Lib> - <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration> + <Link> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> <TargetMachine>MachineX64</TargetMachine> <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> - </Lib> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'"> <ClCompile> @@ -265,12 +393,37 @@ <Culture>0x0409</Culture> </ResourceCompile> <Lib> - <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration> <TargetMachine>MachineX86</TargetMachine> <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> </Lib> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|ARM64'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <DisableLanguageExtensions>true</DisableLanguageExtensions> + <WarningLevel>Level4</WarningLevel> + <CompileAs>Default</CompileAs> + <DisableSpecificWarnings>4001</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet> + <IntrinsicFunctions>true</IntrinsicFunctions> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;$(UserDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Lib> + <TargetMachine>MachineARM64</TargetMachine> + <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'"> <ClCompile> <Optimization>MaxSpeed</Optimization> @@ -284,7 +437,6 @@ <CompileAs>Default</CompileAs> <DisableSpecificWarnings>4001</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> - <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <IntrinsicFunctions>true</IntrinsicFunctions> </ClCompile> <ResourceCompile> @@ -292,7 +444,6 @@ <Culture>0x0409</Culture> </ResourceCompile> <Lib> - <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration> <TargetMachine>MachineX64</TargetMachine> <AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies> @@ -316,13 +467,13 @@ <ClCompile Include="..\..\..\src\base\ftpfr.c" /> <ClCompile Include="..\..\..\src\base\ftstroke.c" /> <ClCompile Include="..\..\..\src\base\ftsynth.c" /> - <ClCompile Include="..\..\..\src\base\ftsystem.c" /> <ClCompile Include="..\..\..\src\base\fttype1.c" /> <ClCompile Include="..\..\..\src\base\ftwinfnt.c" /> <ClCompile Include="..\..\..\src\bdf\bdf.c" /> <ClCompile Include="..\..\..\src\cache\ftcache.c" /> <ClCompile Include="..\..\..\src\cff\cff.c" /> <ClCompile Include="..\..\..\src\cid\type1cid.c" /> + <ClCompile Include="..\..\..\src\dlg\dlgwrap.c" /> <ClCompile Include="..\..\..\src\gzip\ftgzip.c" /> <ClCompile Include="..\..\..\src\lzw\ftlzw.c" /> <ClCompile Include="..\..\..\src\pcf\pcf.c" /> @@ -333,6 +484,7 @@ <ClCompile Include="..\..\..\src\raster\raster.c" /> <ClCompile Include="..\..\..\src\sfnt\sfnt.c" /> <ClCompile Include="..\..\..\src\smooth\smooth.c" /> + <ClCompile Include="..\..\..\src\sdf\sdf.c" /> <ClCompile Include="..\..\..\src\truetype\truetype.c" /> <ClCompile Include="..\..\..\src\type1\type1.c" /> <ClCompile Include="..\..\..\src\type42\type42.c" /> @@ -340,12 +492,33 @@ <ClCompile Include="..\ftdebug.c"> <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> + <ClCompile Include="..\ftsystem.c"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> <ResourceCompile Include="..\..\..\src\base\ftver.rc" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> + <ItemGroup Condition="Exists('..\..\..\subprojects\dlg\.git')"> + <DlgSrc Include="..\..\..\subprojects\dlg\include\dlg\output.h"> + <DlgDst>..\..\..\include\dlg\output.h</DlgDst> + </DlgSrc> + <DlgSrc Include="..\..\..\subprojects\dlg\include\dlg\dlg.h"> + <DlgDst>..\..\..\include\dlg\dlg.h</DlgDst> + </DlgSrc> + <DlgSrc Include="..\..\..\subprojects\dlg\src\dlg\dlg.c"> + <DlgDst>..\..\..\src\dlg\dlg.c</DlgDst> + </DlgSrc> + </ItemGroup> + <Target Name="DlgCopy" Inputs="@(DlgSrc)" Outputs="@(DlgSrc->'%(DlgDst)')" Condition="Exists('..\..\..\subprojects\dlg\.git')"> + <Copy SourceFiles="@(DlgSrc)" DestinationFiles="@(DlgSrc->'%(DlgDst)')" /> + </Target> <Target Name="AfterBuild"> - <Copy SourceFiles="$(TargetPath)" DestinationFolder="..\..\..\objs" /> + <ItemGroup> + <TargetFiles Include="$(TargetDir)$(TargetName).*" /> + </ItemGroup> + <Copy SourceFiles="@(TargetFiles)" DestinationFolder="..\..\..\objs" /> + <Copy SourceFiles="$(TargetDir)$(TargetFileName)" DestinationFolder="..\..\..\..\freetype-demos\bin" Condition="'$(TargetExt)'=='.dll'" /> </Target> </Project> diff --git a/freetype/builds/windows/vc2010/freetype.vcxproj.filters b/freetype/builds/windows/vc2010/freetype.vcxproj.filters index edfeacfe5..f0a075c6f 100644 --- a/freetype/builds/windows/vc2010/freetype.vcxproj.filters +++ b/freetype/builds/windows/vc2010/freetype.vcxproj.filters @@ -23,9 +23,6 @@ <ClCompile Include="..\..\..\src\base\ftinit.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\src\base\ftsystem.c"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\..\..\src\bdf\bdf.c"> <Filter>Source Files</Filter> </ClCompile> @@ -65,6 +62,9 @@ <ClCompile Include="..\..\..\src\sfnt\sfnt.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\..\..\src\sdf\sdf.c"> + <Filter>Source Files</Filter> + </ClCompile> <ClCompile Include="..\..\..\src\smooth\smooth.c"> <Filter>Source Files</Filter> </ClCompile> @@ -131,6 +131,12 @@ <ClCompile Include="..\..\..\src\base\ftwinfnt.c"> <Filter>Source Files\FT_MODULES</Filter> </ClCompile> + <ClCompile Include="..\..\..\src\dlg\dlgwrap.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\ftsystem.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\..\src\base\ftver.rc"> diff --git a/freetype/builds/windows/vc2010/index.html b/freetype/builds/windows/vc2010/index.html index 3b60c5fe1..dcb1944b8 100644 --- a/freetype/builds/windows/vc2010/index.html +++ b/freetype/builds/windows/vc2010/index.html @@ -12,7 +12,7 @@ <p>This directory contains solution and project files for Visual C++ 2010 or newer, named <tt>freetype.sln</tt>, and <tt>freetype.vcxproj</tt>. It compiles the following libraries -from the FreeType 2.10.4 sources:</p> +from the FreeType 2.11.1 sources:</p> <ul> <li>freetype.dll using 'Release' or 'Debug' configurations</li> diff --git a/freetype/builds/windows/visualc/freetype.dsp b/freetype/builds/windows/visualc/freetype.dsp index 36e9fc3b8..451fab28b 100644 --- a/freetype/builds/windows/visualc/freetype.dsp +++ b/freetype/builds/windows/visualc/freetype.dsp @@ -58,7 +58,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 /out:"$(OutDir)\freetype.dll" +# ADD LINK32 /nologo /dll /machine:I386 /opt:REF,ICF /out:"$(OutDir)\freetype.dll" !ELSEIF "$(CFG)" == "freetype - Win32 Debug" diff --git a/freetype/builds/windows/visualc/freetype.vcproj b/freetype/builds/windows/visualc/freetype.vcproj index 9ff82a5ba..f69bc421a 100644 --- a/freetype/builds/windows/visualc/freetype.vcproj +++ b/freetype/builds/windows/visualc/freetype.vcproj @@ -19,7 +19,7 @@ ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="1" + CharacterSet="0" > <Tool Name="VCPreBuildEventTool" @@ -45,6 +45,7 @@ PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;DLL_EXPORT" StringPooling="true" RuntimeLibrary="2" + EnableEnhancedInstructionSet="2" EnableFunctionLevelLinking="true" DisableLanguageExtensions="true" WarningLevel="4" @@ -65,6 +66,8 @@ /> <Tool Name="VCLinkerTool" + OptimizeReferences="2" + EnableCOMDATFolding="2" /> <Tool Name="VCALinkTool" @@ -95,7 +98,7 @@ ConfigurationType="4" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="1" + CharacterSet="0" > <Tool Name="VCPreBuildEventTool" @@ -121,6 +124,7 @@ PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY" StringPooling="true" RuntimeLibrary="0" + EnableEnhancedInstructionSet="2" EnableFunctionLevelLinking="true" DisableLanguageExtensions="true" WarningLevel="4" @@ -165,7 +169,7 @@ ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="1" + CharacterSet="0" > <Tool Name="VCPreBuildEventTool" @@ -238,7 +242,7 @@ ConfigurationType="4" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="1" + CharacterSet="0" > <Tool Name="VCPreBuildEventTool" @@ -395,8 +399,40 @@ > </File> <File - RelativePath="..\..\..\src\base\ftsystem.c" + RelativePath="..\ftsystem.c" > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="false" + /> + </FileConfiguration> + <FileConfiguration + Name="Release Static|Win32" + > + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="false" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="false" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug Static|Win32" + > + <Tool + Name="VCCLCompilerTool" + DisableLanguageExtensions="false" + /> + </FileConfiguration> </File> <File RelativePath="..\..\..\src\smooth\smooth.c" diff --git a/freetype/builds/windows/visualc/index.html b/freetype/builds/windows/visualc/index.html index cec26d27a..d0c8f2f94 100644 --- a/freetype/builds/windows/visualc/index.html +++ b/freetype/builds/windows/visualc/index.html @@ -12,7 +12,7 @@ <p>This directory contains project files <tt>freetype.dsp</tt> for Visual C++ 6.0, and <tt>freetype.vcproj</tt> for Visual C++ 2002 through 2008, which you might need to upgrade automatically. -It compiles the following libraries from the FreeType 2.10.4 sources:</p> +It compiles the following libraries from the FreeType 2.11.1 sources:</p> <ul> <li>freetype.dll using 'Release' or 'Debug' configurations</li> diff --git a/freetype/builds/windows/visualce/index.html b/freetype/builds/windows/visualce/index.html index 474e85c37..b50ef79b0 100644 --- a/freetype/builds/windows/visualce/index.html +++ b/freetype/builds/windows/visualce/index.html @@ -21,7 +21,7 @@ the following targets: <li>PPC/SP WM6 (Windows Mobile 6)</li> </ul> -It compiles the following libraries from the FreeType 2.10.4 sources:</p> +It compiles the following libraries from the FreeType 2.11.1 sources:</p> <ul> <pre> diff --git a/freetype/builds/windows/w32-bcc.mk b/freetype/builds/windows/w32-bcc.mk index c80710ea3..d497dd15d 100644 --- a/freetype/builds/windows/w32-bcc.mk +++ b/freetype/builds/windows/w32-bcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-bccd.mk b/freetype/builds/windows/w32-bccd.mk index 966bdb51f..701b83d25 100644 --- a/freetype/builds/windows/w32-bccd.mk +++ b/freetype/builds/windows/w32-bccd.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-dev.mk b/freetype/builds/windows/w32-dev.mk index b2af66790..a2f464479 100644 --- a/freetype/builds/windows/w32-dev.mk +++ b/freetype/builds/windows/w32-dev.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-gcc.mk b/freetype/builds/windows/w32-gcc.mk index f27e6b12a..4117453ec 100644 --- a/freetype/builds/windows/w32-gcc.mk +++ b/freetype/builds/windows/w32-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-icc.mk b/freetype/builds/windows/w32-icc.mk index 2e696092d..ebab45ef2 100644 --- a/freetype/builds/windows/w32-icc.mk +++ b/freetype/builds/windows/w32-icc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-intl.mk b/freetype/builds/windows/w32-intl.mk index 88e626975..0fef8d724 100644 --- a/freetype/builds/windows/w32-intl.mk +++ b/freetype/builds/windows/w32-intl.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-lcc.mk b/freetype/builds/windows/w32-lcc.mk index 6cf646064..7aed5b517 100644 --- a/freetype/builds/windows/w32-lcc.mk +++ b/freetype/builds/windows/w32-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-mingw32.mk b/freetype/builds/windows/w32-mingw32.mk index f2eb0216d..673177885 100644 --- a/freetype/builds/windows/w32-mingw32.mk +++ b/freetype/builds/windows/w32-mingw32.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-vcc.mk b/freetype/builds/windows/w32-vcc.mk index e800d2744..278624f37 100644 --- a/freetype/builds/windows/w32-vcc.mk +++ b/freetype/builds/windows/w32-vcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/w32-wat.mk b/freetype/builds/windows/w32-wat.mk index a0de4bbbb..df2ece365 100644 --- a/freetype/builds/windows/w32-wat.mk +++ b/freetype/builds/windows/w32-wat.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/freetype/builds/windows/win32-def.mk b/freetype/builds/windows/win32-def.mk index f75985399..15bfd0cfd 100644 --- a/freetype/builds/windows/win32-def.mk +++ b/freetype/builds/windows/win32-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2020 by +# Copyright (C) 1996-2021 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -13,11 +13,11 @@ # fully. -DELETE := del -CAT := type -SEP := $(strip \ ) -BUILD_DIR := $(TOP_DIR)/builds/windows -PLATFORM := windows +DELETE := del +CAT := type +SEP := $(strip \ ) +PLATFORM_DIR := $(TOP_DIR)/builds/windows +PLATFORM := windows # This is used for `make refdoc' and `make refdoc-venv' # |