diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eb0e9a2c..86c17456f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,7 +202,7 @@ set(MEGA_LUAJIT_VER "2.1.0-e826d0c") set(MEGA_LIBOGG_VER "1.3.2") set(MEGA_LIBVORBIS_VER "1.3.5") set(MEGA_LIBTHEORA_VER "1.1.1") -set(MEGA_FREETYPE_VER "2.12.0") +set(MEGA_FREETYPE_VER "2.13.2") set(MEGA_SDL2_VER "2.28.5") set(MEGA_OPENAL_VER "1.22.0") set(MEGA_MODPLUG_VER "0.8.8.4") diff --git a/libs/freetype/CMakeLists.txt b/libs/freetype/CMakeLists.txt index db17bcc7f..8dbca01e6 100644 --- a/libs/freetype/CMakeLists.txt +++ b/libs/freetype/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright (C) 2013-2022 by +# Copyright (C) 2013-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written originally by John Cary @@ -61,6 +61,8 @@ # # Some notes. # +# - Say `cmake -LAH` to see all configuration options. +# # - `cmake' creates configuration files in # # /include/freetype/config @@ -121,7 +123,6 @@ endif () include(CheckIncludeFile) include(CMakeDependentOption) -include(FindPkgConfig) # CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which # configures the base build environment and references the toolchain file @@ -162,8 +163,8 @@ endif () project(freetype C) set(VERSION_MAJOR "2") -set(VERSION_MINOR "12") -set(VERSION_PATCH "0") +set(VERSION_MINOR "13") +set(VERSION_PATCH "2") # Generate LIBRARY_VERSION and LIBRARY_SOVERSION. set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'") @@ -216,6 +217,8 @@ cmake_dependent_option(FT_REQUIRE_BROTLI "Require support of compressed WOFF2 fonts." OFF "NOT FT_DISABLE_BROTLI" OFF) +option(FT_ENABLE_ERROR_STRINGS + "Enable support for meaningful error descriptions." OFF) # Disallow in-source builds if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") @@ -245,6 +248,8 @@ endif () # Find dependencies +include(FindPkgConfig) + if (NOT FT_DISABLE_HARFBUZZ) set(HARFBUZZ_MIN_VERSION "2.0.0") if (FT_REQUIRE_HARFBUZZ) @@ -353,6 +358,12 @@ if (BROTLIDEC_FOUND) FTOPTION_H "${FTOPTION_H}") endif () +if (FT_ENABLE_ERROR_STRINGS) + string(REGEX REPLACE + "/\\* +(#define +FT_CONFIG_OPTION_ERROR_STRINGS) +\\*/" "\\1" + FTOPTION_H "${FTOPTION_H}") +endif () + set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h") if (EXISTS "${FTOPTION_H_NAME}") file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H) @@ -469,8 +480,6 @@ if (BUILD_SHARED_LIBS) SOVERSION ${LIBRARY_SOVERSION}) endif () -message(STATUS ${CMAKE_CURRENT_BINARY_DIR}) - # Pick up ftconfig.h and ftoption.h generated above, first. target_include_directories( freetype @@ -493,46 +502,55 @@ if (BUILD_FRAMEWORK) ) set_target_properties(freetype PROPERTIES FRAMEWORK TRUE - MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist PUBLIC_HEADER "${PUBLIC_HEADERS}" XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" ) endif () +# 'freetype-interface' is an interface library, to be accessed with +# `EXPORT_NAME Freetype::Freetype`. This is the target name provided by +# CMake's `FindFreetype.cmake`, so we provide it for compatibility. +add_library(freetype-interface INTERFACE) +set_target_properties(freetype-interface PROPERTIES + EXPORT_NAME Freetype::Freetype + INTERFACE_LINK_LIBRARIES freetype) -set(PKG_CONFIG_REQUIRED_PRIVATE "") -set(PKG_CONFIG_LIBS_PRIVATE "") +set(PKGCONFIG_REQUIRES "") +set(PKGCONFIG_REQUIRES_PRIVATE "") +set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype") +set(PKGCONFIG_LIBS_PRIVATE "") if (ZLIB_FOUND) target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES}) target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib") endif () if (BZIP2_FOUND) target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES}) target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS if (PC_BZIP2_FOUND) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2") else () - list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2") + list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2") endif () endif () if (PNG_FOUND) target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS}) target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libpng") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng") endif () if (HarfBuzz_FOUND) target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY}) target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}") endif () if (BROTLIDEC_FOUND) target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS}) target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libbrotlidec") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec") endif () @@ -559,7 +577,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) # Generate the pkg-config file file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN) - string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}") + string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}") string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX} FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) @@ -571,10 +589,26 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + + if (BUILD_SHARED_LIBS) + string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + else () + string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + endif () set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc") if (EXISTS "${FREETYPE2_PC_IN_NAME}") @@ -598,7 +632,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) COMPATIBILITY SameMajorVersion) install( - TARGETS freetype + TARGETS freetype freetype-interface EXPORT freetype-targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/libs/freetype/ChangeLog b/libs/freetype/ChangeLog index d3dd70d50..e1c0576a4 100644 --- a/libs/freetype/ChangeLog +++ b/libs/freetype/ChangeLog @@ -1,3 +1,3514 @@ +2023-08-25 Werner Lemberg + + * Version 2.13.2 released. + ========================== + + Tag sources with `VER-2-13-2'. + + * docs/VERSION.TXT: Add entry for version 2.13.2. + * docs/CHANGES: Updated. + * docs/release, docs/README, builds/macs/README: Updated. + + * README, src/base/ftver.rc, builds/windows/vc2010/index.html, + builds/windows/visualc/index.html, builds/windows/visualce/index.html, + builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, + docs/freetype-config.1: s/2.13.1/2.13.2/, s/2131/2132/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. + + * builds/unix/configure.raw (version_info): Set to 26:1:20. + * CMakeLists.txt (VERSION_PATCH): Set to 2. + +2023-08-25 Alexei Podtelezhnikov + + * src/base/ftcalc.c (FT_MulAddFix): Simplify 32-bit rounding. + +2023-08-25 Werner Lemberg + + Fix clang warnings. + + * src/cffload.c (cff_blend_doBlend): Fix type of `sum`. + * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Fix type of + `word_delta_count`. + +2023-08-24 Werner Lemberg + + * subprojects/*.wrap: Updated. + +2023-08-24 Hugh McMaster + + builds/unix/configure.raw: Use variable to specify minimum Python version. + +2023-08-24 Alexei Podtelezhnikov + + * builds/toplevel.mk: Simplify version extraction. + +2023-08-22 Alexei Podtelezhnikov + + [base] Improve the matrix degeneracy check. + + Also fixes #1251. + + * src/base/ftcalc.c (FT_Matrix_Check): To avoid overflow, scale by shifting. + * include/freetype/internal/ftcalc.h (FT_Matrix_Check): Update description. + +2023-08-22 Werner Lemberg + + builds/toplevel.mk: Don't use `\#` in functions. + + The behaviour changed in GNU make 4.3, where `#` (without the backslash) + would be necessary. Using a variable instead the code works with both older + and newer GNU make versions. + + Fixes #1252. + +2023-08-19 Hugh McMaster + + builds/freetype.mk: Invoke `mkdocs` as a Python module + + FreeType's `refdoc` target currently allows users to override the + default Python path, which is useful for testing and development. + + In contrast, `mkdocs` is invoked via the default Python path. + + Invoking `mkdocs` via Python's module syntax allows for greater + flexibility, although there is no change for the default use case. + +2023-08-17 Ben Wagner + + [base] Avoid UB with memcpy + + `FT_NEW_ARRAY(p, 0)` sets `p` to `NULL`. `FT_Stream_ReadAt` with a + memory based stream uses `FT_MEM_COPY` which is `memcpy` which specifies + that it is undefined behavior for either the `src` or `dst` to be + `NULL`. Instead of forcing all callers work around calling + `FT_Stream_Read` when `buffer == NULL && count == 0` do the check in + `FT_StreamRead`. This allows any call with `count == 0` to succesfully + read zero bytes without UB. + + * src/base/ftstream.c (FT_Stream_ReadAt): skip `FT_MEM_COPY` when + `count == 0`. (FT_Stream_TryRead): ditto + + Fixes: #1250 + +2023-08-12 Werner Lemberg + + Fix warnings in tracing messages for 32bit compilation. + + Since we now require C99, use `%td` for `ptrdiff_t` and `%zu` for `size_t`. + +2023-08-04 Ben Wagner + + Avoid overflow in COLR bounds checks. + + The values read into `base_glyphs_offset_v1` and `layer_offset_v1` may + be in the range 0xFFFFFFFD-0xFFFFFFFF. On systems where `unsigned long` + is 32 bits adding 4 to such values will wrap and pass bounds checks but + accessing values at such offsets will be out of bounds. + + On the other hand `table_size` has already been tested to be at least + `COLRV1_HEADER_SIZE` (34) so it is safe to subtract 4 from it. + + * src/sfnt/ttcolr.c (tt_face_load_colr): subtract 4 from `table_size` + instead of adding 4 to font data offsets in bounds checks + + Fixes: https://crbug.com/1469348 + +2023-08-02 Alexei Podtelezhnikov + + * src/base/ftobjs.c (open_face_from_buffer): Silence `maybe-uninitialized`. + + We never call this function without a `driver_name` (#1245). + +2023-07-29 Alexei Podtelezhnikov + + [truetype] Reduce v40 footprint. + + * src/truetype/ttgload.c (TT_HInt_Glyph, tt_loader_set_pp, + tt_loader_init): Refactor code. + +2023-07-27 Alexei Podtelezhnikov + + [truetype] Remove Infinality for good (remaining bits). + + * src/truetype/ttobjs.h: Remove remaining fields. + * src/truetype/ttinterp.c: Do not initialize them. + * include/freetype/internal/tttypes.h: Remove descriptions. + +2023-07-27 Alexei Podtelezhnikov + + [truetype] Remove Infinality for good. + + Remove everything `#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY`, + which was undefined for a while now. + + * include/freetype/internal/tttypes.h: Ditto. + * src/truetype/truetype.c: Ditto. + * src/truetype/ttdriver.c: Ditto. + * src/truetype/ttgload.c: Ditto. + * src/truetype/ttinterp.c: Ditto. + * src/truetype/ttinterp.h: Ditto. + * src/truetype/ttobjs.c: Ditto. + * src/truetype/ttsubpix.[ch]: Remove files. + * src/truetype/rules.mk: Don't mention "ttsubpix.c". + +2023-07-21 Jouk Jansen + + * vms_make.com: Provide separate library compiled with C++. + + Some types on OpenVMS x86_64 (for example, `long') have different sizes + depending on whether compiled with either C or C++. In particular, + X-Windows applications crash if linked with the C++ version. + + This patch makes `vms_make.com` create a second version of the FreeType + library compiled with C++ if OpenVMS is running on the x86_64 platform. + +2023-07-21 Jouk Jansen + + * vms_make.com: Fix typos. + +2023-07-21 Jouk Jansen + + * src/smooth/ftgrays.c (FT_SSE2): Fix definition for VMS. + +2023-07-19 Jouk Jansen + + vms_make.com: Make use of additional libraries optional. + + Check whether `.olb` files are present. + + Also check for the HarfBuzz library. + +2023-07-19 Jouk Jansen + + vms_make.com: Add `/warn=noinfo` to `CFLAGS`. + + This reduces enormously the informationals while compiling on x86_64 (i.e., + which `.h` file is inluded form where). + +2023-07-18 Ben Wagner + + [woff2] Clean up on large brotli expansion + + * src/sfnt/sfwoff2.c (woff2_open_font): set error and goto cleanup + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60711 + +2023-07-16 Werner Lemberg + + [woff2] Avoid allocation bomb. + + This is a fix for commit 85167dbd5, reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60615 + + * src/sfnt/sfwoff2.c (MAX_SFNT_SIZE): New macro. + (woff2_open_font): Use it to limit the maximum size of an uncompressed WOFF2 + font. + +2023-07-14 Werner Lemberg + + [cff] Fix compiler warning. + + * src/cff/cffparse.c, src/cff/cffparse.h: Make `cff_parse_fixed` a local + function. + +2023-07-14 Ben Wagner + + [woff2] Remove sfnt size guess check + + In WOFF the `totalSfntSize` must be correct, however in WOFF2 this value + is now just a hint and a conforming implementation must not reject + otherwise valid data if the `totalSfntSize` turns out not to be exact. + + * src/sfnt/sfwoff2.c (woff2_open_font): remove check that uncompressed + woff2 data would fit in the sfnt size guess. + + Fixes: #1235 + +2023-07-14 Skef Iterum + + [cff] Make blend operator work with floats in private dicts. + + The CFF2 blend operator takes N default values and corresponding + sets of deltas and pushes N values specific to a designspace + location. CFF has a floating point numeric type and the FreeType + blending code was not converting those into its internal 16.16 + Fixed type format. + + Fixes #1243. + + * src/cff/cffparse.c (do_fixed): Handle floating point numbers. + Also fix scaling overflow check for integer-to-fixed conversion. + + * src/cff/cffload.c (cff_blend_doBlend): Updated. + +2023-07-08 Hin-Tak Leung + + * src/truetype/ttgload.c (TT_Hint_Glyph): More mostly cosmetic update. + + This is a follow-up to commit 49c74ac02, which creates a new local variable + "exec = loader->exec", and shortening a lot of "loader->exec". This commit + does two more such changes missed in that first commit. + +2023-07-06 Hugh McMaster + + [gzip] Don't compile internal zlib development files when using system zlib. + + `src/gzip/rules.mk` compiles the internal zlib sources even when using the + zlib development files provided by a host system. If the internal zlib + development files are not present, FreeType fails to build from source. + + This patch ensures the internal zlib development files are only + prerequisites when not using zlib development files on a host system. + + * src/gzip/rules.mk (GZIP_DRV_SRCS): Define conditionally. + +2023-06-24 Werner Lemberg + + * Version 2.13.1 released. + ========================== + + Tag sources with `VER-2-13-1'. + + * docs/VERSION.TXT: Add entry for version 2.13.1. + * docs/CHANGES: Updated. + * docs/release, docs/README, builds/macs/README: Updated. + + * README, src/base/ftver.rc, builds/windows/vc2010/index.html, + builds/windows/visualc/index.html, builds/windows/visualce/index.html, + builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, + docs/freetype-config.1: s/2.13.0/2.13/1/, s/2130/2131/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. + + * builds/unix/configure.raw (version_info): Set to 26:0:20. + * CMakeLists.txt (VERSION_PATCH): Set to 1. + + * subprojects/libpng.wrap, subprojects/zlib.wrap, subprojects/dlg: Updated. + +2023-06-09 suzuki toshiya + + Comment fixes. + +2023-06-09 Werner Lemberg + + [sdf] Correct handling of empty glyphs. + + This is a refinement of commit 7b3ebb9. + + * src/sdf/ftsdfrend.c (ft_sdf_render): Goto 'Exit' instead of directly + returning. + (fd_bsdf_render): Ditto, also taking care of setting `FT_GLYPH_OWN_BITMAP` + correctly. + +2023-06-05 Ben Wagner + + Mark FT_Renderer_Class::raster_class as pointer to const + + The `FT_DEFINE_RASTER_FUNCS` macro declares a `const FT_Raster_Funcs`. + The address of the definition is taken and assigned to + `FT_Renderer_Class::raster_class` which is currently `FT_Raster_Funcs*`. + Until recently the `const` was cast away and with the removal of the + cast there are now warnings about dropping this `const`. Instead of + adding back the casts, make `FT_Renderer_Class::raster_class` a pointer + to const, as is done with pointers in other interfaces. + + * include/freetype/ftrender.h (FT_Renderer_Class_): mark `raster_class` + as const. + +2023-06-03 Ben Wagner + + Fix some `FT_Fixed` vs. `FT_Long` confusion. + + `FT_Fixed` and `FT_Long` are both typedef'ed to be `signed long`. However, + `FT_Fixed` implies that the lower 16 bits are being used to express + fractional values and so these two types should not be confused. + + * include/freetype/internal/services/svmm.h (FT_Set_MM_Blend_Func): Use + `FT_Fixed` for `coords`. Users are passing `FT_Fixed` and implementations + are taking `FT_Fixed`. + (FT_Get_MM_Blend_Func): Ditto. + + * src/autofit/afcjk.c (af_cjk_metrics_check_digits): Use `FT_Long` for + `advance` and `old_advance`. `advance`'s address is passed as `FT_Long*` to + `af_shaper_get_elem`, which writes the advance in em units (not fixed). The + exact value is not important here as it is only compared to check whether it + has changed. + + * src/autofit/aflatin.c (af_latin_metrics_check_digits): Ditto. + +2023-06-03 Ben Wagner + + */*: Remove many function pointer casts. + + In C it is undefined behavior to call a function through a function pointer + of a different type. This is now detected by the Control Flow Integrity + Sanitizer. All known issues have already been fixed. Prevent any + accidental re-introduction by removing function pointer casts when defining + services. The services will call the service functions through the function + pointers on the service. As a result the functions must have the same type + so there should be no need to cast. Removing the casts allows compilers to + warn about assignment to an incompatible function pointer type. + +2023-06-03 Werner Lemberg + + Minor formatting. + +2023-05-23 Werner Lemberg + + Replace `sprintf` with `snprintf`. + + Fixes #1233. + + * include/freetype/config/ftstdlib.h (ft_sprintf): Replace with... + (ft_snprintf): This new macro. + + * src/autofit/afhints.c (af_print_idx): Add argument to pass the buffer + size. + (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, + af_glyph_hints_dump_edges): Updated. + + * src/bdf/bdflib.c (BUFSIZE): New macro. + (bdf_parse_properties_, bdf_parse_start_): Use `ft_snprintf`. + + * src/tools/ftrandom/ftrandom.c (do_test): Use `snprintf`. + +2023-05-23 Werner Lemberg + + docs/DEBUG: Formatting. + +2023-05-20 suzuki toshiya + + [doc] Type1 GX (sfnt-wrapped Type1) is not supported. + + * docs/formats.txt: Clarify the reference of Type1 GX, + and state that this format is not supported. This + is because the content `TYP1' table is not exactly same + with the Type1 font format specification; no eexec + encryption is used. For detail and concrete examples, + see the analysis on: + + https://gitlab.freedesktop.org/freetype/freetype/-/issues/1231 + +2023-05-19 Craig White + + Add missing end quote of a string in the example code of FT_Trace_Set_Level + +2023-05-19 Seigo Nonaka + + [truetype] Reduce heap allocation of `deltaSet` variation data. + + `deltaSet` is an array of packed integers that can be 32 bits, 16 bits, or + 8 bits. Before this change, these values were unpacked to 32-bit integers. + However, this can cause big heap allocations, e.g., around 500 KByte for + 'NotoSansCJK'. To reduce this amount, store the packed integers and unpack + them just before passing to the calculation. At calculation time, due to + the variable length of region indices, temporary heap allocations are + necessary. This heap allocation is not negligible and visible in `ftbench` + results. So, use stack-allocated arrays for short array calculations. + + Fixes #1230. + + * include/freetype/internal/ftmmtypes.h (GX_ItemVarDataRec): New fields + `wordDeltaCount` and `longWords`. + + * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Load packed + data. + (tt_var_get_item_delta): Unpack data before applying. + +2023-05-17 Jouk Jansen + + vms_make.com: Create shared executable for x86 version of OpenVMS. + +2023-05-15 Werner Lemberg + + Add new load flag `FT_LOAD_NO_SVG`. + + Modern color fonts often contain both an 'SVG' and 'COLR' table. FreeType + always preferred 'SVG' over 'COLR' (this was a design decision), however, + this might not be the right choice for the user. The new flags makes + FreeType ignore the 'SVG' table while loading a glyph. + + Fixes #1229. + + * include/freetype/freetype.h (FT_LOAD_NO_SVG): New macro. + + * src/base/ftobjs.c (FT_Load_Glyph), src/cff/cffgload.c (cff_slot_load), + src/truetype/ttgload.c (TT_Load_Glyph): Use it. + +2023-05-13 Werner Lemberg + + .mailmap: Updated. + +2023-05-13 Alexei Podtelezhnikov + + [cache] Merge functions. + + * src/cache/ftccache.c (FTC_Cache_Init): Merge into... + (ftc_cache_done): ... this function, with unnecessary checks removed. + +2023-05-13 Alexei Podtelezhnikov + + [cache] Minor casting and cosmetic updates. + + * src/cache/ftcglyph.c (ftc_gcache_{init,done}): Remove casting. + (FTC_GCache_Lookup): Cosmetic variable renaming. + * src/cache/ftcsbits.c (ftc_snode_compare): Formatting. + +2023-05-12 Werner Lemberg + + * include/freetype/ftcache.h: Typo, punctuation. + +2023-05-12 Alexei Podtelezhnikov + + * include/freetype/ftcache.h: Formatted and updated. + +2023-05-12 suzuki toshiya + + * include/freetype/internal/t1types.h: Fix the indentation. + +2023-05-11 Alexei Podtelezhnikov + + [cache] Revise the dynamic hash table accounting. + + Instead of counting entries relative to the middle of the hash table, + this switches to the absolute counter with the full index range mask. + As a result, some calculations become a bit simpler. The cache resizing + logic stays largely the same. + + * src/cache/ftccache.h (FTC_NODE_TOP_FOR_HASH): Revised with new counter. + * src/cache/ftccache.c (ftc_get_top_node_for_hash): Ditto. + (ftc_cache_resize): Simplify reallocations and stop their zeroing. + (ftc_cache_init): Stop over-allocating but keep zeroing initially. + (FTC_Cache_Clear, FTC_Cache_RemoveFaceID): Updated accordingly. + +2023-05-11 suzuki toshiya + + [t1cid] Set FT_FACE_FLAG_CID_KEYED. + + * cidobjs.c (cid_face_init): Set FT_FACE_FLAG_CID_KEYED. + + * cidriver.c (cid_get_is_cid): Comment about the case that + is_cid cannot guarantee the glyph collection specification. + +2023-05-09 Jouk Jansen + + * src/smooth/ftgrays.c (FT_SSE2): Don't define for VMS. + +2023-05-08 Werner Lemberg + + * src/cff/cffdrivr.c (cff_glyph_load): Fix guard for `size`. + + This was forgotten to change in commit 2b54eba36b (in May 2004). + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58739 + +2023-05-08 Werner Lemberg + + Minor compiler warning fixes. + + * src/autofit/afcjk.c (af_cjk_get_standard_widths), src/autofit/aflatin.c + (af_latin_get_standard_widths): Use `FT_CALLBACK_DEF`. + + * src/cff/cffparse.c (cff_parser_run): Initialize and fix allocation of `q`. + +2023-05-08 Werner Lemberg + + * src/psaux/t1cmap.c: Signature fixes. + +2023-05-08 Werner Lemberg + + * src/bzip2/ftbzip2.c: Signature fixes. + +2023-05-08 Werner Lemberg + + [cache] Signature fixes. + + * src/cache/ftcglyph.c, src/cache/ftcglyph.h (FTC_GNode_Compare): Remove + redundant function. It is equivalent to `ftc_gnode_compare` and becomes + completely meaningless with fixed signatures. + Update all callers. + + * src/cache/ftcsbits.c, src/cache/ftcsbits.h (FTC_SNode_Compare): Remove + redundant function. It is equivalent to `ftc_snode_compare` and becomes + completely meaningless with fixed signatures. + Update all callers. + +2023-05-07 Werner Lemberg + + [sdf] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/svg/ftsvg.c: Signature fixes. + +2023-05-07 Werner Lemberg + + [raster] Signature fixes. + +2023-05-07 Werner Lemberg + + [smooth] Signature fixes. + +2023-05-07 Werner Lemberg + + [pshinter] Signature fixes. + + * src/pshinter/pshrec.c (t1_hints_close, t1_hints_apply): New wrapper + functions. + (t1_hints_funcs_init): Use them. + (t2_hints_close, t2_hints_apply): New wrapper functions. + (t2_hints_funcs_init): Use them. + +2023-05-07 Werner Lemberg + + [autofit] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/sfnt/ttcmap: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/pcf/pcfdrivr.c: Signature fix. + +2023-05-07 Werner Lemberg + + * src/winfonts/winfnt.c: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/type42/t42parse.c: Signature fixes. + +2023-05-07 Werner Lemberg + + [pfr] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/cid/cidload.c: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/cff/cffcmap.c: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/type1/t1load.c: Signature fixes. + +2023-05-07 Werner Lemberg + + [truetype] Signature fixes. + +2023-05-07 Werner Lemberg + + [base] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/type42/t42drivr.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/type1/*: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/truetype/*: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/sfnt/sfdriver.c, src/sfnt/ttbdf.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + + * src/sfnt/sfdriver.c (sfnt_load_table): New wrapper function. + (sfnt_service_sfnt_table): Use it. + +2023-05-07 Werner Lemberg + + * src/psnames/psmodule.c: Use `FT_CALLBACK_DEF`. + +2023-05-07 Werner Lemberg + + * src/pfr/pfrdrivr.c: face -> pfrface, pfrface -> face. + +2023-05-07 Werner Lemberg + + * src/pcf/pcfdrivr.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/cid/cidriver.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/bdf/bdfdrivr.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/cff/*: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-06 Werner Lemberg + + [truetype] Fix style name handling for variation fonts. + + * include/freetype/internal/tttypes.h (TT_FaceRec): New field + `non_var_style_name`. + + * src/sfnt/sfobjs.c (sfnt_load_face): Initialize `non_var_style_name`. + (sfnt_done_face): Free `non_var_style_name`. + + * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Restore non-VF style name + if switching back to non-VF mode. + +2023-05-06 Werner Lemberg + + [truetype] Fix PostScript name handling for variation fonts. + + A variation font's PostScript name of a named instance is usually different + from the PostScript name of an unnamed instance. However, if a change + between a named instance and an unnamed instance with exactly the same + design axis values happened, it was possible that the PostScript name wasn't + correctly updated. + + This commit reorganizes the code to handle this issue within the top-level + API functions, using a new service to trigger recomputation of the + PostScript name. + + * include/freetype/internal/services/svmm.h (FT_Construct_PS_Name_Func): New + typedef. + (FT_Service_MultiMasters): New field `construct_ps_name`. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call + `mm->construct_ps_name` to handle `postscript_name`. + (FT_Set_Named_Instance): Call `mm->construct_ps_name` to handle + `postscript_name`. + Use shortcut. + * src/cff/cffdrivr.c (cff_construct_ps_name): New function. + (cff_service_multi_masters): Updated. + + * src/truetype/ttgxvar.c (tt_set_mm_blend): Don't handle `postscript_name`. + (TT_Set_MM_Blend): Simplify. + (TT_Set_Named_Instance): Return -1 if axis values haven't changed. + Don't set `face_index`. + (tt_construct_ps_name): New function. + + * src/truetype/ttgxvar.h: Updated. + + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + + * src/type1/t1load.c (T1_Set_MM_Blend): Simplify. + +2023-05-06 Werner Lemberg + + * include/freetype/internal/services/svmm.h: Minor changes. + +2023-05-06 Werner Lemberg + + [truetype] Fix deactivation of variation font handling. + + According to the documentation, the functions `FT_Set_Named_Instance`, + `FT_Set_MM_Design_Coordinates`, `FT_Set_Var_Design_Coordinates`, and + `FT_Set_Var_Blend_Coordinates` can unset the `FT_FACE_FLAG_VARIATION` flag. + (The same is true for `FT_Set_MM_WeightVector` but this information was + accidentally omitted from the documentation.) + + However, if a call of these functions didn't change the axis values this + could fail because internal shortcuts exited too early. + + This commit reorganizes the code to handle `FT_FACE_FLAG_VARIATION` in the + top-level API functions, also taking care of the issue at hand. + + * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, FT_Set_MM_WeightVector, + FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, + FT_Set_Var_Blend_Coordinates): Handle `FT_FACE_FLAG_VARIATION`. + + * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design, + TT_Set_Named_Instance) Don't handle `FT_FACE_FLAG_VARIATION`. + + * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_WeightVector, + T1_Set_MM_Design): Ditto. + + * src/cff/cffobjs.c (cff_face_init): Use `FT_Set_Named_Instance` instead of + low-level functions. + + * src/truetype/ttobjs.c (tt_face_init): Ditto. + +2023-05-06 Werner Lemberg + + s/set_instance/set_named_instance/ + + * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): Renamed + to... + (FT_Set_Named_Instance_Func): ...this. + (FT_Service_MultiMasters): Rename `set_instance` to `set_named_instance`. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + + * src/base/ftmm.c (FT_Set_Named_Instance): Updated. + + * src/cff/cffdrivr.c (cff_set_instance): Renamed to... + (cff_set_named_instance): ...this. + (cff_service_multi_masters): Updated. + * src/cff/cffobjs.c (cff_face_init): Updated. + + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + +2023-05-06 Werner Lemberg + + New Variation Font function `FT_Get_Default_Named_Instance`. + + * include/freetype/ftmm.h, src/base/ftmm.c (FT_Get_Default_Named_Instance): + New function. + + * include/freetype/internal/services/svmm.h + (FT_Get_Default_Named_Instance_Func): New typedef. + (FT_Service_MultiMasters): New field `get_default_named_instance`. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + + * include/freetype/internal/tttypes.h (TT_Face): New field + `var_default_named_instance`. + + * src/sfnt/sfobjc.s (sfnt_init_face): Initialize + `var_default_named_instance`. + + * src/cff/cffdrivr.c (cff_get_default_named_instance): New function. + (cff_service_multi_masters): Updated. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize + `var_default_named_instance`. + (TT_Get_Default_Named_Instance): New function. + * src/truetype/ttgxvar.h: Updated. + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + + * docs/CHANGES: Updated. + +2023-05-06 Werner Lemberg + + [cid] Improve tracing messages; formatting. + +2023-05-04 Alexei Podtelezhnikov + + * src/cache/ftccache.c (ftc_node_hash_unlink): Minor. + +2023-05-04 Alexei Podtelezhnikov + + * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Purge backwards. + +2023-05-04 Alexei Podtelezhnikov + + [cache] Revise list cleansing. + + * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Use one loop to + do it. + * src/cache/ftcmanag.c (FTC_Manager_Compress, FTC_Manager_FlushN): + Streamline loops. + +2023-05-03 suzuki toshiya + + [t1cid] Improve cid_get_cid_from_glyph_index(). + + Update cid_get_cid_from_glyph_index() to + return an error and CID=0 in the case that + the specified glyph index points to an invalid + entry. + + cidgload.h (cid_compute_fd_and_offsets): + Declare new helper function to set the + fd_select and 2 offsets to access the glyph + description data. + + cidgload.c (cid_compute_fd_and_offsets): + Move the part loading fd_select and 2 offsets + from cid_load_glyph() to here. If the loaded + parameters are broken, return the Invalid_Offset + error. This function does not load the glyph + data, only fills these parameters. + + (cid_load_glyph): Use new helper function in above. + + cidriver.c (cid_get_cid_from_glyph_index): + Check whether the requested glyph index points + to a valid entry, by calling cid_compute_fd_and_offsets(). + If it is valid, fill the cid by the glyph + index (=CID). If it is invalid, return an + error and fill the cid by 0. + +2023-04-30 Werner Lemberg + + API documentation: Re-organize chapters and sections + + * Split the very long 'Base Interface' section into smaller sections. + * Split the 'Core API' chapter into two chapters. + * Remove single enumeration values from `@order` fields since they have no + effect. + +2023-04-29 Alexei Podtelezhnikov + + * src/sfnt/pngshim.c (Load_SBit_Png): Remove FALL_THROUGH warning. + +2023-04-28 Werner Lemberg + + * src/sfnt/ttload.c (tt_face_load_font_dir): Add another guard. + + Reject 'OTTO' fonts with no valid tables. + +2023-04-28 Werner Lemberg + + * src/cff/cffdrivr/c (cff_get_ps_name): Avoid unnecessary crash. + + The situation can happen if `FT_New_Face` (or one of its siblings) is called + with a negative index to get the number of contained faces, followed + immediately by a call to `FT_Get_Postscript_Name`. While this is not a valid + use of the FreeType library there is no need for a crash. + + Fixes #1219. + +2023-04-28 Werner Lemberg + + * src/cff/cffdrivr.c (cff_ps_get_font_info): Reject 'CFF2' format. + +2023-04-28 Werner Lemberg + + * src/cid/cidgload.c (cid_load_glyph): Fix compiler warnings. + +2023-04-28 Werner Lemberg + + Minor documentation updates. + +2023-04-27 Werner Lemberg + + * src/ttgxvar.c: Minor changes. + + (TT_Get_MM_Var): Improve tracing messages. + (tt_set_mm_blend): Minor speed-up. + +2023-04-27 Werner Lemberg + + s/this is,/that is,/ + +2023-04-27 Alexei Podtelezhnikov + + [bdf] Clean up the atom property parsing. + + * src/bdflib.c (bdf_is_atom_): Refactor code with fewer checks. + (bdf_list_join_): Return NULL. + (bdf_add_comment_): Use const argument. + (bdf_get_property): Ditto, ditto, make the function static. + * src/bdf.h (bdf_get_property): Remove prototype. + +2023-04-25 Werner Lemberg + + Improve/add source comments and documentation. + +2023-04-25 Werner Lemberg + + [sfnt] Fix handling of PS names for Variation Fonts. + + * src/sfnt/sfdriver.c (get_win_string, get_apple_string): Continue + construction of string if an invalid character is encountered. + + Fixes #1218. + +2023-04-24 suzuki toshiya + + [t1cid] Change the trace messages of the charstrings retrieval errors. + + The t1cid driver catches 3 types of errors in + the charstrings retrieval; + A) The invalid FD number, there are 2 subtypes; + A-1) FD number is the maximum number fitting to FDBytes. + A-2) FD number is greater than num_dicts. + B) Declared length is overrunning. + C) Declared length is invalid (its end is before its head). + + Considering that some widely distributed fonts + (e.g., "CJKV" book by O'Reilly) have A-1 errors + in the unimplemented glyphs, the trace level for + A-1 is calmed to level 1. + + The errors A-2, B, and C would be irregular; + their trace levels are kept at level 0, but + the updated trace messages include the CID number. + +2023-04-24 suzuki toshiya + + [truetype] Fix `make multi'. + + * src/truetype/ttgxvar.c: Include freetype/internal/services/svmetric.h + for the FT_Service_MetricsVariations type definition. + +2023-04-19 Ben Wagner + + [services] FT_Size_Reset_Func to return FT_Error + + The `MetricsVariations` `FT_Size_Reset_Func` is currently defined to + return `void`, but the implementations return `FT_Error`. Even though + the pointers passed will be the same at runtime, calling a function + through a pointer of a different type from the original function pointer + type is undefined behavior. This may be caught at runtime by Control + Flow Integrity with something like clang's `cfi-icall`. + + Issue: https://crbug.com/1433651 + + * include/freetype/internal/services/svmetric.h (FT_Size_Reset_Func): + return `FT_Error` instead of `void`. + +2023-04-17 Ben Wagner + + [truetype] tt_size_reset_height to take FT_Size + + The `MetricsVariations` `FT_Size_Reset_Func` is defined to take an + `FT_Size`. Because `tt_size_reset_height` is to be used as such a + function, it must also take an `FT_Size` instead of a `TT_Size`. Even + though the pointers passed will be the same at runtime, calling a + function through a pointer of a different type from the original + function pointer type is undefined behavior. This may be caught at + runtime by Control Flow Integrity with something like clang's + `cfi-icall`. + + Issue: https://crbug.com/1433651 + + * src/truetype/ttobjs.h (tt_size_reset_height): take `FT_Size` + + * src/truetype/ttobjs.c (tt_size_reset_height): take `FT_Size` and + update documentation + +2023-04-13 Werner Lemberg + + * src/truetype/ttinterp.c: Remove outdated comments. + +2023-04-11 Ben Wagner + + [sfnt, truetype] Add `size_reset` to `MetricsVariations`. + + This is a generalization of commit + + ``` + commit e6699596af5c5d6f0ae0ea06e19df87dce088df8 + Author: Werner Lemberg + Date: Thu Feb 2 11:38:04 2017 +0100 + + [truetype] Fix MVAR post-action handling. + ``` + + It is also possible for plain `CFF ` style fonts to contain an `fvar` and + `MVAR` table and use `cff_metrics_adjust`. `tt_size_reset` should only be + called with `TT_Size` and never with `CFF_Size`. + + Allow the "metrics-variations" service to specify the correct function (if + any) to reset `FT_Size`s after adjusting metrics. + + * src/truetype/ttobjs.c (tt_size_reset): Split off some functionality + into... + (tt_size_reset_height): ... this new function. + + * src/truetype/ttdriver.c (tt_service_metrics_variations): Add + `size_reset`. + (tt_size_select, tt_size_request): Updated. + + * src/truetype/ttobjs.h: Updated. + + * include/freetype/internal/services/svmetric.h (MetricsVariations): Add + `size_reset`. + (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Updated. + + * include/freetype/internal/tttypes.h (TT_FaceRec_): Rename `var` to + `tt_var` and add `face_var`. + + * src/cff/cffdrivr.c (cff_service_metrics_variations): Add `size_reset`. + (cff_hadvance_adjust, cff_metrics_adjust): Updated. + + * src/cff/cffobjs.c (cff_face_init): Use `face_var`. + + * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `face_var`. + + * src/sfnt/ttmtx.c (tt_face_get_metrics): Use `tt_var`. + + * src/truetype/ttgxvar.c (tt_size_reset_iterator): Renamed to... + (ft_size_reset_iterator): ... this new function. + Call `size_reset`. + (tt_apply_mvar): Pass `size_reset` to `ft_size_reset_iterator`. + + Fixes #1211 + +2023-04-10 Alexei Podtelezhnikov + + * src/cff/cffcmap.c (cff_cmap_encoding_char_next): Abbreviate. + +2023-04-10 Alexei Podtelezhnikov + + Align `char_next` return types. + + This is mostly cosmetic because FT_UInt and FT_UInt32 are likely identical. + + * src/sfnt/ttcmap.c, src/cff/cffcmap.c, src/psaux/t1cmap.c, + src/psnames/psmodule.c, include/freetype/internal/service/svpcsmap.h, + src/pfr/pfrcmap.c, src/winfonts/winfnt.c (*_char_next): return FT_UInt. + +2023-04-09 Alexei Podtelezhnikov + + [sfnt] Clean up CMAP{4,12,13} handling. + + This moves the charcode overflow checks upstream and turns some + while-loops into the do-while ones to avoid the uninitialized warnings. + This should slightly reduce the number of checks and jumps. + + * src/sfnt/ttcmap.c (tt_cmap{4,12,13}_next, + tt_cmap{4.12.13}_char_map_linear): Remove the charcode overflow check. + (tt_cmap{4,12,13}_char_map_binary): Ditto and use do-while. + (tt_cmap{12,13}_char_next): Add the overflow check. + +2023-04-03 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c (load_format_25): Do not abort frame reading. + +2023-04-03 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c (load_format_*): Streamline frame reading. + +2023-04-02 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c: Formatting and comments. + +2023-04-02 Alexei Podtelezhnikov + + [sfnt] Consolidate POST version 2.0 and 2.5 (pt 2). + + * src/sfnt/ttpost.c (load_format_20, load_format_25): Update arguments + and move shared calls and checks upstream to... + (load_post_names): ... this function. + (tt_face_free_ps_names, tt_face_get_ps_name): Updated. + +2023-04-02 Alexei Podtelezhnikov + + [sfnt] Consolidate POST version 2.0 and 2.5 (pt 1). + + The deprecated POST version 2.5 can be handled using the data + structures of version 2.0. The goal is to reduce the footprint. + + * include/freetype/internal/tttypes.h (TT_Post_Names): Absorb and... + (TT_Post_20, TT_Post_25): ... remove these structures. + src/sfnt/ttpost.c (load_post_names, tt_face_get_ps_name, + tt_face_free_ps_names, load_format_20): Updated accordingly. + (load_format_25): ditto and convert offsets to glyph indices. + +2023-04-01 Alexei Podtelezhnikov + + [sfnt] Miscellaneous POST clean-ups. + + * src/sfnt/ttpost.c (load_format_20): Decrease casts. + (load_format_25): Check the table length and impose a theoretical + glyph number limit usable with 8-bit offset. Decrease casts. + (load_post_names): Pass the mapping data length without 2 bytes. + +2023-03-30 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c (load_format_20): Simplify comutations. + +2023-03-29 Alexei Podtelezhnikov + + [sfnt] Streamline POST format 2.0 handing (cont'd). + + * src/sfnt/ttpost.c (load_format_20): Co-allocate the string data and + their pointers, which makes it easier to handle and free them. + (tt_face_free_ps_names): Updated. + * include/freetype/internal/tttypes.h (TT_Post_20): Update type. + +2023-03-20 Alexei Podtelezhnikov + + [cff] Simplify `t2_strings` management in the old engine. + + * src/cff/cffparse.c (cff_parser_run): Allocate the charstring buffers + and the list nodes together so that they can be freed at once. + (finalize_t2_strings): Removed as no longer needed. + (cff_parser_done): Updated. + +2023-03-19 Alexei Podtelezhnikov + + [cff] Rework the stream limit checks. + + The old stream limit checks, before 6986ddac1ece, were good but + pointless for the crafted t2_strings. Checking limits there is + not necessary as they are created to hold all data. By using two + conditions, we can detect the actual crossing of the stream boundary + as appropriate for the stream pointer only. The t2_strings parsing + will not be triggering these checks. + + * src/cff/cffparse.c (cff_parser_within_limits): Removed. + (cff_parse_real, cff_parse_integer): Redesign the stream limit check. + (cff_parse_num, do fixed, cff_parse_fixed_dynamic): Update callers. + +2023-03-18 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use for-loop. + + Even though we never call `TT_Load_Simple_Glyph` with zero contours, + out of abundance of precaution, let's handle this case properly. + +2023-03-18 Alexei Podtelezhnikov + + [truetype] Clean up zeroing and local variables. + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Avoid zeroing. + (load_truetype_glyph): Avoid zeroing and clean local variables. + +2023-03-16 Werner Lemberg + + * include/freetype/ftsystem.h (FT_Stream_IoFunc): Improve documentation. + + Fixes #1208. + +2023-03-16 Alexei Podtelezhnikov + + * src/base/ftsynth.c (FT_GlyphSlot_AdjustWeight): New API. + +2023-03-16 Alexei Podtelezhnikov + + [truetype] Clean up glyph loading. + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Clean space checking. + (TT_Hint_Glyph): Don't copy the outline structure. + (TT_Process_Simple_Glyph): Cosmetic update. + +2023-03-15 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Clean up. + +2023-03-13 Werner Lemberg + + builds/vms/apinames_vms.bash: Fix `unzip` artifact + + The problem occured when unpacking a zip file created on OpenVMS on Linux. + While OpenVMS knows many different file formats, Unix only knows stream-LF + and binary. In principle `zip` on Linux should have translated the file to + stream-LF but failed to do so. That caused the file to incorrectly contain + only one line with control-characters. + +2023-03-11 Alexei Podtelezhnikov + + [truetype] Fix recent fallout in memory management. + + * src/truetype/ttgload.c (TT_Process_Composite_Glyph, + TT_Load_Simple_Glyph): Clean up old instructions regardless of + new ones, postpone setting `control_len` and `control_data` until... + (TT_Load_Glyph): ... the exit from this function. + +2023-03-10 Jouk Jansen + + Update VMS installation support. + +2023-03-10 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Hint_Glyph): Mostly cosmetic update. + + The number of instructions is now taken from the executed context. + Technically, this means that `control_len` and `control_data` + values are no longer _used_ internally but only expose them. + +2023-03-08 Werner Lemberg + + apinames.c: Add comment. + +2023-03-07 Werner Lemberg + + [gzip] File `infback.c` is not needed. + + * src/gzip/infback.c: Remove. + * src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. + +2023-03-07 Werner Lemberg + + [apinames] Fix VMS handling of overly long function names. + + Based on ideas from Jouk Jansen . + + * src/tools/vms_shorten_symbol.c: New file, taken from + + https://sourceforge.net/p/vms-ports/vmsshortsym/ci/default/tree/vms_shorten_symbol.c + + with some minor edits to allow compilation with C++ and being included in + another source code file. + + * src/tools/apinames.c: Include `vms_shorten_symbol.c`. + (PROGRAM_VERSION): Set to '0.5'. + (names_dump) [OUTPUT_VMS_OPT]: Call `vms_shorten_symbol` to get unique function + identifiers not longer than 31 characters. + +2023-03-07 Werner Lemberg + + * src/tools/apinames.c (panic): Accept variable number of arguments. + +2023-03-07 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix leak too. + +2023-03-07 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Triage memory leak. + + This leak has been introduced in the previous commit and immediately + detected: + https://chromium-review.googlesource.com/c/chromium/src/+/4313202 + +2023-03-06 Alexei Podtelezhnikov + + [truetype] Simplify memory management. + + Instead of using `Update_Max`, switch to regular FreeType memory + allocation macros, stop pre-allocating the glyph instruction arrays. + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph, + TT_Process_Composite_Glyph): Switch to regular memory allocation. + * src/truetype/ttinterp.c (Update_Max): Removed. + (TT_Load_Context): Reallocate stack and free old instructions. + (Modify_CVT_Check, Ins_WS): Switch to regular memory allocation. + * src/truetype/ttinterp.h (Update_Max): Removed. + +2023-03-06 David PROVENT + + Added information about the zlib version update in the changelog + +2023-03-06 Alexei Podtelezhnikov + + Fix a couple of MSVC warnings. + + * src/base/ftcalc.c (FT_MulAddFix): Add cast. + * src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Ditto. + +2023-03-05 Alexei Podtelezhnikov + + * builds/windows/vc2010/freetype.vcxproj: Suppress C4267 on _WIN64. + + This usually comes from `strlen` returning 64-bit `size_t`, which + we often assign to 32-bit `FT_ULong` on Windows-64 (LLP64). + +2023-03-05 Alexei Podtelezhnikov + + * src/cff/cffparse.c (cff_parser_run): Thinko. + +2023-03-05 Alexei Podtelezhnikov + + [cff] Clean up CharString number encoding. + + * src/cff/cffparser.c (cff_parser_run): Work with signed numbers. + +2023-03-05 Alexei Podtelezhnikov + + * src/cff/cffparse.c (cff_parser_run): Fix variable type. + +2023-03-04 Alexei Podtelezhnikov + + [cff] Clean up memory management in the old engine. + + * src/cff/cffparse.c (finalize_t2_strings): Fix NULL-dereferencing + in the out-of-memory situation, use `FT_FREE`. + (cff_parser_run): Use FreeType memory allocation macros and avoid + uninitialized pointers. + +2023-03-04 Alexei Podtelezhnikov + + * src/cff/cffobjs.c (cff_size_init): Synonymous change. + +2023-03-04 Alexei Podtelezhnikov + + * src/sfnt/sfobjs.c (sfnt_load_face): Shorten de-referencing. + +2023-03-04 Alexei Podtelezhnikov + + [pfr] Shorten de-referencing. + + * src/pfr/pfrobjs.c (pfr_face_done, pfr_face_init): Use closer `memory`. + * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove `loader`. + +2023-03-03 Alexei Podtelezhnikov + + * src/cff/cffobjs.c (cff_size_get_globals_funcs): Shorten de-referencing. + +2023-03-03 Alexei Podtelezhnikov + + [cff,cid,type1] Shorten de-referencing. + + * src/cff/cffobjs.c (cff_clot_init): Use immediate library reference. + * src/cid/cidobjs.c (cid_slot_init): Ditto. + * src/type1/t1objs.c (T1_GlyphSlot_Init): Ditto. + +2023-03-02 Alexei Podtelezhnikov + + * configure: Use `sed` instead of `grep`. + + This is more portable and consistent with `autogen.sh`. + +2023-03-02 Ben Wagner + + Avoid strtol on non-null-terminated data. + + Technically, `strtol` can only be used with C strings terminated with + `\0`. CID data is not generally null-terminated and often does not + contain a `\0` if it is hex-encoded. AddressSanitizer with `ASAN_OPTIONS` + containing `strict_string_checks=1` verifies this by using an adversarial + `strtol` that always reads to the terminating `\0`. + + To avoid undefined behavior from `strtol` in `cid_parser_new`, use the + parser to parse the tokens instead of attempting to parse them ad-hoc. + This will internally use `PS_Conv_Strtol` to parse the integer, which + respects the parser's limits and directly implements the PostScript + parsing rules for integers. + + * src/cid/cidparse.c (cid_parser_new): Use the parser to parse the + tokens. + + Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1420329 + +2023-03-02 Alexei Podtelezhnikov + + * src/cff/cffload.c (cff_subfont_load): Synonymous update. + +2023-03-01 ubawurinna + + * src/gzip/README.freetype: Update version. + +2023-03-01 ubawurinna + + [gzip] Fix static linking. + + Without this patch, static linking with MS Visual Studio causes linking + errors. + + * src/gzip/ftgzip.c: Set `ZEXPORT` to nothing and `ZEXTERN` to static for + all compilers. + +2023-03-01 Werner Lemberg + + * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update. + + This follows + + https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00200.html + +2023-02-28 Alexei Podtelezhnikov + + [truetype] Treat 38 as 40 without Infinality. + + * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Reinstate. + * src/truetype/ttdriver.c (tt_property_set): Fallback from 38 to 40. + +2023-02-26 Werner Lemberg + + * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update. + + This follows + + https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html + +2023-02-26 Werner Lemberg + + * src/*: Replace leading underscores with trailing ones in dummy variables. + + This is to avoid clang warnings. + +2023-02-26 Karl Berry + + * configure: Don't hardcode `grep -E`. + + TeXLive still supports Solaris 5.10, where the system's `grep` doesn't + accept the `-E` option. We thus introduce an `EGREP` variable that is set + to either `grep -E` or `-egrep`. + +2023-02-26 Alexei Podtelezhnikov + + * src/cff/cffload.c (cff_encoding_load): Optimize array zeroing. + + This is unnecessary for predefined standard and expert encodings. + Even for custom encodings the arrays might be already zeroed when + CFF_FontRec is created but we keep it just in case. + +2023-02-25 Alexei Podtelezhnikov + + * src/type1/t1load.c (T1_Get_MM_Var): Optimize array zeroing. + +2023-02-25 Tamir Duberstein + + * src/base/ftsystem.c (ft_ansi_stream_io): Avoid undefined behaviour. + Also short-circuit on `offset` to avoid checking `count` a second time when + `ft_ansi_stream_io` is used for reading. + + Per ISO/IEC 9899: + + If an argument to a function has an invalid value (such as a value outside + the domain of the function, or a pointer outside the address space of the + program, or a null pointer, or apointer to non-modifiable storage when the + corresponding parameter is not const-qualified) or a type (after + promotion) not expected by a function with variable number of arguments, + the behavior is undefined. If a function argument is described as being + an array, the pointer actually passed to the function shall have a value + such that all address computations and accesses to objects (that would be + valid if the pointer did point to the first element of such an array) are + in fact valid. + + Per IEEE Std 1003.1: + + size_t fread(void *restrict ptr, size_t size, size_t nitems, + FILE *restrict stream); + + The `fread` function shall read into the array pointed to by `ptr` up to + `nitems` elements whose size is specified by `size` in bytes, from the + stream pointed to by `stream`. + + Since the first argument to `fread` is described as being an array, its + behavior is undefined when that argument is a null pointer. + + Per the documentation on `ft_ansi_stream_io`: + + If `count' is zero (this is, the function is used for seeking), a non-zero + return value indicates an error. + + Thus the intent is clear, and the call to `fread` can be skipped, avoiding + undefined behaviour. + +2023-02-21 Alexei Podtelezhnikov + + [raster] Clean up contour indexing. + + * src/raster/ftraster.c (Decompose_Curve, Convert_Glyph): Use consistent + index types (Int) and compact iterations. + +2023-02-21 Alexei Podtelezhnikov + + [autofit] Clean up contour indexing. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Refactor. + * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Ditto. + +2023-02-21 Alexei Podtelezhnikov + + * src/base/ftoutln.c (FT_Outline_Check): Fix C4701 warning. + +2023-02-21 Alexei Podtelezhnikov + + * src/sdf/ftsdf.c (get_min_distance_cubic): Fix C4701, typos. + +2023-02-20 Alexei Podtelezhnikov + + * src/base/ftstroke.c (FT_Stroker_ParseOutline): Clean up contour indexing. + +2023-02-20 Alexei Podtelezhnikov + + [base] Clean up contour indexing. + + * src/base/ftoutln.c (FT_Outline_Reverse, FT_Outline_EmboldenXY, + FT_Outline_Get_Orientation): Set the first and last indexes together. + (FT_Outline_Decompose): Ditto and check them more stringently. + * src/smooth/ftgrays.c (FT_Outline_Decompose)[STANDALONE_]: Ditto. + +2023-02-20 Alexei Podtelezhnikov + + * src/base/ftoutln.c (FT_Outline_Check): Update error code, clean up. + +2023-02-17 Alexei Podtelezhnikov + + [truetype] Hide Infinality. + + Remove Infinality as an option before its complete extraction. + + * include/freetype/ftoption.h: Remove the Infinality option. + * devel/ftoption.h: Ditto. + * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Is 40 now. + +2023-02-17 Alex Ringlein + + * src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points. + + A cubic contour has to always start from an on-point. Therefore, we + should not swap the first with the last point, which might be off, and + obtain an invalid contour. This does not matter for conic contours. + If anything, it also saves one swap there. Fixes #1207. + +2023-02-16 Werner Lemberg + + Documentation improvement for `FT_Bitmap`. + + Fixes #1205. + +2023-02-10 Alexei Podtelezhnikov + + [type1/MM] Round design coordinates. + + The design coordinates for MM fonts were not rounded. For example, + `FT_Get_Var_Design_Coordinates` returned values with fractional part. + + * src/type1/t1load.c (mm_axis_unmap): Refactor with rounding. + + * include/freetype/ftmm.h (FT_Var_Axis, FT_Set_Var_Design_Coordinates, + FT_Get_Var_Design_Coordinates): Reword documentation. + +2023-02-09 Jan Alexander Steffens (heftig) + + * builds/meson/parse_modules_cfg.py: Handle `gxvalid` and `otvalid`. + + These need a name mapping similar to what was done for other modules, + or linking will fail. + +2023-02-09 Werner Lemberg + + * build/toplevel.mk (do_dist): Fix typo. + +2023-02-09 Werner Lemberg + + * Version 2.13 released. + ========================== + + Tag sources with `VER-2-13-0'. + + * docs/VERSION.TXT: Add entry for version 2.13. + * docs/CHANGES: Updated. + + * README, src/base/ftver.rc, builds/windows/vc2010/index.html, + builds/windows/visualc/index.html, builds/windows/visualce/index.html, + builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, + docs/freetype-config.1: s/2.12.1/2.13/, s/2121/2130/. + + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 13. + (FREETYPE_PATCH): Set to 0. + + * builds/unix/configure.raw (version_info): Set to 25:0:19. + * CMakeLists.txt (VERSION_MINOR): Set to 13. + (VERSION_PATCH): Set to 0. + +2023-02-09 Alexei Podtelezhnikov + + Comment on `FT_GlyphSlot_Slant'. + +2023-02-08 Werner Lemberg + + [autofit] Fix 'multi' compilation. + + * src/autofit/ft-hb.c: Decorate with `FT_LOCAL_DEF`. + Add ANSI boilerplate code for otherwise empty file. + * src/autofit/ft-hb.h: Include `compiler-macros.h` and `freetype.h`. + Use `FT_BEGIN_HEADER` and `FT_END_HEADER`. + Decorate with `FT_LOCAL`. + + * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `ft-hb.c`. + +2023-02-08 Werner Lemberg + + Fix `FT_LOCAL` and `FT_LOCAL_DEF` tags. + +2023-02-08 Werner Lemberg + + Fix 'fall-through' warning messages. + + Modern compilers get more insistent on that... + + * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Define. + * src/*: Use it instead of `/* fall through */` comments. + +2023-02-08 Werner Lemberg + + For debugging, avoid implicit conversion from integer to double. + + Otherwise we get zillions of clang 15 warnings. + + * src/autofit/afcjk.c, src/autofit/afhints.c, src/autofit/aflatin.c, + src/base/ftobjs.c, src/base/ftoutln.c, src/cff/cffparse.c, + src/raster/ftraster.c, src/sfnt/pngshim.c, src/truetype/ttgload.c, + src/truetype/ttgxvar.c, src/truetype/ttobjs.c, src/type1/t1gload.c: Use + `double` cast in debugging and tracing macros. + +2023-02-08 Werner Lemberg + + Avoid reserved identifiers that are globally defined. + + This is mandated by the C99 standard, and clang 15 produces zillions of + warnings otherwise. + + * devel/ftoption.h, include/freetype/config/ftoption.h, + include/freetype/internal/ftmemory.h, src/autofit/afhints.h, + src/autofit/afmodule.c, src/autofit/aftypes.h, src/base/ftadvanc.c, + src/base/ftdbgmem.c, src/base/ftstream.c, src/bdf/bdflib.c, + src/truetype/ttinterp.c: Replace identifiers of the form `_foo` with `foo_`. + +2023-02-08 Werner Lemberg + + Fix minor clang and clang++ warnings. + +2023-02-08 Alexei Podtelezhnikov + + [truetype, type1] Additional variation tags. + + Sync with + https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags + + * src/truetype/ttgxvar.h (TTAG_ital): New tag. + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use it. + * src/type1/t1load.c (T1_Get_MM_Var): Handle 'slnt' and 'ital'. + +2023-02-08 Alexei Podtelezhnikov + + * src/base/ftsynth.c (FT_GlyphSlot_Slant): Add vertical slant. + * include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Update it. + +2023-02-08 anuj <95867901+anuj99@users.noreply.github.com> + + [sdf] Use 32-bit integers internally. + + * src/sdf/ftsdfcommon.h (FT_16D16, FT_26D6): Use 32-bit integers + instead of `FT_Fixed` for internal data types. `FT_Fixed` i.e. + `signed long` is 64-bit on some architectures. + +2023-02-07 Werner Lemberg + + docs/CHANGES: Updated. + +2023-02-04 Alexei Podtelezhnikov + + Comment on optional ascender and descender. + +2023-02-04 Alexei Podtelezhnikov + + * src/type1/t1afm.c (T1_Read_Metrics): Reaffirm ascender and descender. + +2023-02-04 Alexei Podtelezhnikov + + * src/type1/t1afm.c (T1_Read_Metrics): Validate ascender and descender. + + The ascender and descender are optional in the AFM specifications. + They could be omitted or even set to zero, e.g., in the current release + of URW++ base 35 fonts. + +2023-02-02 Werner Lemberg + + * src/cff/cffgload.c (cff_slot_load): Avoid memory leak. + + Fixes issue #1204. + +2023-02-01 Werner Lemberg + + * src/truetype/ttgxvar.c (tt_var_get_item_delta): Check `face->blend`. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55581 + +2023-02-01 Werner Lemberg + + * docs/CHANGES: Add news for 'freetype-demos'. + +2023-01-30 Werner Lemberg + + * subprojects/harfbuzz.wrap, subprojects/libpng.wrap: Updated. + +2023-01-28 Werner Lemberg + + Minor changes. + + Comment fixes, typos, removing of unnecessary parentheses. + +2023-01-28 Werner Lemberg + + Whitespace. + +2023-01-27 Behdad Esfahbod + + [ttgxvar] Fix crash in COLRv1. + + This is a stopgap until issue #1202 is properly fixed. + + * src/truetype/ttxgvar.c (tt_var_get_item_delta): Check `normalizedcoords`. + +2023-01-19 Werner Lemberg + + The 'COLR' v1 API will no longer be experimental in the next release. + +2023-01-18 Alexei Podtelezhnikov + + * docs/oldlogs/ChangeLog.210: Typos. + +2023-01-18 Ben Wagner + + [base] Fix typo. + + * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Request module 't1cid', + not 'cid'. + +2023-01-18 Ben Wagner + + [base] Return error if requested driver is not found. + + In `open_face_from_buffer` it is possible that a driver is requested but + FreeType was built without the requested module. Return an error in this + case to indicate that the request could not be satisfied, rather than trying + all existing driver modules. + + * src/base/ftobjs.c (open_face_from_buffer): Return `FT_Err_Missing_Module` + if a driver is specified but not found. + +2023-01-18 Dominik Röttsches + + [sfnt] Avoid nullptr dereference in reading malformed 'COLR' v1 table. + + Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1408044. + + * src/sfnt/ttcolr.c (tt_face_load_colr): When the 'COLR' v1 table header is + too small, don't deallocate delta set index map structures. + +2023-01-17 Werner Lemberg + + * src/tools/update-copyright: Allow execution from other repositories. + + We use this for `freetype-demos`. + +2023-01-17 Werner Lemberg + + Update all copyright notices. + +2023-01-17 Werner Lemberg + + * src/tools/no-copyright: Updated. + +2023-01-17 Ben Wagner + + [base] 'close' callback may not use `stream->memory`. + + The documentation for `FT_StreamRec::memory` states that it 'shouldn't be + touched by stream implementations'. This is true even for internal + implementations of the 'close' callback, since it is not guaranteed that + `memory` will even be set when the 'close' callback occurs. + + * src/base/ftobjs.c (new_memory_stream): stash current `memory` in + `stream->descriptor`. + (memory_stream_close): Use it. + +2023-01-17 Ben Wagner + + [base] Always close user-provided stream. + + The `FT_Open_Face` documentation states + + > If `FT_OPEN_STREAM` is set in `args->flags`, the stream in `args->stream` + > is automatically closed before this function returns any error (including + > `FT_Err_Invalid_Argument`). + + However, if the user provides a stream in `args.stream` with + `FT_OPEN_STREAM` set and a `close` function, but then for some reason passes + NULL for `aface` and a non-negative `face_index`, the error + `Invalid_Argument` is returned but the `close` callback will not be called + on the user-provided stream. This may cause resource leaks if the caller is + depending on the `close` callback to free resources. + + The difficulty is that a user may fill out a `FT_StreamRec` and pass its + address as `args.stream`, but the stream isn't really 'live' until + `FT_Stream_New` is called on it (and `memory` is set). In particular, it + cannot really be cleaned up properly in `ft_open_face_internal` until the + stream pointer has been copied into the `stream` local variable. + + * src/base/ftobj.c (ft_open_face_internal): Ensure that user-provided + `args.stream.close` is called even with early errors. + +2023-01-17 Ben Wagner + + [base] Fix leak of internal stream marked external. + + `open_face_from_buffer` allocates a new `FT_Stream` to pass to + `ft_open_face_internal`. Because this is an `FT_OPEN_STREAM`, + `ft_open_face_internal` will mark this as an 'external stream', which the + caller must free. However, `open_face_from_buffer` cannot directly free it + because the stream must last as long as the face. There is currently an + attempt at this by clearing the 'external stream' bit after + `open_face_from_buffer` returns successfully. However, this is too late as + the original stream may have already been closed and the stream on the face + may not be the same stream as originally passed. + + It is tempting to use `FT_OPEN_MEMORY` and let `ft_open_face_internal` + create the stream internally. However, with this method there is no means + to pass through a 'close' function to the created stream to free the + underlying data, which must be owned by the stream. + + A possibility is to check on success if the stream of the face is the same + as the original stream. If it is then unset the external flag. If not, + then free the original stream. Unfortunately, while no current + implementation does so, it is possible that the face still has the original + stream somewhere other than as the `FT_FaceRec::stream`. The stream needs + to remain available for the life of the face or until it is closed, + whichever comes earlier. + + The approach taken here is to let the stream own itself. When the stream is + closed it will free itself. + + * src/base/ftobjs.c (memory_stream_close): Free `stream`. + (open_face_from_buffer): Simplify error handling, since + `ft_open_face_internal` always closes `args.stream` on any error. + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54930 + +2023-01-16 Werner Lemberg + + sr/*.c: Various minor fixes. + + * src/autofit/ft-hb.c (_hb_ft_reference_table): Call `FT_UNUSED` after + variable declarations. + + * src/gxvalid/gxvjust.c (gxv_just_widthDeltaClusters_validate): Eliminate + unused variable. + + * src/gzip/ftgzip.c: Don't call GCC '-Wstrict-prototypes' pragma for C++ + compiler. + + * src/sfnt/ttcolr.c (ENSURE_READ_BYTES): Remove final semicolon to avoid + compiler warning. + + * src/sfnt/ttsvg.c (tt_face_load_svg_doc): Fix signedness warning. + +2023-01-16 Dominik Röttsches + + [sfnt] Remove temporary runtime flag for variable 'COLR' v1. + + Fixes #1187. + + * src/sfnt/ttcolr.c (top level, read_paint, tt_face_load_colr, + tt_face_free_colr, get_deltas_for_var_index_base, + tt_face_get_color_glyph_clipbox, tt_face_get_colorline_stops): Remove macro + definition `VARIABLE_COLRV1_ENABLED` and its usage. + + * src/truetype/ttdriver.c (tt_property_set): Remove parsing of + 'TEMPORARY-enable-variable-colrv1' property name. + + * src/truetype/ttobjs.h (TT_DriverRec): Remove `enable_variable_colrv1` + flag. + +2023-01-07 Werner Lemberg + + * src/autofit/ft-hb.c (_hb_ft_reference_table): Minor integration fixes. + +2023-01-07 Ben Wagner + + [truetype] Reset cvt and storage in context load. + + Currently the cvt and storage are saved and restored in `TT_RunIns`. + However, this is too granular as the cvt and storage area should be set to + the original cvt and storage area only when setting up the hinting context. + This allows for the cvt and storage area to be modified while parsing + multiple glyphs, as is the case with composite glyphs. + + * src/truetype/ttinterp.h (TT_ExecContextRec): Remove `origCvt` and + `origStorage`. + + * src/truetype/ttinterp.c (TT_RunIns): Don't save and restore the cvt and + storage area. + (Modify_CVT_Check, Ins_WS): Switch from "if in glyph and using original data + do copy on write" to "if in glyph and not using glyph specific data do copy + on write". + +2023-01-06 Matthias Clasen + + [autofit] Don't depend on 'hb-ft'. + + The circular dependency is still there, but at least we no longer depend on + the HarfBuzz API that is only present if HarfBuzz has been built with + FreeType support, making the bootstrapping a bit easier. + + * src/autofit/ft-hb.c, src/autofit/ft-hb.h: New files, providing + `_hb_ft_font_create`, which is more or less a verbatim copy of the + corresponding HarfBuzz code from file `hb-ft.cc`. + + * src/autofit/afglobal.c (af_face_globals_new): Use it. + * src/autofit/afshaper.h: Don't include `hb-ft.h` but `ft-hb.h`. + * src/autofit/autofit.c: Include `ft-hb.c`. + + * LICENSE.TXT: Updated. + +2023-01-06 Ben Wagner + + [truetype] Keep variation store consistent. + + `tt_var_load_item_variation_store` fills out a `GX_ItemVarStore`. While it + may return an error, the item store must be left in a consistent state so + that any use or destruction of the item store can properly use or free the + data in it. Before this change the counts from the font data were read + directly into the item store before the actual allocation of the arrays to + which they referred. There exist many opportunities between the time the + counts are read and the arrays are allocated to return early due to invalid + data. When this happened the item store claimed to have entires it actually + did not, leading to crashes later when it was used. + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54449 + + * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Read the counts + into local variables and store them in the item store only after the related + arrays are actually created on the item store. + +2023-01-05 Ben Wagner + + [base] Report used stream's external status. + + In `open_face` the initial stream is set on the face, along with the + information about if FreeType is the owner of the stream object itself. The + loaders may in the course of their work replace this stream with a new + stream (as is the case for 'woff' and 'woff2'), which may have a different + ownership than the initial stream object (likely the original stream object + is owned by the user and is external, while the new stream object is created + internally to FreeType and is internal). When the stream is replaced, the + face's flags are updated with the new ownership status. + + However, `open_face` cannot itself free this stream as its caller + `ft_open_face_internal` is responsible for this. In addition, in the case + of an error `open_face` cannot return an actual face with the new stream and + its ownership status to the caller. As a result, it must pass this + information back to the caller as a sort of "failed face" so that the caller + can clean up. + + `open_face` was already passing back the new stream but was not passing back + the stream ownership information. As a result the stream may not have been + free'd when needed. + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54700 + + * src/base/ftobjs.c (open_face): Pass back the ownership information as + well. + (ft_open_face_internal): Updated. + +2023-01-05 Noah Cabral + + fix spelling err in LICENSE.txt + +2023-01-05 Dominik Röttsches + + [sfnt] Fix color stop bounds check calculation at table end. + + Fixes https://bugs.chromium.org/p/skia/issues/detail?id=14021 + + * src/sfnt/ttcolr.c (VAR_IDX_BASE_SIZE): New macro. + (tt_face_get_colorline_stops): Fix off-by-one bounds check calculation, take + `VarColorStop` into account, and hopefully make it easier to read. + +2023-01-05 Alexei Podtelezhnikov + + * src/base/ftobjs.c (FT_Request_Metrics): Avoid division by zero. + + The division-by-zero might happen in broken fonts (see #1194). + Instead of returning a huge number from FT_DivFix and failing + to scale later, we now bail immediately. + +2022-12-20 Alexei Podtelezhnikov + + [psaux] Delay the upem validity assertion. + + Fixes #1194. + + * src/psaux/psft.c (cf2_getUnitsPerEm): Remove the upem assert. + (cf2_checkTransform): Assert the upem validity after checking the scale. + +2022-12-14 David Vanderson + Werner Lemberg + + [gzip] Make static compilation not leak global symbols. + + * src/gzip/ftgzip.c (HAVE_HIDDEN): Do not define; it is no longer needed + because everything is static. + (HAVE_MEMCPY): Define. + (zcalloc, zcfree): Remove no longer needed definitions (because `Z_SOLO` is + active). + + * src/gzip/patches/freetype-zlib.diff: Regenerated. + + Fixes #1146. + +2022-12-14 Werner Lemberg + + * src/gzip/ftzconf.h: Updated to zlib 1.2.13. + + I forgot to copy that file. + +2022-12-14 Werner Lemberg + + * builds/unix/configure.raw: Don't check for `memcpy` and `memmove`. + + We expect a C99 compiler, and both functions are part of this standard. + +2022-12-13 Werner Lemberg + + [sdf, sfnt] Handle minor compiler warnings. + + * src/sdf/ftsdf.c (get_min_distance_conic): Initialize `nearest_point`. + + * src/sfnt/ttsvg.c (find_doc): Initialize `mid_doc`. + + Fixes #1195. + +2022-12-07 Werner Lemberg + + * subprojects/zlib.wrap: Micro-update from upstream. + +2022-12-06 Jiří Malák + + * include/freetype/internal/ftcalc.h (FT_MSB): Support Open Watcom 2.0. + + Closes !232. + +2022-11-23 Luca Bacci + + * src/base/ftdbgmem.c (ft_mem_source_compare): Add FT_COMPARE_DEF. + + Closes !230. + +2022-11-21 Alexei Podtelezhnikov + + * src/autofit/afloader.c (af_loader_load_glyph): Remove `size` check. + + This is done by `FT_Load_Glyph`. + +2022-11-18 Alexei Podtelezhnikov + + Comments added. + +2022-11-16 Johan Matsson + + * src/autofit/afloader.c (af_loader_load_glyph): Fix dereference. + + This must happen after the NULL check. + + Taken from + + https://github.com/freetype/freetype/pull/2 + +2022-11-15 Alexei Podtelezhnikov + + * src/pcf/pcfutil.c ({Two,Four}ByteSwap): Use builtins or shifts. + + We trust glibc which uses shifts or builtins to swap bytes. This + must be more efficient. + +2022-11-14 Werner Lemberg + + * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50462 + +2022-11-14 Loïc Yhuel + + [meson] Use generated ftmodule.h + + ftmodule.h is generated at the root of the build directory, but FT_CONFIG_MODULES_H + (freetype/config/ftmodule.h) is used instead. + This makes the build fail when disabling modules in modules.cfg. + + * meson.build (harfbuzz_dep): Add '-DFT_CONFIG_MODULES_H='. + +2022-11-14 Loïc Yhuel + + [meson] Fix generated ftmodule.h + + The sdf module wasn't recognized, so the generated ftmodule.h had "None_renderer_class". + + * builds/meson/parse_modules_cfg.py: Handle sdf in RASTER_MODULES. + +2022-11-12 Dominik Röttsches + + Add `TT_CONFIG_OPTION_NO_BORING_EXPANSION` configuration macro. + + This gives users a possibility to deactivate new features not (yet) in the + OpenType standard. + + * include/freetype/config/ftoption.h, devel/ftoption.h + (TT_CONFIG_OPTION_NO_BORING_EXPANSION): New macro. + + * src/truetype/ttgxvar.c (ft_var_load_avar): Use it to disable 'avar' + version 2.0 support. + +2022-11-12 Behdad Esfahbod + + [truetype] Improve bounds checks for `ItemVariationStore`. + + * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Move bounds check ... + (tt_var_get_item_delta): ... to this function, because it is safer. For + example, the 'avar' table 2.0 codepath was not performing a bounds check at + all. + +2022-11-12 Behdad Esfahbod + + [truetype] In `ItemVariationStore`, value 0xFFFF for `dataCount` is valid. + + It corresponds to outer indices of 0 to 0xFFFE. + + * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Remove invalid + code. + +2022-11-11 Alexei Podtelezhnikov + + [pcf] Improve CMap efficiency and readability. + + * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Check and walk + the encoding array indexes. + +2022-11-10 Sam James + + Fix `-Wstrict-prototypes`. + + * builds/unix/configure.raw: Fix `-Wstrict-prototypes`. + Clang 16 warns on these and they will be dropped in C23. + + * builds/unix/freetype2.m4: Ditto. + +2022-11-09 Ben Wagner + + [truetype] Check avar_segment before access + + * src/truetype/ttgxvar.c (tt_done_blend): check `avar_segment` before + accessing to free its `correspondence`. + + Reported as: + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53062 + +2022-11-09 Ben Wagner + + [truetype] Restore behavior of ft_var_load_hvvar + + * src/truetype/ttgcvar.c (ft_var_load_hvvar): restore previous behavior + + In a previous change [0] the behavior of `ft_var_load_hvvar` was changed + to not load the item variation store if it was at offset 0, but not + return an error when this happened. This broke any users, like + `tt_hvadvance_adjust`, that rely on successful completion of + `ft_var_load_hvvar` to imply that returned table's `itemStore` had been + initialized. This lead such users to dereference NULL. + + This change appears to have been unintentional and unrelated to the + actual avar2 changes. As a result, fix these NULL dereferences by + restoring the code to always attempt to initialize the `itemStore`. + + [0] ae4eb996 "[truetype] Add support for `avar` table 2.0 format." + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53061 + +2022-11-08 Werner Lemberg + + docs/CHANGES: Updated. + +2022-11-08 suzuki toshiya + + [build] use AC_CHECK_PROG() macro for libpng-config detection + + * builds/unix/configure.raw: use AC_CHECK_PROG() instead of `which` to find `libpng-config`. + +2022-11-08 suzuki toshiya + + [build] fix for make multi + + Fix "make multi" by MR !223 + + * include/freetype/internal/services/svmm.h: include ftmm.h to define FT_Get_MM_Func. + * src/truetype/ttgxvar.h: include ftmmtypes.h to use GX_AVarTable properly. + * src/base/ftmac.c: include ftdebug.h to use FT_THROW() properly. + +2022-11-08 Alexei Podtelezhnikov + + * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Accelerate the search. + + This is mostly for consistency because PFR fonts with bitmap strikes + do not seem to exist. + +2022-11-06 Alexei Podtelezhnikov + + [bdf, pfr, psnames] Accelarate charmap searches. + + The binary searches within charmaps can be accelerated because they + often contain dense continuous blocks of character codes. Within such + blocks, you can predict matches based on misses. This method has been + deployed in `bdf` since 0f122fef34; we only refactor it there. We now + use it in `pfr` and `psnames`, which speeds up the unicode charmap + access by about 50% in PFR and Type 1 fonts. + + * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Refactor. + * src/pfr/pfrcmap.c (pfr_cmap_char_{index,next}): Predict `mid` based + on the mismatch distance. + * src/psnames/psmodule.c (ps_unicodes_char_{index,next}): Ditto. + +2022-11-04 Behdad Esfahbod + + [truetype] Add support for `avar` table 2.0 format. + + See + + https://github.com/harfbuzz/boring-expansion-spec/blob/main/avar2.md + + for the specification. + + Currently, this is implemented only in most recent OS versions on Apple + platforms and in the HarfBuzz library, but it is expected to be added to the + OpenType standard soon. + + * src/truetype/ttgxvar.h (GX_AVarTableRec): New structure. + (GX_BlendRec): Use it to replace `avar_segment` with `avar_table`. + + * src/truetype/ttgxvar.c (ft_var_load_avar): Load new table version. + (ft_var_to_normalized, tt_done_blend): Extend for new format. + (ft_var_load_hvvar, ft_var_to_design): Updated. + +2022-10-24 Werner Lemberg + + Replace '1/64th' (and similar entries) with '1/64' in docs and comments. + +2022-10-24 Ivan Panchenko + + * include/freetype/*: Fix documentation typos. + +2022-10-21 Alexei Podtelezhnikov + + * src/truetype/ttgload.c: Cosmetic changes. + +2022-10-21 Alexei Podtelezhnikov + + [cff, truetype] Simplify SVG metrics scaling. + + Use pre-calculated scaling factors. Also, the advance widths used + to be rounded, which was incorrect. + + * src/cff/cffgload.c (cff_slot_load): Use `x_scale` and `y_scale`. + * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. + +2022-10-20 Werner Lemberg + + * subprojects/zlib.wrap: Update to zlib version 1.2.13. + +2022-10-18 Dominik Röttsches + + [sfnt] Additional bounds checks for `COLR` v1 table handling. + + * src/sfnt/ttcolr.c (read_paint): Add `colr` argument, necessary for... + ... another use of `ENSURE_READ_BYTES`. + Update callers. + (tt_face_get_paint_layers): Ensure that the 4-byte paint table + offset can be read. + + This is a follow-up to !124 and issue + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52404 + +2022-10-18 Werner Lemberg + + [gzip] Update sources to zlib 1.2.13. + +2022-10-18 Alexei Podtelezhnikov + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Simplify calculations. + +2022-10-18 Werner Lemberg + + Minor formatting. + +2022-10-18 Dominik Röttsches + + [sfnt] Guard individual `COLR` v1 paint field reads. + + * src/sfnt/ttcolr.c (ENSURE_READ_BYTES): New macro. + (read_paint): Use it – after the start pointer `p` has been checked for + whether it allows reading the format byte, each successive paint table field + read need to be bounds-checked before reading further values. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52404 + +2022-10-17 Xiang Xiao + + * builds/toplevel.mk: Prefix all paths with `$(TOP_DIR)/`. + + This is useful for builds that are not started from the root directory. + +2022-10-17 Liu Kunpeng(柳鲲é¹) + + * src/base/ftsynth.c (FT_GlyphSlot_Slant): New API with custom slant. + * include/freetype/ftsynth.h (FT_GlyphSlot_Slant): Declare it. + +2022-10-15 Alexei Podtelezhnikov + + Note the lack of floating-point data types. + +2022-10-10 Werner Lemberg + + [cff] Remove `FT_CONFIG_OPTION_NO_GLYPH_NAMES`. + + This ancient option stayed completely undocumented. Given that the 'cff' + driver requires the 'psnames' module, it makes no sense today to have this + macro. + + * src/cff/cffdrivr.c (cff_services), src/cff/cffobjs.c (cff_face_init): + Remove corresponding conditional code. + +2022-10-10 Werner Lemberg + + Synchronize `ftoption.h` flavours. + +2022-10-10 Werner Lemberg + + Minor comment changes. + +2022-10-05 Alexei Podtelezhnikov + + Improve FT_Get_Name_Index docs and place it next to FT_Get_Glyph_Name. + +2022-10-04 Alexei Podtelezhnikov + + [autofit] Reset the face charmap directly. + + There is no need to validate the original charmap in `FT_Set_Charmap`. + It can be reset directly. + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Use direct assignment. + * src/autofit/af{latin,cjk,indic}.c (af_latin_metrics_init): Ditto. + +2022-10-04 Alexei Podtelezhnikov + + * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly. + + As with the previous commit, we can avoid the validation checks + of `FT_Set_Charmap` and set it directly when choosing from the + available list. + +2022-10-03 Alexei Podtelezhnikov + + * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Avoid `FT_Set_Charmap`. + + Set charmap aggressively without all validations of `FT_Set_Charmap` + because we take it from the available array and only temporarily. + Even CMap Format 14 will gracefully return 0. + +2022-10-03 Alexei Podtelezhnikov + + * src/cache/ftcbasic.c (ftc_basic_family_get_count): Remove redundancy. + +2022-09-30 Werner Lemberg + + * src/psaux/pshints.c (cf2_hintmap_insertHint): Fix midpoint computation. + + Replace '(start + end) / 2' with 'start + (end - start) / 2' to avoid + overflow. + + Fixes #1180. + +2022-09-30 Werner Lemberg + + * src/psaux/pshints.c (cf2_hintmap_build): Improve debugging output. + +2022-09-29 mlugg + + [truetype] Fix undefined pointer arithmetic. + + * src/truetype/ttgxvar.c (tt_var_get_item_delta, ft_var_load_mvar): Use + `FT_OFFSET`. + +2022-09-29 Alexei Podtelezhnikov + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Use lighter FT_DivFix. + +2022-09-29 Ali Chraghi + + [base] FT_Attach_Stream: Make `parameters` argument constant. + +2022-09-29 Azamat Hackimov + + * src/tools/*.py: Migrate to Python 3. + + Fixes #1185, closes !205. Formatting changes according to PEP8. + +2022-09-27 Dominik Röttsches + + [sfnt] Guard access in 'COLR' table when requesting child table pointer. + + * src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Tighten + pointer bounds checks. + (get_child_table_pointer): Check whether incoming pointer `p` lies within + the 'COLR' table. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51816 + +2022-09-27 Ben Wagner + + [sfnt] Add SVG document bounds checking. + + Add a check that the document content is actually contained within the + `SVG ` table. Without this check a malformed font may claim arbitrary + memory as its document content. + + * src/sfnt/ttsvg.c (tt_face_load_svg): Take `numEntries` into account when + testing 'documentRecord' extents. + (find_doc): Rename `stream` to `document_records` for clarity. + (tt_face_load_svg_doc): Split `doc` from `doc_list` pointer for clarity. + Test that the document content is contained within the table. + Ensure minimum length of document before testing for gzip format. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51812 + +2022-09-23 Alexei Podtelezhnikov + + [base] Clean up the bitmap flow control. + + * src/base/ftbitmap.c (FT_Bitmap_Copy): Flip the copy if its pitch + is trully opposite, zero is not a positive value. + (FT_Bitmap_Convert): Set negative pitch as needed, accept negative + alignment values. + +2022-09-22 Alexei Podtelezhnikov + + [base] Discard and recreate bitmaps for copying and converting. + + Reusing target bitmaps for copying and converting is permitted. It is, + however, pointless to preserve their content before overwriting. Free- + malloc might be faster than realloc. + + * src/base/ftbitmap.c (FT_Bitmap_Copy, FT_Bitmap_Convert): Free + an old buffer and create a new one. + +2022-09-16 Dominik Röttsches + + Reject 'COLR' table if version is 1 but header too small. + + * src/sfnt/ttcolr.c (tt_face_load_colr): If the version is determined to + be 1, then the table size has to be at least the size of the v1 header. + Also, for peeking the number of base glyphs and entries in the layer list, + ensure that the table is sufficiently long. + + Fixes #1179. Original patch by Sergey Temnikov. + +2022-09-15 Werner Lemberg + + * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix format 1 handling. + + Fixes #1181. + +2022-09-06 Dominik Röttsches + + [truetype] Reject 'fvar' loading when `num_instances` is too small. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Reject retrieving master when + 'fvar' values locally do not match with sanitized values from initialization + at `sfnt_init_face` time. + + Reported as + + https://bugs.chromium.org/p/chromium/issues/detail?id=1360295 + +2022-09-05 Dominik Röttsches + + [sfnt] Handle variable `COLR` v1 fonts without delta set index map + + Fixes #1178. + + * src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Set outer index to + 0 and inner index to the delta index when retrieving deltas if the + `COLR` table has no delta set index map. + +2022-09-05 Dominik Röttsches + + [sfnt] Pointer sanity checks before reading layer info in 'COLR' v0 + + * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Check that the pointer to + read from is within the 'COLR' table. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50633 + +2022-09-05 Werner Lemberg + + [autofit] Minor fix. + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Avoid + compiler warning. + +2022-09-05 Dominik Röttsches + + [sfnt] Don't require 'gvar' table to support variation fonts. + + Fixes #1172. + + * src/sfnt/sfobjs.c (sfnt_load_face): Tag font as Multiple Masters font if + `fvar` is present; do not require other tables to be present. + + * src/truetype/ttgxvar.c (tt_set_mm_blend): Allow for a missing 'gvar' table + when setting variation coordinates. However, if a 'gvar' table is actually + present, do perform a sanity check and fail on malformedness. + (TT_Get_MM_Var): Don't assume 'fvar' needs 'gvar' or 'CFF2 tables in all + cases, which is an overly tight check. + +2022-08-27 Alexei Podtelezhnikov + + * src/base/ftver.rc: Explicitly use UTF-16. + + Fixes #1177 to avoid mistranslation and other problems. + +2022-08-26 Dominik Röttsches + + [sfnt] Avoid undefined shifts in `COLR` v1 color line retrieval + + * src/sfnt/ttcolr.c (tt_face_get_colorline_stops): Disambiguate shift + behavior by using multiplication using macros from ftcalc.h. + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50573 + +2022-08-21 Sean Farrell + + CMakeLists.txt (FT_ENABLE_ERROR_STRINGS): New configuration option. + + This option uncomments FreeType configuration macro + `FT_CONFIG_OPTION_ERROR_STRINGS` to make function `FT_Error_String` return + meaningful error strings. + + This option is off by default. + +2022-08-21 Chris Liddell + + [base, type1] Better handling of out-of-memory situations. + + This follows similar code in `cff_slot_done`. + + * src/base/ftobjs.c (ft_glyphslot_done), src/type1/t1objs.c + (T1_GlyphSlot_Done): Check `internal` pointer. + + The Type1 problems was reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50057. + +2022-08-06 Tim-Philipp Müller + + ci: bump windows image and use newer runner and vs2019 + + The old 1809 runner will be decommissioned at some point. + +2022-08-04 @udoudou <> + + * src/cache/ftcmanag.c (FTC_Manager_New): Initialize `cur_weight`. + + See !192. + +2022-08-02 Alexei Podtelezhnikov + + * src/sfnt/ttload.c: Trace formatting updates. + +2022-08-02 Alexei Podtelezhnikov + + * src/psaux/psobjs.c (ps_table_release): Remove redundant casting. + +2022-08-02 Alexei Podtelezhnikov + + * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Reduce casting. + +2022-08-02 Alexei Podtelezhnikov + + [cache] Remove some casts, clean up tracing. + + * src/cache/ftcbasic.c (FTC_ImageCache_Lookup, FTC_SBitCache_Lookup): + Clean up tracing types. + * src/cache/ftccache.c (ftc_node_destroy): Ditto. + * src/cache/ftcmanag.c (FTC_Manager_Check): Ditto. + (FTC_Manager_Check, FTC_Node_Unref): Remove a cast. + * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto. + +2022-08-01 Alexei Podtelezhnikov + + [autofit] Updated to reduce casting (cont'd). + + * src/autofit/afmodule.h (AF_ModuleRec): Change `default_script` type. + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Remove casting. + * src/autofit/afmodule.c (af_property_{set,get}): Updated accordingly. + +2022-08-01 Alexei Podtelezhnikov + + [autofit] Updated to reduce casting. + + * src/autofit/afglobal.h (AF_FaceGlobalsRec): Change `glyph_count` type. + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage, + af_face_globals_get_metrics, af_face_globals_is_digit, + af_face_globals_new): Changed local types and updated accordingly. + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Ditto. + +2022-08-01 Alexei Podtelezhnikov + + [psaux] Remove unused structure field. + + * include/freetype/internal/psaux.h (PS_TableRec): Remove `num_elems`. + * src/psaux/psobjs.c (ps_table_new): Remoove its initialization. + +2022-07-30 Dominik Röttsches + + [sfnt] Implement VarClipBox. + + * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Depending on the + format, read `var_index_base`, then retrieve and apply scaled deltas. + +2022-07-30 Dominik Röttsches + + [sfnt] Fix typo in clip box computation. + + * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Use appropriate + scale factor for `yMin` and `yMax`. + +2022-07-30 Alexei Podtelezhnikov + + [autofit] Use unsigned accounting for hints. + + * src/autofit/afhints.h (AF_AxisHintsRec): Use unsigned types. + + * src/autofit/afhints.c (af_axis_hints_new_{segment,edge}, + af_glyph_hints_get_num_segments, af_glyph_hints_get_segment_offset): + Updated accordingly. + * src/autofit/aflatin.c (af_cjk_hints_compute_edges): Ditto. + * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Ditto. + +2022-07-30 Alexei Podtelezhnikov + + * src/autofit/afhints.h: Remove dead code. + +2022-07-29 Werner Lemberg + + * src/base/ftglyph.c (FT_Get_Glyph): Set `*aglyph` to NULL in case of error. + +2022-07-29 Werner Lemberg + + Fix compilation if `TT_CONFIG_OPTION_GX_VAR_SUPPORT` is not set. + + * src/sfnt/ttcolr.c: Protect relevant code with + `TT_CONFIG_OPTION_GX_VAR_SUPPORT`. + +2022-07-29 Werner Lemberg + + Fix clang14 compiler warnings. + + * include/freetype/internal/ftstream.h (FT_GET_SHORT_LE, FT_GET_USHORT_LE): + Fix type. + + * src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Always return boolean + value. + (tt_face_get_colorline_stops): Fix type of `var_index_base`. + +2022-07-26 Alexei Podtelezhnikov + + [pfr] Fortify the kerning code. + + Any array index must be strictly less then the array size. Therefore, + we must reject indexes that are equal to the array size. Alternatively, + we should move the bounds check before the index decrement but that + would be confusing. + + In addition, it is ok to decrement zero (.notdef) and get UINT_MAX, + which is then automatically rejected in the bounds check. + + * src/pfr/pfrobjs.c (pfr_face_get_kerning): Fix the bounds checking. + +2022-07-26 Werner Lemberg + + [pfr] Add some safety guards. + + * src/pfr/pfrload.c (pfr_phy_font_load): Check resolutions and number of + characters. + + Fixes #1174. + +2022-07-26 Werner Lemberg + + * src/pfr/*.c: Trivial improvements and formatting. + +2022-07-24 Werner Lemberg + + * configure: s/egrep/grep -E/ + + `egrep` is deprecated. + +2022-07-23 Ben Wagner + + [base] Build outlines in amortized constant time. + + When resizing the loader's points and contours, resize them to at least 1.5 + times their current size. The code currently only reserves as much space as + is currently required, leading to O(n^2) runtime when adding points one at a + time. + + This change does not attempt to ever shrink the loader's point and contour + storage since this was not attempted previously either. The 1.5 multiple + was chosen as a trade-off between potentially unused space and the runtime. + + * src/base/ftgloader.c (FT_GlyphLoader_CheckPoints): Implement it. + + Fixes #1173. + +2022-07-09 Dominik Röttsches + + [sfnt] Support variable 'COLR' v1 `PaintVarSkew*`. + + * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration values + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW`, + `FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER`, and + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SKEW_CENTER`. + (read_paint): Handle new enumeration values. + +2022-07-09 Dominik Röttsches + + [sfnt] Support variable 'COLR' v1 `PaintVarRotate*`. + + * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration values + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE` and + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_ROTATE_CENTER`. + (read_paint): Handle new enumeration values. + +2022-07-09 Dominik Röttsches + + [sfnt] Support 'COLR' v1 variable `PaintVarScale*`. + + * src/sfnt/ttcolr.c: (FT_PaintFormatInternal): New enumeration values + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE`, + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_CENTER`, + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM`, and + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SCALE_UNIFORM_CENTER`. + (read_paint): Handle new enumeration values. + +2022-07-09 Dominik Röttsches + + [sfnt] Support for 'COLR' v1 variable translate. + + * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSLATE`. + (read_paint): Handle new enumeration value. + +2022-07-09 Dominik Röttsches + + [sfnt] Support for 'COLR' v1 variable transforms. + + * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration value + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_TRANSFORM`. + (read_paint): Handle new enumeration value. + +2022-07-09 Dominik Röttsches + + [sfnt] Deltas for 'COLR' v1 gradient coordinates. + + * src/sfnt/ttcolr.c (read_paint) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Read and + apply deltas to radial, linear, and sweep gradient coordinates such as 'p0', + 'p1', 'p2', 'center', 'radii', and 'angles'. + +2022-07-08 Dominik Röttsches + + [sfnt] Support variable 'COLR' v1 color lines. + + * include/freetype/ftcolor.h (FT_ColorStopIterator): Add field + `read_variable` to indicate whether a variation index base should be read. + + * src/sfnt/ttcolr.c: (FT_PaintFormat_Internal): New enumerations + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT` + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT`, and + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT`. + (read_color_line): New parameter `read_variable`; update callers. + (read_paint): Handle new enumerations. + +2022-07-07 Dominik Röttsches + + [sfnt] Apply variation deltas to `PaintVarSolid`. + + * src/sfnt/ttcolr.c (FT_PaintFormat_Internal_): New enumeration + `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`. + + (get_deltas_for_var_index_base) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New + function to retrieve an array of delta values, which will be used for most + of 'COLR' v1 variation formats (in follow-up commits). + + (read_paint): Add `face` parameter; update caller. + Handle `FT_COLR_PAINTFORMAT_INTERNAL_VAR_SOLID`. + +2022-07-07 Dominik Röttsches + + [sfnt] Check safety of cast to `TT_Driver` before accessing member. + + * src/sfnt/ttcolr.c (VARIABLE_COLRV1_ENABLED): Access + `enable_variable_colrv1` only if driver class matches. + +2022-07-06 Stephen Holdaway + + doc: Clarify description of `FT_Stream_IoFunc`. + + The existing documentation comments on `FT_Stream_IoFunc` hinted at the dual + seek/read behavior required for custom stream implementations to work, but + it didn't explicitly explain it. Without looking at the internals of + FreeType, it was easy for someone to assume their implementation should + handle both seek and read operations all the time. If this is done, you get + a variety of errors, but mostly just `Unknown_File_Format` (error code + 0x02). + +2022-07-04 Dominik Röttsches + + [sfnt] Load variation store for 'COLR' v1. + + * src/sfnt/ttcolr.c: Include `ttobjs.h` temporarily. + (VARIABLE_COLRV1_ENABLED): New temporary macro to detect whether variable + COLRv1 is enabled. + (Colr): New fields `var_store` and `delta_set_idx_map`. + (tt_face_load_colr, tt_face_free_colr) [VARIABLE_COLRV1_ENABLED]: Load and + free variation store data using the functions from the Multiple Masters + service. + +2022-07-03 Chris Liddell + + [base] Improve error handling in `FT_GlyphLoader_CheckPoints`. + + If `FT_GlyphLoader_CreateExtra` returns an error (and a couple of other + places), `FT_GlyphLoader_CheckPoints` would propagate the error immediately, + rather than cleaning up the partially set up `FT_GlyphLoader`. As a + consequence, a subsequent attempt to create a glyph could result in a crash. + + * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Ensure all the error + conditions exits are consistent, eventually calling `FT_GlyphLoader_Reset`. + +2022-07-03 Thomas Sondergaard + + CMakeLists.txt: Provide both 'freetype' and 'Freetype::Freetype' targets. + + FreeType can be located by consuming projects that use + `find_package(Freetype)` either via the old `MODULE` path (which uses + `FindFreetype.cmake` supplied by CMake), or via the new `CONFIG` path (which + uses `freetype-config.cmake` as supplied by this project). Up to this point + the CMake module has supplied the target `Freetype::Freetype` and the config + file provided by this project the target `freetype`. Now we supply both + `freetype` and `Freetype::Freetype` so that consuming projects can always + use the target `Freetype::Freetype` regardless of what path was taken by + `find_package(Freetype)`. + + Fixes #1165. + +2022-07-02 Werner Lemberg + + include/freetype/ftmm.h: Improve documentation. + +2022-07-01 Dominik Röttsches + + [base] Round values in `FT_MulAdd_Fix`. + + This avoids regressing Blink layout tests and makes `FT_MulAdd_Fix` delta + retrieval implementation consistent with the previous implementation, which + used `FT_fixedToInt` and included rounding. + + * src/base/ftcalc.c (FT_MulAdd_Fix): Implement it. + Also fix remaining `temp` initialization compilation issue. + + Fixes #1169. + +2022-07-01 Werner Lemberg + + Minor formatting. + +2022-06-30 Dominik Röttsches + + Fix initialisation of temp variable in new FT_MulAddFix + + src/truetype/ttgxvar.c (FT_MulAddFix): Initialise `temp`. + +2022-06-29 Dominik Röttsches + + [truetype] Perform variation store delta computation with 64-bit precision. + + * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Make type + explicitly 32-bit. + * include/freetype/internal/services/svmm.h + (FT_Var_Get_Item_Delta_Func): Change return type to `FT_ItemVarDelta` + * truetype/ttgxvar.h (tt_var_get_item_delta): Change return type to + `FT_ItemVarDelta`. + * truetype/ttgxvar.c (tt_var_get_item_delta): Store scalars and deltas + to intermediate array, perform computation using new method + `FT_MulAddFix`. + +2022-06-29 Dominik Röttsches + + New function `FT_MulAddFix` to compute the sum of fixed-point products. + + This function, based on the code of `FT_MulFix`, uses 64-bit precision + internally for intermediate computations. + + * include/freetype/internal/ftcalc.h, base/ftcalc.c (FT_MulAddFix): + Implement it. + +2022-06-22 Werner Lemberg + + CMakeLists.txt: Move inclusion of `FindPkgConfig` down. + + It must come after `CMAKE_TOOLCHAIN_FILE`. + + Fixes #1167. + +2022-06-22 Dominik Röttsches + + [sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14 + +2022-06-21 Alexei Podtelezhnikov + + * docs/CHANGES: Announce impending Infinality removal. + +2022-06-21 Alexei Podtelezhnikov + + * ttgload.c (TT_Process_Composite_Glyph): Fix a signedness warning. + +2022-06-21 Werner Lemberg + + s/fixed point/fixed-point/ + +2022-06-21 Werner Lemberg + + .gitlab-ci.yml: Correctly upgrade `meson`. + +2022-06-21 Dominik Röttsches + + Proposal: Feature control for variable COLRv1 + + * include/freetype/ftdriver.h (variable-color-v1 property): Add documentation + for variable-colr-v1 property. + * src/truetype/ttdriver.c (tt_property_set): Ingest variable-control property + when called, set to enable_variable_colrv1 driver flag. + * src/truetype/ttobjs.h (TT_DriverRec): Add enable_variable_colrv1 flag. + +2022-06-21 Xavier Claessens + + [meson] Disable FreeType in HarfBuzz fallback. + + This avoids cyclic subproject configuration when the 'harfbuzz' feature is + enabled, or `--wrap-mode=forcefallback` is used, but HarfBuzz is built as a + subproject. HarfBuzz does the same and disables HarfBuzz support when + configuring FreeType as a subproject. + + * meson.build (harfbuzz_dep): Implement it. + + * subprojects/harfbuzz.wrap: New file. + + * .gitlab-ci.yml [windows meson]: Use latest version of the meson 0.59 + series, which has a necessary bug fix to make CI work. + +2022-06-19 Alexei Podtelezhnikov + + [truetype] Clean up phantom point accounting. + + This formalizes that the phantom points appended in the outline + do not increase its point count, nor are they tagged or included + in any additional contours. Only their coordinates are stored. + They are counted in the glyph zone, however. + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Infer `n_points` + from the outline size plus four phantom points. + * src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Remove this + argument. + * src/truetype/ttgload.c (tt_prepare_zone): Add phantom four. + (TT_Process_Simple_Glyph, load_truetype_glyph): Update all callers. + +2022-06-19 Alexei Podtelezhnikov + + [truetype/GX] Clean up phantom point adjustment. + + This moves phantom point and advance variation adjustment next to + calculations. The logic stays the same, HVAR and VVAR take priority. + + * src/truetype/ttgload.c (load_truetype_glyph): Move it from here... + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here + and check for HVAR and VVAR presence outside the main loop. + +2022-06-18 Ben Wagner + + [stream] Fix reading s32 when long is s64 + + `FT_READ_LONG`, `FT_GET_LONG`, and related macros did not return + negative values when `long` is more than 32 bits. `FT_Stream_ReadULong` + would read four bytes into the LSB of an `FT_ULong` and return that. + Since this can never set the MSb of the `FT_ULong` when `FT_ULong` is + more than 32 bits the cast to `FT_Long` never resulted in a negative + value. + + Fix this by modifying `FT_Stream_Read*` to return a type of the same + size as the bytes it is reading and changing the `FT_READ_*` and + `FT_GET_*` macros to cast to the same type returned by `FT_Stream_Read*` + but with the correctly signed type (instead of casting to what is + assumed to be the type of `var` which will happen automatically anyway). + + There exist a few cases like with the `OFF3` variants where there isn't + generally a type with the correct size. `FT_PEEK_OFF3` works around this + loading the bytes into the three most significant bits and then doing a + signed shift down. `FT_NEXT_OFF3` also already worked correctly by + casting this signed value to another signed type. `FT_Stream_GetUOffset` + works correctly but one must be careful not to attempt to cast the + returned value to a signed type. Fortunately there is only + `FT_GET_UOFF3` and no `FT_GET_OFF3`. + + All of these cases are handled correctly when reading values through + `FT_Stream_ReadFields` since it generically computes the signed value + through an `FT_Int32`. This change is essentially doing the same for + these macros. + + * include/freetype/internal/ftstream.h (FT_NEXT_*, FT_GET_*, FT_READ*): + Update macros and return types to use fixed size types for fixed size + values. + + * src/base/ftstream.c (FT_StreamGet*, FT_StreamRead*): Dito. + + Issue: #1161 + +2022-06-17 Alexei Podtelezhnikov + + [truetype/GX] Fix an old typo. + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Vertical + advance is measured along y-coordinate. + +2022-06-16 Alexei Podtelezhnikov + + [truetype/GX] Clean up advance adjustment (Brrr). + + * src/truetype/ttgload.c (load_truetype_glyph): Remove remaining code. + +2022-06-16 Ben Wagner + + [type1] Directly search for eexec in private dict + + This code originally just searched for `eexec`. This was later modified + to check that the `eexec` found is valid (not in a string or comment). + This was done by searching for `eexec` as before and then, for each + `eexec` found, searching from the beginning using the correct parsing to + see if the `eexec` was still found. If the private dictionary is large + and contains many copies of `eexec` which are not valid, the initial + part of the private dictionary is scanned once for each, potentially + leading to n^2 parsing time. + + Instead of finding an initial `eexec` and then re-parsing to discover if + it is valid, drop the initial search for `eexec` and just parse to find + a valid `eexec`. This is strictly faster since the validation must + happen anyway and avoids restarting from the beginning each time an + `eexec` is found in the data. + + * src/type1/t1parse.c (T1_Get_Private_Dict): avoid n^2 parsing + + Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1328883 + +2022-06-16 Alexei Podtelezhnikov + + [truetype/GX] Clean up advance adjustment. + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): + Move the advance adjustment from here... + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): ... to here and + simplify arguments. + * src/truetype/ttgxvar.h (TT_Vary_Apply_Glyph_Deltas): Update prototype + with fewer arguments. + +2022-06-14 Ben Wagner + + [gzip] Handle inflate returning Z_NEED_DICT + + When `inflate` returns `Z_NEED_DICT` this is currently not reported as + an error and callers may assume that the decompression succeeded when it + did not. In particular, a compressed table in a woff file may not + actually be decompressed and written as expected, leaving the backing + memory for the expanded table uninitialized. + + * src/gzlip/ftgzip.c (FT_Gzip_Uncompress): treat `Z_NEED_DICT` as + indicating invalid data since there is no means to provide a dictionary. + + Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1335712 + +2022-06-13 Ben Wagner + + [woff] Don't allocate table entries until needed + + * src/sfnt/sfwoff.c (woff_open_font): delay allocating space for the + table entries until they are actually written out with the data. + +2022-06-12 Alexei Podtelezhnikov + + * src/sfnt/sfwoff2.c (woff2_open_font): Partial revert. + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47981. + +2022-06-12 Alexei Podtelezhnikov + + * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Cosmetic macro change. + +2022-06-11 Alexei Podtelezhnikov + + [woff, woff2] Avoid buffer zeroing. + + * src/sfnt/sfwoff.c (woff_open_font): Use Q-macros. + * src/sfnt/sfwoff2.c: Ditto. + (reconstruct_font): Allocate table_entry on stack. + +2022-06-10 Alexei Podtelezhnikov + + [smooth] Fix GCC LTO crashes on Windows. + + Fixes #1164 by using a volatile variable around `setjmp`. It is hard to + say how this fixes crashes related to certain link-time optimizations. + This does not decrease the rendering performance. + + * src/smooth/ftgrays.c (gray_convert_glyph_inner): Use volatile `error`. + +2022-06-09 bruvzg <@bruvzg> + + * src/smooth/ftgrays.c [FT_STATIC_RASTER]: Fix compilation. + +2022-06-06 Ben Wagner + + [svg] Set linear advances when loading SVG glyphs + + * include/freetype/freetype.h (FT_GlyphSlotRec_): update doc + * src/cff/cffgload.c (cff_slot_load): do it + * src/truetype/ttgload.c (TT_Load_Glyph): do it + + Fixes: #1156 + +2022-06-01 Ben Wagner + + [svg] Clear correct flags for doc ownership + + This issue was discovered with an SVG based font with some documents + compressed and other uncompressed. After loading the first compressed + document the ownership flag on the glyph slot was set to true but never + set to false. As a result after loading a compressed document a glyph + from an uncompressed document would load fine, but when this glyph slot + was cleared it would try to free its document resulting in a wild free. + + * src/base/ftobjs.c (ft_glyphslot_clear): clear correct flags + + Fixes: #1162 + +2022-06-01 Alexei Podtelezhnikov + + [docs] Correct favicon. + +2022-06-01 Alexei Podtelezhnikov + + [docs] Use hinted favicon. + +2022-05-27 Alexei Podtelezhnikov + + [docs] Update favicon. + +2022-05-25 Behdad Esfahbod (بهداد اسÙهبد) + + * src/sfnt/ttmtx.c (tt_face_get_metrics): Apply variations unconditionally. + + This causes a speed-up of approx. 20% for getting advance widths. + +2022-05-23 Dominik Röttsches + + [truetype] Support reading 32bit/16bit VarStore deltas + + * include/freetype/internal/ftmmtypes.h (FT_ItemVarDelta): Define type + to be used for delta arrays, upgrade to FT_long. + * src/truetype/ttgxvar.c: Adhere to long_words bit and read either + Short/Byte pairs or Long/Short pairs, as defined by spec. For better + readability, define macro for repetitive read code. + +2022-05-20 Dominik Röttsches + + [truetype] Handle 0xFFFF special value inside delta retrieval function + + * truetype/ttgxvar.c (tt_hvadvance_adjust, tt_apply_mvar, + tt_var_get_item_delta): Remove special 0xFFFF handling in favor of less + redundant handling inside the tt_var_get_item_delta function, as it is + equivalent to returning a 0 delta. Avoids code-duplication checking for + special value 0xFFFF. + +2022-05-19 Dominik Röttsches + + [truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`. + + This will be needed for 'COLR' v1 variation support. + + * src/truetype/ttgxvar.h (GX_ItemVarData, GX_AxisCoords, GX_VarRegion, + GX_VarItemStore, GX_DeltaSetIdxMap): Move structures to... + * include/freetype/internal/ftmmtypes.h: ... this new file. + + * include/freetype/internal/service/svmm.h (MultiMasters): Include + `ftmmtypes.h`. + (FT_Var_Load_Delta_Set_Idx_Map_Func, FT_Var_Load_Item_Var_Store_Func, + FT_Var_Get_Item_Delta_Func, FT_Var_Done_Item_Var_Store_Func, + FT_Var_Done_Delta_Set_Idx_Map_Func): New function typedefs. + (MultiMasters): Add them. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + + * src/cff/cffdrivr.c (cff_load_item_variation_store, + cff_load_delta_set_index_mapping, cff_get_item_delta, + cff_done_item_variation_store, cff_done_delta_set_index_map): New wrapper + methods calling into mm service. + (cff_service_multi_masters): Updated. + + * src/truetype/ttgxvar.c (ft_var_load_item_variation_store, + ft_var_load_delta_set_index_mapping, ft_var_get_item_delta, + ft_var_done_item_variation_store, ft_var_done_delta_set_index_map): Renamed + to ... + (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping, + tt_var_get_item_delta, tt_var_done_item_variation_store, + tt_var_done_delta_set_index_map): ... this for consistency. + Mark them as non-static. + * src/truetype/ttgxvar.h: Add corresponding prototypes. + + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + +2022-05-19 Dominik Röttsches + + [truetype] Move deallocation of `DeltaSetIdxMap` into own function. + + This is a preparation for handling `DeltaSetIdxMap` and `VarStore` as a + FreeType service. + + * src/truetype/ttgxvar.c (ft_var_done_delta_set_index_map): New function. + (tt_done_blend): Use it. + +2022-05-18 Werner Lemberg + + * builds/toplevel.mk (do-dist): Don't remove meson wrap files. + + Fixes #1157. + +2022-05-18 Werner Lemberg + + * subprojects/zlib.wrap: Update to zlib version 1.2.12. + +2022-05-18 Werner Lemberg + + REAMDE: Mention that gitlab's 'download' button doesn't work. + + This is because the `git archive` command doesn't preserve submodules. + + Note that currently there is no support for disabling the 'download' button + in gitlab (https://gitlab.com/gitlab-org/gitlab/-/issues/17032). + + Fixes issue #1158. + +2022-05-11 Werner Lemberg + + [truetype] Handle inner/outer index values 0xFFFF/0xFFFF. + + This was introduced in OpenType 1.8.4. + + * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping, + tt_hvadvance_adjust, ft_var_load_mvar, tt_apply_mvar): Handle special + inner/outer index values. + (ft_var_load_item_variation_store): Add test. + + Fixes #1154. + +2022-05-01 Werner Lemberg + + * Version 2.12.1 released. + ========================== + + Tag sources with `VER-2-12-1'. + + * docs/VERSION.TXT: Add entry for version 2.12.1. + * docs/CHANGES, docs/release: Updated. + + * README, src/base/ftver.rc, builds/windows/vc2010/index.html, + builds/windows/visualc/index.html, builds/windows/visualce/index.html, + builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, + docs/freetype-config.1: s/2.12.0/2.12.1/, s/2120/2121/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. + + * builds/unix/configure.raw (version_info): Set to 24:3:18. + * CMakeLists.txt (VERSION_PATCH): Set to 1. + +2022-04-30 Anuj Verma + + [sdf] Do not throw errors for invisible glyphs. + + * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Return `FT_Err_Ok` if + width or height is zero, since some glyphs do not generate visible bitmaps. + + Fixes #1150. + +2022-04-30 Werner Lemberg + + * src/sfnt/sfobjs.c (sfnt_load_face): Set `FT_FACE_FLAG_COLOR` for SVG fonts. + + Fixes #1151. + +2022-04-27 Brendan Shanks + + autogen.sh: Fix building when freetype is itself a git submodule. + + There are situations where .git is not a directory, like when + freetype is a submodule in another repository. + +2022-04-26 Alexei Podtelezhnikov + + [builds/windows] Simplify non-desktop UWP check. + + Fixes mingw compilation described in !159. + + * builds/windows/ftsystem.c: Do not use WINAPI_FAMILY_PARTITION macro. + +2022-04-25 Alexei Podtelezhnikov + + [truetype] Reset IUP flags in `TT_RunIns`. + + Fixes #1148 by moving the flag initialization back, partly reverting + 7809007a and fd03dcc1. Initializing these flags elsewhere skips 'cvt'. + + * src/truetype/ttinterp.c (TT_RunIns): Initialize the IUP flag here... + (TT_Run_Context): ... instead of here. + +2022-04-24 Xavier Claessens + + [meson] Remove `default_library=both` from `default_options`. + + It is inconsistent with what all other Meson projects do. + + It also prevents static linking to FreeType when it is a subproject because + `default_options` in a subproject takes precedence on values set on the main + project. For example, building 'GStreamer' with `-Ddefault_library=static` + would still dynamically link on FreeType unless the user also sets + `-Dfreetype2:default_library=static`. + + * meson.build: Updated. + + * .gitlab-ci.yml: Retain `both` option for testing. + +2022-04-19 Werner Lemberg + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46792 + +2022-04-16 Georg Brandl + + * src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_SVG]: Fix segfault. + + This can happen if the function is called with `size` being `NULL`. + + Fixes #1147. + +2022-04-14 Steve Lhomme + + .gitlab-ci.yml: Add a Universal Windows build target + + It's compiled for Windows 10 and up, ensuring UNICODE is set (default for UWP) + and selecting the proper WINAPI_FAMILY (WINAPI_FAMILY_APP). + + Do not try to run the UWP exe in the Docker as it doesn't work. + +2022-04-04 Ben Wagner + + [sfnt] Correct FT_ColorStopIterator documentation. + + * include/freetype/ftcolor.h (FT_ColorStopIterator): the user should not + set `p` to NULL before calling `FT_Get_Colorline_Stops`. `p` and + `num_color_stops` are set by `FT_Get_Paint`. `p` and + `current_color_stop` are updated by `FT_Get_Colorline_Stops`. + +2022-04-01 Werner Lemberg + + * builds/unix/configure.raw: Add option `--with-librsvg`. + + Since 'librsvg' is written in Rust, this option allows distributions to + avoid a dependency on the entire Rust toolchain to provide the FreeType demo + programs. + + Suggested by Lars Wendler in !156. + +2022-04-01 Werner Lemberg + + * src/sfnt/sfwoff.c (reconstruct_glyf): Fix gcc 10 warning. + +2022-04-01 Werner Lemberg + + [gzip] Update sources to zlib 1.2.12. + +2022-04-01 Eric Jing <@CPUcontrol> + + CMakeLists.txt: Fix `Info.plist` path. + + When building a framework using CMake with `add_subdirectory`, CMake must be + able to find `freetype-Info.plist` when configuring the framework + properties. + + Fixes #1145. + +2022-04-01 Werner Lemberg + + Whitespace. + +2022-04-01 Ben Wagner + + [truetype] Use SUB_LONG for component offset. + + * src/truetype/ttgload.c (TT_Process_Composite_Component): do it. + + Bug: https://crbug.com/1309429 + +2022-03-31 Werner Lemberg + + CMakeList.txt: Update code to handle recent changes for `freetype.pc`. + + Fixes #1144. + +2022-03-31 Werner Lemberg + + CMakeLists.txt: s/PKG_CONFIG/PKGCONFIG/, s/REQUIRED_/REQUIRES_/. + 2022-03-31 Werner Lemberg * Version 2.12.0 released. diff --git a/libs/freetype/LICENSE.TXT b/libs/freetype/LICENSE.TXT index b1def65dd..8b9ce9e2e 100644 --- a/libs/freetype/LICENSE.TXT +++ b/libs/freetype/LICENSE.TXT @@ -29,12 +29,16 @@ The contributed BDF and PCF drivers come with a license similar to that of the X Window System. It is compatible to the above two licenses (see files `src/bdf/README` and `src/pcf/README`). The same holds for the source code files `src/base/fthash.c` and -`include/freetype/internal/fthash.h`; they wer part of the BDF driver +`include/freetype/internal/fthash.h`; they were part of the BDF driver in earlier FreeType versions. The gzip module uses the zlib license (see `src/gzip/zlib.h`) which too is compatible to the above two licenses. +The files `src/autofit/ft-hb.c` and `src/autofit/ft-hb.h` contain code +taken almost verbatim from the HarfBuzz file `hb-ft.cc`, which uses +the 'Old MIT' license, compatible to the above two licenses. + The MD5 checksum support (only used for debugging in development builds) is in the public domain. diff --git a/libs/freetype/Makefile b/libs/freetype/Makefile index 8b2935507..14fba3022 100644 --- a/libs/freetype/Makefile +++ b/libs/freetype/Makefile @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/README b/libs/freetype/README index a33cb11aa..cd4c1d7d1 100644 --- a/libs/freetype/README +++ b/libs/freetype/README @@ -1,4 +1,4 @@ -FreeType 2.12.0 +FreeType 2.13.2 =============== Homepage: https://www.freetype.org @@ -16,7 +16,9 @@ Read the files `docs/INSTALL*` for installation instructions; see the file `docs/LICENSE.TXT` for the available licenses. For using FreeType's git repository instead of a distribution bundle, -please read file `README.git`. +please read file `README.git`. Note that you have to actually clone +the repository; using a snapshot will not work (in other words, don't +use gitlab's 'Download' button). The FreeType 2 API reference is located in directory `docs/reference`; use the file `index.html` as the top entry point. [Please note that @@ -30,9 +32,9 @@ sites. Go to and download one of the following files. - freetype-doc-2.12.0.tar.xz - freetype-doc-2.12.0.tar.gz - ftdoc2120.zip + freetype-doc-2.13.2.tar.xz + freetype-doc-2.13.2.tar.gz + ftdoc2132.zip To view the documentation online, go to @@ -92,7 +94,7 @@ Enjoy! ---------------------------------------------------------------------- -Copyright (C) 2006-2022 by +Copyright (C) 2006-2023 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/libs/freetype/README.git b/libs/freetype/README.git index 258de14b7..117d74f0d 100644 --- a/libs/freetype/README.git +++ b/libs/freetype/README.git @@ -89,7 +89,7 @@ address: ---------------------------------------------------------------------- -Copyright (C) 2005-2022 by +Copyright (C) 2005-2023 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/libs/freetype/autogen.sh b/libs/freetype/autogen.sh index 1545c63ad..ff5e46f0d 100644 --- a/libs/freetype/autogen.sh +++ b/libs/freetype/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2005-2022 by +# Copyright (C) 2005-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -182,7 +182,7 @@ copy_submodule_files () cp $DLG_SRC_DIR/* src/dlg } -if test -d ".git"; then +if test -e ".git"; then DLG_INC_DIR=subprojects/dlg/include/dlg DLG_SRC_DIR=subprojects/dlg/src/dlg diff --git a/libs/freetype/builds/amiga/README b/libs/freetype/builds/amiga/README index e77435527..5b2abef3d 100644 --- a/libs/freetype/builds/amiga/README +++ b/libs/freetype/builds/amiga/README @@ -1,7 +1,7 @@ README for the builds/amiga subdirectory. -Copyright (C) 2005-2022 by +Copyright (C) 2005-2023 by Werner Lemberg and Detlef Würkner. This file is part of the FreeType project, and may only be used, modified, diff --git a/libs/freetype/builds/amiga/include/config/ftconfig.h b/libs/freetype/builds/amiga/include/config/ftconfig.h index 211f170e9..de074bf83 100644 --- a/libs/freetype/builds/amiga/include/config/ftconfig.h +++ b/libs/freetype/builds/amiga/include/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific configuration file (specification only). */ /* */ -/* Copyright (C) 2005-2022 by */ +/* Copyright (C) 2005-2023 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/libs/freetype/builds/amiga/include/config/ftmodule.h b/libs/freetype/builds/amiga/include/config/ftmodule.h index 73e86d5b6..bf3336743 100644 --- a/libs/freetype/builds/amiga/include/config/ftmodule.h +++ b/libs/freetype/builds/amiga/include/config/ftmodule.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType module selection. */ /* */ -/* Copyright (C) 2005-2022 by */ +/* Copyright (C) 2005-2023 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/libs/freetype/builds/amiga/makefile b/libs/freetype/builds/amiga/makefile index 5df281c0b..4a33fdd92 100644 --- a/libs/freetype/builds/amiga/makefile +++ b/libs/freetype/builds/amiga/makefile @@ -5,7 +5,7 @@ # -# Copyright (C) 2005-2022 by +# Copyright (C) 2005-2023 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/libs/freetype/builds/amiga/makefile.os4 b/libs/freetype/builds/amiga/makefile.os4 index 02742ea46..dfc3e9f19 100644 --- a/libs/freetype/builds/amiga/makefile.os4 +++ b/libs/freetype/builds/amiga/makefile.os4 @@ -4,7 +4,7 @@ # -# Copyright (C) 2005-2022 by +# Copyright (C) 2005-2023 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/libs/freetype/builds/amiga/smakefile b/libs/freetype/builds/amiga/smakefile index 311375d0e..ca3da6634 100644 --- a/libs/freetype/builds/amiga/smakefile +++ b/libs/freetype/builds/amiga/smakefile @@ -3,7 +3,7 @@ # -# Copyright (C) 2005-2022 by +# Copyright (C) 2005-2023 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/libs/freetype/builds/amiga/src/base/ftdebug.c b/libs/freetype/builds/amiga/src/base/ftdebug.c index 84e2c8bac..a20929749 100644 --- a/libs/freetype/builds/amiga/src/base/ftdebug.c +++ b/libs/freetype/builds/amiga/src/base/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for amiga (body). * - * Copyright (C) 1996-2022 by + * Copyright (C) 1996-2023 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/libs/freetype/builds/amiga/src/base/ftsystem.c b/libs/freetype/builds/amiga/src/base/ftsystem.c index ed34a779f..d85845c81 100644 --- a/libs/freetype/builds/amiga/src/base/ftsystem.c +++ b/libs/freetype/builds/amiga/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType low-level system interface (body). */ /* */ -/* Copyright (C) 1996-2022 by */ +/* Copyright (C) 1996-2023 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/libs/freetype/builds/ansi/ansi-def.mk b/libs/freetype/builds/ansi/ansi-def.mk index d91894c06..82178932f 100644 --- a/libs/freetype/builds/ansi/ansi-def.mk +++ b/libs/freetype/builds/ansi/ansi-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/ansi/ansi.mk b/libs/freetype/builds/ansi/ansi.mk index 96c1576d0..ad40939b5 100644 --- a/libs/freetype/builds/ansi/ansi.mk +++ b/libs/freetype/builds/ansi/ansi.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/beos/beos-def.mk b/libs/freetype/builds/beos/beos-def.mk index 0b3ef6099..1cca80cce 100644 --- a/libs/freetype/builds/beos/beos-def.mk +++ b/libs/freetype/builds/beos/beos-def.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/beos/beos.mk b/libs/freetype/builds/beos/beos.mk index a5e6a82c0..69ca1f1b0 100644 --- a/libs/freetype/builds/beos/beos.mk +++ b/libs/freetype/builds/beos/beos.mk @@ -2,7 +2,7 @@ # FreeType 2 configuration rules for a BeOS system # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/beos/detect.mk b/libs/freetype/builds/beos/detect.mk index 7b27ff9f9..dd1b5a61a 100644 --- a/libs/freetype/builds/beos/detect.mk +++ b/libs/freetype/builds/beos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/cmake/FindBrotliDec.cmake b/libs/freetype/builds/cmake/FindBrotliDec.cmake index 0a3d89926..81036cb10 100644 --- a/libs/freetype/builds/cmake/FindBrotliDec.cmake +++ b/libs/freetype/builds/cmake/FindBrotliDec.cmake @@ -1,6 +1,6 @@ # FindBrotliDec.cmake # -# Copyright (C) 2019-2022 by +# Copyright (C) 2019-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by Werner Lemberg diff --git a/libs/freetype/builds/cmake/iOS.cmake b/libs/freetype/builds/cmake/iOS.cmake index 011e7ef02..7aba7c523 100644 --- a/libs/freetype/builds/cmake/iOS.cmake +++ b/libs/freetype/builds/cmake/iOS.cmake @@ -1,6 +1,6 @@ # iOS.cmake # -# Copyright (C) 2014-2022 by +# Copyright (C) 2014-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by David Wimsey diff --git a/libs/freetype/builds/cmake/testbuild.sh b/libs/freetype/builds/cmake/testbuild.sh index 312b47697..007170b04 100644 --- a/libs/freetype/builds/cmake/testbuild.sh +++ b/libs/freetype/builds/cmake/testbuild.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -# Copyright (C) 2015-2022 by +# Copyright (C) 2015-2023 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/libs/freetype/builds/compiler/ansi-cc.mk b/libs/freetype/builds/compiler/ansi-cc.mk index 98cb05776..f8386f615 100644 --- a/libs/freetype/builds/compiler/ansi-cc.mk +++ b/libs/freetype/builds/compiler/ansi-cc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/bcc-dev.mk b/libs/freetype/builds/compiler/bcc-dev.mk index 83ed28cf1..d01ed7cd8 100644 --- a/libs/freetype/builds/compiler/bcc-dev.mk +++ b/libs/freetype/builds/compiler/bcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/bcc.mk b/libs/freetype/builds/compiler/bcc.mk index 76b5dc212..a484bbaa7 100644 --- a/libs/freetype/builds/compiler/bcc.mk +++ b/libs/freetype/builds/compiler/bcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/emx.mk b/libs/freetype/builds/compiler/emx.mk index f79183623..34d06b205 100644 --- a/libs/freetype/builds/compiler/emx.mk +++ b/libs/freetype/builds/compiler/emx.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2022 by +# Copyright (C) 2003-2023 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/libs/freetype/builds/compiler/gcc-dev.mk b/libs/freetype/builds/compiler/gcc-dev.mk index 0d1b0da71..a6ded52cf 100644 --- a/libs/freetype/builds/compiler/gcc-dev.mk +++ b/libs/freetype/builds/compiler/gcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/gcc.mk b/libs/freetype/builds/compiler/gcc.mk index fbb12cc5b..20ca9698c 100644 --- a/libs/freetype/builds/compiler/gcc.mk +++ b/libs/freetype/builds/compiler/gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/intelc.mk b/libs/freetype/builds/compiler/intelc.mk index b1fdbe729..1f7249355 100644 --- a/libs/freetype/builds/compiler/intelc.mk +++ b/libs/freetype/builds/compiler/intelc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/unix-lcc.mk b/libs/freetype/builds/compiler/unix-lcc.mk index 09da86f4f..af11d1778 100644 --- a/libs/freetype/builds/compiler/unix-lcc.mk +++ b/libs/freetype/builds/compiler/unix-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/visualage.mk b/libs/freetype/builds/compiler/visualage.mk index 8c14d6f04..75e9023d3 100644 --- a/libs/freetype/builds/compiler/visualage.mk +++ b/libs/freetype/builds/compiler/visualage.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/visualc.mk b/libs/freetype/builds/compiler/visualc.mk index 2635a9fec..30b03fc46 100644 --- a/libs/freetype/builds/compiler/visualc.mk +++ b/libs/freetype/builds/compiler/visualc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/watcom.mk b/libs/freetype/builds/compiler/watcom.mk index 6484d4180..61f8cd76f 100644 --- a/libs/freetype/builds/compiler/watcom.mk +++ b/libs/freetype/builds/compiler/watcom.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/compiler/win-lcc.mk b/libs/freetype/builds/compiler/win-lcc.mk index 1faad4940..92f653e43 100644 --- a/libs/freetype/builds/compiler/win-lcc.mk +++ b/libs/freetype/builds/compiler/win-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/detect.mk b/libs/freetype/builds/detect.mk index 4068ca2a6..d5cddb09a 100644 --- a/libs/freetype/builds/detect.mk +++ b/libs/freetype/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/dos/detect.mk b/libs/freetype/builds/dos/detect.mk index 46f9a630c..8ed148bde 100644 --- a/libs/freetype/builds/dos/detect.mk +++ b/libs/freetype/builds/dos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/dos/dos-def.mk b/libs/freetype/builds/dos/dos-def.mk index 307047da5..37cb2c138 100644 --- a/libs/freetype/builds/dos/dos-def.mk +++ b/libs/freetype/builds/dos/dos-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/dos/dos-emx.mk b/libs/freetype/builds/dos/dos-emx.mk index 4ab7b6c7e..23181d774 100644 --- a/libs/freetype/builds/dos/dos-emx.mk +++ b/libs/freetype/builds/dos/dos-emx.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2022 by +# Copyright (C) 2003-2023 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/libs/freetype/builds/dos/dos-gcc.mk b/libs/freetype/builds/dos/dos-gcc.mk index 24d14a9b2..cd695dbac 100644 --- a/libs/freetype/builds/dos/dos-gcc.mk +++ b/libs/freetype/builds/dos/dos-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/dos/dos-wat.mk b/libs/freetype/builds/dos/dos-wat.mk index 07d54e896..a6b65cbf6 100644 --- a/libs/freetype/builds/dos/dos-wat.mk +++ b/libs/freetype/builds/dos/dos-wat.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2003-2022 by +# Copyright (C) 2003-2023 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/libs/freetype/builds/exports.mk b/libs/freetype/builds/exports.mk index a3342ecb9..b10924a78 100644 --- a/libs/freetype/builds/exports.mk +++ b/libs/freetype/builds/exports.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 2005-2022 by +# Copyright (C) 2005-2023 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/libs/freetype/builds/freetype.mk b/libs/freetype/builds/freetype.mk index 7b30c79d6..b3fac80fd 100644 --- a/libs/freetype/builds/freetype.mk +++ b/libs/freetype/builds/freetype.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -299,7 +299,7 @@ refdoc: $(PUBLIC_DIR)/config/*.h \ $(PUBLIC_DIR)/cache/*.h @echo Building static site... - cd $(DOC_DIR) && mkdocs build + cd $(DOC_DIR) && $(PYTHON) -m mkdocs build @echo Done. # Variables for running `refdoc' with Python's `virtualenv'. The diff --git a/libs/freetype/builds/link_dos.mk b/libs/freetype/builds/link_dos.mk index dd97fbe7c..b3dc451f5 100644 --- a/libs/freetype/builds/link_dos.mk +++ b/libs/freetype/builds/link_dos.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/link_std.mk b/libs/freetype/builds/link_std.mk index d94e06d01..aca8ec49f 100644 --- a/libs/freetype/builds/link_std.mk +++ b/libs/freetype/builds/link_std.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/mac/README b/libs/freetype/builds/mac/README index 092487a84..06e3d51da 100644 --- a/libs/freetype/builds/mac/README +++ b/libs/freetype/builds/mac/README @@ -200,14 +200,6 @@ environment by Metrowerks. GCC for MPW and Symantec behaviours are not tested at all. Building ftdemos for classic MacOS and working test is required. - 4-3. Porting Jam onto MPW - ------------------------- - - FreeType uses Jam (and FT-Jam) for unified cross- - platform building tool. At present, Jam is not ported - to MPW. To update classic MacOS support easily, - building by Jam is expected on MPW. - APPENDIX I ---------- diff --git a/libs/freetype/builds/mac/ftmac.c b/libs/freetype/builds/mac/ftmac.c index f30ffc7d1..8fe556593 100644 --- a/libs/freetype/builds/mac/ftmac.c +++ b/libs/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-2022 by */ +/* Copyright (C) 1996-2023 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/libs/freetype/builds/meson/extract_freetype_version.py b/libs/freetype/builds/meson/extract_freetype_version.py index 66b5bc855..c4c60e7f1 100644 --- a/libs/freetype/builds/meson/extract_freetype_version.py +++ b/libs/freetype/builds/meson/extract_freetype_version.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2022 by +# Copyright (C) 2020-2023 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/libs/freetype/builds/meson/extract_libtool_version.py b/libs/freetype/builds/meson/extract_libtool_version.py index 580f645c1..6fac74c8e 100644 --- a/libs/freetype/builds/meson/extract_libtool_version.py +++ b/libs/freetype/builds/meson/extract_libtool_version.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2022 by +# Copyright (C) 2020-2023 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/libs/freetype/builds/meson/generate_reference_docs.py b/libs/freetype/builds/meson/generate_reference_docs.py index eb4480633..4208bb677 100644 --- a/libs/freetype/builds/meson/generate_reference_docs.py +++ b/libs/freetype/builds/meson/generate_reference_docs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2022 by +# Copyright (C) 2020-2023 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/libs/freetype/builds/meson/parse_modules_cfg.py b/libs/freetype/builds/meson/parse_modules_cfg.py index f68110cf0..d48129fe7 100644 --- a/libs/freetype/builds/meson/parse_modules_cfg.py +++ b/libs/freetype/builds/meson/parse_modules_cfg.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2022 by +# Copyright (C) 2020-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -84,19 +84,25 @@ def generate_ftmodule(lists): ) for module in lists["RASTER_MODULES"]: - name = { - "raster": "ft_raster1", - "smooth": "ft_smooth", - "svg": "ft_svg", + names = { + "raster": ("ft_raster1",), + "smooth": ("ft_smooth",), + "svg": ("ft_svg",), + "sdf": ("ft_sdf", "ft_bitmap_sdf"), }.get(module) - result += ( - "FT_USE_MODULE( FT_Renderer_Class, %s_renderer_class )\n" % name - ) + for name in names: + result += ( + "FT_USE_MODULE( FT_Renderer_Class, %s_renderer_class )\n" % name + ) for module in lists["AUX_MODULES"]: if module in ("psaux", "psnames", "otvalid", "gxvalid"): + name = { + "gxvalid": "gxv", + "otvalid": "otv", + }.get(module, module) result += ( - "FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % module + "FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % name ) result += "/* EOF */\n" diff --git a/libs/freetype/builds/meson/process_ftoption_h.py b/libs/freetype/builds/meson/process_ftoption_h.py index d3f8bb9ae..98daa8c1e 100644 --- a/libs/freetype/builds/meson/process_ftoption_h.py +++ b/libs/freetype/builds/meson/process_ftoption_h.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020-2022 by +# Copyright (C) 2020-2023 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/libs/freetype/builds/modules.mk b/libs/freetype/builds/modules.mk index abbb0ef9e..a75baaf24 100644 --- a/libs/freetype/builds/modules.mk +++ b/libs/freetype/builds/modules.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/os2/detect.mk b/libs/freetype/builds/os2/detect.mk index 0bb557680..afdba7405 100644 --- a/libs/freetype/builds/os2/detect.mk +++ b/libs/freetype/builds/os2/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/os2/os2-def.mk b/libs/freetype/builds/os2/os2-def.mk index 4f508bb36..917ef2d0e 100644 --- a/libs/freetype/builds/os2/os2-def.mk +++ b/libs/freetype/builds/os2/os2-def.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/os2/os2-dev.mk b/libs/freetype/builds/os2/os2-dev.mk index 7c35c1c46..3584fb6be 100644 --- a/libs/freetype/builds/os2/os2-dev.mk +++ b/libs/freetype/builds/os2/os2-dev.mk @@ -5,7 +5,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/os2/os2-gcc.mk b/libs/freetype/builds/os2/os2-gcc.mk index 62003f82c..e17c5be6f 100644 --- a/libs/freetype/builds/os2/os2-gcc.mk +++ b/libs/freetype/builds/os2/os2-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/symbian/bld.inf b/libs/freetype/builds/symbian/bld.inf index 6d20af917..61689225a 100644 --- a/libs/freetype/builds/symbian/bld.inf +++ b/libs/freetype/builds/symbian/bld.inf @@ -2,7 +2,7 @@ // FreeType 2 project for the symbian platform // -// Copyright (C) 2008-2022 by +// Copyright (C) 2008-2023 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/libs/freetype/builds/symbian/freetype.mmp b/libs/freetype/builds/symbian/freetype.mmp index ef3a96f15..297678ede 100644 --- a/libs/freetype/builds/symbian/freetype.mmp +++ b/libs/freetype/builds/symbian/freetype.mmp @@ -2,7 +2,7 @@ // FreeType 2 makefile for the symbian platform // -// Copyright (C) 2008-2022 by +// Copyright (C) 2008-2023 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/libs/freetype/builds/toplevel.mk b/libs/freetype/builds/toplevel.mk index fb0838e98..8d5063ebb 100644 --- a/libs/freetype/builds/toplevel.mk +++ b/libs/freetype/builds/toplevel.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -139,12 +139,12 @@ ifdef check_platform ifneq ($(is_unix),) distclean: - $(RM) builds/unix/config.cache - $(RM) builds/unix/config.log - $(RM) builds/unix/config.status - $(RM) builds/unix/unix-def.mk - $(RM) builds/unix/unix-cc.mk - $(RM) builds/unix/freetype2.pc + $(RM) $(TOP_DIR)/builds/unix/config.cache + $(RM) $(TOP_DIR)/builds/unix/config.log + $(RM) $(TOP_DIR)/builds/unix/config.status + $(RM) $(TOP_DIR)/builds/unix/unix-def.mk + $(RM) $(TOP_DIR)/builds/unix/unix-cc.mk + $(RM) $(TOP_DIR)/builds/unix/freetype2.pc $(RM) nul endif # test is_unix @@ -170,17 +170,17 @@ endif # test check_platform check_out_submodule: $(info Checking out submodule in `subprojects/dlg') - git submodule init - git submodule update + git --git-dir=$(TOP_DIR) submodule init + git --git-dir=$(TOP_DIR) 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) + ifeq ($(wildcard $(TOP_DIR)/include/dlg),) + mkdir $(subst /,$(SEP),$(TOP_DIR)/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) + $(COPY) $(subst /,$(SEP),$(TOP_DIR)/subprojects/dlg/include/dlg/output.h $(TOP_DIR)/include/dlg) + $(COPY) $(subst /,$(SEP),$(TOP_DIR)/subprojects/dlg/include/dlg/dlg.h $(TOP_DIR)/include/dlg) + $(COPY) $(subst /,$(SEP),$(TOP_DIR)/subprojects/dlg/src/dlg/dlg.c $(TOP_DIR)/src/dlg) # We always need the list of modules in ftmodule.h. @@ -198,27 +198,22 @@ modules: include $(TOP_DIR)/builds/modules.mk -# get FreeType version string, using a -# poor man's `sed' emulation with make's built-in string functions +# get FreeType version string using built-in string functions # +hash := \# + work := $(strip $(shell $(CAT) \ $(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h))) -work := $(subst |,x,$(work)) -work := $(subst $(space),|,$(work)) -work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work)) -work := $(word 2,$(work)) -major := $(subst |,$(space),$(work)) -major := $(firstword $(major)) - -work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work)) -work := $(word 2,$(work)) -minor := $(subst |,$(space),$(work)) -minor := $(firstword $(minor)) - -work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work)) -work := $(word 2,$(work)) -patch := $(subst |,$(space),$(work)) -patch := $(firstword $(patch)) + +work := $(subst $(hash)define$(space)FREETYPE_MAJOR$(space),MAjOR=,$(work)) +work := $(subst $(hash)define$(space)FREETYPE_MINOR$(space),MInOR=,$(work)) +work := $(subst $(hash)define$(space)FREETYPE_PATCH$(space),PAtCH=,$(work)) + +major := $(subst MAjOR=,,$(filter MAjOR=%,$(work))) +minor := $(subst MInOR=,,$(filter MInOR=%,$(work))) +patch := $(subst PAtCH=,,$(filter PAtCH=%,$(work))) + +work := # ifneq ($(findstring x0x,x$(patch)x),) # version := $(major).$(minor) @@ -294,15 +289,15 @@ CHANGELOG_SCRIPT = ~/git/config/gitlog-to-changelog do-dist: distclean refdoc @# Without removing the files, `autoconf' and friends follow links. - rm -f builds/unix/aclocal.m4 - rm -f builds/unix/configure.ac - rm -f builds/unix/configure + rm -f $(TOP_DIR)/builds/unix/aclocal.m4 + rm -f $(TOP_DIR)/builds/unix/configure.ac + rm -f $(TOP_DIR)/builds/unix/configure sh autogen.sh - rm -rf builds/unix/autom4te.cache + rm -rf $(TOP_DIR)/builds/unix/autom4te.cache - cp $(CONFIG_GUESS) builds/unix - cp $(CONFIG_SUB) builds/unix + cp $(CONFIG_GUESS) $(TOP_DIR)/builds/unix + cp $(CONFIG_SUB) $(TOP_DIR)/builds/unix @# Generate `ChangeLog' file with commits since release 2.11.0 @# (when we stopped creating this file manually). @@ -313,10 +308,10 @@ do-dist: distclean refdoc > ChangeLog @# Remove intermediate files created by the `refdoc' target. - rm -rf docs/markdown - rm -f docs/mkdocs.yml + rm -rf $(TOP_DIR)/docs/markdown + rm -f $(TOP_DIR)/docs/mkdocs.yml @# Remove more stuff related to git. - rm -rf subprojects + rm -rf $(TOP_DIR)/subprojects/dlg # EOF diff --git a/libs/freetype/builds/unix/aclocal.m4 b/libs/freetype/builds/unix/aclocal.m4 index 96c1cc7fd..563b92412 100644 --- a/libs/freetype/builds/unix/aclocal.m4 +++ b/libs/freetype/builds/unix/aclocal.m4 @@ -14,7 +14,8 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -45,7 +46,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 58 LT_INIT +# serial 59 LT_INIT # LT_PREREQ(VERSION) @@ -195,6 +196,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -233,8 +235,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -785,7 +787,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1047,8 +1049,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1072,17 +1074,12 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1131,12 +1128,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1250,7 +1247,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) +[m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1267,7 +1265,7 @@ case $with_sysroot in #( fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1297,7 +1295,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1314,7 +1312,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1326,7 +1324,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1348,7 +1346,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1356,7 +1354,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1364,7 +1362,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1384,14 +1382,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1459,7 +1457,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1498,9 +1496,22 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1719,7 +1730,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1762,7 +1773,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -2212,26 +2223,35 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + ;; + esac + fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2554,7 +2574,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; @@ -2564,14 +2584,14 @@ m4_if([$1], [],[ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -2590,7 +2610,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2627,7 +2647,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2660,7 +2680,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -3459,7 +3479,7 @@ beos*) bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3493,14 +3513,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3514,7 +3534,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3561,7 +3581,7 @@ netbsd*) newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3688,13 +3708,13 @@ else mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -3720,7 +3740,7 @@ else # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -3960,7 +3980,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -3978,20 +3998,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -4015,7 +4035,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ @@ -4033,9 +4053,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -4322,7 +4342,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4405,7 +4425,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4741,7 +4761,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4924,7 +4944,7 @@ m4_if([$1], [CXX], [ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -4932,7 +4952,7 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) + cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -4989,15 +5009,15 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -5049,7 +5069,7 @@ dnl Note also adjust exclude_expsyms for C++ above. _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -5161,6 +5181,7 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) @@ -5175,7 +5196,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -5218,7 +5239,7 @@ _LT_EOF _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes @@ -5230,7 +5251,7 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -5246,7 +5267,7 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -5378,7 +5399,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -5561,12 +5582,12 @@ _LT_EOF cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes @@ -5607,7 +5628,7 @@ _LT_EOF fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. @@ -5655,7 +5676,7 @@ _LT_EOF ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -5866,6 +5887,7 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) @@ -6632,8 +6654,8 @@ if test yes != "$_lt_caught_CXX_error"; then cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' @@ -6731,6 +6753,7 @@ if test yes != "$_lt_caught_CXX_error"; then emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) @@ -6761,7 +6784,7 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes @@ -6898,7 +6921,7 @@ if test yes != "$_lt_caught_CXX_error"; then # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -7038,13 +7061,13 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -8182,6 +8205,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) +# _LT_DECL_FILECMD +# ---------------- +# Check for a file(cmd) program that can be used to detect file type and magic +m4_defun([_LT_DECL_FILECMD], +[AC_CHECK_TOOL([FILECMD], [file], [:]) +_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) +])# _LD_DECL_FILECMD + # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates @@ -8361,8 +8392,8 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -8793,7 +8824,7 @@ LT_OPTION_DEFINE([LTDL_INIT], [convenience], # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # @@ -8918,7 +8949,8 @@ m4_define([lt_dict_filter], # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, +# Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -8927,23 +8959,23 @@ m4_define([lt_dict_filter], # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) +m4_define([LT_PACKAGE_VERSION], [2.4.7]) +m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' +[macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives diff --git a/libs/freetype/builds/unix/config.guess b/libs/freetype/builds/unix/config.guess index 7f76b6228..b18721393 100644 --- a/libs/freetype/builds/unix/config.guess +++ b/libs/freetype/builds/unix/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-01-09' +timestamp='2023-07-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -459,7 +459,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -966,11 +966,37 @@ EOF GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1036,7 +1062,16 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) @@ -1151,16 +1186,27 @@ EOF ;; x86_64:Linux:*:*) set_cc_for_build + CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_X32 >/dev/null - then - LIBCABI=${LIBC}x32 - fi + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac fi - GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC @@ -1180,7 +1226,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1321,7 +1367,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; @@ -1367,8 +1413,11 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; - x86_64:Haiku:*:*) - GUESS=x86_64-unknown-haiku + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE diff --git a/libs/freetype/builds/unix/config.sub b/libs/freetype/builds/unix/config.sub index dba16e84c..6ae250275 100644 --- a/libs/freetype/builds/unix/config.sub +++ b/libs/freetype/builds/unix/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-01-03' +timestamp='2023-07-31' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -76,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -130,7 +130,7 @@ IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo Invalid configuration \`"$1"\': more than four components >&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -145,7 +145,8 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -943,7 +944,7 @@ $basic_machine EOF IFS=$saved_IFS ;; - # We use `pc' rather than `unknown' + # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) @@ -1075,7 +1076,7 @@ case $cpu-$vendor in pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) @@ -1205,39 +1206,16 @@ case $cpu-$vendor in | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ + | kvx \ | le32 | le64 \ | lm32 \ - | loongarch32 | loongarch64 | loongarchx32 \ + | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r3 | mipsisa32r3el \ - | mipsisa32r5 | mipsisa32r5el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r3 | mipsisa64r3el \ - | mipsisa64r5 | mipsisa64r5el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ @@ -1285,7 +1263,7 @@ case $cpu-$vendor in ;; *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1341,6 +1319,10 @@ EOF kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; *) kernel= os=$basic_os @@ -1728,7 +1710,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ @@ -1754,7 +1736,7 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* ) + | fiwix* | mlibc* | cos* | mbr* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1762,8 +1744,11 @@ case $os in ;; none) ;; + kernel* | msvc* ) + # Restricted further below + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac @@ -1772,14 +1757,30 @@ esac # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* ) + | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) ;; uclinux-uclibc* ) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + managarm-mlibc* | managarm-kernel* ) + ;; + windows*-gnu* | windows*-msvc*) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + -kernel* ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel* ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + *-msvc* ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) @@ -1792,11 +1793,15 @@ case $kernel-$os in ;; *-eabi* | *-gnueabi*) ;; + none-coff* | none-elf*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an output format "OS" + ;; -*) # Blank kernel with real OS is always fine. ;; *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac diff --git a/libs/freetype/builds/unix/configure b/libs/freetype/builds/unix/configure index 28bad74ab..580f18c3c 100644 --- a/libs/freetype/builds/unix/configure +++ b/libs/freetype/builds/unix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for FreeType 2.12. +# Generated by GNU Autoconf 2.71 for FreeType 2.13.2. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FreeType' PACKAGE_TARNAME='freetype' -PACKAGE_VERSION='2.12' -PACKAGE_STRING='FreeType 2.12' +PACKAGE_VERSION='2.13.2' +PACKAGE_STRING='FreeType 2.13.2' PACKAGE_BUGREPORT='freetype@nongnu.org' PACKAGE_URL='' @@ -690,6 +690,7 @@ BROTLI_LIBS BROTLI_CFLAGS HARFBUZZ_LIBS HARFBUZZ_CFLAGS +have_libpng LIBPNG_LIBS LIBPNG_CFLAGS BZIP2_LIBS @@ -720,6 +721,7 @@ RANLIB STRIP ac_ct_AR AR +FILECMD LN_S NM ac_ct_DUMPBIN @@ -812,6 +814,7 @@ with_bzip2 with_png with_harfbuzz with_brotli +with_librsvg with_old_mac_fonts with_fsspec with_fsref @@ -1392,7 +1395,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures FreeType 2.12 to adapt to many kinds of systems. +\`configure' configures FreeType 2.13.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1459,7 +1462,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeType 2.12:";; + short | recursive ) echo "Configuration of FreeType 2.13.2:";; esac cat <<\_ACEOF @@ -1502,6 +1505,9 @@ Optional Packages: --with-brotli=[yes|no|auto] support decompression of WOFF2 streams [default=auto] + --with-librsvg=[yes|no|auto] + support OpenType SVG fonts in FreeType demo programs + [default=auto] --with-old-mac-fonts allow Mac resource-based fonts to be used --with-fsspec use obsolete FSSpec API of MacOS, if available (default=yes) @@ -1617,7 +1623,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeType configure 2.12 +FreeType configure 2.13.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1968,7 +1974,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeType $as_me 2.12, which was +It was created by FreeType $as_me 2.13.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2730,7 +2736,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Don't forget to update `docs/VERSIONS.TXT'! -version_info='24:2:18' +version_info='26:1:20' ft_version=`echo $version_info | tr : .` @@ -4087,8 +4093,8 @@ esac -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' @@ -4641,13 +4647,13 @@ else mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -4785,7 +4791,7 @@ esac fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -4889,7 +4895,7 @@ else $as_nop lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -4932,7 +4938,7 @@ else $as_nop sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -5137,6 +5143,114 @@ esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. +set dummy ${ac_tool_prefix}file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$FILECMD"; then + ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FILECMD="${ac_tool_prefix}file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FILECMD=$ac_cv_prog_FILECMD +if test -n "$FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 +printf "%s\n" "$FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_FILECMD"; then + ac_ct_FILECMD=$FILECMD + # Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_FILECMD"; then + ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FILECMD="file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD +if test -n "$ac_ct_FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 +printf "%s\n" "$ac_ct_FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_FILECMD" = x; then + FILECMD=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FILECMD=$ac_ct_FILECMD + fi +else + FILECMD="$ac_cv_prog_FILECMD" +fi + + + + + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 @@ -5277,7 +5391,7 @@ beos*) bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -5311,14 +5425,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -5332,7 +5446,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' @@ -5379,7 +5493,7 @@ netbsd*) newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -5750,13 +5864,29 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cru} +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS + + + + + + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. + @@ -6220,7 +6350,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -6238,20 +6368,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -6275,7 +6405,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -6293,9 +6423,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -6498,7 +6628,7 @@ case $with_sysroot in #( fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -6623,7 +6753,7 @@ ia64-*-hpux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -6644,7 +6774,7 @@ ia64-*-hpux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -6656,7 +6786,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -6682,7 +6812,7 @@ mips64*-*linux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -6690,7 +6820,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -6698,7 +6828,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -6722,14 +6852,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -6837,7 +6967,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -7620,8 +7750,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 + $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -7648,17 +7778,12 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; } _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[012],*|,*powerpc*-darwin[5-8]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -8374,8 +8499,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -8883,7 +9008,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -9306,15 +9431,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -9366,7 +9491,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -9478,6 +9603,7 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; interix[3-9]*) @@ -9492,7 +9618,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -9535,7 +9661,7 @@ _LT_EOF compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes @@ -9547,7 +9673,7 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -9563,7 +9689,7 @@ _LT_EOF archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -9695,7 +9821,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -9966,12 +10092,12 @@ fi cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -10012,7 +10138,7 @@ fi fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -10053,8 +10179,8 @@ fi output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -10088,7 +10214,7 @@ fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -10339,6 +10465,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; osf3*) @@ -11031,7 +11158,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; @@ -11041,14 +11168,14 @@ cygwin* | mingw* | pw32* | cegcc*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -11067,7 +11194,7 @@ cygwin* | mingw* | pw32* | cegcc*) done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -11104,7 +11231,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -11137,7 +11264,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -12290,30 +12417,41 @@ striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +if test -z "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - fi - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + fi + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; - esac + ;; + esac + fi fi @@ -12739,7 +12877,7 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of native executables" >&5 printf %s "checking for suffix of native executables... " >&6; } rm -f a.* b.* a_out.exe conftest.* - echo > conftest.c "int main() { return 0;}" + echo > conftest.c "int main(void) { return 0;}" ${CC_BUILD} conftest.c || as_fn_error $? "native C compiler is not working" "$LINENO" 5 rm -f conftest.c if test -x a.out -o -x b.out -o -x conftest; then @@ -13606,21 +13744,6 @@ fi -ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy" -if test "x$ac_cv_func_memcpy" = xyes -then : - printf "%s\n" "#define HAVE_MEMCPY 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" -if test "x$ac_cv_func_memmove" = xyes -then : - printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h - -fi - - - # get compiler flags right # # We try to make the compiler work for C99-strict source. Even if the @@ -14241,19 +14364,54 @@ fi have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)" else # fall back to config script - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpng-config" >&5 -printf %s "checking for libpng-config... " >&6; } - if which libpng-config > /dev/null 2>&1; then + # Extract the first word of "libpng-config", so it can be a program name with args. +set dummy libpng-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_have_libpng+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$have_libpng"; then + ac_cv_prog_have_libpng="$have_libpng" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_have_libpng="yes (libpng-config)" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_have_libpng" && ac_cv_prog_have_libpng="no" +fi +fi +have_libpng=$ac_cv_prog_have_libpng +if test -n "$have_libpng"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_libpng" >&5 +printf "%s\n" "$have_libpng" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + if test "$have_libpng" != no; then LIBPNG_CFLAGS=`libpng-config --cflags` LIBPNG_LIBS=`libpng-config --ldflags` libpng_libspriv=`libpng-config --static --ldflags` libpng_libsstaticconf="$libpng_libspriv" - have_libpng="yes (libpng-config)" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi fi fi @@ -14586,8 +14744,23 @@ then : fi +FT_DEMO_CFLAGS="" +FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME" + # 'librsvg' is needed to demonstrate SVG support. +# Check whether --with-librsvg was given. +if test ${with_librsvg+y} +then : + withval=$with_librsvg; +else $as_nop + with_librsvg=auto +fi + + +have_librsvg=no +if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then + pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBRSVG" >&5 printf %s "checking for LIBRSVG... " >&6; } @@ -14646,11 +14819,11 @@ fi # Put the nasty error message in config.log where it belongs echo "$LIBRSVG_PKG_ERRORS" >&5 - have_librsvg=no + : elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - have_librsvg=no + : else LIBRSVG_CFLAGS=$pkg_cv_LIBRSVG_CFLAGS LIBRSVG_LIBS=$pkg_cv_LIBRSVG_LIBS @@ -14659,12 +14832,14 @@ printf "%s\n" "yes" >&6; } have_librsvg="yes (pkg-config)" fi -FT_DEMO_CFLAGS="" -FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME" + if test "$have_librsvg" != no; then + FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" + FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" + fi +fi -if test "$have_librsvg" != no; then - FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" - FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" +if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then + as_fn_error $? "librsvg support requested but library not found" "$LINENO" 5 fi @@ -16068,7 +16243,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check for Python and docwriter - +PYTHON_MIN_VERSION=3.5 have_py3=no have_docwriter=no PIP=pip @@ -16129,7 +16304,7 @@ if test "x$PYTHON" != "xmissing"; then if test -n "$PYTHON" then : - ax_python_version="3.5" + ax_python_version="$PYTHON_MIN_VERSION" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version" >&5 printf %s "checking for python version... " >&6; } @@ -16861,7 +17036,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeType $as_me 2.12, which was +This file was extended by FreeType $as_me 2.13.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16929,7 +17104,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -FreeType config.status 2.12 +FreeType config.status 2.13.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -17094,12 +17269,14 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -17265,13 +17442,13 @@ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ +FILECMD \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ -AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -18126,6 +18303,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd +# A file(cmd) program that detects file types. +FILECMD=$lt_FILECMD + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18144,8 +18324,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR +# Flags to create an archive (by configure). +lt_ar_flags=$lt_ar_flags + # Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS +AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -18521,7 +18704,7 @@ ltmain=$ac_aux_dir/ltmain.sh # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -18738,13 +18921,13 @@ if test $have_docwriter = no; then \`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. + \`virtualenv'). These operations require Python >= $PYTHON_MIN_VERSION. " >&5 printf "%s\n" "$as_me: WARNING: \`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. + \`virtualenv'). These operations require Python >= $PYTHON_MIN_VERSION. " >&2;} fi diff --git a/libs/freetype/builds/unix/configure.ac b/libs/freetype/builds/unix/configure.ac index 28f65b9a4..5df9d8612 100644 --- a/libs/freetype/builds/unix/configure.ac +++ b/libs/freetype/builds/unix/configure.ac @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright (C) 2001-2022 by +# Copyright (C) 2001-2023 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.12], [freetype@nongnu.org], [freetype]) +AC_INIT([FreeType], [2.13.2], [freetype@nongnu.org], [freetype]) AC_CONFIG_SRCDIR([ftconfig.h.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='24:2:18' +version_info='26:1:20' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -50,7 +50,7 @@ if test ${cross_compiling} = yes; then AC_MSG_CHECKING([for suffix of native executables]) rm -f a.* b.* a_out.exe conftest.* - echo > conftest.c "int main() { return 0;}" + echo > conftest.c "int main(void) { return 0;}" ${CC_BUILD} conftest.c || AC_MSG_ERROR([native C compiler is not working]) rm -f conftest.c if test -x a.out -o -x b.out -o -x conftest; then @@ -163,9 +163,6 @@ fi AC_SUBST([FTSYS_SRC]) -AC_CHECK_FUNCS([memcpy memmove]) - - # get compiler flags right # # We try to make the compiler work for C99-strict source. Even if the @@ -406,16 +403,12 @@ if test x"$with_png" = xyes -o x"$with_png" = xauto; then have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)" else # fall back to config script - AC_MSG_CHECKING([for libpng-config]) - if which libpng-config > /dev/null 2>&1; then + AC_CHECK_PROG(have_libpng, [libpng-config], [yes (libpng-config)], [no]) + if test "$have_libpng" != no; then LIBPNG_CFLAGS=`libpng-config --cflags` LIBPNG_LIBS=`libpng-config --ldflags` libpng_libspriv=`libpng-config --static --ldflags` libpng_libsstaticconf="$libpng_libspriv" - have_libpng="yes (libpng-config)" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) fi fi fi @@ -530,16 +523,28 @@ AC_SEARCH_LIBS([clock_gettime], [test "$ac_cv_search_clock_gettime" = "none required" \ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) -# 'librsvg' is needed to demonstrate SVG support. -PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0], - [have_librsvg="yes (pkg-config)"], [have_librsvg=no]) - FT_DEMO_CFLAGS="" FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME" -if test "$have_librsvg" != no; then - FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" - FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" +# 'librsvg' is needed to demonstrate SVG support. +AC_ARG_WITH([librsvg], + [AS_HELP_STRING([--with-librsvg=@<:@yes|no|auto@:>@], + [support OpenType SVG fonts in FreeType demo programs @<:@default=auto@:>@])], + [], [with_librsvg=auto]) + +have_librsvg=no +if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then + PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0], + [have_librsvg="yes (pkg-config)"], [:]) + + if test "$have_librsvg" != no; then + FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" + FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" + fi +fi + +if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then + AC_MSG_ERROR([librsvg support requested but library not found]) fi AC_SUBST([FT_DEMO_CFLAGS]) @@ -961,14 +966,14 @@ esac AX_PTHREAD([have_pthread=yes], [have_pthread=no]) # Check for Python and docwriter - +PYTHON_MIN_VERSION=3.5 have_py3=no have_docwriter=no PIP=pip AC_CHECK_PROGS([PYTHON], [python3 python], [missing]) if test "x$PYTHON" != "xmissing"; then - AX_PROG_PYTHON_VERSION([3.5], [have_py3=yes], []) + AX_PROG_PYTHON_VERSION([$PYTHON_MIN_VERSION], [have_py3=yes], []) if test "x$have_py3" = "xyes"; then PIP="$PYTHON -m $PIP" @@ -1157,7 +1162,7 @@ if test $have_docwriter = no; then `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. + `virtualenv'). These operations require Python >= $PYTHON_MIN_VERSION. ]) fi diff --git a/libs/freetype/builds/unix/configure.raw b/libs/freetype/builds/unix/configure.raw index cfb073efa..dc7426ee0 100644 --- a/libs/freetype/builds/unix/configure.raw +++ b/libs/freetype/builds/unix/configure.raw @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright (C) 2001-2022 by +# Copyright (C) 2001-2023 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='24:2:18' +version_info='26:1:20' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -50,7 +50,7 @@ if test ${cross_compiling} = yes; then AC_MSG_CHECKING([for suffix of native executables]) rm -f a.* b.* a_out.exe conftest.* - echo > conftest.c "int main() { return 0;}" + echo > conftest.c "int main(void) { return 0;}" ${CC_BUILD} conftest.c || AC_MSG_ERROR([native C compiler is not working]) rm -f conftest.c if test -x a.out -o -x b.out -o -x conftest; then @@ -163,9 +163,6 @@ fi AC_SUBST([FTSYS_SRC]) -AC_CHECK_FUNCS([memcpy memmove]) - - # get compiler flags right # # We try to make the compiler work for C99-strict source. Even if the @@ -406,16 +403,12 @@ if test x"$with_png" = xyes -o x"$with_png" = xauto; then have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)" else # fall back to config script - AC_MSG_CHECKING([for libpng-config]) - if which libpng-config > /dev/null 2>&1; then + AC_CHECK_PROG(have_libpng, [libpng-config], [yes (libpng-config)], [no]) + if test "$have_libpng" != no; then LIBPNG_CFLAGS=`libpng-config --cflags` LIBPNG_LIBS=`libpng-config --ldflags` libpng_libspriv=`libpng-config --static --ldflags` libpng_libsstaticconf="$libpng_libspriv" - have_libpng="yes (libpng-config)" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) fi fi fi @@ -530,16 +523,28 @@ AC_SEARCH_LIBS([clock_gettime], [test "$ac_cv_search_clock_gettime" = "none required" \ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) -# 'librsvg' is needed to demonstrate SVG support. -PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0], - [have_librsvg="yes (pkg-config)"], [have_librsvg=no]) - FT_DEMO_CFLAGS="" FT_DEMO_LDFLAGS="$LIB_CLOCK_GETTIME" -if test "$have_librsvg" != no; then - FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" - FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" +# 'librsvg' is needed to demonstrate SVG support. +AC_ARG_WITH([librsvg], + [AS_HELP_STRING([--with-librsvg=@<:@yes|no|auto@:>@], + [support OpenType SVG fonts in FreeType demo programs @<:@default=auto@:>@])], + [], [with_librsvg=auto]) + +have_librsvg=no +if test x"$with_librsvg" = xyes -o x"$with_librsvg" = xauto; then + PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.46.0], + [have_librsvg="yes (pkg-config)"], [:]) + + if test "$have_librsvg" != no; then + FT_DEMO_CFLAGS="$FT_DEMO_CFLAGS $LIBRSVG_CFLAGS -DHAVE_LIBRSVG" + FT_DEMO_LDFLAGS="$FT_DEMO_LDFLAGS $LIBRSVG_LIBS" + fi +fi + +if test x"$with_librsvg" = xyes -a "$have_librsvg" = no; then + AC_MSG_ERROR([librsvg support requested but library not found]) fi AC_SUBST([FT_DEMO_CFLAGS]) @@ -961,14 +966,14 @@ esac AX_PTHREAD([have_pthread=yes], [have_pthread=no]) # Check for Python and docwriter - +PYTHON_MIN_VERSION=3.5 have_py3=no have_docwriter=no PIP=pip AC_CHECK_PROGS([PYTHON], [python3 python], [missing]) if test "x$PYTHON" != "xmissing"; then - AX_PROG_PYTHON_VERSION([3.5], [have_py3=yes], []) + AX_PROG_PYTHON_VERSION([$PYTHON_MIN_VERSION], [have_py3=yes], []) if test "x$have_py3" = "xyes"; then PIP="$PYTHON -m $PIP" @@ -1157,7 +1162,7 @@ if test $have_docwriter = no; then `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. + `virtualenv'). These operations require Python >= $PYTHON_MIN_VERSION. ]) fi diff --git a/libs/freetype/builds/unix/detect.mk b/libs/freetype/builds/unix/detect.mk index 7ed58ff74..6b87013d5 100644 --- a/libs/freetype/builds/unix/detect.mk +++ b/libs/freetype/builds/unix/detect.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/unix/freetype-config.in b/libs/freetype/builds/unix/freetype-config.in index c076bc1f8..58561126f 100644 --- a/libs/freetype/builds/unix/freetype-config.in +++ b/libs/freetype/builds/unix/freetype-config.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (C) 2000-2022 by +# Copyright (C) 2000-2023 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/libs/freetype/builds/unix/freetype2.m4 b/libs/freetype/builds/unix/freetype2.m4 index 0cafc8e8c..09ead4304 100644 --- a/libs/freetype/builds/unix/freetype2.m4 +++ b/libs/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 # -# Copyright (C) 2001-2022 by +# Copyright (C) 2001-2023 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,7 +15,7 @@ # generated by Autoconf, under the same distribution terms as the rest of # that program. # -# serial 6 +# serial 7 # AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) # Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS. @@ -121,7 +121,7 @@ AC_DEFUN([AC_CHECK_FT2], #include int -main() +main(void) { FT_Library library; FT_Error error; diff --git a/libs/freetype/builds/unix/ft-munmap.m4 b/libs/freetype/builds/unix/ft-munmap.m4 index c536febb2..a0fcf3580 100644 --- a/libs/freetype/builds/unix/ft-munmap.m4 +++ b/libs/freetype/builds/unix/ft-munmap.m4 @@ -1,6 +1,6 @@ ## FreeType specific autoconf tests # -# Copyright (C) 2002-2022 by +# Copyright (C) 2002-2023 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/libs/freetype/builds/unix/ftconfig.h.in b/libs/freetype/builds/unix/ftconfig.h.in index 67474dcef..3dac56126 100644 --- a/libs/freetype/builds/unix/ftconfig.h.in +++ b/libs/freetype/builds/unix/ftconfig.h.in @@ -4,7 +4,7 @@ * * UNIX-specific configuration file (specification only). * - * Copyright (C) 1996-2022 by + * Copyright (C) 1996-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/libs/freetype/builds/unix/ftsystem.c b/libs/freetype/builds/unix/ftsystem.c index 4d2870b59..5927215df 100644 --- a/libs/freetype/builds/unix/ftsystem.c +++ b/libs/freetype/builds/unix/ftsystem.c @@ -4,7 +4,7 @@ * * Unix-specific FreeType low-level system interface (body). * - * Copyright (C) 1996-2022 by + * Copyright (C) 1996-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/libs/freetype/builds/unix/install-sh b/libs/freetype/builds/unix/install-sh index 0b0fdcbba..ec298b537 100644 --- a/libs/freetype/builds/unix/install-sh +++ b/libs/freetype/builds/unix/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2013-12-25.23; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ posix_mkdir= # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ while test $# -ne 0; do -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -271,15 +295,18 @@ do fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,27 +315,16 @@ do fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -318,43 +334,49 @@ do fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -365,7 +387,7 @@ do then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -394,7 +416,7 @@ do prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -427,14 +449,25 @@ do else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -460,6 +493,13 @@ do then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -474,9 +514,9 @@ do # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 @@ -493,9 +533,9 @@ do done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/libs/freetype/builds/unix/install.mk b/libs/freetype/builds/unix/install.mk index 0758d6e1a..2f1729b71 100644 --- a/libs/freetype/builds/unix/install.mk +++ b/libs/freetype/builds/unix/install.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/unix/ltmain.sh b/libs/freetype/builds/unix/ltmain.sh index 0f0a2da3f..2a50d7f6f 100644 --- a/libs/freetype/builds/unix/ltmain.sh +++ b/libs/freetype/builds/unix/ltmain.sh @@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 +VERSION=2.4.7 +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ package_revision=2.4.6 # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES 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 . +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# ## ------ ## @@ -139,9 +130,12 @@ do _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ test -z "$SED" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ test -z "$GREP" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ sed_double_backslash="\ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ func_relative_path () } -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () { $debug_cmd - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + $require_check_ifs_backslash + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break fi - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" + # Quote for eval. + case $func_quote_portable_result in + *[\\\`\"\$]*) + # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string + # contains the shell wildcard characters. + case $check_ifs_backshlash_broken$func_quote_portable_result in + :*|*[\[\*\?]*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ + | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; + *) ;; esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift + break done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_portable_result=\"$func_quote_portable_result\" + ;; + esac } -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + printf -v _GL_test_printf_tilde %q '~' + if test '\~' = "$_GL_test_printf_tilde"; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } + else + # Broken older Bash implementations. Make those faster too if possible. + func_quotefast_eval () + { + case $1 in + '~'*) + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + ;; + *) + printf -v func_quotefast_eval_result %q "$1" + ;; + esac + } + fi +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero or more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# be used later in func_quote to get output like: 'echo "a b"' instead +# of 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; esac - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result + ;; + *) + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result ;; esac +} + - func_quote_for_expand_result=$_G_arg +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done } @@ -1215,8 +1376,8 @@ func_show_eval () _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" @@ -1241,8 +1402,8 @@ func_show_eval_locale () _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || { @@ -1369,30 +1530,26 @@ func_lt_ver () # End: #! /bin/sh -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2010-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# Please report bugs or propose patches to: +# -# Please report bugs or propose patches to gary@gnu.org. +# Set a version string for this script. +scriptversion=2019-02-19.15; # UTC ## ------ ## @@ -1415,7 +1572,7 @@ scriptversion=2014-01-07.03; # UTC # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. +# starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1427,7 +1584,7 @@ scriptversion=2014-01-07.03; # UTC # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug processing for additional +# After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1476,8 +1633,8 @@ fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. +# in the main code. A hook is just a list of function names that can be +# run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1510,7 +1667,8 @@ func_add_hook () # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +# Remove HOOK_FUNC from the list of hook functions to be called by +# FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1519,10 +1677,28 @@ func_remove_hook () } +# func_propagate_result FUNC_NAME_A FUNC_NAME_B +# --------------------------------------------- +# If the *_result variable of FUNC_NAME_A _is set_, assign its value to +# *_result variable of FUNC_NAME_B. +func_propagate_result () +{ + $debug_cmd + + func_propagate_result_result=: + if eval "test \"\${${1}_result+set}\" = set" + then + eval "${2}_result=\$${1}_result" + else + func_propagate_result_result=false + fi +} + + # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more +# It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1532,22 +1708,19 @@ func_run_hooks () case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; + *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + func_unset "${_G_hook}_result" + eval $_G_hook '${1+"$@"}' + func_propagate_result $_G_hook func_run_hooks + if $func_propagate_result_result; then + eval set dummy "$func_run_hooks_result"; shift + fi done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result } @@ -1557,10 +1730,18 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: +# full positional parameter list from your hook function. You may remove +# or edit any options that you action, and then pass back the remaining +# unprocessed options in '_result', escaped +# suitably for 'eval'. +# +# The '_result' variable is automatically unset +# before your hook gets called; for best performance, only set the +# *_result variable when necessary (i.e. don't call the 'func_quote' +# function unnecessarily because it can be an expensive operation on some +# machines). +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1751,8 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). Leave +# # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1761,36 @@ func_run_hooks () # { # $debug_cmd # -# # Note that for efficiency, we parse as many options as we can +# args_changed=false +# +# # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@" in case we need it later, +# # if $args_changed was set to 'true'. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# # Only call 'func_quote' here if we processed at least one argument. +# if $args_changed; then +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result +# fi # } # func_add_hook func_parse_options my_silent_option # @@ -1610,17 +1801,26 @@ func_run_hooks () # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + func_run_hooks func_options ${1+"$@"} + func_propagate_result func_run_hooks func_options_finish +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1830,27 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_options_quoted=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + func_unset func_${my_func}_result + func_unset func_run_hooks_result + eval func_$my_func '${1+"$@"}' + func_propagate_result func_$my_func func_options + if $func_propagate_result_result; then + eval set dummy "$func_options_result"; shift + _G_options_quoted=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + $_G_options_quoted || { + # As we (func_options) are top-level options-parser function and + # nobody quoted "$@" for us yet, we need to do it explicitly for + # caller. + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + } } @@ -1649,9 +1859,8 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. +# needs to propagate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { @@ -1662,9 +1871,7 @@ func_options_prep () opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + func_propagate_result func_run_hooks func_options_prep } @@ -1676,25 +1883,32 @@ func_parse_options () { $debug_cmd - func_parse_options_result= - + _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + func_propagate_result func_run_hooks func_parse_options + if $func_propagate_result_result; then + eval set dummy "$func_parse_options_result"; shift + # Even though we may have changed "$@", we passed the "$@" array + # down into the hook and it quoted it for us (because we are in + # this if-branch). No need to quote it again. + _G_parse_options_requote=false + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + # We expect that one of the options parsed in this function matches + # and thus we remove _G_opt from "$@" and need to re-quote. + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" + func_echo "enabling shell trace mode" >&2 $debug_cmd ;; @@ -1704,7 +1918,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_parse_options_requote=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1974,24 @@ func_parse_options () shift ;; - --) break ;; + --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + if $_G_match_parse_options; then + _G_parse_options_requote=: + fi done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + if $_G_parse_options_requote; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result + fi } @@ -1782,12 +2008,10 @@ func_validate_options () test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} + func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result } @@ -1843,8 +2067,8 @@ func_missing_arg () # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables +# after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -1859,8 +2083,9 @@ then func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= + if test "x$func_split_equals_lhs" = "x$1"; then + func_split_equals_rhs= + fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -1870,7 +2095,7 @@ else func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ + test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -1896,7 +2121,7 @@ else { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -1938,31 +2163,44 @@ func_usage_message () # func_version # ------------ # Echo version message to standard output and exit. +# The version message is extracted from the calling file's header +# comments, with leading '# ' stripped: +# 1. First display the progname and version +# 2. Followed by the header comment line matching /^# Written by / +# 3. Then a blank line followed by the first following line matching +# /^# Copyright / +# 4. Immediately followed by any lines between the previous matches, +# except lines preceding the intervening completely blank line. +# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p + /^# Written by /!b + s|^# ||; p; n + + :fwd2blnk + /./ { + n + b fwd2blnk } - /^# Written by / { - s|^# || - p + p; n + + :holdwrnt + s|^# || + s|^# *$|| + /^Copyright /!{ + /./H + n + b holdwrnt } - /^warranty; /q' < "$progpath" + + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + G + s|\(\n\)\n*|\1|g + p; q' < "$progpath" exit $? } @@ -1972,12 +2210,12 @@ func_version () # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6' +scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... @@ -2068,7 +2306,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 + version: $progname (GNU libtool) 2.4.7 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2124,7 +2362,7 @@ fi # a configuration failure hint, and exit. func_fatal_configuration () { - func__fatal_error ${1+"$@"} \ + func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -2270,6 +2508,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2533,16 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result + fi } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2554,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2634,20 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result + fi } func_add_hook func_parse_options libtool_parse_options @@ -2451,8 +2704,8 @@ libtool_validate_options () } # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options @@ -3418,8 +3671,8 @@ func_mode_compile () esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3492,8 +3745,8 @@ compiler." func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3648,7 +3901,8 @@ This mode accepts the following additional options: -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler + -Wc,FLAG + -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -3754,6 +4008,8 @@ The following components of LINK-COMMAND are treated specially: -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wa,FLAG + -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4096,8 +4352,8 @@ func_mode_install () case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -4107,8 +4363,8 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4165,12 +4421,12 @@ func_mode_install () esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ @@ -4181,8 +4437,8 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -4478,8 +4734,8 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else @@ -5258,7 +5514,8 @@ else if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5268,7 +5525,7 @@ func_fallback_echo () \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to @@ -6611,9 +6868,9 @@ func_mode_link () while test "$#" -gt 0; do arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -6849,6 +7106,13 @@ func_mode_link () prev= continue ;; + xassembler) + func_append compiler_flags " -Xassembler $qarg" + prev= + func_append compile_command " -Xassembler $qarg" + func_append finalize_command " -Xassembler $qarg" + continue + ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7019,7 +7283,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7039,7 +7303,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7069,8 +7333,20 @@ func_mode_link () prev=xcompiler continue ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + ;; + esac + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7211,9 +7487,9 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7227,16 +7503,21 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; + -Xassembler) + prev=xassembler + continue + ;; + -Xcompiler) prev=xcompiler continue @@ -7254,8 +7535,8 @@ func_mode_link () # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -7272,12 +7553,17 @@ func_mode_link () # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7298,15 +7584,15 @@ func_mode_link () continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -7426,8 +7712,8 @@ func_mode_link () *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -8632,7 +8918,7 @@ func_mode_link () test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -8805,7 +9091,7 @@ func_mode_link () # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -8896,7 +9182,7 @@ func_mode_link () versuffix=.$current.$revision ;; - freebsd-elf) + freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9122,7 +9408,7 @@ func_mode_link () *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -9933,8 +10219,8 @@ EOF for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10027,8 +10313,8 @@ EOF eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10502,12 +10788,13 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -10747,13 +11034,15 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi diff --git a/libs/freetype/builds/unix/unix-cc.in b/libs/freetype/builds/unix/unix-cc.in index d5ae46745..802016dda 100644 --- a/libs/freetype/builds/unix/unix-cc.in +++ b/libs/freetype/builds/unix/unix-cc.in @@ -2,7 +2,7 @@ # FreeType 2 template for Unix-specific compiler definitions # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/unix/unix-def.in b/libs/freetype/builds/unix/unix-def.in index 8e298ac59..d50994f3c 100644 --- a/libs/freetype/builds/unix/unix-def.in +++ b/libs/freetype/builds/unix/unix-def.in @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/unix/unix-dev.mk b/libs/freetype/builds/unix/unix-dev.mk index 37543895b..9dd8ad6ae 100644 --- a/libs/freetype/builds/unix/unix-dev.mk +++ b/libs/freetype/builds/unix/unix-dev.mk @@ -6,7 +6,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/unix/unix-lcc.mk b/libs/freetype/builds/unix/unix-lcc.mk index 0198adfd8..ded24f486 100644 --- a/libs/freetype/builds/unix/unix-lcc.mk +++ b/libs/freetype/builds/unix/unix-lcc.mk @@ -6,7 +6,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/unix/unix.mk b/libs/freetype/builds/unix/unix.mk index e660fafa9..3505175b5 100644 --- a/libs/freetype/builds/unix/unix.mk +++ b/libs/freetype/builds/unix/unix.mk @@ -3,7 +3,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/unix/unixddef.mk b/libs/freetype/builds/unix/unixddef.mk index 923773e09..71973471d 100644 --- a/libs/freetype/builds/unix/unixddef.mk +++ b/libs/freetype/builds/unix/unixddef.mk @@ -4,7 +4,7 @@ # -# Copyright (C) 1996-2022 by +# Copyright (C) 1996-2023 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/libs/freetype/builds/vms/LIBS.OPT_IA64 b/libs/freetype/builds/vms/LIBS.OPT_IA64 deleted file mode 100644 index 6768c7662..000000000 Binary files a/libs/freetype/builds/vms/LIBS.OPT_IA64 and /dev/null differ diff --git a/libs/freetype/builds/vms/_LINK.OPT_IA64 b/libs/freetype/builds/vms/_LINK.OPT_IA64 deleted file mode 100644 index b8cbd1bc7..000000000 Binary files a/libs/freetype/builds/vms/_LINK.OPT_IA64 and /dev/null differ diff --git a/libs/freetype/builds/vms/apinames_vms.bash b/libs/freetype/builds/vms/apinames_vms.bash new file mode 100644 index 000000000..e9b1b727b --- /dev/null +++ b/libs/freetype/builds/vms/apinames_vms.bash @@ -0,0 +1,2 @@ +src/tools/apinames -wV include/freetype/*.h > freetype_vms0.opt +mv freetype_vms0.opt freetype_vms.opt diff --git a/libs/freetype/builds/vms/ftconfig.h b/libs/freetype/builds/vms/ftconfig.h index 8f5ca9671..31dfcecbd 100644 --- a/libs/freetype/builds/vms/ftconfig.h +++ b/libs/freetype/builds/vms/ftconfig.h @@ -4,7 +4,7 @@ * * VMS-specific configuration file (specification only). * - * Copyright (C) 1996-2022 by + * Copyright (C) 1996-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/libs/freetype/builds/vms/ftsystem.c b/libs/freetype/builds/vms/ftsystem.c index e700eac5c..0afd07d91 100644 --- a/libs/freetype/builds/vms/ftsystem.c +++ b/libs/freetype/builds/vms/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* VMS-specific FreeType low-level system interface (body). */ /* */ -/* Copyright (C) 1996-2022 by */ +/* Copyright (C) 1996-2023 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/libs/freetype/builds/vms/vmslib.dat b/libs/freetype/builds/vms/vmslib.dat deleted file mode 100644 index 4c817da44..000000000 --- a/libs/freetype/builds/vms/vmslib.dat +++ /dev/null @@ -1,28 +0,0 @@ -! -! This is a simple driver file with information used by make.com to -! check if external libraries (like t1lib and freetype) are available on -! the system. -! -! Layout of the file: -! -! - Lines starting with ! are treated as comments -! - Elements in a data line are separated by # signs -! - The elements need to be listed in the following order -! 1.) Name of the Library -! 2.) Location where the object library can be found -! 3.) Location where the include files for the library can be found -! 4.) Include file used to verify library location -! 5.) CPP define to pass to the build to indicate availability of -! the library -! -! Example: The following lines show how definitions -! might look like. They are site specific and the locations of the -! library and include files need almost certainly to be changed. -! -! Location: All of the libaries can be found at the following addresses -! -! ZLIB: http://www.decus.de:8080/www/vms/sw/zlib.htmlx -! -BZ2LIB # sys$library:libbz2.olb # decc$user_include: # bzlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB -PNGLIB # sys$library:libpng.olb # sys$library: # png.h # FT_CONFIG_OPTION_SYSTEM_ZLIB -ZLIB # sys$library:libz.olb # sys$library: # zlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB diff --git a/libs/freetype/builds/wince/ftdebug.c b/libs/freetype/builds/wince/ftdebug.c index 7a4fac5d2..6453f8d23 100644 --- a/libs/freetype/builds/wince/ftdebug.c +++ b/libs/freetype/builds/wince/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component for WinCE (body). * - * Copyright (C) 1996-2022 by + * Copyright (C) 1996-2023 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/libs/freetype/builds/wince/vc2005-ce/index.html b/libs/freetype/builds/wince/vc2005-ce/index.html index 2289c76b8..8ea6cfded 100644 --- a/libs/freetype/builds/wince/vc2005-ce/index.html +++ b/libs/freetype/builds/wince/vc2005-ce/index.html @@ -21,7 +21,7 @@

  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.12.0 sources:

    +It compiles the following libraries from the FreeType 2.13.2 sources:

      diff --git a/libs/freetype/builds/wince/vc2008-ce/index.html b/libs/freetype/builds/wince/vc2008-ce/index.html
      index de0f34058..a6e74f893 100644
      --- a/libs/freetype/builds/wince/vc2008-ce/index.html
      +++ b/libs/freetype/builds/wince/vc2008-ce/index.html
      @@ -21,7 +21,7 @@ 

    • PPC/SP WM6 (Windows Mobile 6)
    -It compiles the following libraries from the FreeType 2.12.0 sources:

    +It compiles the following libraries from the FreeType 2.13.2 sources: