Bug 1672411 - Update freetype2 to 2.10.4. r=jfkthame
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 28 Oct 2020 09:39:35 +0000
changeset 625022 7b80592017b72a6a92d794b32e68ee4b2ce267ba
parent 625021 14e2615846392e710d48c3e3b14b7de1476f347e
child 625023 2592edffe5f4a44c85d36c86c48f49abed0d7997
push id2472
push userffxbld-merge
push dateMon, 07 Dec 2020 19:30:50 +0000
treeherdermozilla-release@65e419b06959 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1672411
milestone84.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1672411 - Update freetype2 to 2.10.4. r=jfkthame Differential Revision: https://phabricator.services.mozilla.com/D94321
modules/freetype2/.clang-format
modules/freetype2/CMakeLists.txt
modules/freetype2/ChangeLog
modules/freetype2/ChangeLog.21
modules/freetype2/Jamfile
modules/freetype2/Jamrules
modules/freetype2/README
modules/freetype2/README.moz-patches
modules/freetype2/builds/amiga/include/config/ftmodule.h
modules/freetype2/builds/amiga/src/base/ftdebug.c
modules/freetype2/builds/amiga/src/base/ftsystem.c
modules/freetype2/builds/cmake/testbuild.sh
modules/freetype2/builds/mac/ftmac.c
modules/freetype2/builds/meson/extract_freetype_version.py
modules/freetype2/builds/meson/extract_libtool_version.py
modules/freetype2/builds/meson/generate_reference_docs.py
modules/freetype2/builds/meson/parse_modules_cfg.py
modules/freetype2/builds/meson/process_ftoption_h.py
modules/freetype2/builds/unix/config.guess
modules/freetype2/builds/unix/config.sub
modules/freetype2/builds/unix/configure
modules/freetype2/builds/unix/configure.ac
modules/freetype2/builds/unix/configure.raw
modules/freetype2/builds/unix/freetype2.m4
modules/freetype2/builds/unix/ftconfig.h.in
modules/freetype2/builds/unix/ftconfig.in
modules/freetype2/builds/unix/ftsystem.c
modules/freetype2/builds/vms/ftconfig.h
modules/freetype2/builds/vms/ftsystem.c
modules/freetype2/builds/wince/ftdebug.c
modules/freetype2/builds/wince/vc2005-ce/index.html
modules/freetype2/builds/wince/vc2008-ce/index.html
modules/freetype2/builds/windows/ftdebug.c
modules/freetype2/builds/windows/vc2010/index.html
modules/freetype2/builds/windows/visualc/index.html
modules/freetype2/builds/windows/visualce/index.html
modules/freetype2/devel/ftoption.h
modules/freetype2/docs/CHANGES
modules/freetype2/docs/INSTALL.ANY
modules/freetype2/docs/VERSIONS.TXT
modules/freetype2/docs/freetype-config.1
modules/freetype2/docs/reference/404.html
modules/freetype2/docs/reference/ft2-auto_hinter.html
modules/freetype2/docs/reference/ft2-base_interface.html
modules/freetype2/docs/reference/ft2-basic_types.html
modules/freetype2/docs/reference/ft2-bdf_fonts.html
modules/freetype2/docs/reference/ft2-bitmap_handling.html
modules/freetype2/docs/reference/ft2-bzip2.html
modules/freetype2/docs/reference/ft2-cache_subsystem.html
modules/freetype2/docs/reference/ft2-cff_driver.html
modules/freetype2/docs/reference/ft2-cid_fonts.html
modules/freetype2/docs/reference/ft2-color_management.html
modules/freetype2/docs/reference/ft2-computations.html
modules/freetype2/docs/reference/ft2-error_code_values.html
modules/freetype2/docs/reference/ft2-error_enumerations.html
modules/freetype2/docs/reference/ft2-font_formats.html
modules/freetype2/docs/reference/ft2-gasp_table.html
modules/freetype2/docs/reference/ft2-glyph_management.html
modules/freetype2/docs/reference/ft2-glyph_stroker.html
modules/freetype2/docs/reference/ft2-glyph_variants.html
modules/freetype2/docs/reference/ft2-gx_validation.html
modules/freetype2/docs/reference/ft2-gzip.html
modules/freetype2/docs/reference/ft2-header_file_macros.html
modules/freetype2/docs/reference/ft2-header_inclusion.html
modules/freetype2/docs/reference/ft2-incremental.html
modules/freetype2/docs/reference/ft2-index.html
modules/freetype2/docs/reference/ft2-layer_management.html
modules/freetype2/docs/reference/ft2-lcd_rendering.html
modules/freetype2/docs/reference/ft2-list_processing.html
modules/freetype2/docs/reference/ft2-lzw.html
modules/freetype2/docs/reference/ft2-mac_specific.html
modules/freetype2/docs/reference/ft2-module_management.html
modules/freetype2/docs/reference/ft2-multiple_masters.html
modules/freetype2/docs/reference/ft2-ot_validation.html
modules/freetype2/docs/reference/ft2-outline_processing.html
modules/freetype2/docs/reference/ft2-parameter_tags.html
modules/freetype2/docs/reference/ft2-pcf_driver.html
modules/freetype2/docs/reference/ft2-pfr_fonts.html
modules/freetype2/docs/reference/ft2-properties.html
modules/freetype2/docs/reference/ft2-quick_advance.html
modules/freetype2/docs/reference/ft2-raster.html
modules/freetype2/docs/reference/ft2-sfnt_names.html
modules/freetype2/docs/reference/ft2-sizes_management.html
modules/freetype2/docs/reference/ft2-system_interface.html
modules/freetype2/docs/reference/ft2-t1_cid_driver.html
modules/freetype2/docs/reference/ft2-truetype_engine.html
modules/freetype2/docs/reference/ft2-truetype_tables.html
modules/freetype2/docs/reference/ft2-tt_driver.html
modules/freetype2/docs/reference/ft2-type1_tables.html
modules/freetype2/docs/reference/ft2-user_allocation.html
modules/freetype2/docs/reference/ft2-version.html
modules/freetype2/docs/reference/ft2-winfnt_fonts.html
modules/freetype2/docs/reference/index.html
modules/freetype2/docs/reference/search/search_index.json
modules/freetype2/docs/reference/sitemap.xml
modules/freetype2/docs/reference/sitemap.xml.gz
modules/freetype2/include/freetype/config/ftconfig.h
modules/freetype2/include/freetype/config/ftheader.h
modules/freetype2/include/freetype/config/ftmodule.h
modules/freetype2/include/freetype/config/ftoption.h
modules/freetype2/include/freetype/config/integer-types.h
modules/freetype2/include/freetype/config/mac-support.h
modules/freetype2/include/freetype/config/public-macros.h
modules/freetype2/include/freetype/freetype.h
modules/freetype2/include/freetype/ftadvanc.h
modules/freetype2/include/freetype/ftbbox.h
modules/freetype2/include/freetype/ftbdf.h
modules/freetype2/include/freetype/ftbitmap.h
modules/freetype2/include/freetype/ftbzip2.h
modules/freetype2/include/freetype/ftcache.h
modules/freetype2/include/freetype/ftcid.h
modules/freetype2/include/freetype/ftcolor.h
modules/freetype2/include/freetype/ftdriver.h
modules/freetype2/include/freetype/fterrors.h
modules/freetype2/include/freetype/ftfntfmt.h
modules/freetype2/include/freetype/ftgasp.h
modules/freetype2/include/freetype/ftglyph.h
modules/freetype2/include/freetype/ftgxval.h
modules/freetype2/include/freetype/ftgzip.h
modules/freetype2/include/freetype/ftimage.h
modules/freetype2/include/freetype/ftincrem.h
modules/freetype2/include/freetype/ftlcdfil.h
modules/freetype2/include/freetype/ftlist.h
modules/freetype2/include/freetype/ftlzw.h
modules/freetype2/include/freetype/ftmac.h
modules/freetype2/include/freetype/ftmm.h
modules/freetype2/include/freetype/ftmodapi.h
modules/freetype2/include/freetype/ftmoderr.h
modules/freetype2/include/freetype/ftotval.h
modules/freetype2/include/freetype/ftoutln.h
modules/freetype2/include/freetype/ftparams.h
modules/freetype2/include/freetype/ftpfr.h
modules/freetype2/include/freetype/ftrender.h
modules/freetype2/include/freetype/ftsizes.h
modules/freetype2/include/freetype/ftsnames.h
modules/freetype2/include/freetype/ftstroke.h
modules/freetype2/include/freetype/ftsynth.h
modules/freetype2/include/freetype/ftsystem.h
modules/freetype2/include/freetype/fttrigon.h
modules/freetype2/include/freetype/fttypes.h
modules/freetype2/include/freetype/ftwinfnt.h
modules/freetype2/include/freetype/internal/autohint.h
modules/freetype2/include/freetype/internal/cffotypes.h
modules/freetype2/include/freetype/internal/cfftypes.h
modules/freetype2/include/freetype/internal/compiler-macros.h
modules/freetype2/include/freetype/internal/ftcalc.h
modules/freetype2/include/freetype/internal/ftdebug.h
modules/freetype2/include/freetype/internal/ftdrv.h
modules/freetype2/include/freetype/internal/ftgloadr.h
modules/freetype2/include/freetype/internal/fthash.h
modules/freetype2/include/freetype/internal/ftmemory.h
modules/freetype2/include/freetype/internal/ftobjs.h
modules/freetype2/include/freetype/internal/ftpsprop.h
modules/freetype2/include/freetype/internal/ftrfork.h
modules/freetype2/include/freetype/internal/ftserv.h
modules/freetype2/include/freetype/internal/ftstream.h
modules/freetype2/include/freetype/internal/ftvalid.h
modules/freetype2/include/freetype/internal/internal.h
modules/freetype2/include/freetype/internal/psaux.h
modules/freetype2/include/freetype/internal/pshints.h
modules/freetype2/include/freetype/internal/services/svbdf.h
modules/freetype2/include/freetype/internal/services/svcfftl.h
modules/freetype2/include/freetype/internal/services/svcid.h
modules/freetype2/include/freetype/internal/services/svfntfmt.h
modules/freetype2/include/freetype/internal/services/svgldict.h
modules/freetype2/include/freetype/internal/services/svgxval.h
modules/freetype2/include/freetype/internal/services/svkern.h
modules/freetype2/include/freetype/internal/services/svmetric.h
modules/freetype2/include/freetype/internal/services/svmm.h
modules/freetype2/include/freetype/internal/services/svotval.h
modules/freetype2/include/freetype/internal/services/svpfr.h
modules/freetype2/include/freetype/internal/services/svpostnm.h
modules/freetype2/include/freetype/internal/services/svpscmap.h
modules/freetype2/include/freetype/internal/services/svpsinfo.h
modules/freetype2/include/freetype/internal/services/svsfnt.h
modules/freetype2/include/freetype/internal/services/svttcmap.h
modules/freetype2/include/freetype/internal/services/svtteng.h
modules/freetype2/include/freetype/internal/services/svttglyf.h
modules/freetype2/include/freetype/internal/services/svwinfnt.h
modules/freetype2/include/freetype/internal/sfnt.h
modules/freetype2/include/freetype/internal/t1types.h
modules/freetype2/include/freetype/internal/tttypes.h
modules/freetype2/include/freetype/internal/wofftypes.h
modules/freetype2/include/freetype/t1tables.h
modules/freetype2/include/freetype/ttnameid.h
modules/freetype2/include/freetype/tttables.h
modules/freetype2/include/freetype/tttags.h
modules/freetype2/include/ft2build.h
modules/freetype2/meson.build
modules/freetype2/meson_options.txt
modules/freetype2/src/Jamfile
modules/freetype2/src/autofit/Jamfile
modules/freetype2/src/autofit/afblue.c
modules/freetype2/src/autofit/afblue.dat
modules/freetype2/src/autofit/afblue.h
modules/freetype2/src/autofit/afcjk.c
modules/freetype2/src/autofit/aferrors.h
modules/freetype2/src/autofit/afglobal.c
modules/freetype2/src/autofit/afhints.c
modules/freetype2/src/autofit/aflatin.c
modules/freetype2/src/autofit/aflatin2.c
modules/freetype2/src/autofit/afloader.c
modules/freetype2/src/autofit/afmodule.c
modules/freetype2/src/autofit/afmodule.h
modules/freetype2/src/autofit/afranges.c
modules/freetype2/src/autofit/afscript.h
modules/freetype2/src/autofit/afshaper.c
modules/freetype2/src/autofit/afshaper.h
modules/freetype2/src/autofit/afstyles.h
modules/freetype2/src/autofit/aftypes.h
modules/freetype2/src/autofit/autofit.c
modules/freetype2/src/base/Jamfile
modules/freetype2/src/base/ftadvanc.c
modules/freetype2/src/base/ftbase.c
modules/freetype2/src/base/ftbase.h
modules/freetype2/src/base/ftbbox.c
modules/freetype2/src/base/ftbdf.c
modules/freetype2/src/base/ftbitmap.c
modules/freetype2/src/base/ftcalc.c
modules/freetype2/src/base/ftcid.c
modules/freetype2/src/base/ftcolor.c
modules/freetype2/src/base/ftdbgmem.c
modules/freetype2/src/base/ftdebug.c
modules/freetype2/src/base/fterrors.c
modules/freetype2/src/base/ftfntfmt.c
modules/freetype2/src/base/ftfstype.c
modules/freetype2/src/base/ftgasp.c
modules/freetype2/src/base/ftgloadr.c
modules/freetype2/src/base/ftglyph.c
modules/freetype2/src/base/ftgxval.c
modules/freetype2/src/base/fthash.c
modules/freetype2/src/base/ftinit.c
modules/freetype2/src/base/ftlcdfil.c
modules/freetype2/src/base/ftmac.c
modules/freetype2/src/base/ftmm.c
modules/freetype2/src/base/ftobjs.c
modules/freetype2/src/base/ftotval.c
modules/freetype2/src/base/ftoutln.c
modules/freetype2/src/base/ftpatent.c
modules/freetype2/src/base/ftpfr.c
modules/freetype2/src/base/ftpsprop.c
modules/freetype2/src/base/ftrfork.c
modules/freetype2/src/base/ftsnames.c
modules/freetype2/src/base/ftstream.c
modules/freetype2/src/base/ftstroke.c
modules/freetype2/src/base/ftsynth.c
modules/freetype2/src/base/ftsystem.c
modules/freetype2/src/base/fttrigon.c
modules/freetype2/src/base/fttype1.c
modules/freetype2/src/base/ftutil.c
modules/freetype2/src/base/ftver.rc
modules/freetype2/src/base/ftwinfnt.c
modules/freetype2/src/bdf/Jamfile
modules/freetype2/src/bdf/bdf.c
modules/freetype2/src/bdf/bdf.h
modules/freetype2/src/bdf/bdfdrivr.c
modules/freetype2/src/bdf/bdfdrivr.h
modules/freetype2/src/bdf/bdferror.h
modules/freetype2/src/bdf/bdflib.c
modules/freetype2/src/bzip2/Jamfile
modules/freetype2/src/bzip2/ftbzip2.c
modules/freetype2/src/cache/Jamfile
modules/freetype2/src/cache/ftcache.c
modules/freetype2/src/cache/ftcbasic.c
modules/freetype2/src/cache/ftccache.c
modules/freetype2/src/cache/ftccache.h
modules/freetype2/src/cache/ftccback.h
modules/freetype2/src/cache/ftccmap.c
modules/freetype2/src/cache/ftcerror.h
modules/freetype2/src/cache/ftcglyph.c
modules/freetype2/src/cache/ftcglyph.h
modules/freetype2/src/cache/ftcimage.c
modules/freetype2/src/cache/ftcimage.h
modules/freetype2/src/cache/ftcmanag.c
modules/freetype2/src/cache/ftcmanag.h
modules/freetype2/src/cache/ftcmru.c
modules/freetype2/src/cache/ftcmru.h
modules/freetype2/src/cache/ftcsbits.c
modules/freetype2/src/cache/ftcsbits.h
modules/freetype2/src/cff/Jamfile
modules/freetype2/src/cff/cff.c
modules/freetype2/src/cff/cffcmap.c
modules/freetype2/src/cff/cffcmap.h
modules/freetype2/src/cff/cffdrivr.c
modules/freetype2/src/cff/cffdrivr.h
modules/freetype2/src/cff/cfferrs.h
modules/freetype2/src/cff/cffgload.c
modules/freetype2/src/cff/cffgload.h
modules/freetype2/src/cff/cffload.c
modules/freetype2/src/cff/cffload.h
modules/freetype2/src/cff/cffobjs.c
modules/freetype2/src/cff/cffobjs.h
modules/freetype2/src/cff/cffparse.c
modules/freetype2/src/cff/cffparse.h
modules/freetype2/src/cid/Jamfile
modules/freetype2/src/cid/ciderrs.h
modules/freetype2/src/cid/cidgload.c
modules/freetype2/src/cid/cidgload.h
modules/freetype2/src/cid/cidload.c
modules/freetype2/src/cid/cidload.h
modules/freetype2/src/cid/cidobjs.c
modules/freetype2/src/cid/cidobjs.h
modules/freetype2/src/cid/cidparse.c
modules/freetype2/src/cid/cidparse.h
modules/freetype2/src/cid/cidriver.c
modules/freetype2/src/cid/cidriver.h
modules/freetype2/src/cid/type1cid.c
modules/freetype2/src/gxvalid/Jamfile
modules/freetype2/src/gxvalid/gxvalid.c
modules/freetype2/src/gxvalid/gxvalid.h
modules/freetype2/src/gxvalid/gxvcommn.h
modules/freetype2/src/gxvalid/gxverror.h
modules/freetype2/src/gxvalid/gxvjust.c
modules/freetype2/src/gxvalid/gxvkern.c
modules/freetype2/src/gxvalid/gxvmod.c
modules/freetype2/src/gxvalid/gxvmod.h
modules/freetype2/src/gxvalid/gxvmort.h
modules/freetype2/src/gxvalid/gxvmorx.h
modules/freetype2/src/gzip/Jamfile
modules/freetype2/src/gzip/ftgzip.c
modules/freetype2/src/lzw/Jamfile
modules/freetype2/src/lzw/ftlzw.c
modules/freetype2/src/lzw/ftzopen.c
modules/freetype2/src/lzw/ftzopen.h
modules/freetype2/src/otvalid/Jamfile
modules/freetype2/src/otvalid/otvalid.c
modules/freetype2/src/otvalid/otvalid.h
modules/freetype2/src/otvalid/otvcommn.h
modules/freetype2/src/otvalid/otverror.h
modules/freetype2/src/otvalid/otvmod.c
modules/freetype2/src/otvalid/otvmod.h
modules/freetype2/src/pcf/Jamfile
modules/freetype2/src/pcf/pcf.c
modules/freetype2/src/pcf/pcf.h
modules/freetype2/src/pcf/pcfdrivr.c
modules/freetype2/src/pcf/pcfdrivr.h
modules/freetype2/src/pcf/pcferror.h
modules/freetype2/src/pcf/pcfread.c
modules/freetype2/src/pcf/pcfread.h
modules/freetype2/src/pcf/pcfutil.c
modules/freetype2/src/pcf/pcfutil.h
modules/freetype2/src/pfr/Jamfile
modules/freetype2/src/pfr/pfr.c
modules/freetype2/src/pfr/pfrcmap.c
modules/freetype2/src/pfr/pfrcmap.h
modules/freetype2/src/pfr/pfrdrivr.c
modules/freetype2/src/pfr/pfrdrivr.h
modules/freetype2/src/pfr/pfrerror.h
modules/freetype2/src/pfr/pfrgload.c
modules/freetype2/src/pfr/pfrload.c
modules/freetype2/src/pfr/pfrload.h
modules/freetype2/src/pfr/pfrobjs.c
modules/freetype2/src/pfr/pfrsbit.c
modules/freetype2/src/pfr/pfrtypes.h
modules/freetype2/src/psaux/Jamfile
modules/freetype2/src/psaux/afmparse.c
modules/freetype2/src/psaux/afmparse.h
modules/freetype2/src/psaux/cffdecode.c
modules/freetype2/src/psaux/cffdecode.h
modules/freetype2/src/psaux/psarrst.c
modules/freetype2/src/psaux/psaux.c
modules/freetype2/src/psaux/psauxerr.h
modules/freetype2/src/psaux/psauxmod.c
modules/freetype2/src/psaux/psauxmod.h
modules/freetype2/src/psaux/psblues.c
modules/freetype2/src/psaux/psconv.c
modules/freetype2/src/psaux/psconv.h
modules/freetype2/src/psaux/pserror.h
modules/freetype2/src/psaux/psfont.c
modules/freetype2/src/psaux/psfont.h
modules/freetype2/src/psaux/psft.c
modules/freetype2/src/psaux/psft.h
modules/freetype2/src/psaux/pshints.c
modules/freetype2/src/psaux/psintrp.c
modules/freetype2/src/psaux/psobjs.c
modules/freetype2/src/psaux/psobjs.h
modules/freetype2/src/psaux/psread.c
modules/freetype2/src/psaux/psstack.c
modules/freetype2/src/psaux/psstack.h
modules/freetype2/src/psaux/pstypes.h
modules/freetype2/src/psaux/t1cmap.c
modules/freetype2/src/psaux/t1cmap.h
modules/freetype2/src/psaux/t1decode.c
modules/freetype2/src/psaux/t1decode.h
modules/freetype2/src/pshinter/Jamfile
modules/freetype2/src/pshinter/pshalgo.c
modules/freetype2/src/pshinter/pshglob.c
modules/freetype2/src/pshinter/pshglob.h
modules/freetype2/src/pshinter/pshinter.c
modules/freetype2/src/pshinter/pshmod.c
modules/freetype2/src/pshinter/pshmod.h
modules/freetype2/src/pshinter/pshnterr.h
modules/freetype2/src/pshinter/pshrec.c
modules/freetype2/src/pshinter/pshrec.h
modules/freetype2/src/psnames/Jamfile
modules/freetype2/src/psnames/psmodule.c
modules/freetype2/src/psnames/psmodule.h
modules/freetype2/src/psnames/psnamerr.h
modules/freetype2/src/psnames/psnames.c
modules/freetype2/src/raster/Jamfile
modules/freetype2/src/raster/ftraster.c
modules/freetype2/src/raster/ftraster.h
modules/freetype2/src/raster/ftrend1.c
modules/freetype2/src/raster/ftrend1.h
modules/freetype2/src/raster/raster.c
modules/freetype2/src/raster/rasterrs.h
modules/freetype2/src/sfnt/Jamfile
modules/freetype2/src/sfnt/pngshim.c
modules/freetype2/src/sfnt/pngshim.h
modules/freetype2/src/sfnt/sfdriver.c
modules/freetype2/src/sfnt/sfdriver.h
modules/freetype2/src/sfnt/sferrors.h
modules/freetype2/src/sfnt/sfnt.c
modules/freetype2/src/sfnt/sfobjs.c
modules/freetype2/src/sfnt/sfobjs.h
modules/freetype2/src/sfnt/sfwoff.c
modules/freetype2/src/sfnt/sfwoff.h
modules/freetype2/src/sfnt/sfwoff2.c
modules/freetype2/src/sfnt/sfwoff2.h
modules/freetype2/src/sfnt/ttbdf.c
modules/freetype2/src/sfnt/ttbdf.h
modules/freetype2/src/sfnt/ttcmap.c
modules/freetype2/src/sfnt/ttcmap.h
modules/freetype2/src/sfnt/ttcolr.c
modules/freetype2/src/sfnt/ttcolr.h
modules/freetype2/src/sfnt/ttcpal.c
modules/freetype2/src/sfnt/ttcpal.h
modules/freetype2/src/sfnt/ttkern.c
modules/freetype2/src/sfnt/ttkern.h
modules/freetype2/src/sfnt/ttload.c
modules/freetype2/src/sfnt/ttload.h
modules/freetype2/src/sfnt/ttmtx.c
modules/freetype2/src/sfnt/ttmtx.h
modules/freetype2/src/sfnt/ttpost.c
modules/freetype2/src/sfnt/ttpost.h
modules/freetype2/src/sfnt/ttsbit.c
modules/freetype2/src/sfnt/ttsbit.h
modules/freetype2/src/sfnt/woff2tags.c
modules/freetype2/src/sfnt/woff2tags.h
modules/freetype2/src/smooth/Jamfile
modules/freetype2/src/smooth/ftgrays.c
modules/freetype2/src/smooth/ftgrays.h
modules/freetype2/src/smooth/ftsmerrs.h
modules/freetype2/src/smooth/ftsmooth.c
modules/freetype2/src/smooth/ftsmooth.h
modules/freetype2/src/smooth/module.mk
modules/freetype2/src/smooth/smooth.c
modules/freetype2/src/tools/Jamfile
modules/freetype2/src/tools/ftrandom/ftrandom.c
modules/freetype2/src/tools/make_distribution_archives.py
modules/freetype2/src/tools/test_afm.c
modules/freetype2/src/tools/test_bbox.c
modules/freetype2/src/tools/test_trig.c
modules/freetype2/src/truetype/Jamfile
modules/freetype2/src/truetype/truetype.c
modules/freetype2/src/truetype/ttdriver.c
modules/freetype2/src/truetype/ttdriver.h
modules/freetype2/src/truetype/tterrors.h
modules/freetype2/src/truetype/ttgload.c
modules/freetype2/src/truetype/ttgload.h
modules/freetype2/src/truetype/ttgxvar.c
modules/freetype2/src/truetype/ttgxvar.h
modules/freetype2/src/truetype/ttinterp.c
modules/freetype2/src/truetype/ttinterp.h
modules/freetype2/src/truetype/ttobjs.c
modules/freetype2/src/truetype/ttobjs.h
modules/freetype2/src/truetype/ttpload.c
modules/freetype2/src/truetype/ttpload.h
modules/freetype2/src/truetype/ttsubpix.c
modules/freetype2/src/truetype/ttsubpix.h
modules/freetype2/src/type1/Jamfile
modules/freetype2/src/type1/t1afm.c
modules/freetype2/src/type1/t1afm.h
modules/freetype2/src/type1/t1driver.c
modules/freetype2/src/type1/t1driver.h
modules/freetype2/src/type1/t1errors.h
modules/freetype2/src/type1/t1gload.c
modules/freetype2/src/type1/t1gload.h
modules/freetype2/src/type1/t1load.c
modules/freetype2/src/type1/t1load.h
modules/freetype2/src/type1/t1objs.c
modules/freetype2/src/type1/t1objs.h
modules/freetype2/src/type1/t1parse.c
modules/freetype2/src/type1/t1parse.h
modules/freetype2/src/type1/type1.c
modules/freetype2/src/type42/Jamfile
modules/freetype2/src/type42/t42drivr.c
modules/freetype2/src/type42/t42drivr.h
modules/freetype2/src/type42/t42error.h
modules/freetype2/src/type42/t42objs.c
modules/freetype2/src/type42/t42objs.h
modules/freetype2/src/type42/t42parse.c
modules/freetype2/src/type42/t42parse.h
modules/freetype2/src/type42/t42types.h
modules/freetype2/src/type42/type42.c
modules/freetype2/src/winfonts/Jamfile
modules/freetype2/src/winfonts/fnterrs.h
modules/freetype2/src/winfonts/winfnt.c
modules/freetype2/src/winfonts/winfnt.h
new file mode 100644
--- /dev/null
+++ b/modules/freetype2/.clang-format
@@ -0,0 +1,16 @@
+BasedOnStyle: Chromium
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: true
+AlignConsecutiveDeclarations: true
+AlignConsecutiveMacros: true
+AlignEscapedNewlines: true
+# AlignOperands: Align
+AlignTrailingComments: true
+AlwaysBreakAfterReturnType: AllDefinitions
+BreakBeforeBraces: Allman
+ColumnLimit: 80
+DerivePointerAlignment: false
+IndentCaseLabels: false
+PointerAlignment: Left
+SpaceBeforeParens: ControlStatements
+SpacesInParentheses: true
--- a/modules/freetype2/CMakeLists.txt
+++ b/modules/freetype2/CMakeLists.txt
@@ -142,17 +142,17 @@ else ()
   endif ()
 endif ()
 
 
 project(freetype C)
 
 set(VERSION_MAJOR "2")
 set(VERSION_MINOR "10")
-set(VERSION_PATCH "2")
+set(VERSION_PATCH "4")
 
 # Generate LIBRARY_VERSION and LIBRARY_SOVERSION.
 set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'")
 file(STRINGS "${PROJECT_SOURCE_DIR}/builds/unix/configure.raw"
   VERSION_INFO
   REGEX ${LIBTOOL_REGEX})
 string(REGEX REPLACE
   ${LIBTOOL_REGEX} "\\1"
@@ -235,37 +235,29 @@ if (FT_WITH_BROTLI)
 else ()
   find_package(BrotliDec)
 endif ()
 
 # Create the configuration file
 if (UNIX)
   check_include_file("unistd.h" HAVE_UNISTD_H)
   check_include_file("fcntl.h" HAVE_FCNTL_H)
-  check_include_file("stdint.h" HAVE_STDINT_H)
 
-  file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in"
+  file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in"
     FTCONFIG_H)
   if (HAVE_UNISTD_H)
     string(REGEX REPLACE
       "#undef +(HAVE_UNISTD_H)" "#define \\1 1"
       FTCONFIG_H "${FTCONFIG_H}")
   endif ()
   if (HAVE_FCNTL_H)
     string(REGEX REPLACE
       "#undef +(HAVE_FCNTL_H)" "#define \\1 1"
       FTCONFIG_H "${FTCONFIG_H}")
   endif ()
-  if (HAVE_STDINT_H)
-    string(REGEX REPLACE
-      "#undef +(HAVE_STDINT_H)" "#define \\1 1"
-      FTCONFIG_H "${FTCONFIG_H}")
-  endif ()
-  string(REPLACE "/undef " "#undef "
-    FTCONFIG_H "${FTCONFIG_H}")
 else ()
   file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
     FTCONFIG_H)
 endif ()
 
 set(FTCONFIG_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
 if (EXISTS "${FTCONFIG_H_NAME}")
   file(READ "${FTCONFIG_H_NAME}" ORIGINAL_FTCONFIG_H)
@@ -530,29 +522,39 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT S
     endif ()
 
     install(
       FILES ${PROJECT_BINARY_DIR}/freetype2.pc
       DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
       COMPONENT pkgconfig)
   endif ()
 
+  include(CMakePackageConfigHelpers)
+  write_basic_package_version_file(
+    ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
+    VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
+    COMPATIBILITY SameMajorVersion)
+
   install(
     TARGETS freetype
       EXPORT freetype-targets
       LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
       ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
       RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
       FRAMEWORK DESTINATION Library/Frameworks
       COMPONENT libraries)
   install(
     EXPORT freetype-targets
       DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
       FILE freetype-config.cmake
       COMPONENT headers)
+  install(
+    FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
+    COMPONENT headers)
 endif ()
 
 
 # Packaging
 set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.")
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/docs/LICENSE.TXT")
--- a/modules/freetype2/ChangeLog
+++ b/modules/freetype2/ChangeLog
@@ -1,8 +1,787 @@
+2020-10-20  Werner Lemberg  <wl@gnu.org>
+
+	* Version 2.10.4 released.
+	==========================
+
+
+	Tag sources with `VER-2-10-4'.
+
+	* docs/VERSION.TXT: Add entry for version 2.10.4.
+	* 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.10.3/2.10.4/, s/2103/2104/.
+
+	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+
+	* builds/unix/configure.raw (version_info): Set to 23:4:17.
+	* CMakeLists.txt (VERSION_PATCH): Set to 4.
+
+2020-10-19  Werner Lemberg  <wl@gnu.org>
+
+	[sfnt] Fix heap buffer overflow (#59308).
+
+	This is CVE-2020-15999.
+
+	* src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier.
+
+2020-10-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	* src/sfnt/tt{colr,cpal}.c: Fix signedness warnings from VC++.
+
+2020-10-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	* src/sfnt/sfwoff2.c (Read255UShort): Tweak types to please VC++.
+
+2020-10-10  Werner Lemberg  <wl@gnu.org>
+
+	* Version 2.10.3 released.
+	==========================
+
+
+	Tag sources with `VER-2-10-3'.
+
+	* docs/VERSION.TXT: Add entry for version 2.10.3.
+
+	* 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.10.2/2.10.3/, s/2102/2103/.
+
+	* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
+
+	* builds/unix/configure.raw (version_info): Set to 23:3:17.
+	* CMakeLists.txt (VERSION_PATCH): Set to 3.
+
+2020-09-25  Werner Lemberg  <wl@gnu.org>
+
+	[autofit] Synchronize with ttfautohint.
+
+	This corresponds to the following commits in the ttfautohint git
+	repository:
+
+	  bb6842bd3bd437b7b4a7921b0376c860f5e73d18  Typo, formatting.
+	  d5c91ddb1cb310257a3dfe9a8e20e1fc51335faa  Add Medefaidrin script.
+
+	* src/autofit/afblue.dat: Add blue zone data for Medefaidrin.
+	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+	* src/autofit/afscript.h: Add Medefaidrin standard characters.
+
+	* src/autofit/afranges.c, src/autofit/afstyles.h: Add Medefaidrin
+	data.
+
+2020-09-25  Werner Lemberg  <wl@gnu.org>
+
+	Move `scripts/make_distribution_archives.py` to `src/tools`.
+
+	* scr/tools/scripts/make_distribution_archives.py: (_TOP_DIR,
+	_SCRIPT_DIR): Updated to new location.
+	(main): s/shutils.copyfile/shutils.copy/ to preserve file
+	permissions.
+	(main): Prefix source file paths with `git_dir` while copying files
+	to allow calls of the script from other places than the top-level
+	directory.
+
+2020-09-24  Werner Lemberg  <wl@gnu.org>
+
+	* src/cff/cffgload.c (cff_slot_load): Scale `vertBearingY`.
+
+	Towards the end of the the function there is a call to
+	`FT_Outline_Get_CBox` that retrieves the glyph bbox in scaled units.
+	That sets `horiBearing{X,Y}` and `vertBearingX` but `vertBearingY`
+	is left alone, and is not scaled.
+
+	Patch from Eric Muller <emuller@amazon.com>.
+
+2020-09-24  Werner Lemberg  <wl@gnu.org>
+
+	* src/base/ftobjs.c (FT_Load_Glyph): Trace glyph metrics.
+
+2020-09-22  Werner Lemberg  <wl@gnu.org>
+
+	[meson] Move auxiliary scripts to `builds/meson`.
+
+	Suggested by Alexei.
+
+	* scripts/*.py: Move meson scripts to...
+	* builds/meson/*.py: ... this new location.
+
+	* meson.build: Updated.
+
+2020-09-21  David Turner  <david@freetype.org>
+
+	Add python script for building tarballs.
+
+	* scripts/make_distribution_archives.py: New file.
+
+	This standalone Python script should be equivalent to running `make
+	dist` with the Make-based build system, with the following minor
+	differences:
+
+	- Since `make distclean` doesn't always clean up `objs/` properly,
+	  `make dist` archives may contain some stale binaries like
+	  `objs/.libs/libfreetype.so.6` or others.
+
+	- `config.guess` and `config.sub` are not updated unless option
+	  `--gnu-config-dir=DIR` is used to specify the location of these
+	  files.
+
+	- Some bits of the auto-generated reference documentation may
+	  appear in slightly different order, probably due to issues related
+	  to mkdocs and docwriter.
+
+	As an example, the call
+
+	  scripts/make_distribution_archives.py /tmp/freetype2-dist
+
+	creates the following files under `/tmp/freetype2-dist`:
+
+	  freetype-<version>.tar.gz
+	  freetype-<version>.tar.xz
+	  ft<winversion>.zip
+
+2020-09-21  Werner Lemberg  <wl@gnu.org>
+
+	* scripts/extract_freetype_version.py: Fix regex typos.
+
+2020-09-21  David Turner  <david@freetype.org>
+
+	Add Meson build project file.
+
+	Example usage:
+
+	  # Configure Meson build in directory `build-meson` to generate
+	  # release binaries comparable to to the ones from the
+	  # autotools/make build system.
+	  meson setup build-meson \
+	        --prefix=/usr/local \
+	        --buildtype=debugoptimized \
+	        --strip \
+	        -Db_ndebug=true
+
+	  # After configuring the Meson build with the above command,
+	  # compile and install to `/usr/local/`; this includes a pkg-config
+	  # file.
+	  ninja -C build-meson install
+
+	  # Alternatively, compile and install to `/tmp/aa/usr/local/...`
+	  # for packaging.
+	  DESTDIR=/tmp/aa ninja -C build-meson install
+
+	  # Generate documentation under `build-meson/docs`.
+	  ninja -C build-meson docs
+
+	Library size comparison for stripped `libfreetype.so` generated by
+	all three build systems:
+
+	  - Default build (autotools + libtool): 712 KiB
+	  - CMake build (RelWithDebInfo):        712 KiB
+	  - Meson build:                         712 KiB
+
+
+	* meson.build: New top-level Meson build file for the library.
+
+	* meson_options.txt: New file.  It holds user-selectable options for
+	the build, which can be printed with `meson configure`, and selected
+	at `meson setup` or `meson --reconfigure` time with
+	`-D<option>=<value>`.
+
+	* scripts/parse_modules_cfg.py: A script invoked by `meson.build` to
+	parse `modules.cfg` and extract important information out of it
+	(i.e., the list of modules).
+
+	* scripts/process_ftoption_h.py: New script invoked by `meson.build`
+	to process the original `ftoption.h` file.  It enables or disables
+	configuration macro variables based on the available dependencies.
+	This is similar to what other build systems are using (i.e., Meson's
+	`configure_file()` command is not used here).
+
+	* scripts/extract_freetype_version.py: New script invoked by
+	`meson.build` to extract the FreeType version number from
+	`<freetype/freetype.h>`.
+
+	* scripts/extract_libtool_version.py: New script invoked by
+	`meson.build` to extract the libtool `revision_info` data from
+	`builds/unix/configure.raw`, and to generate the corresponding
+	shared library suffix.
+
+	* scripts/generate_reference_docs.py: New script invoked by
+	`meson.build` to generate the FreeType 2 reference documentation
+	(using the `docwriter` and `mkdocs` packages, which must be already
+	installed).
+
+2020-09-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[raster] Improve the second pass (#58373).
+
+	Besides dropout control the second horizontal sweep is supposed to
+	clean up straight horizontal edges that are mishandled by the first
+	vertical sweep when a line passes through pixel centers.  This line
+	would present as perfectly aligned span edges in the second sweep.
+
+	* src/raster/ftraster.c (Horizontal_Sweep_Span): Replace the old
+	implementation with a better one focusing on aligned span edges only.
+
+2020-09-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[raster] Tune SMART macro (#58352).
+
+	Windows seems to perform smart dropout control at 26.6 precision.
+	To mimick Windows independent of increased precision, we need to tweak
+	the macro so that some close calls break down rather than up.
+
+	* src/raster/ftraster.c (SMART): Tweak the macro.
+
+2020-09-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[raster] Introduce SMART macro.
+
+	* src/raster/ftraster.c (SMART): New macro for smart dropout rounding.
+	(Verstical_Sweep_Drop, Horizontal_Sweep_Drop): Use it.
+
+2020-09-03  Boris Dalstein  <dalboris@gmail.com>
+
+	[build] Make CMake install basic version information.
+
+	* CMakeLists.txt: Do it.
+
+2020-09-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[truetype] Reduce Infinality footprint (cont'd).
+
+	* src/truetype/ttinterp.c (Ins_DELTAP): Shrink variable scope.
+	(Ins_SHPIX, Ins_MIRP): Revise if-logic.
+
+2020-09-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[truetype] Reduce Infinality footprint.
+
+	* src/truetype/ttinterp.c (Ins_SHPIX, Ins_MSIRP, Ins_MIAP, Ins_MDRP,
+	Ins_MIRP): Shrink variable scopes and consolidate ifdefs.
+
+2020-09-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[truetype] Refactor compensation color.
+
+	* src/truetype/ttinterp.h (TT_Round_Func): Change the last argument.
+	* src/truetype/ttinterp.c (Ins_ROUND, Ins_NROUND, Ins_MDAP, Ins_MIAP,
+	Ins_MDRP, Ins_MIRP): Move compensation retrieval from here...
+	(Round_*): ... to here.
+	* src/truetype/ttobjs.c (tt_size_init_bytecode): Reserve zero
+	compensation at color index 3.
+
+2020-08-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[smooth] Don't set target in direct mode.
+
+	* src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Remove assignment.
+	(ft_smooth_raster_lcd) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Ditto.
+
+2020-08-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	* src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Limit width.
+
+	Segmentation fault reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24729
+
+2020-08-22  Werner Lemberg  <wl@gnu.org>
+
+	* src/truetype/ttgload.c (TT_Get_VMetrics): Add tracing message.
+
+2020-08-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[truetype] Retain OVERLAP_SIMPLE and OVERLAP_COMPOUND.
+
+	For glyphs with OVERLAP_SIMPLE or OVERLAP_COMPOUND, set
+	FT_OUTLINE_OVERLAP to render them with direct oversampling, which
+	mitigates artifacts (see 3bb512bc9f62).
+
+	* include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Redefine to rhyme
+	with OVERLAP_SIMPLE.
+	* src/base/ftgloadr.c (FT_GlyphLoader_Rewind): Reset outline flags.
+	* src/truetype/ttgload.c
+	(TT_Load_Simple_Glyph): Retain OVERLAP_SIMPLE.
+	(load_truetype_glyph): Retain OVERLAP_COMPOUND.
+
+2020-08-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	* src/truetype/ttgload.c (TT_Load_Glyph): More tracing.
+
+2020-07-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	Hide internal functions with SunPro.
+
+	* include/freetype/internal/compiler-macros.h
+	(FT_INTERNAL_FUNCTION_ATTRIBUTE) <__SUNPRO_C>: Define as __hidden.
+
+2020-07-28  Anuj Verma  <anujv@iitbhilai.ac.in>
+
+	Fix static compilation with Visual C.
+
+	* include/freetype/internal/compiler-macros.h
+	(FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty.
+
+2020-07-28  Priyesh Kumar  <priyeshkkumar@gmail.com>
+
+	Fix `-Wformat' compiler warnings.
+
+	* src/*: Fix format specifiers.
+
+	* builds/unix/ftsystem.c (FT_Stream_Open): Ditto.
+
+2020-07-25  Werner Lemberg  <wl@gnu.org>
+
+	Fix `-Wformat' compiler warnings.
+
+	Problem reported by Priyesh kumar <priyeshkkumar@gmail.com>
+
+	* src/base/ftoutln.c (FT_Outline_Decompose): Fix number of arguments
+	to tracing macro.
+
+	* src/bdf/bdfdrivr.c (bdf_cmap_char_next, bdf_get_bdf_property):
+	Ditto.
+
+	* src/cache/ftcbasic.c (ftc_basic_family_get_count): Ditto.
+	Reformulate message.
+
+	* src/pcf/pcfdrivr.c (pcf_get_bdf_property): Ditto.
+
+	* src/sfnt/sfwoff2.c (woff2_open_font): Ditto.
+	Trace table offset, too.
+
+	* src/truetype/ttgxvar.c (ft_var_apply_tuple): Ditto.
+
+2020-07-23  Werner Lemberg  <wl@gnu.org>
+
+	* src/sfnt/sfwoff2.c (woff2_decompress): Fix compiler warning.
+
+	Reported by Hin-Tak.
+
+2020-07-12  Werner Lemberg  <wl@gnu.org>
+
+	* builds/unix/configure.raw: Fix inclusion of `ftoption.h'.
+
+2020-07-07  Werner Lemberg  <wl@gnu.org>
+
+	Fix clang warnings.
+
+	* include/freetype/internal/autohint.h
+	(FT_DECLARE_AUTOHINTER_INTERFACE): New macro.
+	* src/autofit/afmodule.h: Use it to declare
+	`af_autofitter_interface'.
+
+	* include/freetype/internal/ftobjs.h (FT_DECLARE_GLYPH): New macro.
+	* src/base/ftbase.h: Use it to declare `ft_bitmap_glyph_class' and
+	`ft_outline_glyph_class'.
+
+	* src/base/ftglyph.c: Include `ftbase.h'.
+
+	* src/cff/cffparse.c (cff_parser_run): Fix type of `t2_size'.
+
+	* src/pcf/pcfdrivr.c (pcf_cmap_char_next): Fix type of `result'.
+
+	* src/psaux/psauxmod.c (psaux_module_class): Use `FT_DEFINE_MODULE'.
+	* src/psaux/psauxmod.h: Declare `afm_parser_funcs',
+	`t1_cmap_classes', `cff_decoder_funcs', and `psaux_module_class'.
+
+	* src/pshinter/pshmod.c: Include `pshmod.h'.
+
+	* src/sfnt/sfwoff2.c (ROUND4, WRITE_SHORT): Fix implicit sign
+	conversion.
+	(compute_ULong_sum): Fix return type.
+	Fix implicit sign conversion.
+	(store_points): Fix type of `last_flag', `repeat_count', and `flag'.
+	Use casts to avoid warnings.
+	(reconstruct_glyf): Fix implicit sign conversion.
+	Use cast to avoid warning.
+	(get_x_mins): Fix implicit sign conversion.
+	* src/sfnt/ttcmap.c: Undef `TTCMAPCITEM'.
+	* src/sfnt/ttcmap.h: Define `TTCMAPCITEM' and include `ttcmapc.h' to
+	declare cmap classes.
+
+	* src/smooth/ftsmooth.c (ft_smooth_overlap_spans): Use cast.
+
+	* src/truetype/ttinterp.c (Ins_MIAP): Fix typo.
+
+2020-07-07  David Turner  <david@freetype.org>
+
+	[build] Really fix multi and C++ builds.
+
+	The following builds were still failing due to previous changes:
+
+	  make multi
+	  make multi CC="c++"
+	  make CC="c++"
+
+	This patch fixes the issues, which were missing includes to get the
+	right macro definitions in multi-build mode.
+
+	Also, `FT_UNUSED' is actually used by third-party code, so move it
+	back to `public-macros.h' to avoid breaking it.
+
+	* include/freetype/config/public-macros.h (FT_EXPORT): Remove
+	special definition for C++.
+	(FT_UNUSED): Define here instead of...
+	* include/freetype/config/compiler-macros.h: ... here.
+	(FT_FUNCTION_DECLARATION): Remove special definition for C++.
+	(FT_LOCAL_ARRAY_DEF): Fix definition.
+
+	* src/cache/ftccback.h, src/lzw/ftzopen.h, src/gxvalid/gxvmort.h,
+	src/gxvalid/gxvmorx.h: Add `FT_BEGIN_HEADER' and `FT_END_HEADER'.
+
+2020-07-06  David Turner  <david@freetype.org>
+
+	[build] Fix multi and C++ builds.
+
+	The following builds were failing due to previous changes:
+
+	  make multi
+	  make multi CC="c++"
+
+	* include/freetype/config/ftconfig.h: Remove `FT_END_HEADER'.
+
+	* include/freetype/config/ftheader.h (FT_BEGIN_HEADER,
+	FT_END_HEADER): Protect against redefinition.
+
+	* src/cache/ftccache.h, src/cache/ftcmru.h, src/pcf/pcfutil.h,
+	src/psaux/pserror.h, src/psaux/psft.h, src/psaux/psstack.h,
+	src/sfnt/woff2tags.h: Include `compiler-macros.h'.
+
+	* src/sfnt/woff2tags.c: Include `woff2tags.h'.
+
+2020-07-06  Werner Lemberg  <wl@gnu.org>
+
+	[psaux] Improve `t1_decoder_parse_metrics' (#58646).
+
+	* src/psaux/t1decode.c (t1_decoder_parse_metrics): Copy
+	corresponding code from old engine's `t1_decoder_parse_charstrings'
+	function to handle `op_callsubr' and `op_return'.
+
+2020-07-05  David Turner  <david@freetype.org>
+
+	[build] Improve visibility support of library function names.
+
+	* include/freetype/config/public-macros.h
+	(FT_PUBLIC_FUNCTION_ATTRIBUTE): New macro to tag functions as
+	public (and thus exportable).
+	(FT_EXPORT): Use it.
+
+	* include/freetype/config/compiler-macros.h
+	(FT_INTERNAL_FUNCTION_ATTRIBUTE): New macro to tag functions as
+	internal to the library (and thus hidden).  Note that on ELF
+	systems, all internal functions have hidden visibility, which avoids
+	the need to enforce this when invoking the compiler (e.g., with an
+	option like `-fvisibility=hidden').
+
+	(FT_FUNCTION_DECLARATION, FT_FUNCTION_DEFINITION): New base macros
+	to deal with C and C++ linkage issues at the same time.
+
+	(FT_LOCAL, FT_LOCAL_DEF, FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF,
+	FT_BASE, FT_BASE_DEF, FT_EXPORT_VAR, FT_BASE_CALLBACK,
+	FT_BASE_CALLBACK_DEF): Redefined using new macros.
+
+2020-07-05  David Turner  <david@freetype.org>
+
+	[build] Split off more stuff from `ftconfig.h'.
+
+	* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
+	include/freetype/config/ftconfig.h: Split off macro definitions
+	required by the FreeType API headers to...
+	* include/freetype/config/public-macros.h: ...this new file.
+
+	* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
+	include/freetype/config/ftconfig.h: Split off macro definitions used
+	by the library but not to be exposed to clients to...
+	* include/freetype/config/compiler-macros.h: ...this new file.
+
+	* include/freetype/internal/*.h, src/raster/ftraster.h: Include
+	`compiler-macros.h' where needed.
+
+2020-07-05  David Turner  <david@freetype.org>
+
+	[build] Move mac support code to `mac-support.h'.
+
+	* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
+	include/freetype/config/ftconfig.h: Split off mac-specific stuff
+	to...
+	* include/freetype/config/mac-support.h: ...this new file.
+
+	* CMakeLists.txt, builds/unix/configure.raw: Remove `/undef ->
+	#undef' string replacement; the affected code is no longer part of
+	the `ftconfig.h' template.
+
+2020-07-05  David Turner  <david@freetype.org>
+
+	[build] Put integer type definitions into `integer-types.h'.
+
+	Refactor some of the `ftconfig.h' headers and template to move the
+	definition of the FreeType integer types (e.g., `FT_Int16') to a
+	common header file `freetype/config/integer-types.h'.
+
+	* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
+	include/freetype/config/ftconfig.h: Split off integer type
+	definition stuff to...
+	* include/freetype/config/integer-types.h: ...this new file.
+
+	* builds/unix/ftconfig.h.in: Control the definition of
+	`FT_SIZEOF_INT' and `FT_SIZEOF_LONG' with macro
+	`FT_USE_AUTOCONF_SIZEOF_TYPES'.  If these are not defined, auto
+	detection happens in `integer-types.h' as usual based on `INTXX_MAX'
+	values.  Otherwise the autoconf-detected values are used.
+
+	* builds/unix/configure.raw (CPPFLAGS): Don't include path to
+	`config' directory.  Instead, ...
+	(FT_CONFIG_STANDARD_LIBRARY_H): Use complete path.
+
+2020-07-05  David Turner  <david@freetype.org>
+
+	[build] Rename `build/unix/ftconfig.in' to `ftconfig.h.in'.
+
+	Since we are no longer limited to 8.3 file names, it is simpler to
+	follow the usual conventions for template files.
+
+	* builds/unix/ftconfig.in: Renamed to...
+	* builds/unix/ftconfig.h.in: ...this.
+
+	* CMakeLists.txt, builds/unix/configure.raw: Updated.
+
+2020-07-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[smooth] Introduce direct oversampling for overlaps.
+
+	This implements oversampling to mitigate artifacts in pixels partially
+	covered by overlapping contours.  It turns out that the 4x4
+	oversampling is sufficient but, at least, quadruples the rendering
+	time.  The outline has to set FT_OUTLINE_OVERLAP to use this method.
+
+	* include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): New flag.
+	* src/smooth/ftsmooth.c (ft_smooth_render): Check it to...
+	(ft_smooth_raster_overlap): ... inflate outline and set up direct
+	rendering for oversampling with...
+	(ft_smooth_overlap_spans): ... new span function that integrates them.
+
+2020-07-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[smooth] Use direct rendering mode in Harmony.
+
+	Instead of rendering 3 bitmaps side by side and reshuffling, we use
+	direct rendering to deliver the bitmaps on each third byte.
+
+	* src/smooth/ftsmooth.c (ft_smooth_raster_lcd)
+	[!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Set up direct mode with...
+	(ft_smooth_lcd_spans): ... new span function.
+
+2020-07-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[smooth] Separate LCD paths from gray rendering.
+
+	This makes `ft_smooth_render' a lot smaller and easier to follow. It
+	also cleanly separates Harmony and ClearType-style LCD rendering
+	algorithms. Now I only wish to move LCD filtering and geometry from
+	FT_Library to FT_Renderer.
+
+	* src/smooth/ftsmooth.c (ft_smooth_render): Move LCD code from here...
+	(ft_smooth_raster_lcd, ft_smooth_raster_lcdv): ... to here.
+	[FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Reorganize #ifdef's.
+
+2020-06-20  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[cff] Fix handling of `style_name == NULL' (#58630).
+
+	* src/cff/cffobjs.c (cff_face_init): If a call to `cff_strcpy' fails
+	by returning NULL in `cff_face_init', `remove_style' is still
+	called.  This means that the NULL pointer is dereferenced, causing a
+	crash.
+
+2020-06-19  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[cff] Fix another two memory leaks (#58629).
+
+	* src/cff/cffobjs.c (cff_size_init): If a call to `funcs->create'
+	fails to allocate one of the `internal->subfont' variables, make
+	sure to free `internal->topfont' and any successfully allocated
+	subfonts.
+
+2020-06-19  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[psaux] Fix memory leak (#58626).
+
+	* src/psaux/psstack.c (cf2_stack_init): If `cf2_stack_init' fails to
+	allocate the stack, return error early.
+
+2020-06-19  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[base] Fix memory leak (#58624).
+
+	* src/base/ftobjs.c (FT_New_Size): Avoid trying to free
+	`size->internal' unless `size' has been allocated.  This mistake
+	appeared in the fix for issue #58611.
+
+2020-06-19  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[base] Rework d1180b5f9598 until further notice.
+
+	* src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large
+	outlines.
+
+2020-06-19  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[cff, cid] Fix segfaults in case of error (#58621).
+
+	* src/cff/cffobjs.c (cff_slot_done), src/cid/cidobjs.c
+	(cid_slot_done): If `ft_glyphslot_init' fails to allocate
+	`internal', then the class' `done_slot' callback (called by
+	`ft_glyphslot_done') must not dereference the pointer to `internal'.
+
+2020-06-19  Werner Lemberg  <wl@gnu.org>
+
+	[base] Fix UBSAN error.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23166
+
+	* src/base/ftoutln.c (FT_Outline_Get_Orientation): Avoid values
+	larger than 32 bits.
+
+2020-06-19  Werner Lemberg  <wl@gnu.org>
+
+	[woff2] Fix segfault.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23402
+
+	* src/sfnt/sfwoff2.c (get_x_mins): Check whether `loca' table
+	exists.
+
+2020-06-19  Stephen McDowell  <svenevs.dev@gmail.com>
+
+	[sfnt] Support Intel compilers.
+
+	* src/sfnt/pngshim.c (premultiply_data): Intel compilers do not
+	currently support `__builtin_shuffle'.
+
+2020-06-19  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[base] Fix memory leak (#58611).
+
+	* src/base/ftobjs.c (FT_New_Size): When the call to `clazz->init_size'
+	fails, make sure to free `size->internal'.
+
+2020-06-19  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[cff] Fix memory leak (#58610).
+
+	* src/cff/cffobjs.c (cff_size_init): When the call to
+	`funcs->create' fails, make sure to free `internal'.
+
+2020-06-19  Werner Lemberg  <wl@gnu.org>
+
+	* src/cff/cffload.c (cff_index_get_pointers): Rename `t' to `tbl'.
+
+2020-06-19  Sebastian Rasmussen  <sebras@gmail.com>
+
+	[cff] Free table upon error allocating other data (#58609).
+
+	* src/cff/cffload.c (cff_index_get_pointers): When new_bytes fails
+	to allocate, make sure to free the table.  Do the same for both
+	allocations if there is a later error.
+
+2020-06-13  Werner Lemberg  <wl@gnu.org>
+
+	Remove redundant inclusion of `ft2build.h'.
+
+	* */*: Remove `#include <ft2build.h>' where possible.
+
+	* include/freetype/freetype.h: Remove cpp error about missing
+	inclusion of `ft2build.h'.
+
+2020-06-08  David Turner  <david@freetype.org>
+
+	Make macros for header file names optional.
+
+	We no longer have to take care of the 8.3 file name limit; this
+	allows us (a) to introduce longer, meaningful file names, and (b) to
+	avoid macro names in `#include' lines altogether since some
+	compilers (most notably Visual C++) doesn't support this properly.
+
+	*/*: Replace
+
+	   #include FOO_H
+
+	with
+
+	   #include <freetype/foo.h>
+
+	or something similar.  Also update the documentation.
+
+2020-06-02  Werner Lemberg  <wl@gnu.org>
+
+	* src/sfnt/ttcmap.c (tt_face_build_cmaps): Trace number of cmaps.
+
+2020-05-18  David Turner  <david@freetype.org>
+
+	Remove obsolete HAVE_STDINT_H probing macro.
+
+	This macro was updated by the unix configure script and the
+	`CMakeLists.txt' one, but is never used in the source tree (nor is
+	<stdint.h> included anywhere).
+
+	* CMakeLists.txt, builds/unix/ftconfig.in: Don't handle
+	`HAVE_STDINT_H'.
+
+2020-05-18  David Turner  <david@freetype.org>
+
+	Remove Jamfile files from the tree.
+
+	These have not been used in a very, very long time, so better remove
+	them.  A corresponding patch will be submitted to the
+	`freetype2-demos' repository.
+
+	* src/Jamfile, src/*/Jamfile, Jamrules: Delete.
+
+2020-05-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[smooth] Turn on LCD filtering during FreeType initialization.
+
+	* src/smooth/ftsmooth.c (ft_smooth_init): Enable LCD filtering.
+
+	* include/freetype/ftlcdfil.h: Document it, remove patent warnings.
+	* include/freetype/freetype.h (FT_Render_Mode): Updated.
+	* include/freetype/config/ftoption.h, devel/ftoption.h
+	[FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Do not mention patents.
+
+2020-05-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[smooth] Stop using dedicated LCD modules and classes.
+
+	The LCD modules were never truly independent. They mostly served as
+	a way to disable patented LCD rendering, which is no longer necessary.
+	The `smooth' module now handles LCD modes as well.
+
+	* src/smooth/ftsmooth.c (ft_smooth_lcd_renderer_class.
+	ft_smooth_lcdv_renderer_class): Deleted.
+	(ft_render_smooth): Reworked from `ft_render_smooth_generic'.
+	* src/smooth/ftsmooth.h: Remove dedicated LCD classes.
+	* src/smooth/module.mk: Remove dedicated LCD modules.
+	* include/freetype/config/ftmodule.h: Ditto.
+	* builds/amiga/include/config/ftmodule.h: Ditto.
+	* include/freetype/ftmodapi.h: Do not mention LCD modules.
+
 2020-05-09  Werner Lemberg  <wl@gnu.org>
 
 	* Version 2.10.2 released.
 	==========================
 
 
 	Tag sources with `VER-2-10-2'.
 
@@ -4074,17 +4853,17 @@ 2018-05-14  Werner Lemberg  <wl@gnu.org>
 
 2018-05-13  Werner Lemberg  <wl@gnu.org>
 
 	* src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
 
 2018-05-13  Shao Yu Zhang  <shaozhang@fb.com>
 	    Werner Lemberg  <wl@gnu.org>
 
-	[sfnt] Preliminary support of coloured layer outlines (#44689).
+	[sfnt] Preliminary support of colored layer outlines (#44689).
 
 	This commit enables OpenType's COLR/CPAL table handling; a typical
 	application are color emojis that can be scaled to any size.
 
 	If the color palette does not exist or is invalid, the rendering
 	step rasterizes the outline instead.  The current implementation
 	assumes that the foreground is black.
 
--- a/modules/freetype2/ChangeLog.21
+++ b/modules/freetype2/ChangeLog.21
@@ -4794,21 +4794,21 @@ 2003-07-25  Werner Lemberg  <wl@gnu.org>
 	Fix syntax.
 	(block_header, block_footer, description_header, description_footer,
 	marker_header, marker_footer, source_header, source_footer,
 	chapter_header): Don't use <center>...</center> but `align=center'
 	table attribute.
 	(chapter_inter, chapter_footer): Add <li> and use special <ul>
 	class.
 	Use double quotes around table widths given in percent.
-	(keyword_prefix, keyword_suffix): Don't change font colour directly
+	(keyword_prefix, keyword_suffix): Don't change font color directly
 	but use a new <span> class.
 	(section_synopsis_header, section_synopsis_footer): Don't change
-	colour.
-	(code_header, code_footer): Don't change font colour directly but
+	color.
+	(code_header, code_footer): Don't change font color directly but
 	use a special <pre> class.
 	(print_html_field): <tr> gets the `valign' attribute, not <table>.
 	(print_html_field_list): Ditto.
 	(index_exit): Don't use <center>...</center> but `align=center'
 	table attribute.
 	(section_enter): Ditto.
 	(toc_exit): Don't emit </table>.
 	(block_enter): Use <h4><a>, not <a><h4>.
deleted file mode 100644
--- a/modules/freetype2/Jamfile
+++ /dev/null
@@ -1,224 +0,0 @@
-# FreeType 2 top Jamfile.
-#
-# Copyright (C) 2001-2020 by
-# David Turner, Robert Wilhelm, and Werner Lemberg.
-#
-# This file is part of the FreeType project, and may only be used, modified,
-# and distributed under the terms of the FreeType project license,
-# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
-# indicate that you have read the license and understand and accept it
-# fully.
-
-
-# The HDRMACRO is already defined in FTJam and is used to add
-# the content of certain macros to the list of included header
-# files.
-#
-# We can compile FreeType 2 with classic Jam however thanks to
-# the following code
-#
-if ! $(JAM_TOOLSET)
-{
-  rule HDRMACRO
-  {
-    # nothing
-  }
-}
-
-
-# We need to invoke a SubDir rule if the FT2 source directory top is not the
-# current directory.  This allows us to build FreeType 2 as part of a larger
-# project easily.
-#
-if $(FT2_TOP) != $(DOT)
-{
-  SubDir  FT2_TOP ;
-}
-
-
-# The following macros define the include directory, the source directory,
-# and the final library name (without library extensions).  They can be
-# replaced by other definitions when the library is compiled as part of
-# a larger project.
-#
-
-# Name of FreeType include directory during compilation.
-# This is relative to FT2_TOP.
-#
-FT2_INCLUDE_DIR ?= include ;
-
-# Name of FreeType source directory during compilation.
-# This is relative to FT2_TOP.
-#
-FT2_SRC_DIR ?= src ;
-
-# Name of final library, without extension.
-#
-FT2_LIB ?= $(LIBPREFIX)freetype ;
-
-
-# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
-# This is prepended to FT2_INCLUDE_DIR.  It can be used to specify
-# the location of a custom <ft2build.h> which will point to custom
-# versions of `ftmodule.h' and `ftoption.h', for example.
-#
-FT2_BUILD_INCLUDE ?= ;
-
-# The list of modules to compile on any given build of the library.
-# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
-#
-# IMPORTANT: You'll need to change the content of `ftmodule.h' as well
-#            if you modify this list or provide your own.
-#
-FT2_COMPONENTS ?= autofit    # auto-fitter
-                  base       # base component (public APIs)
-                  bdf        # BDF font driver
-                  bzip2      # support for bzip2-compressed PCF font
-                  cache      # cache sub-system
-                  cff        # CFF/CEF font driver
-                  cid        # PostScript CID-keyed font driver
-                  gzip       # support for gzip-compressed PCF font
-                  lzw        # support for LZW-compressed PCF font
-                  pcf        # PCF font driver
-                  pfr        # PFR/TrueDoc font driver
-                  psaux      # common PostScript routines module
-                  pshinter   # PostScript hinter module
-                  psnames    # PostScript names handling
-                  raster     # monochrome rasterizer
-                  sfnt       # SFNT-based format support routines
-                  smooth     # anti-aliased rasterizer
-                  truetype   # TrueType font driver
-                  type1      # PostScript Type 1 font driver
-                  type42     # PostScript Type 42 (embedded TrueType) driver
-                  winfonts   # Windows FON/FNT font driver
-                  ;
-
-
-# Don't touch.
-#
-FT2_INCLUDE  = $(FT2_BUILD_INCLUDE)
-               [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
-
-FT2_SRC      = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
-
-# Location of API Reference Documentation
-#
-if $(DOC_DIR)
-{
-  DOC_DIR = $(DOCDIR:T) ;
-}
-else
-{
-  DOC_DIR = docs/reference ;
-}
-
-
-# Only used by FreeType developers.
-#
-if $(DEBUG_HINTER)
-{
-  CCFLAGS += -DDEBUG_HINTER ;
-}
-
-
-# We need `include' in the current include path in order to
-# compile any part of FreeType 2.
-#
-HDRS += $(FT2_INCLUDE) ;
-
-
-# We need to #define FT2_BUILD_LIBRARY so that our sources find the
-# internal headers
-#
-CCFLAGS += -DFT2_BUILD_LIBRARY ;
-
-# Uncomment the following line if you want to build individual source files
-# for each FreeType 2 module.  This is only useful during development, and
-# is better defined as an environment variable anyway!
-#
-# FT2_MULTI = true ;
-
-
-# The files `ftheader.h', `internal.h', and `ftserv.h' are used to define
-# macros that are later used in #include statements.  They need to be parsed
-# in order to record these definitions.
-#
-HDRMACRO  [ FT2_SubDir  $(FT2_INCLUDE_DIR) freetype config ftheader.h ] ;
-HDRMACRO  [ FT2_SubDir  $(FT2_INCLUDE_DIR) freetype internal internal.h ] ;
-HDRMACRO  [ FT2_SubDir  $(FT2_INCLUDE_DIR) freetype internal ftserv.h ] ;
-
-
-# Now include the Jamfile in `freetype2/src', used to drive the compilation
-# of each FreeType 2 component and/or module.
-#
-SubInclude  FT2_TOP $(FT2_SRC_DIR) ;
-
-# Handle the generation of the `ftexport.sym' file, which contains the list
-# of exported symbols.  This can be used on Unix by libtool.
-#
-SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
-
-rule GenExportSymbols
-{
-  local  apinames = apinames$(SUFEXE) ;
-  local  aheader ;
-  local  headers ;
-
-  for aheader in [ Glob $(2) : *.h ]
-  {
-    switch $(aheader)
-    {
-      case */ftmac.h :
-        if ( $(MAC) || $(OS) = MACOSX ) {
-          headers += $(aheader) ;
-        }
-      case *.h : headers += $(aheader) ;
-    }
-  }
-
-  LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
-
-  APINAMES on $(1) = apinames$(SUFEXE) ;
-
-  Depends            $(1) : $(apinames) $(headers) ;
-  GenExportSymbols1  $(1) : $(headers) ;
-  Clean              clean : $(1) ;
-}
-
-actions GenExportSymbols1 bind APINAMES
-{
-  $(APINAMES) $(2) > $(1)
-}
-
-GenExportSymbols  ftexport.sym : include/freetype ;
-
-# Test files (hinter debugging).  Only used by FreeType developers.
-#
-if $(DEBUG_HINTER)
-{
-  SubInclude FT2_TOP tests ;
-}
-
-rule RefDoc
-{
-  Depends  $1 : all ;
-  NotFile  $1 ;
-  Always   $1 ;
-}
-
-actions RefDoc
-{
-  python3 -m docwriter
-          --prefix=ft2
-          --title=FreeType-2.10.2
-          --site=reference
-          --output=$(DOC_DIR)
-          $(FT2_INCLUDE)/freetype/*.h
-          $(FT2_INCLUDE)/freetype/config/*.h
-          $(FT2_INCLUDE)/freetype/cache/*.h
-}
-
-RefDoc  refdoc ;
-
-
-# end of top Jamfile
deleted file mode 100644
--- a/modules/freetype2/Jamrules
+++ /dev/null
@@ -1,71 +0,0 @@
-# FreeType 2 JamRules.
-#
-# Copyright (C) 2001-2020 by
-# David Turner, Robert Wilhelm, and Werner Lemberg.
-#
-# This file is part of the FreeType project, and may only be used, modified,
-# and distributed under the terms of the FreeType project license,
-# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
-# indicate that you have read the license and understand and accept it
-# fully.
-
-
-# This file contains the Jam rules needed to build the FreeType 2 library.
-# It is shared by all Jamfiles and is included only once in the build
-# process.
-#
-
-
-# Call SubDirHdrs on a list of directories.
-#
-rule AddSubDirHdrs
-{
-  local x ;
-
-  for x in $(<)
-  {
-    SubDirHdrs $(x) ;
-  }
-}
-
-
-# Determine prefix of library file.  We must use "libxxxxx" on Unix systems,
-# while all other simply use the real name.
-#
-if $(UNIX)
-{
-  LIBPREFIX ?= lib ;
-}
-else
-{
-  LIBPREFIX ?= "" ;
-}
-
-# FT2_TOP contains the location of the FreeType source directory.  You can
-# set it to a specific value if you want to compile the library as part of a
-# larger project.
-#
-FT2_TOP ?= $(DOT) ;
-
-# Define a new rule used to declare a sub directory of the Nirvana source
-# tree.
-#
-rule FT2_SubDir
-{
-  if $(FT2_TOP) = $(DOT)
-  {
-    return [ FDirName  $(<) ] ;
-  }
-  else
-  {
-    return [ FDirName  $(FT2_TOP) $(<) ] ;
-  }
-}
-
-# We also set ALL_LOCATE_TARGET in order to place all object and library
-# files in "objs".
-#
-ALL_LOCATE_TARGET ?= [ FT2_SubDir  objs ] ;
-
-
-# end of Jamrules
--- a/modules/freetype2/README
+++ b/modules/freetype2/README
@@ -1,9 +1,9 @@
-  FreeType 2.10.2
+  FreeType 2.10.4
   ===============
 
   Homepage: https://www.freetype.org
 
   FreeType is a freely available software library to render fonts.
 
   It  is  written  in  C,  designed to  be  small,  efficient,  highly
   customizable, and  portable while capable of  producing high-quality
@@ -22,19 +22,19 @@
 
   Additional documentation is available as a separate package from our
   sites.  Go to
 
     https://download.savannah.gnu.org/releases/freetype/
 
   and download one of the following files.
 
-    freetype-doc-2.10.2.tar.xz
-    freetype-doc-2.10.2.tar.gz
-    ftdoc2102.zip
+    freetype-doc-2.10.4.tar.xz
+    freetype-doc-2.10.4.tar.gz
+    ftdoc2104.zip
 
   To view the documentation online, go to
 
     https://www.freetype.org/freetype2/docs/
 
 
   Mailing Lists
   =============
@@ -62,16 +62,28 @@
     https://savannah.nongnu.org/bugs/?group=freetype
 
   Alternatively,    you   might    report    bugs    by   e-mail    to
   `freetype-devel@nongnu.org'.   Don't  forget   to  send  a  detailed
   explanation of the problem --  there is nothing worse than receiving
   a terse message that only says `it doesn't work'.
 
 
+  Patches
+  =======
+
+  Please  submit patches  to  the `freetype-devel@nongnu.org'  mailing
+  list  --  and thank  you  in  advance  for  your work  on  improving
+  FreeType!
+
+  Details on the process can be found here:
+
+    https://www.freetype.org/developer.html#patches
+
+
   Enjoy!
 
 
     The FreeType Team
 
 ----------------------------------------------------------------------
 
 Copyright (C) 2006-2020 by
--- a/modules/freetype2/README.moz-patches
+++ b/modules/freetype2/README.moz-patches
@@ -1,5 +1,5 @@
-This directory contains FreeType v2.10.1 downloaded from
+This directory contains FreeType v2.10.4 downloaded from
 https://download.savannah.gnu.org/releases/freetype/
 
-No post-2.10.1 commits have been cherry-picked from the upstream FreeType
+No post-2.10.4 commits have been cherry-picked from the upstream FreeType
 repository at this time.
--- a/modules/freetype2/builds/amiga/include/config/ftmodule.h
+++ b/modules/freetype2/builds/amiga/include/config/ftmodule.h
@@ -132,18 +132,16 @@ FT_USE_MODULE( FT_Renderer_Class, ft_ras
 #endif
 
 #ifdef FT_USE_SFNT
 FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
 #endif
 
 #ifdef FT_USE_SMOOTH
 FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
 #endif
 
 #ifdef FT_USE_OTV
 FT_USE_MODULE( FT_Module_Class, otv_module_class )
 #endif
 
 #ifdef FT_USE_BDF
 FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
--- a/modules/freetype2/builds/amiga/src/base/ftdebug.c
+++ b/modules/freetype2/builds/amiga/src/base/ftdebug.c
@@ -63,18 +63,18 @@
 #ifndef __amigaos4__
   extern struct Library*  DOSBase;
 #else
   extern struct DOSIFace*  IDOS;
 #endif
 
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
 
   /* documentation is in ftdebug.h */
 
   FT_BASE_DEF( void )
   FT_Message( const char*  fmt,
@@ -147,17 +147,17 @@
   /* or `ft_trace_levels_disabled'                 */
   int*  ft_trace_levels;
 
   /* define array of trace toggle names */
 #define FT_TRACE_DEF( x )  #x ,
 
   static const char*  ft_trace_toggles[trace_count + 1] =
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     NULL
   };
 
 #undef FT_TRACE_DEF
 
 
   /* documentation is in ftdebug.h */
 
--- a/modules/freetype2/builds/amiga/src/base/ftsystem.c
+++ b/modules/freetype2/builds/amiga/src/base/ftsystem.c
@@ -91,20 +91,20 @@ Free_VecPooled( APTR  poolHeader,
   ULONG  *realmem = (ULONG *)memory - 1;
 
   FreePooled( poolHeader, realmem, *realmem );
 }
 #endif
 
 #include <ft2build.h>
 #include FT_CONFIG_CONFIG_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 
   /*************************************************************************/
   /*                                                                       */
--- a/modules/freetype2/builds/cmake/testbuild.sh
+++ b/modules/freetype2/builds/cmake/testbuild.sh
@@ -88,17 +88,17 @@ END
 
 # create test project main.c
 
 cat >$tmpdir/main.c << END
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 
 
 FT_Library library;
 
 
 int main(int argc,
          char*argv[])
 {
--- a/modules/freetype2/builds/mac/ftmac.c
+++ b/modules/freetype2/builds/mac/ftmac.c
@@ -57,20 +57,19 @@
     - Some suitcase fonts (notably Onyx) might point the `LWFN' file to
       itself, even though it doesn't contains `POST' resources.  To handle
       this special case without opening the file an extra time, we just
       ignore errors from the `LWFN' and fallback to the `sfnt' if both are
       available.
   */
 
 
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TAGS_H
-#include FT_INTERNAL_STREAM_H
+#include <freetype/freetype.h>
+#include <freetype/tttags.h>
+#include <freetype/internal/ftstream.h>
 #include "ftbase.h"
 
 #if defined( __GNUC__ ) || defined( __IBMC__ )
   /* This is for Mac OS X.  Without redefinition, OS_INLINE */
   /* expands to `static inline' which doesn't survive the   */
   /* -ansi compilation flag of GCC.                         */
 #if !HAVE_ANSI_OS_INLINE
 #undef  OS_INLINE
new file mode 100644
--- /dev/null
+++ b/modules/freetype2/builds/meson/extract_freetype_version.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python
+"""Extract the FreeType version numbers from `<freetype/freetype.h>`.
+
+This script parses the header to extract the version number defined there.
+By default, the full dotted version number is printed, but `--major`,
+`--minor` or `--patch` can be used to only print one of these values
+instead.
+"""
+
+from __future__ import print_function
+
+import argparse
+import os
+import re
+import sys
+
+# Expected input:
+#
+#  ...
+#  #define FREETYPE_MAJOR  2
+#  #define FREETYPE_MINOR  10
+#  #define FREETYPE_PATCH  2
+#  ...
+
+RE_MAJOR = re.compile(r"^ \#define \s+ FREETYPE_MAJOR \s+ (.*) $", re.X)
+RE_MINOR = re.compile(r"^ \#define \s+ FREETYPE_MINOR \s+ (.*) $", re.X)
+RE_PATCH = re.compile(r"^ \#define \s+ FREETYPE_PATCH \s+ (.*) $", re.X)
+
+
+def parse_freetype_header(header):
+    major = None
+    minor = None
+    patch = None
+
+    for line in header.splitlines():
+        line = line.rstrip()
+        m = RE_MAJOR.match(line)
+        if m:
+            assert major == None, "FREETYPE_MAJOR appears more than once!"
+            major = m.group(1)
+            continue
+
+        m = RE_MINOR.match(line)
+        if m:
+            assert minor == None, "FREETYPE_MINOR appears more than once!"
+            minor = m.group(1)
+            continue
+
+        m = RE_PATCH.match(line)
+        if m:
+            assert patch == None, "FREETYPE_PATCH appears more than once!"
+            patch = m.group(1)
+            continue
+
+    assert (
+        major and minor and patch
+    ), "This header is missing one of FREETYPE_MAJOR, FREETYPE_MINOR or FREETYPE_PATCH!"
+
+    return (major, minor, patch)
+
+
+def main():
+    parser = argparse.ArgumentParser(description=__doc__)
+
+    group = parser.add_mutually_exclusive_group()
+    group.add_argument(
+        "--major",
+        action="store_true",
+        help="Only print the major version number.",
+    )
+    group.add_argument(
+        "--minor",
+        action="store_true",
+        help="Only print the minor version number.",
+    )
+    group.add_argument(
+        "--patch",
+        action="store_true",
+        help="Only print the patch version number.",
+    )
+
+    parser.add_argument(
+        "input",
+        metavar="FREETYPE_H",
+        help="The input freetype.h header to parse.",
+    )
+
+    args = parser.parse_args()
+    with open(args.input) as f:
+        header = f.read()
+
+    version = parse_freetype_header(header)
+
+    if args.major:
+        print(version[0])
+    elif args.minor:
+        print(version[1])
+    elif args.patch:
+        print(version[2])
+    else:
+        print("%s.%s.%s" % version)
+
+    return 0
+
+
+if __name__ == "__main__":
+    sys.exit(main())
new file mode 100644
--- /dev/null
+++ b/modules/freetype2/builds/meson/extract_libtool_version.py
@@ -0,0 +1,105 @@
+#!/usr/bin/env python
+"""Extract the libtool version from `configure.raw`.
+
+This script parses the `configure.raw` file to extract the libtool version
+number.  By default, the full dotted version number is printed, but
+`--major`, `--minor` or `--patch` can be used to only print one of these
+values instead.
+"""
+
+from __future__ import print_function
+
+import argparse
+import os
+import re
+import sys
+
+# Expected input:
+#
+#  ...
+#  version_info='23:2:17'
+#  ...
+
+RE_VERSION_INFO = re.compile(r"^version_info='(\d+):(\d+):(\d+)'")
+
+
+def parse_configure_raw(header):
+    major = None
+    minor = None
+    patch = None
+
+    for line in header.splitlines():
+        line = line.rstrip()
+        m = RE_VERSION_INFO.match(line)
+        if m:
+            assert major == None, "version_info appears more than once!"
+            major = m.group(1)
+            minor = m.group(2)
+            patch = m.group(3)
+            continue
+
+    assert (
+        major and minor and patch
+    ), "This input file is missing a version_info definition!"
+
+    return (major, minor, patch)
+
+
+def main():
+    parser = argparse.ArgumentParser(description=__doc__)
+
+    group = parser.add_mutually_exclusive_group()
+    group.add_argument(
+        "--major",
+        action="store_true",
+        help="Only print the major version number.",
+    )
+    group.add_argument(
+        "--minor",
+        action="store_true",
+        help="Only print the minor version number.",
+    )
+    group.add_argument(
+        "--patch",
+        action="store_true",
+        help="Only print the patch version number.",
+    )
+    group.add_argument(
+        "--soversion",
+        action="store_true",
+        help="Only print the libtool library suffix.",
+    )
+
+    parser.add_argument(
+        "input",
+        metavar="CONFIGURE_RAW",
+        help="The input configure.raw file to parse.",
+    )
+
+    args = parser.parse_args()
+    with open(args.input) as f:
+        raw_file = f.read()
+
+    version = parse_configure_raw(raw_file)
+
+    if args.major:
+        print(version[0])
+    elif args.minor:
+        print(version[1])
+    elif args.patch:
+        print(version[2])
+    elif args.soversion:
+        # Convert libtool version_info to the library suffix.
+        # (current,revision, age) -> (current - age, age, revision)
+        print(
+            "%d.%s.%s"
+            % (int(version[0]) - int(version[2]), version[2], version[1])
+        )
+    else:
+        print("%s.%s.%s" % version)
+
+    return 0
+
+
+if __name__ == "__main__":
+    sys.exit(main())
new file mode 100644
--- /dev/null
+++ b/modules/freetype2/builds/meson/generate_reference_docs.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+"""Generate FreeType reference documentation."""
+
+from __future__ import print_function
+
+import argparse
+import glob
+import os
+import subprocess
+import sys
+
+
+def main():
+    parser = argparse.ArgumentParser(description=__doc__)
+
+    parser.add_argument(
+        "--input-dir",
+        required=True,
+        help="Top-level FreeType source directory.",
+    )
+
+    parser.add_argument(
+        "--version", required=True, help='FreeType version (e.g. "2.x.y").'
+    )
+
+    parser.add_argument(
+        "--output-dir", required=True, help="Output directory."
+    )
+
+    args = parser.parse_args()
+
+    # Get the list of input files of interest.
+    include_dir = os.path.join(args.input_dir, "include")
+    include_config_dir = os.path.join(include_dir, "config")
+    include_cache_dir = os.path.join(include_dir, "cache")
+
+    all_headers = (
+        glob.glob(os.path.join(args.input_dir, "include", "freetype", "*.h"))
+        + glob.glob(
+            os.path.join(
+                args.input_dir, "include", "freetype", "config", "*.h"
+            )
+        )
+        + glob.glob(
+            os.path.join(
+                args.input_dir, "include", "freetype", "cache", "*.h"
+            )
+        )
+    )
+
+    if not os.path.exists(args.output_dir):
+        os.makedirs(args.output_dir)
+    else:
+        assert os.path.isdir(args.output_dir), (
+            "Not a directory: " + args.output_dir
+        )
+
+    cmds = [
+        sys.executable,
+        "-m",
+        "docwriter",
+        "--prefix=ft2",
+        "--title=FreeType-" + args.version,
+        "--site=reference",
+        "--output=" + args.output_dir,
+    ] + all_headers
+
+    print("Running docwriter...")
+    subprocess.check_call(cmds)
+
+    print("Building static site...")
+    subprocess.check_call(
+        [sys.executable, "-m", "mkdocs", "build"], cwd=args.output_dir
+    )
+    return 0
+
+
+if __name__ == "__main__":
+    sys.exit(main())
new file mode 100644
--- /dev/null
+++ b/modules/freetype2/builds/meson/parse_modules_cfg.py
@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+"""Parse modules.cfg and dump its output either as ftmodule.h or a list of
+base extensions.
+"""
+
+from __future__ import print_function
+
+import argparse
+import os
+import re
+import sys
+
+# Expected input:
+#
+#  ...
+#  FONT_MODULES += <name>
+#  HINTING_MODULES += <name>
+#  RASTER_MODULES += <name>
+#  AUX_MODULES += <name>
+#  BASE_EXTENSIONS += <name>
+#  ...
+
+
+def parse_modules_cfg(input_file):
+
+    lists = {
+        "FONT_MODULES": [],
+        "HINTING_MODULES": [],
+        "RASTER_MODULES": [],
+        "AUX_MODULES": [],
+        "BASE_EXTENSIONS": [],
+    }
+
+    for line in input_file.splitlines():
+        line = line.rstrip()
+        # Ignore empty lines and those that start with a comment.
+        if not line or line[0] == "#":
+            continue
+
+        items = line.split()
+        assert len(items) == 3 and items[1] == "+=", (
+            "Unexpected input line [%s]" % line
+        )
+        assert items[0] in lists, (
+            "Unexpected configuration variable name " + items[0]
+        )
+
+        lists[items[0]].append(items[2])
+
+    return lists
+
+
+def generate_ftmodule(lists):
+    result = "/* This is a generated file. */\n"
+    for driver in lists["FONT_MODULES"]:
+        if driver == "sfnt":  # Special case for the sfnt 'driver'.
+            result += "FT_USE_MODULE( FT_Module_Class, sfnt_module_class )\n"
+            continue
+
+        name = {
+            "truetype": "tt",
+            "type1": "t1",
+            "cid": "t1cid",
+            "type42": "t42",
+            "winfonts": "winfnt",
+        }.get(driver, driver)
+        result += (
+            "FT_USE_MODULE( FT_Driver_ClassRec, %s_driver_class )\n" % name
+        )
+
+    for module in lists["HINTING_MODULES"]:
+        result += (
+            "FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % module
+        )
+
+    for module in lists["RASTER_MODULES"]:
+        name = {
+            "raster": "ft_raster1",
+            "smooth": "ft_smooth",
+        }.get(module)
+        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"):
+            result += (
+                "FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % module
+            )
+
+    result += "/* EOF */\n"
+    return result
+
+
+def generate_main_modules(lists):
+    return "\n".join(
+        lists["FONT_MODULES"]
+        + lists["HINTING_MODULES"]
+        + lists["RASTER_MODULES"]
+    )
+
+
+def generate_aux_modules(lists):
+    return "\n".join(lists["AUX_MODULES"])
+
+
+def generate_base_extensions(lists):
+    return "\n".join(lists["BASE_EXTENSIONS"])
+
+
+def main():
+    parser = argparse.ArgumentParser(description=__doc__)
+
+    parser.add_argument(
+        "--format",
+        required=True,
+        choices=(
+            "ftmodule.h",
+            "main-modules",
+            "aux-modules",
+            "base-extensions-list",
+        ),
+        help="Select output format.",
+    )
+
+    parser.add_argument(
+        "input",
+        metavar="CONFIGURE_RAW",
+        help="The input configure.raw file to parse.",
+    )
+
+    parser.add_argument("--output", help="Output file (default is stdout).")
+
+    args = parser.parse_args()
+    with open(args.input) as f:
+        input_data = f.read()
+
+    lists = parse_modules_cfg(input_data)
+
+    if args.format == "ftmodule.h":
+        result = generate_ftmodule(lists)
+    elif args.format == "main-modules":
+        result = generate_main_modules(lists)
+    elif args.format == "aux-modules":
+        result = generate_aux_modules(lists)
+    elif args.format == "base-extensions-list":
+        result = generate_base_extensions(lists)
+    else:
+        assert False, "Invalid output format!"
+
+    if args.output:
+        with open(args.output, "w") as f:
+            f.write(result)
+    else:
+        print(result)
+    return 0
+
+
+if __name__ == "__main__":
+    sys.exit(main())
new file mode 100644
--- /dev/null
+++ b/modules/freetype2/builds/meson/process_ftoption_h.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+"""Toggle settings in `ftoption.h` file based on command-line arguments.
+
+This script takes an `ftoption.h` file as input and rewrites
+`#define`/`#undef` lines in it based on `--enable=CONFIG_VARNAME` or
+`--disable=CONFIG_VARNAME` arguments passed to it, where `CONFIG_VARNAME` is
+configuration variable name, such as `FT_CONFIG_OPTION_USE_LZW`, that may
+appear in the file.
+
+Note that if one of `CONFIG_VARNAME` is not found in the input file, this
+script exits with an error message listing the missing variable names.
+"""
+
+import argparse
+import os
+import re
+import sys
+
+
+def main():
+    parser = argparse.ArgumentParser(description=__doc__)
+
+    parser.add_argument(
+        "input", metavar="FTOPTION_H", help="Path to input ftoption.h file."
+    )
+
+    parser.add_argument("--output", help="Output to file instead of stdout.")
+
+    parser.add_argument(
+        "--enable",
+        action="append",
+        default=[],
+        help="Enable a given build option (e.g. FT_CONFIG_OPTION_USE_LZW).",
+    )
+
+    parser.add_argument(
+        "--disable",
+        action="append",
+        default=[],
+        help="Disable a given build option.",
+    )
+
+    args = parser.parse_args()
+
+    common_options = set(args.enable) & set(args.disable)
+    if common_options:
+        parser.error(
+            "Options cannot be both enabled and disabled: %s"
+            % sorted(common_options)
+        )
+        return 1
+
+    with open(args.input) as f:
+        input_file = f.read()
+
+    options_seen = set()
+
+    new_lines = []
+    for line in input_file.splitlines():
+        # Expected formats:
+        #   #define <CONFIG_VAR>
+        #   /* #define <CONFIG_VAR> */
+        #   #undef <CONFIG_VAR>
+        line = line.rstrip()
+        if line.startswith("/* #define ") and line.endswith(" */"):
+            option_name = line[11:-3].strip()
+            option_enabled = False
+        elif line.startswith("#define "):
+            option_name = line[8:].strip()
+            option_enabled = True
+        elif line.startswith("#undef "):
+            option_name = line[7:].strip()
+            option_enabled = False
+        else:
+            new_lines.append(line)
+            continue
+
+        options_seen.add(option_name)
+        if option_enabled and option_name in args.disable:
+            line = "#undef " + option_name
+        elif not option_enabled and option_name in args.enable:
+            line = "#define " + option_name
+        new_lines.append(line)
+
+    result = "\n".join(new_lines)
+
+    # Sanity check that all command-line options were actually processed.
+    cmdline_options = set(args.enable) | set(args.disable)
+    assert cmdline_options.issubset(
+        options_seen
+    ), "Could not find options in input file: " + ", ".join(
+        sorted(cmdline_options - options_seen)
+    )
+
+    if args.output:
+        with open(args.output, "w") as f:
+            f.write(result)
+    else:
+        print(result)
+
+    return 0
+
+
+if __name__ == "__main__":
+    sys.exit(main())
--- a/modules/freetype2/builds/unix/config.guess
+++ b/modules/freetype2/builds/unix/config.guess
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2020-04-26'
+timestamp='2020-09-19'
 
 # 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
 # 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
@@ -145,27 +145,25 @@ Linux|GNU|GNU/*)
 	set_cc_for_build
 	cat <<-EOF > "$dummy.c"
 	#include <features.h>
 	#if defined(__UCLIBC__)
 	LIBC=uclibc
 	#elif defined(__dietlibc__)
 	LIBC=dietlibc
 	#else
+	#include <stdarg.h>
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#else
 	LIBC=gnu
 	#endif
+	#endif
 	EOF
 	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
-
-	# If ldd exists, use it to detect musl libc.
-	if command -v ldd >/dev/null && \
-		ldd --version 2>&1 | grep -q ^musl
-	then
-	    LIBC=musl
-	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
@@ -399,17 +397,17 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
 	echo i386-pc-auroraux"$UNAME_RELEASE"
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	set_cc_for_build
 	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
 		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		grep IS_64BIT_ARCH >/dev/null
 	    then
 		SUN_ARCH=x86_64
 	    fi
 	fi
 	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
@@ -539,20 +537,20 @@ EOF
 	echo m88k-motorola-sysv4
 	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
 	then
-	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
-	       [ "$TARGET_BINARY_INTERFACE"x = x ]
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
 	    then
 		echo m88k-dg-dgux"$UNAME_RELEASE"
 	    else
 		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
 	    fi
 	else
 	    echo i586-dg-dgux"$UNAME_RELEASE"
 	fi
@@ -575,17 +573,17 @@ EOF
 	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
 	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
 	exit ;;
     ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
+	if test -x /usr/bin/oslevel ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
 		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
 	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -615,17 +613,17 @@ EOF
 	exit ;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/lslpp ] ; then
+	if test -x /usr/bin/lslpp ; then
 		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
 		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
 	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:*:*)
@@ -650,31 +648,31 @@ EOF
 	echo m68k-hp-bsd4.4
 	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
 	case "$UNAME_MACHINE" in
 	    9000/31?)            HP_ARCH=m68000 ;;
 	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
+		if test -x /usr/bin/getconf; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
 		    case "$sc_cpu_version" in
 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
 			case "$sc_kernel_bits" in
 			  32) HP_ARCH=hppa2.0n ;;
 			  64) HP_ARCH=hppa2.0w ;;
 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "$HP_ARCH" = "" ]; then
+		if test "$HP_ARCH" = ""; then
 		    set_cc_for_build
 		    sed 's/^		//' << EOF > "$dummy.c"
 
 		#define _HPUX_SOURCE
 		#include <stdlib.h>
 		#include <unistd.h>
 
 		int main ()
@@ -703,17 +701,17 @@ EOF
 			}
 		    exit (0);
 		}
 EOF
 		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ "$HP_ARCH" = hppa2.0w ]
+	if test "$HP_ARCH" = hppa2.0w
 	then
 	    set_cc_for_build
 
 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
 	    # generating 64-bit code.  GNU and HP use different nomenclature:
 	    #
 	    # $ CC_FOR_BUILD=cc ./config.guess
@@ -777,17 +775,17 @@ EOF
 	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
 	echo hppa1.1-hp-osf
 	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
 	exit ;;
     i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
+	if test -x /usr/sbin/sysversion ; then
 	    echo "$UNAME_MACHINE"-unknown-osf1mk
 	else
 	    echo "$UNAME_MACHINE"-unknown-osf1
 	fi
 	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
 	exit ;;
@@ -1090,17 +1088,27 @@ EOF
 	exit ;;
     tile*:Linux:*:*)
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     vax:Linux:*:*)
 	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
 	exit ;;
     x86_64:Linux:*:*)
-	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+	set_cc_for_build
+	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
+	fi
+	echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
 	exit ;;
     xtensa*:Linux:*:*)
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
@@ -1279,17 +1287,17 @@ EOF
 	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux"$UNAME_RELEASE"
 	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
+	if test -d /usr/nec; then
 		echo mips-nec-sysv"$UNAME_RELEASE"
 	else
 		echo mips-unknown-sysv"$UNAME_RELEASE"
 	fi
 	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1327,31 +1335,34 @@ EOF
 	echo sxace-nec-superux"$UNAME_RELEASE"
 	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Rhapsody:*:*)
 	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
+    arm64:Darwin:*:*)
+	echo aarch64-apple-darwin"$UNAME_RELEASE"
+	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p`
 	case $UNAME_PROCESSOR in
 	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	if command -v xcode-select > /dev/null 2> /dev/null && \
 		! xcode-select --print-path > /dev/null 2> /dev/null ; then
 	    # Avoid executing cc if there is no toolchain installed as
 	    # cc will be a stub that puts up a graphical alert
 	    # prompting the user to install developer tools.
 	    CC_FOR_BUILD=no_compiler_found
 	else
 	    set_cc_for_build
 	fi
-	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
 	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
 		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		   grep IS_64BIT_ARCH >/dev/null
 	    then
 		case $UNAME_PROCESSOR in
 		    i386) UNAME_PROCESSOR=x86_64 ;;
 		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
 		esac
--- a/modules/freetype2/builds/unix/config.sub
+++ b/modules/freetype2/builds/unix/config.sub
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2020-04-24'
+timestamp='2020-10-13'
 
 # 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
 # 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
@@ -119,524 +119,527 @@ EOF
 # Separate into logical components for further validation
 case $1 in
 	*-*-*-*-*)
 		echo Invalid configuration \`"$1"\': more than four components >&2
 		exit 1
 		;;
 	*-*-*-*)
 		basic_machine=$field1-$field2
-		os=$field3-$field4
+		basic_os=$field3-$field4
 		;;
 	*-*-*)
 		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
 		# parts
 		maybe_os=$field2-$field3
 		case $maybe_os in
-			nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
-			| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+			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*)
 				basic_machine=$field1
-				os=$maybe_os
+				basic_os=$maybe_os
 				;;
 			android-linux)
 				basic_machine=$field1-unknown
-				os=linux-android
+				basic_os=linux-android
 				;;
 			*)
 				basic_machine=$field1-$field2
-				os=$field3
+				basic_os=$field3
 				;;
 		esac
 		;;
 	*-*)
 		# A lone config we happen to match not fitting any pattern
 		case $field1-$field2 in
 			decstation-3100)
 				basic_machine=mips-dec
-				os=
+				basic_os=
 				;;
 			*-*)
 				# Second component is usually, but not always the OS
 				case $field2 in
 					# Prevent following clause from handling this valid os
 					sun*os*)
 						basic_machine=$field1
-						os=$field2
+						basic_os=$field2
 						;;
 					# Manufacturers
 					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
 					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
 					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
 					| convergent* | ncr* | news | 32* | 3600* | 3100* \
 					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
 					| ultra | tti* | harris | dolphin | highlevel | gould \
 					| cbm | ns | masscomp | apple | axis | knuth | cray \
 					| microblaze* | sim | cisco \
 					| oki | wec | wrs | winbond)
 						basic_machine=$field1-$field2
-						os=
+						basic_os=
 						;;
 					*)
 						basic_machine=$field1
-						os=$field2
+						basic_os=$field2
 						;;
 				esac
 			;;
 		esac
 		;;
 	*)
 		# Convert single-component short-hands not valid as part of
 		# multi-component configurations.
 		case $field1 in
 			386bsd)
 				basic_machine=i386-pc
-				os=bsd
+				basic_os=bsd
 				;;
 			a29khif)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			adobe68k)
 				basic_machine=m68010-adobe
-				os=scout
+				basic_os=scout
 				;;
 			alliant)
 				basic_machine=fx80-alliant
-				os=
+				basic_os=
 				;;
 			altos | altos3068)
 				basic_machine=m68k-altos
-				os=
+				basic_os=
 				;;
 			am29k)
 				basic_machine=a29k-none
-				os=bsd
+				basic_os=bsd
 				;;
 			amdahl)
 				basic_machine=580-amdahl
-				os=sysv
+				basic_os=sysv
 				;;
 			amiga)
 				basic_machine=m68k-unknown
-				os=
+				basic_os=
 				;;
 			amigaos | amigados)
 				basic_machine=m68k-unknown
-				os=amigaos
+				basic_os=amigaos
 				;;
 			amigaunix | amix)
 				basic_machine=m68k-unknown
-				os=sysv4
+				basic_os=sysv4
 				;;
 			apollo68)
 				basic_machine=m68k-apollo
-				os=sysv
+				basic_os=sysv
 				;;
 			apollo68bsd)
 				basic_machine=m68k-apollo
-				os=bsd
+				basic_os=bsd
 				;;
 			aros)
 				basic_machine=i386-pc
-				os=aros
+				basic_os=aros
 				;;
 			aux)
 				basic_machine=m68k-apple
-				os=aux
+				basic_os=aux
 				;;
 			balance)
 				basic_machine=ns32k-sequent
-				os=dynix
+				basic_os=dynix
 				;;
 			blackfin)
 				basic_machine=bfin-unknown
-				os=linux
+				basic_os=linux
 				;;
 			cegcc)
 				basic_machine=arm-unknown
-				os=cegcc
+				basic_os=cegcc
 				;;
 			convex-c1)
 				basic_machine=c1-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c2)
 				basic_machine=c2-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c32)
 				basic_machine=c32-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c34)
 				basic_machine=c34-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			convex-c38)
 				basic_machine=c38-convex
-				os=bsd
+				basic_os=bsd
 				;;
 			cray)
 				basic_machine=j90-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			crds | unos)
 				basic_machine=m68k-crds
-				os=
+				basic_os=
 				;;
 			da30)
 				basic_machine=m68k-da30
-				os=
+				basic_os=
 				;;
 			decstation | pmax | pmin | dec3100 | decstatn)
 				basic_machine=mips-dec
-				os=
+				basic_os=
 				;;
 			delta88)
 				basic_machine=m88k-motorola
-				os=sysv3
+				basic_os=sysv3
 				;;
 			dicos)
 				basic_machine=i686-pc
-				os=dicos
+				basic_os=dicos
 				;;
 			djgpp)
 				basic_machine=i586-pc
-				os=msdosdjgpp
+				basic_os=msdosdjgpp
 				;;
 			ebmon29k)
 				basic_machine=a29k-amd
-				os=ebmon
+				basic_os=ebmon
 				;;
 			es1800 | OSE68k | ose68k | ose | OSE)
 				basic_machine=m68k-ericsson
-				os=ose
+				basic_os=ose
 				;;
 			gmicro)
 				basic_machine=tron-gmicro
-				os=sysv
+				basic_os=sysv
 				;;
 			go32)
 				basic_machine=i386-pc
-				os=go32
+				basic_os=go32
 				;;
 			h8300hms)
 				basic_machine=h8300-hitachi
-				os=hms
+				basic_os=hms
 				;;
 			h8300xray)
 				basic_machine=h8300-hitachi
-				os=xray
+				basic_os=xray
 				;;
 			h8500hms)
 				basic_machine=h8500-hitachi
-				os=hms
+				basic_os=hms
 				;;
 			harris)
 				basic_machine=m88k-harris
-				os=sysv3
+				basic_os=sysv3
 				;;
 			hp300 | hp300hpux)
 				basic_machine=m68k-hp
-				os=hpux
+				basic_os=hpux
 				;;
 			hp300bsd)
 				basic_machine=m68k-hp
-				os=bsd
+				basic_os=bsd
 				;;
 			hppaosf)
 				basic_machine=hppa1.1-hp
-				os=osf
+				basic_os=osf
 				;;
 			hppro)
 				basic_machine=hppa1.1-hp
-				os=proelf
+				basic_os=proelf
 				;;
 			i386mach)
 				basic_machine=i386-mach
-				os=mach
+				basic_os=mach
 				;;
 			isi68 | isi)
 				basic_machine=m68k-isi
-				os=sysv
+				basic_os=sysv
 				;;
 			m68knommu)
 				basic_machine=m68k-unknown
-				os=linux
+				basic_os=linux
 				;;
 			magnum | m3230)
 				basic_machine=mips-mips
-				os=sysv
+				basic_os=sysv
 				;;
 			merlin)
 				basic_machine=ns32k-utek
-				os=sysv
+				basic_os=sysv
 				;;
 			mingw64)
 				basic_machine=x86_64-pc
-				os=mingw64
+				basic_os=mingw64
 				;;
 			mingw32)
 				basic_machine=i686-pc
-				os=mingw32
+				basic_os=mingw32
 				;;
 			mingw32ce)
 				basic_machine=arm-unknown
-				os=mingw32ce
+				basic_os=mingw32ce
 				;;
 			monitor)
 				basic_machine=m68k-rom68k
-				os=coff
+				basic_os=coff
 				;;
 			morphos)
 				basic_machine=powerpc-unknown
-				os=morphos
+				basic_os=morphos
 				;;
 			moxiebox)
 				basic_machine=moxie-unknown
-				os=moxiebox
+				basic_os=moxiebox
 				;;
 			msdos)
 				basic_machine=i386-pc
-				os=msdos
+				basic_os=msdos
 				;;
 			msys)
 				basic_machine=i686-pc
-				os=msys
+				basic_os=msys
 				;;
 			mvs)
 				basic_machine=i370-ibm
-				os=mvs
+				basic_os=mvs
 				;;
 			nacl)
 				basic_machine=le32-unknown
-				os=nacl
+				basic_os=nacl
 				;;
 			ncr3000)
 				basic_machine=i486-ncr
-				os=sysv4
+				basic_os=sysv4
 				;;
 			netbsd386)
 				basic_machine=i386-pc
-				os=netbsd
+				basic_os=netbsd
 				;;
 			netwinder)
 				basic_machine=armv4l-rebel
-				os=linux
+				basic_os=linux
 				;;
 			news | news700 | news800 | news900)
 				basic_machine=m68k-sony
-				os=newsos
+				basic_os=newsos
 				;;
 			news1000)
 				basic_machine=m68030-sony
-				os=newsos
+				basic_os=newsos
 				;;
 			necv70)
 				basic_machine=v70-nec
-				os=sysv
+				basic_os=sysv
 				;;
 			nh3000)
 				basic_machine=m68k-harris
-				os=cxux
+				basic_os=cxux
 				;;
 			nh[45]000)
 				basic_machine=m88k-harris
-				os=cxux
+				basic_os=cxux
 				;;
 			nindy960)
 				basic_machine=i960-intel
-				os=nindy
+				basic_os=nindy
 				;;
 			mon960)
 				basic_machine=i960-intel
-				os=mon960
+				basic_os=mon960
 				;;
 			nonstopux)
 				basic_machine=mips-compaq
-				os=nonstopux
+				basic_os=nonstopux
 				;;
 			os400)
 				basic_machine=powerpc-ibm
-				os=os400
+				basic_os=os400
 				;;
 			OSE68000 | ose68000)
 				basic_machine=m68000-ericsson
-				os=ose
+				basic_os=ose
 				;;
 			os68k)
 				basic_machine=m68k-none
-				os=os68k
+				basic_os=os68k
 				;;
 			paragon)
 				basic_machine=i860-intel
-				os=osf
+				basic_os=osf
 				;;
 			parisc)
 				basic_machine=hppa-unknown
-				os=linux
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
 				;;
 			pw32)
 				basic_machine=i586-unknown
-				os=pw32
+				basic_os=pw32
 				;;
 			rdos | rdos64)
 				basic_machine=x86_64-pc
-				os=rdos
+				basic_os=rdos
 				;;
 			rdos32)
 				basic_machine=i386-pc
-				os=rdos
+				basic_os=rdos
 				;;
 			rom68k)
 				basic_machine=m68k-rom68k
-				os=coff
+				basic_os=coff
 				;;
 			sa29200)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			sei)
 				basic_machine=mips-sei
-				os=seiux
+				basic_os=seiux
 				;;
 			sequent)
 				basic_machine=i386-sequent
-				os=
+				basic_os=
 				;;
 			sps7)
 				basic_machine=m68k-bull
-				os=sysv2
+				basic_os=sysv2
 				;;
 			st2000)
 				basic_machine=m68k-tandem
-				os=
+				basic_os=
 				;;
 			stratus)
 				basic_machine=i860-stratus
-				os=sysv4
+				basic_os=sysv4
 				;;
 			sun2)
 				basic_machine=m68000-sun
-				os=
+				basic_os=
 				;;
 			sun2os3)
 				basic_machine=m68000-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun2os4)
 				basic_machine=m68000-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun3)
 				basic_machine=m68k-sun
-				os=
+				basic_os=
 				;;
 			sun3os3)
 				basic_machine=m68k-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun3os4)
 				basic_machine=m68k-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun4)
 				basic_machine=sparc-sun
-				os=
+				basic_os=
 				;;
 			sun4os3)
 				basic_machine=sparc-sun
-				os=sunos3
+				basic_os=sunos3
 				;;
 			sun4os4)
 				basic_machine=sparc-sun
-				os=sunos4
+				basic_os=sunos4
 				;;
 			sun4sol2)
 				basic_machine=sparc-sun
-				os=solaris2
+				basic_os=solaris2
 				;;
 			sun386 | sun386i | roadrunner)
 				basic_machine=i386-sun
-				os=
+				basic_os=
 				;;
 			sv1)
 				basic_machine=sv1-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			symmetry)
 				basic_machine=i386-sequent
-				os=dynix
+				basic_os=dynix
 				;;
 			t3e)
 				basic_machine=alphaev5-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			t90)
 				basic_machine=t90-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			toad1)
 				basic_machine=pdp10-xkl
-				os=tops20
+				basic_os=tops20
 				;;
 			tpf)
 				basic_machine=s390x-ibm
-				os=tpf
+				basic_os=tpf
 				;;
 			udi29k)
 				basic_machine=a29k-amd
-				os=udi
+				basic_os=udi
 				;;
 			ultra3)
 				basic_machine=a29k-nyu
-				os=sym1
+				basic_os=sym1
 				;;
 			v810 | necv810)
 				basic_machine=v810-nec
-				os=none
+				basic_os=none
 				;;
 			vaxv)
 				basic_machine=vax-dec
-				os=sysv
+				basic_os=sysv
 				;;
 			vms)
 				basic_machine=vax-dec
-				os=vms
+				basic_os=vms
 				;;
 			vsta)
 				basic_machine=i386-pc
-				os=vsta
+				basic_os=vsta
 				;;
 			vxworks960)
 				basic_machine=i960-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			vxworks68)
 				basic_machine=m68k-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			vxworks29k)
 				basic_machine=a29k-wrs
-				os=vxworks
+				basic_os=vxworks
 				;;
 			xbox)
 				basic_machine=i686-pc
-				os=mingw32
+				basic_os=mingw32
 				;;
 			ymp)
 				basic_machine=ymp-cray
-				os=unicos
+				basic_os=unicos
 				;;
 			*)
 				basic_machine=$1
-				os=
+				basic_os=
 				;;
 		esac
 		;;
 esac
 
 # Decode 1-component or ad-hoc basic machines
 case $basic_machine in
 	# Here we handle the default manufacturer of certain CPU types.  It is in
@@ -678,59 +681,59 @@ case $basic_machine in
 		;;
 	3b*)
 		cpu=we32k
 		vendor=att
 		;;
 	bluegene*)
 		cpu=powerpc
 		vendor=ibm
-		os=cnk
+		basic_os=cnk
 		;;
 	decsystem10* | dec10*)
 		cpu=pdp10
 		vendor=dec
-		os=tops10
+		basic_os=tops10
 		;;
 	decsystem20* | dec20*)
 		cpu=pdp10
 		vendor=dec
-		os=tops20
+		basic_os=tops20
 		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
 		cpu=m68k
 		vendor=motorola
 		;;
 	dpx2*)
 		cpu=m68k
 		vendor=bull
-		os=sysv3
+		basic_os=sysv3
 		;;
 	encore | umax | mmax)
 		cpu=ns32k
 		vendor=encore
 		;;
 	elxsi)
 		cpu=elxsi
 		vendor=elxsi
-		os=${os:-bsd}
+		basic_os=${basic_os:-bsd}
 		;;
 	fx2800)
 		cpu=i860
 		vendor=alliant
 		;;
 	genix)
 		cpu=ns32k
 		vendor=ns
 		;;
 	h3050r* | hiux*)
 		cpu=hppa1.1
 		vendor=hitachi
-		os=hiuxwe2
+		basic_os=hiuxwe2
 		;;
 	hp3k9[0-9][0-9] | hp9[0-9][0-9])
 		cpu=hppa1.0
 		vendor=hp
 		;;
 	hp9k2[0-9][0-9] | hp9k31[0-9])
 		cpu=m68000
 		vendor=hp
@@ -763,92 +766,92 @@ case $basic_machine in
 		;;
 	hp9k8[0-9][0-9] | hp8[0-9][0-9])
 		cpu=hppa1.0
 		vendor=hp
 		;;
 	i*86v32)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv32
+		basic_os=sysv32
 		;;
 	i*86v4*)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv4
+		basic_os=sysv4
 		;;
 	i*86v)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=sysv
+		basic_os=sysv
 		;;
 	i*86sol2)
 		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
-		os=solaris2
+		basic_os=solaris2
 		;;
 	j90 | j90-cray)
 		cpu=j90
 		vendor=cray
-		os=${os:-unicos}
+		basic_os=${basic_os:-unicos}
 		;;
 	iris | iris4d)
 		cpu=mips
 		vendor=sgi
-		case $os in
+		case $basic_os in
 		    irix*)
 			;;
 		    *)
-			os=irix4
+			basic_os=irix4
 			;;
 		esac
 		;;
 	miniframe)
 		cpu=m68000
 		vendor=convergent
 		;;
 	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
 		cpu=m68k
 		vendor=atari
-		os=mint
+		basic_os=mint
 		;;
 	news-3600 | risc-news)
 		cpu=mips
 		vendor=sony
-		os=newsos
+		basic_os=newsos
 		;;
 	next | m*-next)
 		cpu=m68k
 		vendor=next
-		case $os in
+		case $basic_os in
 		    openstep*)
 		        ;;
 		    nextstep*)
 			;;
 		    ns2*)
-		      os=nextstep2
+		      basic_os=nextstep2
 			;;
 		    *)
-		      os=nextstep3
+		      basic_os=nextstep3
 			;;
 		esac
 		;;
 	np1)
 		cpu=np1
 		vendor=gould
 		;;
 	op50n-* | op60c-*)
 		cpu=hppa1.1
 		vendor=oki
-		os=proelf
+		basic_os=proelf
 		;;
 	pa-hitachi)
 		cpu=hppa1.1
 		vendor=hitachi
-		os=hiuxwe2
+		basic_os=hiuxwe2
 		;;
 	pbd)
 		cpu=sparc
 		vendor=tti
 		;;
 	pbb)
 		cpu=m68k
 		vendor=tti
@@ -875,39 +878,39 @@ case $basic_machine in
 		;;
 	rtpc | rtpc-*)
 		cpu=romp
 		vendor=ibm
 		;;
 	sde)
 		cpu=mipsisa32
 		vendor=sde
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	simso-wrs)
 		cpu=sparclite
 		vendor=wrs
-		os=vxworks
+		basic_os=vxworks
 		;;
 	tower | tower-32)
 		cpu=m68k
 		vendor=ncr
 		;;
 	vpp*|vx|vx-*)
 		cpu=f301
 		vendor=fujitsu
 		;;
 	w65)
 		cpu=w65
 		vendor=wdc
 		;;
 	w89k-*)
 		cpu=hppa1.1
 		vendor=winbond
-		os=proelf
+		basic_os=proelf
 		;;
 	none)
 		cpu=none
 		vendor=none
 		;;
 	leon|leon[3-9])
 		cpu=sparc
 		vendor=$basic_machine
@@ -950,21 +953,21 @@ esac
 unset -v basic_machine
 
 # Decode basic machines in the full and proper CPU-Company form.
 case $cpu-$vendor in
 	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
 	# some cases the only manufacturer, in others, it is the most popular.
 	craynv-unknown)
 		vendor=cray
-		os=${os:-unicosmp}
+		basic_os=${basic_os:-unicosmp}
 		;;
 	c90-unknown | c90-cray)
 		vendor=cray
-		os=${os:-unicos}
+		basic_os=${Basic_os:-unicos}
 		;;
 	fx80-unknown)
 		vendor=alliant
 		;;
 	romp-unknown)
 		vendor=ibm
 		;;
 	mmix-unknown)
@@ -998,59 +1001,59 @@ case $cpu-$vendor in
 		cpu=xps100
 		vendor=honeywell
 		;;
 
 	# Here we normalize CPU types with a missing or matching vendor
 	dpx20-unknown | dpx20-bull)
 		cpu=rs6000
 		vendor=bull
-		os=${os:-bosx}
+		basic_os=${basic_os:-bosx}
 		;;
 
 	# Here we normalize CPU types irrespective of the vendor
 	amd64-*)
 		cpu=x86_64
 		;;
 	blackfin-*)
 		cpu=bfin
-		os=linux
+		basic_os=linux
 		;;
 	c54x-*)
 		cpu=tic54x
 		;;
 	c55x-*)
 		cpu=tic55x
 		;;
 	c6x-*)
 		cpu=tic6x
 		;;
 	e500v[12]-*)
 		cpu=powerpc
-		os=$os"spe"
+		basic_os=${basic_os}"spe"
 		;;
 	mips3*-*)
 		cpu=mips64
 		;;
 	ms1-*)
 		cpu=mt
 		;;
 	m68knommu-*)
 		cpu=m68k
-		os=linux
+		basic_os=linux
 		;;
 	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
 		cpu=s12z
 		;;
 	openrisc-*)
 		cpu=or32
 		;;
 	parisc-*)
 		cpu=hppa
-		os=linux
+		basic_os=linux
 		;;
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		cpu=i586
 		;;
 	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
 		cpu=i686
 		;;
 	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1096,32 +1099,35 @@ case $cpu-$vendor in
 		cpu=mipstx39el
 		;;
 	x64-*)
 		cpu=x86_64
 		;;
 	xscale-* | xscalee[bl]-*)
 		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
 		;;
+	arm64-*)
+		cpu=aarch64
+		;;
 
 	# Recognize the canonical CPU Types that limit and/or modify the
 	# company names they are paired with.
 	cr16-*)
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	crisv32-* | etraxfs*-*)
 		cpu=crisv32
 		vendor=axis
 		;;
 	cris-* | etrax*-*)
 		cpu=cris
 		vendor=axis
 		;;
 	crx-*)
-		os=${os:-elf}
+		basic_os=${basic_os:-elf}
 		;;
 	neo-tandem)
 		cpu=neo
 		vendor=tandem
 		;;
 	nse-tandem)
 		cpu=nse
 		vendor=tandem
@@ -1133,43 +1139,39 @@ case $cpu-$vendor in
 	nsv-tandem)
 		cpu=nsv
 		vendor=tandem
 		;;
 	nsx-tandem)
 		cpu=nsx
 		vendor=tandem
 		;;
-	s390-*)
-		cpu=s390
-		vendor=ibm
-		;;
-	s390x-*)
-		cpu=s390x
-		vendor=ibm
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
 		;;
 	tile*-*)
-		os=${os:-linux-gnu}
+		basic_os=${basic_os:-linux-gnu}
 		;;
 
 	*)
 		# Recognize the canonical CPU types that are allowed with any
 		# company name.
 		case $cpu in
 			1750a | 580 \
 			| a29k \
 			| aarch64 | aarch64_be \
 			| abacus \
 			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
 			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
 			| alphapca5[67] | alpha64pca5[67] \
 			| am33_2.0 \
 			| amdgcn \
 			| arc | arceb \
-			| arm  | arm[lb]e | arme[lb] | armv* \
+			| arm | arm[lb]e | arme[lb] | armv* \
 			| avr | avr32 \
 			| asmjs \
 			| ba \
 			| be32 | be64 \
 			| bfin | bpf | bs2000 \
 			| c[123]* | c30 | [cjt]90 | c4x \
 			| c8051 | clipper | craynv | csky | cydra \
 			| d10v | d30v | dlx | dsp16xx \
@@ -1224,16 +1226,17 @@ case $cpu-$vendor in
 			| orion \
 			| picochip \
 			| pdp10 | pdp11 | pj | pjl | pn | power \
 			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
 			| pru \
 			| pyramid \
 			| riscv | riscv32 | riscv64 \
 			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
 			| score \
 			| sh | shl \
 			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
 			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
 			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
 			| sparclite \
 			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
 			| spu \
@@ -1270,18 +1273,57 @@ case $vendor in
 		vendor=cbm
 		;;
 	*)
 		;;
 esac
 
 # Decode manufacturer-specific aliases for certain operating systems.
 
-if [ x$os != x ]
+if test x$basic_os != x
 then
+
+# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo $basic_os | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo $basic_os | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo $basic_os | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo $basic_os | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo $basic_os | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
 case $os in
 	# First match some system type aliases that might get confused
 	# with valid system types.
 	# solaris* is a basic system type, with this one exception.
 	auroraux)
 		os=auroraux
 		;;
 	bluegene*)
@@ -1291,19 +1333,16 @@ case $os in
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
 	solaris)
 		os=solaris2
 		;;
 	unixware*)
 		os=sysv4.2uw
 		;;
-	gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
 	# es1800 is here to avoid being matched by es* (a different OS)
 	es1800*)
 		os=ose
 		;;
 	# Some version numbers need modification
 	chorusos*)
 		os=chorusos
 		;;
@@ -1317,100 +1356,44 @@ case $os in
 		os=sco3.2v5
 		;;
 	sco4)
 		os=sco3.2v4
 		;;
 	sco3.2.[4-9]*)
 		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
 		;;
-	sco3.2v[4-9]* | sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		;;
-	scout)
+	sco*v* | scout)
 		# Don't match below
 		;;
 	sco*)
 		os=sco3.2v2
 		;;
 	psos*)
 		os=psos
 		;;
-	# Now accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST end in a * to match a version number.
-	# sysv* is not here because it comes later, after sysvr4.
-	gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
-	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
-	     | sym* | kopensolaris* | plan9* \
-	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
-	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
-	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
-	     | knetbsd* | mirbsd* | netbsd* \
-	     | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
-	     | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
-	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
-	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
-	     | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
-	     | chorusrdb* | cegcc* | glidix* \
-	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
-	     | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
-	     | linux-newlib* | linux-musl* | linux-uclibc* \
-	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
-	     | interix* | uwin* | mks* | rhapsody* | darwin* \
-	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
-	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
-	     | os2* | vos* | palmos* | uclinux* | nucleus* \
-	     | morphos* | superux* | rtmk* | windiss* \
-	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
-	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
-	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-	     | nsk* | powerunix*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
 	qnx*)
-		case $cpu in
-		    x86 | i*86)
-			;;
-		    *)
-			os=nto-$os
-			;;
-		esac
+		os=qnx
 		;;
 	hiux*)
 		os=hiuxwe2
 		;;
-	nto-qnx*)
-		;;
-	nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	sim | xray | os68k* | v88r* \
-	    | windows* | osx | abug | netware* | os9* \
-	    | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
-		;;
-	linux-dietlibc)
-		os=linux-dietlibc
-		;;
-	linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
 	lynx*178)
 		os=lynxos178
 		;;
 	lynx*5)
 		os=lynxos5
 		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
 	lynx*)
 		os=lynxos
 		;;
-	mac*)
+	mac[0-9]*)
 		os=`echo "$os" | sed -e 's|mac|macos|'`
 		;;
 	opened*)
 		os=openedition
 		;;
 	os400*)
 		os=os400
 		;;
@@ -1470,81 +1453,69 @@ case $os in
 		os=sysv4
 		;;
 	svr3)
 		os=sysv3
 		;;
 	sysvr4)
 		os=sysv4
 		;;
-	# This must come after sysvr4.
-	sysv*)
-		;;
 	ose*)
 		os=ose
 		;;
 	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
 		os=mint
 		;;
-	zvmoe)
-		os=zvmoe
-		;;
 	dicos*)
 		os=dicos
 		;;
 	pikeos*)
 		# Until real need of OS specific support for
 		# particular features comes up, bare metal
 		# configurations are quite functional.
 		case $cpu in
 		    arm*)
 			os=eabi
 			;;
 		    *)
 			os=elf
 			;;
 		esac
 		;;
-	nacl*)
-		;;
-	ios)
-		;;
-	none)
-		;;
-	*-eabi)
-		;;
 	*)
-		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
-		exit 1
+		# No normalization, but not necessarily accepted, that comes below.
 		;;
 esac
+
 else
 
 # Here we handle the default operating systems that come with various machines.
 # The value should be what the vendor currently ships out the door with their
 # machine or put another way, the most popular os provided with the machine.
 
 # Note that if you're going to try to match "-MANUFACTURER" here (say,
 # "-sun"), then you have to tell the case statement up towards the top
 # that MANUFACTURER isn't an operating system.  Otherwise, code above
 # will signal an error saying that MANUFACTURER isn't an operating
 # system, and we'll never get to this point.
 
+kernel=
 case $cpu-$vendor in
 	score-*)
 		os=elf
 		;;
 	spu-*)
 		os=elf
 		;;
 	*-acorn)
 		os=riscix1.2
 		;;
 	arm*-rebel)
-		os=linux
+		kernel=linux
+		os=gnu
 		;;
 	arm*-semi)
 		os=aout
 		;;
 	c4x-* | tic4x-*)
 		os=coff
 		;;
 	c8051-*)
@@ -1700,94 +1671,183 @@ case $cpu-$vendor in
 		;;
 	*-wrs)
 		os=vxworks
 		;;
 	*)
 		os=none
 		;;
 esac
+
 fi
 
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-abi", so those need to count as OSes.
+	musl* | newlib* | uclibc*)
+		;;
+	# Likewise for "kernel-libc"
+	eabi | eabihf | gnueabi | gnueabihf)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
 # Here we handle the case where we know the os, and the CPU type, but not the
 # manufacturer.  We pick the logical manufacturer.
 case $vendor in
 	unknown)
-		case $os in
-			riscix*)
+		case $cpu-$os in
+			*-riscix*)
 				vendor=acorn
 				;;
-			sunos*)
+			*-sunos*)
 				vendor=sun
 				;;
-			cnk*|-aix*)
+			*-cnk* | *-aix*)
 				vendor=ibm
 				;;
-			beos*)
+			*-beos*)
 				vendor=be
 				;;
-			hpux*)
+			*-hpux*)
 				vendor=hp
 				;;
-			mpeix*)
+			*-mpeix*)
 				vendor=hp
 				;;
-			hiux*)
+			*-hiux*)
 				vendor=hitachi
 				;;
-			unos*)
+			*-unos*)
 				vendor=crds
 				;;
-			dgux*)
+			*-dgux*)
 				vendor=dg
 				;;
-			luna*)
+			*-luna*)
 				vendor=omron
 				;;
-			genix*)
+			*-genix*)
 				vendor=ns
 				;;
-			clix*)
+			*-clix*)
 				vendor=intergraph
 				;;
-			mvs* | opened*)
+			*-mvs* | *-opened*)
 				vendor=ibm
 				;;
-			os400*)
+			*-os400*)
 				vendor=ibm
 				;;
-			ptx*)
+			s390-* | s390x-*)
+				vendor=ibm
+				;;
+			*-ptx*)
 				vendor=sequent
 				;;
-			tpf*)
+			*-tpf*)
 				vendor=ibm
 				;;
-			vxsim* | vxworks* | windiss*)
+			*-vxsim* | *-vxworks* | *-windiss*)
 				vendor=wrs
 				;;
-			aux*)
+			*-aux*)
 				vendor=apple
 				;;
-			hms*)
+			*-hms*)
 				vendor=hitachi
 				;;
-			mpw* | macos*)
+			*-mpw* | *-macos*)
 				vendor=apple
 				;;
-			*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
 				vendor=atari
 				;;
-			vos*)
+			*-vos*)
 				vendor=stratus
 				;;
 		esac
 		;;
 esac
 
-echo "$cpu-$vendor-$os"
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
 exit
 
 # Local variables:
 # eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
 # End:
--- a/modules/freetype2/builds/unix/configure
+++ b/modules/freetype2/builds/unix/configure
@@ -1,11 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for FreeType 2.10.2.
+# Generated by GNU Autoconf 2.69 for FreeType 2.10.4.
 #
 # Report bugs to <freetype@nongnu.org>.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -585,22 +585,22 @@ LIBOBJS=
 cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='FreeType'
 PACKAGE_TARNAME='freetype'
-PACKAGE_VERSION='2.10.2'
-PACKAGE_STRING='FreeType 2.10.2'
+PACKAGE_VERSION='2.10.4'
+PACKAGE_STRING='FreeType 2.10.4'
 PACKAGE_BUGREPORT='freetype@nongnu.org'
 PACKAGE_URL=''
 
-ac_unique_file="ftconfig.in"
+ac_unique_file="ftconfig.h.in"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
@@ -1335,17 +1335,17 @@ done
 
 #
 # Report the --help message.
 #
 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.10.2 to adapt to many kinds of systems.
+\`configure' configures FreeType 2.10.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 To assign environment variables (e.g., CC, CFLAGS...), specify them as
 VAR=VALUE.  See below for descriptions of some of the useful variables.
 
 Defaults for the options are specified in brackets.
 
@@ -1400,17 +1400,17 @@ Fine tuning of the installation director
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of FreeType 2.10.2:";;
+     short | recursive ) echo "Configuration of FreeType 2.10.4:";;
    esac
   cat <<\_ACEOF
 
 Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-shared[=PKGS]  build shared libraries [default=yes]
@@ -1555,17 +1555,17 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
 fi
 
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-FreeType configure 2.10.2
+FreeType configure 2.10.4
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
@@ -2153,17 +2153,17 @@ eval ac_res=\$$3
 $as_echo "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 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.10.2, which was
+It was created by FreeType $as_me 2.10.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
 _ACEOF
 exec 5>>config.log
 {
 cat <<_ASUNAME
@@ -2509,17 +2509,17 @@ ac_link='$CC -o conftest$ac_exeext $CFLA
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
 
 
 # Don't forget to update `docs/VERSIONS.TXT'!
 
-version_info='23:2:17'
+version_info='23:4:17'
 
 ft_version=`echo $version_info | tr : .`
 
 
 
 # checks for system type
 
 ac_aux_dir=
@@ -12749,36 +12749,36 @@ fi
   if test $ac_cv_type_long_long_int = yes; then
 
 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
 
   fi
 
 
 
-# check whether cpp computation of size of int and long in ftconfig.in works
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpp computation of bit length in ftconfig.in works" >&5
-$as_echo_n "checking whether cpp computation of bit length in ftconfig.in works... " >&6; }
+# check whether cpp computation of size of int and long in ftconfig.h.in works
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpp computation of bit length in ftconfig.h.in works" >&5
+$as_echo_n "checking whether cpp computation of bit length in ftconfig.h.in works... " >&6; }
 orig_CPPFLAGS="${CPPFLAGS}"
-CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include ${CPPFLAGS}"
 
 ac_clean_files=
 if test ! -f ft2build.h; then
   ac_clean_files=ft2build.h
   touch ft2build.h
 fi
 
 cat > conftest.c <<\_ACEOF
 #include <limits.h>
-#define FT_CONFIG_OPTIONS_H "ftoption.h"
-#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h"
+#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
+#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
 #define FT_UINT_MAX  UINT_MAX
 #define FT_ULONG_MAX ULONG_MAX
-#include "ftconfig.in"
+#include "ftconfig.h.in"
 _ACEOF
 echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int}
 echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int}
 echo >> conftest.c "#endif"
 echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long}
 echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long}
 echo >> conftest.c "#endif"
 
@@ -15125,34 +15125,25 @@ fi
 # copy the `include/freetype/config/ftoption.h' file to the `unix/builds'
 # directory (using a dummy `AC_CONFIG_FILES' call) and apply the just
 # constructed $FTOPTION_H_SED regexp (using the post-action of
 # `AC_CONFIG_FILES'); this is also the version that gets installed later on.
 #
 ac_config_files="$ac_config_files ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h"
 
 
-# configuration file -- stay in 8.3 limit
-#
-# since #undef doesn't survive in configuration header files we replace
-# `/undef' with `#undef' after creating the output file
-
-ac_config_headers="$ac_config_headers ftconfig.h:ftconfig.in"
+ac_config_headers="$ac_config_headers ftconfig.h"
 
 
 # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
 # and `builds/unix/unix-cc.mk' that will be used by the build system
 #
 ac_config_files="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in"
 
 
-# re-generate the Jamfile to use libtool now
-#
-# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
-
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
 # scripts and configure runs, see configure's option --config-cache.
 # It is not useful on other systems.  If it contains results you don't
 # want to keep, you may remove or edit it.
 #
 # config.status only pays attention to the cache file if you give it
@@ -15649,17 +15640,17 @@ exec 6>&1
 _ASEOF
 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # Save the log message, to keep $0 and so on meaningful, and to
 # 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.10.2, which was
+This file was extended by FreeType $as_me 2.10.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
   CONFIG_LINKS    = $CONFIG_LINKS
   CONFIG_COMMANDS = $CONFIG_COMMANDS
   $ $0 $@
 
@@ -15715,17 +15706,17 @@ Configuration commands:
 $config_commands
 
 Report bugs to <freetype@nongnu.org>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-FreeType config.status 2.10.2
+FreeType config.status 2.10.4
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
 ac_pwd='$ac_pwd'
@@ -16205,17 +16196,17 @@ FTOPTION_H_SED="$FTOPTION_H_SED"
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
 # Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "ftoption.h") CONFIG_FILES="$CONFIG_FILES ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h" ;;
-    "ftconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h:ftconfig.in" ;;
+    "ftconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h" ;;
     "unix-cc.mk") CONFIG_FILES="$CONFIG_FILES unix-cc.mk:unix-cc.in" ;;
     "unix-def.mk") CONFIG_FILES="$CONFIG_FILES unix-def.mk:unix-def.in" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
 
@@ -17456,19 +17447,16 @@ hardcode_action=$hardcode_action_RC
 
 # ### END LIBTOOL TAG CONFIG: RC
 _LT_EOF
 
  ;;
     "ftoption.h":F) mv ftoption.h ftoption.tmp
    eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h"
    rm ftoption.tmp ;;
-    "ftconfig.h":H) mv ftconfig.h ftconfig.tmp
-   sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
-   rm ftconfig.tmp ;;
 
   esac
 done # for ac_tag
 
 
 as_fn_exit 0
 _ACEOF
 ac_clean_files=$ac_clean_files_save
@@ -17520,23 +17508,23 @@ Library configuration:
   libpng:        $have_libpng
   harfbuzz:      $have_harfbuzz
   brotli:        $have_brotli
 " >&6;}
 
 # Warn if docwriter is not installed
 
 if test $have_docwriter = no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}:
-  Warning: \`make refdoc' will fail since pip package \`docwriter' is not
-  installed.  To install, run \`$PIP install docwriter', or to use a Python
+  { $as_echo "$as_me:${as_lineno-$LINENO}: 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.
   " >&5
-$as_echo "$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
+$as_echo "$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.
-  " >&6;}
+  " >&2;}
 fi
 
 # end of configure.raw
--- a/modules/freetype2/builds/unix/configure.ac
+++ b/modules/freetype2/builds/unix/configure.ac
@@ -6,23 +6,23 @@
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
 # and distributed under the terms of the FreeType project license,
 # LICENSE.TXT.  By continuing to use, modify, or distribute this file you
 # indicate that you have read the license and understand and accept it
 # fully.
 
-AC_INIT([FreeType], [2.10.2], [freetype@nongnu.org], [freetype])
-AC_CONFIG_SRCDIR([ftconfig.in])
+AC_INIT([FreeType], [2.10.4], [freetype@nongnu.org], [freetype])
+AC_CONFIG_SRCDIR([ftconfig.h.in])
 
 
 # Don't forget to update `docs/VERSIONS.TXT'!
 
-version_info='23:2:17'
+version_info='23:4:17'
 AC_SUBST([version_info])
 ft_version=`echo $version_info | tr : .`
 AC_SUBST([ft_version])
 
 
 # checks for system type
 
 AC_CANONICAL_HOST
@@ -104,35 +104,35 @@ AC_CHECK_HEADERS([fcntl.h unistd.h])
 # checks for typedefs, structures, and compiler characteristics
 
 AC_C_CONST
 AC_CHECK_SIZEOF([int])
 AC_CHECK_SIZEOF([long])
 AC_TYPE_LONG_LONG_INT
 
 
-# check whether cpp computation of size of int and long in ftconfig.in works
+# check whether cpp computation of size of int and long in ftconfig.h.in works
 
-AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works])
+AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.h.in works])
 orig_CPPFLAGS="${CPPFLAGS}"
-CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include ${CPPFLAGS}"
 
 ac_clean_files=
 if test ! -f ft2build.h; then
   ac_clean_files=ft2build.h
   touch ft2build.h
 fi
 
 cat > conftest.c <<\_ACEOF
 #include <limits.h>
-#define FT_CONFIG_OPTIONS_H "ftoption.h"
-#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h"
+#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
+#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
 #define FT_UINT_MAX  UINT_MAX
 #define FT_ULONG_MAX ULONG_MAX
-#include "ftconfig.in"
+#include "ftconfig.h.in"
 _ACEOF
 echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int}
 echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int}
 echo >> conftest.c "#endif"
 echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long}
 echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long}
 echo >> conftest.c "#endif"
 
@@ -1153,52 +1153,40 @@ AC_SUBST([LDFLAGS])
 # `AC_CONFIG_FILES'); this is also the version that gets installed later on.
 #
 AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h],
   [mv ftoption.h ftoption.tmp
    eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h"
    rm ftoption.tmp],
   [FTOPTION_H_SED="$FTOPTION_H_SED"])
 
-# configuration file -- stay in 8.3 limit
-#
-# since #undef doesn't survive in configuration header files we replace
-# `/undef' with `#undef' after creating the output file
-
-AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
-  [mv ftconfig.h ftconfig.tmp
-   sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
-   rm ftconfig.tmp])
+AC_CONFIG_HEADERS([ftconfig.h])
 
 # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
 # and `builds/unix/unix-cc.mk' that will be used by the build system
 #
 AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
                  unix-def.mk:unix-def.in])
 
-# re-generate the Jamfile to use libtool now
-#
-# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
-
 AC_OUTPUT
 
 AC_MSG_NOTICE([
 
 Library configuration:
   external zlib: $have_zlib
   bzip2:         $have_bzip2
   libpng:        $have_libpng
   harfbuzz:      $have_harfbuzz
   brotli:        $have_brotli
 ])
 
 # Warn if docwriter is not installed
 
 if test $have_docwriter = no; then
-  AC_MSG_NOTICE([
-  Warning: \`make refdoc' will fail since pip package \`docwriter' is not
-  installed.  To install, run \`$PIP install docwriter', or to use a Python
+  AC_MSG_WARN([
+  \`make refdoc' will fail since pip package \`docwriter' is not installed.
+  To install, run \`$PIP install docwriter', or to use a Python
   virtual environment, run \`make refdoc-venv' (requires pip package
   \`virtualenv'). These operations require Python >= 3.5.
   ])
 fi
 
 # end of configure.raw
--- a/modules/freetype2/builds/unix/configure.raw
+++ b/modules/freetype2/builds/unix/configure.raw
@@ -7,22 +7,22 @@
 #
 # This file is part of the FreeType project, and may only be used, modified,
 # and distributed under the terms of the FreeType project license,
 # LICENSE.TXT.  By continuing to use, modify, or distribute this file you
 # indicate that you have read the license and understand and accept it
 # fully.
 
 AC_INIT([FreeType], [@VERSION@], [freetype@nongnu.org], [freetype])
-AC_CONFIG_SRCDIR([ftconfig.in])
+AC_CONFIG_SRCDIR([ftconfig.h.in])
 
 
 # Don't forget to update `docs/VERSIONS.TXT'!
 
-version_info='23:2:17'
+version_info='23:4:17'
 AC_SUBST([version_info])
 ft_version=`echo $version_info | tr : .`
 AC_SUBST([ft_version])
 
 
 # checks for system type
 
 AC_CANONICAL_HOST
@@ -104,35 +104,35 @@ AC_CHECK_HEADERS([fcntl.h unistd.h])
 # checks for typedefs, structures, and compiler characteristics
 
 AC_C_CONST
 AC_CHECK_SIZEOF([int])
 AC_CHECK_SIZEOF([long])
 AC_TYPE_LONG_LONG_INT
 
 
-# check whether cpp computation of size of int and long in ftconfig.in works
+# check whether cpp computation of size of int and long in ftconfig.h.in works
 
-AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works])
+AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.h.in works])
 orig_CPPFLAGS="${CPPFLAGS}"
-CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include ${CPPFLAGS}"
 
 ac_clean_files=
 if test ! -f ft2build.h; then
   ac_clean_files=ft2build.h
   touch ft2build.h
 fi
 
 cat > conftest.c <<\_ACEOF
 #include <limits.h>
-#define FT_CONFIG_OPTIONS_H "ftoption.h"
-#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h"
+#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
+#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
 #define FT_UINT_MAX  UINT_MAX
 #define FT_ULONG_MAX ULONG_MAX
-#include "ftconfig.in"
+#include "ftconfig.h.in"
 _ACEOF
 echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int}
 echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int}
 echo >> conftest.c "#endif"
 echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long}
 echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long}
 echo >> conftest.c "#endif"
 
@@ -1153,52 +1153,40 @@ AC_SUBST([LDFLAGS])
 # `AC_CONFIG_FILES'); this is also the version that gets installed later on.
 #
 AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h],
   [mv ftoption.h ftoption.tmp
    eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h"
    rm ftoption.tmp],
   [FTOPTION_H_SED="$FTOPTION_H_SED"])
 
-# configuration file -- stay in 8.3 limit
-#
-# since #undef doesn't survive in configuration header files we replace
-# `/undef' with `#undef' after creating the output file
-
-AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
-  [mv ftconfig.h ftconfig.tmp
-   sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
-   rm ftconfig.tmp])
+AC_CONFIG_HEADERS([ftconfig.h])
 
 # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
 # and `builds/unix/unix-cc.mk' that will be used by the build system
 #
 AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
                  unix-def.mk:unix-def.in])
 
-# re-generate the Jamfile to use libtool now
-#
-# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
-
 AC_OUTPUT
 
 AC_MSG_NOTICE([
 
 Library configuration:
   external zlib: $have_zlib
   bzip2:         $have_bzip2
   libpng:        $have_libpng
   harfbuzz:      $have_harfbuzz
   brotli:        $have_brotli
 ])
 
 # Warn if docwriter is not installed
 
 if test $have_docwriter = no; then
-  AC_MSG_NOTICE([
-  Warning: \`make refdoc' will fail since pip package \`docwriter' is not
-  installed.  To install, run \`$PIP install docwriter', or to use a Python
+  AC_MSG_WARN([
+  \`make refdoc' will fail since pip package \`docwriter' is not installed.
+  To install, run \`$PIP install docwriter', or to use a Python
   virtual environment, run \`make refdoc-venv' (requires pip package
   \`virtualenv'). These operations require Python >= 3.5.
   ])
 fi
 
 # end of configure.raw
--- a/modules/freetype2/builds/unix/freetype2.m4
+++ b/modules/freetype2/builds/unix/freetype2.m4
@@ -10,17 +10,17 @@
 # indicate that you have read the license and understand and accept it
 # fully.
 #
 # As a special exception to the FreeType project license, this file may be
 # distributed as part of a program that contains a configuration script
 # generated by Autoconf, under the same distribution terms as the rest of
 # that program.
 #
-# serial 4
+# serial 5
 
 # AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 # Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
 # MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is
 # FreeType 2.0.4).
 #
 AC_DEFUN([AC_CHECK_FT2],
   [# Get the cflags and libraries from the freetype-config script
@@ -111,17 +111,17 @@ AC_DEFUN([AC_CHECK_FT2],
 
          #
          # Sanity checks for the results of freetype-config to some extent.
          #
          AC_RUN_IFELSE([
              AC_LANG_SOURCE([[
 
 #include <ft2build.h>
-#include FT_FREETYPE_H
+#include <freetype/freetype.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 int
 main()
 {
   FT_Library library;
   FT_Error  error;
new file mode 100644
--- /dev/null
+++ b/modules/freetype2/builds/unix/ftconfig.h.in
@@ -0,0 +1,62 @@
+/****************************************************************************
+ *
+ * ftconfig.h.in
+ *
+ *   UNIX-specific configuration file (specification only).
+ *
+ * Copyright (C) 1996-2020 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+ * modified, and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT.  By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
+ */
+
+
+  /**************************************************************************
+   *
+   * This header file contains a number of macro definitions that are used by
+   * the rest of the engine.  Most of the macros here are automatically
+   * determined at compile time, and you should not need to change it to port
+   * FreeType, except to compile the library with a non-ANSI compiler.
+   *
+   * Note however that if some specific modifications are needed, we advise
+   * you to place a modified copy in your build directory.
+   *
+   * The build directory is usually `builds/<system>`, and contains
+   * system-specific files that are always included first when building the
+   * library.
+   *
+   */
+
+#ifndef FTCONFIG_H_
+#define FTCONFIG_H_
+
+#include <ft2build.h>
+#include FT_CONFIG_OPTIONS_H
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
+#undef HAVE_UNISTD_H
+#undef HAVE_FCNTL_H
+
+#undef FT_USE_AUTOCONF_SIZEOF_TYPES
+#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
+
+#undef SIZEOF_INT
+#undef SIZEOF_LONG
+#define FT_SIZEOF_INT  SIZEOF_INT
+#define FT_SIZEOF_LONG SIZEOF_LONG
+
+#endif /* FT_USE_AUTOCONF_SIZEOF_TYPES */
+
+#include <freetype/config/integer-types.h>
+#include <freetype/config/public-macros.h>
+#include <freetype/config/mac-support.h>
+
+#endif /* FTCONFIG_H_ */
+
+
+/* END */
deleted file mode 100644
--- a/modules/freetype2/builds/unix/ftconfig.in
+++ /dev/null
@@ -1,603 +0,0 @@
-/****************************************************************************
- *
- * ftconfig.in
- *
- *   UNIX-specific configuration file (specification only).
- *
- * Copyright (C) 1996-2020 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used,
- * modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT.  By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- */
-
-
-  /**************************************************************************
-   *
-   * This header file contains a number of macro definitions that are used by
-   * the rest of the engine.  Most of the macros here are automatically
-   * determined at compile time, and you should not need to change it to port
-   * FreeType, except to compile the library with a non-ANSI compiler.
-   *
-   * Note however that if some specific modifications are needed, we advise
-   * you to place a modified copy in your build directory.
-   *
-   * The build directory is usually `builds/<system>`, and contains
-   * system-specific files that are always included first when building the
-   * library.
-   *
-   */
-
-#ifndef FTCONFIG_H_
-#define FTCONFIG_H_
-
-#include <ft2build.h>
-#include FT_CONFIG_OPTIONS_H
-#include FT_CONFIG_STANDARD_LIBRARY_H
-
-
-FT_BEGIN_HEADER
-
-
-  /**************************************************************************
-   *
-   *              PLATFORM-SPECIFIC CONFIGURATION MACROS
-   *
-   * These macros can be toggled to suit a specific system.  The current ones
-   * are defaults used to compile FreeType in an ANSI C environment (16bit
-   * compilers are also supported).  Copy this file to your own
-   * `builds/<system>` directory, and edit it to port the engine.
-   *
-   */
-
-#undef HAVE_UNISTD_H
-#undef HAVE_FCNTL_H
-#undef HAVE_STDINT_H
-
-  /* There are systems (like the Texas Instruments 'C54x) where a `char`  */
-  /* has 16~bits.  ANSI~C says that `sizeof(char)` is always~1.  Since an */
-  /* `int` has 16~bits also for this system, `sizeof(int)` gives~1 which  */
-  /* is probably unexpected.                                              */
-  /*                                                                      */
-  /* `CHAR_BIT` (defined in `limits.h`) gives the number of bits in a     */
-  /* `char` type.                                                         */
-
-#ifndef FT_CHAR_BIT
-#define FT_CHAR_BIT  CHAR_BIT
-#endif
-
-
-#undef FT_USE_AUTOCONF_SIZEOF_TYPES
-#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
-
-#undef SIZEOF_INT
-#undef SIZEOF_LONG
-#define FT_SIZEOF_INT  SIZEOF_INT
-#define FT_SIZEOF_LONG SIZEOF_LONG
-
-#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
-
-  /* Following cpp computation of the bit length of `int` and `long` */
-  /* is copied from default `include/freetype/config/ftconfig.h`.    */
-  /* If any improvement is required for this file, it should be      */
-  /* applied to the original header file for the builders that do    */
-  /* not use configure script.                                       */
-
-  /* The size of an `int` type. */
-#if                                 FT_UINT_MAX == 0xFFFFUL
-#define FT_SIZEOF_INT  ( 16 / FT_CHAR_BIT )
-#elif                               FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT  ( 32 / FT_CHAR_BIT )
-#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_INT  ( 64 / FT_CHAR_BIT )
-#else
-#error "Unsupported size of `int' type!"
-#endif
-
-  /* The size of a `long` type.  A five-byte `long` (as used e.g. on the */
-  /* DM642) is recognized but avoided.                                   */
-#if                                  FT_ULONG_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_LONG  ( 32 / FT_CHAR_BIT )
-#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
-#define FT_SIZEOF_LONG  ( 32 / FT_CHAR_BIT )
-#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
-#define FT_SIZEOF_LONG  ( 64 / FT_CHAR_BIT )
-#else
-#error "Unsupported size of `long' type!"
-#endif
-
-#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
-
-  /* `FT_UNUSED` indicates that a given parameter is not used --   */
-  /* this is only used to get rid of unpleasant compiler warnings. */
-#ifndef FT_UNUSED
-#define FT_UNUSED( arg )  ( (arg) = (arg) )
-#endif
-
-
-  /**************************************************************************
-   *
-   *                    AUTOMATIC CONFIGURATION MACROS
-   *
-   * These macros are computed from the ones defined above.  Don't touch
-   * their definition, unless you know precisely what you are doing.  No
-   * porter should need to mess with them.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * Mac support
-   *
-   *   This is the only necessary change, so it is defined here instead
-   *   providing a new configuration file.
-   */
-#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
-  /* No Carbon frameworks for 64bit 10.4.x.                         */
-  /* `AvailabilityMacros.h` is available since Mac OS X 10.2,       */
-  /* so guess the system version by maximum errno before inclusion. */
-#include <errno.h>
-#ifdef ECANCELED /* defined since 10.2 */
-#include "AvailabilityMacros.h"
-#endif
-#if defined( __LP64__ ) && \
-    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
-/undef FT_MACINTOSH
-#endif
-
-#elif defined( __SC__ ) || defined( __MRC__ )
-  /* Classic MacOS compilers */
-#include "ConditionalMacros.h"
-#if TARGET_OS_MAC
-#define FT_MACINTOSH 1
-#endif
-
-#endif
-
-
-  /* Fix compiler warning with sgi compiler. */
-#if defined( __sgi ) && !defined( __GNUC__ )
-#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
-#pragma set woff 3505
-#endif
-#endif
-
-
-  /**************************************************************************
-   *
-   * @section:
-   *   basic_types
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int16
-   *
-   * @description:
-   *   A typedef for a 16bit signed integer type.
-   */
-  typedef signed short  FT_Int16;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt16
-   *
-   * @description:
-   *   A typedef for a 16bit unsigned integer type.
-   */
-  typedef unsigned short  FT_UInt16;
-
-  /* */
-
-
-  /* this #if 0 ... #endif clause is for documentation purposes */
-#if 0
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int32
-   *
-   * @description:
-   *   A typedef for a 32bit signed integer type.  The size depends on the
-   *   configuration.
-   */
-  typedef signed XXX  FT_Int32;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt32
-   *
-   *   A typedef for a 32bit unsigned integer type.  The size depends on the
-   *   configuration.
-   */
-  typedef unsigned XXX  FT_UInt32;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int64
-   *
-   *   A typedef for a 64bit signed integer type.  The size depends on the
-   *   configuration.  Only defined if there is real 64bit support;
-   *   otherwise, it gets emulated with a structure (if necessary).
-   */
-  typedef signed XXX  FT_Int64;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt64
-   *
-   *   A typedef for a 64bit unsigned integer type.  The size depends on the
-   *   configuration.  Only defined if there is real 64bit support;
-   *   otherwise, it gets emulated with a structure (if necessary).
-   */
-  typedef unsigned XXX  FT_UInt64;
-
-  /* */
-
-#endif
-
-#if FT_SIZEOF_INT == 4
-
-  typedef signed int      FT_Int32;
-  typedef unsigned int    FT_UInt32;
-
-#elif FT_SIZEOF_LONG == 4
-
-  typedef signed long     FT_Int32;
-  typedef unsigned long   FT_UInt32;
-
-#else
-#error "no 32bit type found -- please check your configuration files"
-#endif
-
-
-  /* look up an integer type that is at least 32~bits */
-#if FT_SIZEOF_INT >= 4
-
-  typedef int            FT_Fast;
-  typedef unsigned int   FT_UFast;
-
-#elif FT_SIZEOF_LONG >= 4
-
-  typedef long           FT_Fast;
-  typedef unsigned long  FT_UFast;
-
-#endif
-
-
-  /* determine whether we have a 64-bit `int` type for platforms without */
-  /* Autoconf                                                            */
-#if FT_SIZEOF_LONG == 8
-
-  /* `FT_LONG64` must be defined if a 64-bit type is available */
-#define FT_LONG64
-#define FT_INT64   long
-#define FT_UINT64  unsigned long
-
-  /* we handle the LLP64 scheme separately for GCC and clang, */
-  /* suppressing the `long long` warning                      */
-#elif ( FT_SIZEOF_LONG == 4 )       && \
-      defined( HAVE_LONG_LONG_INT ) && \
-      defined( __GNUC__ )
-#pragma GCC diagnostic ignored "-Wlong-long"
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-  /**************************************************************************
-   *
-   * A 64-bit data type may create compilation problems if you compile in
-   * strict ANSI mode.  To avoid them, we disable other 64-bit data types if
-   * `__STDC__` is defined.  You can however ignore this rule by defining the
-   * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro.
-   */
-#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
-
-#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
-
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
-
-  /* this compiler provides the `__int64` type */
-#define FT_LONG64
-#define FT_INT64   __int64
-#define FT_UINT64  unsigned __int64
-
-#elif defined( __BORLANDC__ )  /* Borland C++ */
-
-  /* XXXX: We should probably check the value of `__BORLANDC__` in order */
-  /*       to test the compiler version.                                 */
-
-  /* this compiler provides the `__int64` type */
-#define FT_LONG64
-#define FT_INT64   __int64
-#define FT_UINT64  unsigned __int64
-
-#elif defined( __WATCOMC__ )   /* Watcom C++ */
-
-  /* Watcom doesn't provide 64-bit data types */
-
-#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
-
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-#elif defined( __GNUC__ )
-
-  /* GCC provides the `long long` type */
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-#endif /* __STDC_VERSION__ >= 199901L */
-
-#endif /* FT_SIZEOF_LONG == 8 */
-
-#ifdef FT_LONG64
-  typedef FT_INT64   FT_Int64;
-  typedef FT_UINT64  FT_UInt64;
-#endif
-
-
-#ifdef _WIN64
-  /* only 64bit Windows uses the LLP64 data model, i.e., */
-  /* 32bit integers, 64bit pointers                      */
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
-#else
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
-#endif
-
-
-  /**************************************************************************
-   *
-   * miscellaneous
-   *
-   */
-
-
-#define FT_BEGIN_STMNT  do {
-#define FT_END_STMNT    } while ( 0 )
-#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
-
-
-  /* `typeof` condition taken from gnulib's `intprops.h` header file */
-#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 )                       || \
-      ( defined( __IBMC__ ) && __IBMC__ >= 1210 &&                      \
-        defined( __IBM__TYPEOF__ ) )                                 || \
-      ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
-#define FT_TYPEOF( type )  ( __typeof__ ( type ) )
-#else
-#define FT_TYPEOF( type )  /* empty */
-#endif
-
-
-  /* Use `FT_LOCAL` and `FT_LOCAL_DEF` to declare and define,            */
-  /* respectively, a function that gets used only within the scope of a  */
-  /* module.  Normally, both the header and source code files for such a */
-  /* function are within a single module directory.                      */
-  /*                                                                     */
-  /* Intra-module arrays should be tagged with `FT_LOCAL_ARRAY` and      */
-  /* `FT_LOCAL_ARRAY_DEF`.                                               */
-  /*                                                                     */
-#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-
-#define FT_LOCAL( x )      static  x
-#define FT_LOCAL_DEF( x )  static  x
-
-#else
-
-#ifdef __cplusplus
-#define FT_LOCAL( x )      extern "C"  x
-#define FT_LOCAL_DEF( x )  extern "C"  x
-#else
-#define FT_LOCAL( x )      extern  x
-#define FT_LOCAL_DEF( x )  x
-#endif
-
-#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
-
-#define FT_LOCAL_ARRAY( x )      extern const  x
-#define FT_LOCAL_ARRAY_DEF( x )  const  x
-
-
-  /* Use `FT_BASE` and `FT_BASE_DEF` to declare and define, respectively, */
-  /* functions that are used in more than a single module.  In the        */
-  /* current setup this implies that the declaration is in a header file  */
-  /* in the `include/freetype/internal` directory, and the function body  */
-  /* is in a file in `src/base`.                                          */
-  /*                                                                      */
-#ifndef FT_BASE
-
-#ifdef __cplusplus
-#define FT_BASE( x )  extern "C"  x
-#else
-#define FT_BASE( x )  extern  x
-#endif
-
-#endif /* !FT_BASE */
-
-
-#ifndef FT_BASE_DEF
-
-#ifdef __cplusplus
-#define FT_BASE_DEF( x )  x
-#else
-#define FT_BASE_DEF( x )  x
-#endif
-
-#endif /* !FT_BASE_DEF */
-
-
-  /* When compiling FreeType as a DLL or DSO with hidden visibility    */
-  /* some systems/compilers need a special attribute in front OR after */
-  /* the return type of function declarations.                         */
-  /*                                                                   */
-  /* Two macros are used within the FreeType source code to define     */
-  /* exported library functions: `FT_EXPORT` and `FT_EXPORT_DEF`.      */
-  /*                                                                   */
-  /* - `FT_EXPORT( return_type )`                                      */
-  /*                                                                   */
-  /*   is used in a function declaration, as in                        */
-  /*                                                                   */
-  /*   ```                                                             */
-  /*     FT_EXPORT( FT_Error )                                         */
-  /*     FT_Init_FreeType( FT_Library*  alibrary );                    */
-  /*   ```                                                             */
-  /*                                                                   */
-  /* - `FT_EXPORT_DEF( return_type )`                                  */
-  /*                                                                   */
-  /*   is used in a function definition, as in                         */
-  /*                                                                   */
-  /*   ```                                                             */
-  /*     FT_EXPORT_DEF( FT_Error )                                     */
-  /*     FT_Init_FreeType( FT_Library*  alibrary )                     */
-  /*     {                                                             */
-  /*       ... some code ...                                           */
-  /*       return FT_Err_Ok;                                           */
-  /*     }                                                             */
-  /*   ```                                                             */
-  /*                                                                   */
-  /* You can provide your own implementation of `FT_EXPORT` and        */
-  /* `FT_EXPORT_DEF` here if you want.                                 */
-  /*                                                                   */
-  /* To export a variable, use `FT_EXPORT_VAR`.                        */
-  /*                                                                   */
-#ifndef FT_EXPORT
-
-#ifdef FT2_BUILD_LIBRARY
-
-#if defined( _WIN32 ) && defined( DLL_EXPORT )
-#define FT_EXPORT( x )  __declspec( dllexport )  x
-#elif defined( __GNUC__ ) && __GNUC__ >= 4
-#define FT_EXPORT( x )  __attribute__(( visibility( "default" ) ))  x
-#elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550
-#define FT_EXPORT( x )  __global  x
-#elif defined( __cplusplus )
-#define FT_EXPORT( x )  extern "C"  x
-#else
-#define FT_EXPORT( x )  extern  x
-#endif
-
-#else
-
-#if defined( _WIN32 ) && defined( DLL_IMPORT )
-#define FT_EXPORT( x )  __declspec( dllimport )  x
-#elif defined( __cplusplus )
-#define FT_EXPORT( x )  extern "C"  x
-#else
-#define FT_EXPORT( x )  extern  x
-#endif
-
-#endif
-
-#endif /* !FT_EXPORT */
-
-
-#ifndef FT_EXPORT_DEF
-
-#ifdef __cplusplus
-#define FT_EXPORT_DEF( x )  extern "C"  x
-#else
-#define FT_EXPORT_DEF( x )  extern  x
-#endif
-
-#endif /* !FT_EXPORT_DEF */
-
-
-#ifndef FT_EXPORT_VAR
-
-#ifdef __cplusplus
-#define FT_EXPORT_VAR( x )  extern "C"  x
-#else
-#define FT_EXPORT_VAR( x )  extern  x
-#endif
-
-#endif /* !FT_EXPORT_VAR */
-
-
-  /* The following macros are needed to compile the library with a   */
-  /* C++ compiler and with 16bit compilers.                          */
-  /*                                                                 */
-
-  /* This is special.  Within C++, you must specify `extern "C"` for */
-  /* functions which are used via function pointers, and you also    */
-  /* must do that for structures which contain function pointers to  */
-  /* assure C linkage -- it's not possible to have (local) anonymous */
-  /* functions which are accessed by (global) function pointers.     */
-  /*                                                                 */
-  /*                                                                 */
-  /* FT_CALLBACK_DEF is used to _define_ a callback function,        */
-  /* located in the same source code file as the structure that uses */
-  /* it.                                                             */
-  /*                                                                 */
-  /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare   */
-  /* and define a callback function, respectively, in a similar way  */
-  /* as FT_BASE and FT_BASE_DEF work.                                */
-  /*                                                                 */
-  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
-  /* contains pointers to callback functions.                        */
-  /*                                                                 */
-  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
-  /* that contains pointers to callback functions.                   */
-  /*                                                                 */
-  /*                                                                 */
-  /* Some 16bit compilers have to redefine these macros to insert    */
-  /* the infamous `_cdecl` or `__fastcall` declarations.             */
-  /*                                                                 */
-#ifndef FT_CALLBACK_DEF
-#ifdef __cplusplus
-#define FT_CALLBACK_DEF( x )  extern "C"  x
-#else
-#define FT_CALLBACK_DEF( x )  static  x
-#endif
-#endif /* FT_CALLBACK_DEF */
-
-#ifndef FT_BASE_CALLBACK
-#ifdef __cplusplus
-#define FT_BASE_CALLBACK( x )      extern "C"  x
-#define FT_BASE_CALLBACK_DEF( x )  extern "C"  x
-#else
-#define FT_BASE_CALLBACK( x )      extern  x
-#define FT_BASE_CALLBACK_DEF( x )  x
-#endif
-#endif /* FT_BASE_CALLBACK */
-
-#ifndef FT_CALLBACK_TABLE
-#ifdef __cplusplus
-#define FT_CALLBACK_TABLE      extern "C"
-#define FT_CALLBACK_TABLE_DEF  extern "C"
-#else
-#define FT_CALLBACK_TABLE      extern
-#define FT_CALLBACK_TABLE_DEF  /* nothing */
-#endif
-#endif /* FT_CALLBACK_TABLE */
-
-
-FT_END_HEADER
-
-
-#endif /* FTCONFIG_H_ */
-
-
-/* END */
--- a/modules/freetype2/builds/unix/ftsystem.c
+++ b/modules/freetype2/builds/unix/ftsystem.c
@@ -13,22 +13,22 @@
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
 /***************************************************************************/
 
 
 #include <ft2build.h>
   /* we use our special ftconfig.h file, not the standard one */
-#include <ftconfig.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
-#include FT_INTERNAL_STREAM_H
+#include FT_CONFIG_CONFIG_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
+#include <freetype/internal/ftstream.h>
 
   /* memory-mapping includes and definitions */
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
 #include <sys/mman.h>
 #ifndef MAP_FILE
@@ -346,17 +346,17 @@
     close( file );
 
     stream->descriptor.pointer = stream->base;
     stream->pathname.pointer   = (char*)filepathname;
 
     stream->read = 0;
 
     FT_TRACE1(( "FT_Stream_Open:" ));
-    FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
+    FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
                 filepathname, stream->size ));
 
     return FT_Err_Ok;
 
   Fail_Read:
     ft_free( NULL, stream->base );
 
   Fail_Map:
--- a/modules/freetype2/builds/vms/ftconfig.h
+++ b/modules/freetype2/builds/vms/ftconfig.h
@@ -34,522 +34,25 @@
 
 #ifndef FTCONFIG_H_
 #define FTCONFIG_H_
 
 #include <ft2build.h>
 #include FT_CONFIG_OPTIONS_H
 #include FT_CONFIG_STANDARD_LIBRARY_H
 
-
-FT_BEGIN_HEADER
-
-
-  /**************************************************************************
-   *
-   *              PLATFORM-SPECIFIC CONFIGURATION MACROS
-   *
-   * These macros can be toggled to suit a specific system.  The current ones
-   * are defaults used to compile FreeType in an ANSI C environment (16bit
-   * compilers are also supported).  Copy this file to your own
-   * `builds/<system>` directory, and edit it to port the engine.
-   *
-   */
-
 #define HAVE_UNISTD_H  1
 #define HAVE_FCNTL_H   1
 
 #define SIZEOF_INT   4
 #define SIZEOF_LONG  4
 
 #define FT_SIZEOF_INT   4
 #define FT_SIZEOF_LONG  4
 
-
-  /* `FT_UNUSED` indicates that a given parameter is not used --   */
-  /* this is only used to get rid of unpleasant compiler warnings. */
-#ifndef FT_UNUSED
-#define FT_UNUSED( arg )  ( (arg) = (arg) )
-#endif
-
-
-  /**************************************************************************
-   *
-   *                    AUTOMATIC CONFIGURATION MACROS
-   *
-   * These macros are computed from the ones defined above.  Don't touch
-   * their definition, unless you know precisely what you are doing.  No
-   * porter should need to mess with them.
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * Mac support
-   *
-   *   This is the only necessary change, so it is defined here instead
-   *   providing a new configuration file.
-   */
-#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
-  /* No Carbon frameworks for 64bit 10.4.x.                         */
-  /* `AvailabilityMacros.h` is available since Mac OS X 10.2,       */
-  /* so guess the system version by maximum errno before inclusion. */
-#include <errno.h>
-#ifdef ECANCELED /* defined since 10.2 */
-#include "AvailabilityMacros.h"
-#endif
-#if defined( __LP64__ ) && \
-    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
-#undef FT_MACINTOSH
-#endif
-
-#elif defined( __SC__ ) || defined( __MRC__ )
-  /* Classic MacOS compilers */
-#include "ConditionalMacros.h"
-#if TARGET_OS_MAC
-#define FT_MACINTOSH 1
-#endif
-
-#endif
-
-
-  /* Fix compiler warning with sgi compiler. */
-#if defined( __sgi ) && !defined( __GNUC__ )
-#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
-#pragma set woff 3505
-#endif
-#endif
-
-
-  /**************************************************************************
-   *
-   * @section:
-   *   basic_types
-   *
-   */
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int16
-   *
-   * @description:
-   *   A typedef for a 16bit signed integer type.
-   */
-  typedef signed short  FT_Int16;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt16
-   *
-   * @description:
-   *   A typedef for a 16bit unsigned integer type.
-   */
-  typedef unsigned short  FT_UInt16;
-
-  /* */
-
-
-  /* this #if 0 ... #endif clause is for documentation purposes */
-#if 0
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int32
-   *
-   * @description:
-   *   A typedef for a 32bit signed integer type.  The size depends on the
-   *   configuration.
-   */
-  typedef signed XXX  FT_Int32;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt32
-   *
-   *   A typedef for a 32bit unsigned integer type.  The size depends on the
-   *   configuration.
-   */
-  typedef unsigned XXX  FT_UInt32;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_Int64
-   *
-   *   A typedef for a 64bit signed integer type.  The size depends on the
-   *   configuration.  Only defined if there is real 64bit support;
-   *   otherwise, it gets emulated with a structure (if necessary).
-   */
-  typedef signed XXX  FT_Int64;
-
-
-  /**************************************************************************
-   *
-   * @type:
-   *   FT_UInt64
-   *
-   *   A typedef for a 64bit unsigned integer type.  The size depends on the
-   *   configuration.  Only defined if there is real 64bit support;
-   *   otherwise, it gets emulated with a structure (if necessary).
-   */
-  typedef unsigned XXX  FT_UInt64;
-
-  /* */
-
-#endif
-
-#if FT_SIZEOF_INT == 4
-
-  typedef signed int      FT_Int32;
-  typedef unsigned int    FT_UInt32;
-
-#elif FT_SIZEOF_LONG == 4
-
-  typedef signed long     FT_Int32;
-  typedef unsigned long   FT_UInt32;
-
-#else
-#error "no 32bit type found -- please check your configuration files"
-#endif
-
-
-  /* look up an integer type that is at least 32~bits */
-#if FT_SIZEOF_INT >= 4
-
-  typedef int            FT_Fast;
-  typedef unsigned int   FT_UFast;
-
-#elif FT_SIZEOF_LONG >= 4
-
-  typedef long           FT_Fast;
-  typedef unsigned long  FT_UFast;
-
-#endif
-
-
-  /* determine whether we have a 64-bit `int` type for platforms without */
-  /* Autoconf                                                            */
-#if FT_SIZEOF_LONG == 8
-
-  /* `FT_LONG64` must be defined if a 64-bit type is available */
-#define FT_LONG64
-#define FT_INT64   long
-#define FT_UINT64  unsigned long
-
-  /* we handle the LLP64 scheme separately for GCC and clang, */
-  /* suppressing the `long long` warning                      */
-#elif ( FT_SIZEOF_LONG == 4 )       && \
-      defined( HAVE_LONG_LONG_INT ) && \
-      defined( __GNUC__ )
-#pragma GCC diagnostic ignored "-Wlong-long"
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-  /**************************************************************************
-   *
-   * A 64-bit data type may create compilation problems if you compile in
-   * strict ANSI mode.  To avoid them, we disable other 64-bit data types if
-   * `__STDC__` is defined.  You can however ignore this rule by defining the
-   * `FT_CONFIG_OPTION_FORCE_INT64` configuration macro.
-   */
-#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
-
-#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
-
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
-
-  /* this compiler provides the `__int64` type */
-#define FT_LONG64
-#define FT_INT64   __int64
-#define FT_UINT64  unsigned __int64
-
-#elif defined( __BORLANDC__ )  /* Borland C++ */
-
-  /* XXXX: We should probably check the value of `__BORLANDC__` in order */
-  /*       to test the compiler version.                                 */
-
-  /* this compiler provides the `__int64` type */
-#define FT_LONG64
-#define FT_INT64   __int64
-#define FT_UINT64  unsigned __int64
-
-#elif defined( __WATCOMC__ )   /* Watcom C++ */
-
-  /* Watcom doesn't provide 64-bit data types */
-
-#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
-
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-#elif defined( __GNUC__ )
-
-  /* GCC provides the `long long` type */
-#define FT_LONG64
-#define FT_INT64   long long int
-#define FT_UINT64  unsigned long long int
-
-#endif /* __STDC_VERSION__ >= 199901L */
-
-#endif /* FT_SIZEOF_LONG == 8 */
-
-#ifdef FT_LONG64
-  typedef FT_INT64   FT_Int64;
-  typedef FT_UINT64  FT_UInt64;
-#endif
-
-
-#ifdef _WIN64
-  /* only 64bit Windows uses the LLP64 data model, i.e., */
-  /* 32bit integers, 64bit pointers                      */
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
-#else
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
-#endif
-
-
-  /**************************************************************************
-   *
-   * miscellaneous
-   *
-   */
-
-
-#define FT_BEGIN_STMNT  do {
-#define FT_END_STMNT    } while ( 0 )
-#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
-
-
-  /* `typeof` condition taken from gnulib's `intprops.h` header file */
-#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 )                       || \
-      ( defined( __IBMC__ ) && __IBMC__ >= 1210 &&                      \
-        defined( __IBM__TYPEOF__ ) )                                 || \
-      ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
-#define FT_TYPEOF( type )  ( __typeof__ ( type ) )
-#else
-#define FT_TYPEOF( type )  /* empty */
-#endif
-
-
-  /* Use `FT_LOCAL` and `FT_LOCAL_DEF` to declare and define,            */
-  /* respectively, a function that gets used only within the scope of a  */
-  /* module.  Normally, both the header and source code files for such a */
-  /* function are within a single module directory.                      */
-  /*                                                                     */
-  /* Intra-module arrays should be tagged with `FT_LOCAL_ARRAY` and      */
-  /* `FT_LOCAL_ARRAY_DEF`.                                               */
-  /*                                                                     */
-#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
-
-#define FT_LOCAL( x )      static  x
-#define FT_LOCAL_DEF( x )  static  x
-
-#else
-
-#ifdef __cplusplus
-#define FT_LOCAL( x )      extern "C"  x
-#define FT_LOCAL_DEF( x )  extern "C"  x
-#else
-#define FT_LOCAL( x )      extern  x
-#define FT_LOCAL_DEF( x )  x
-#endif
-
-#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
-
-#define FT_LOCAL_ARRAY( x )      extern const  x
-#define FT_LOCAL_ARRAY_DEF( x )  const  x
-
-
-  /* Use `FT_BASE` and `FT_BASE_DEF` to declare and define, respectively, */
-  /* functions that are used in more than a single module.  In the        */
-  /* current setup this implies that the declaration is in a header file  */
-  /* in the `include/freetype/internal` directory, and the function body  */
-  /* is in a file in `src/base`.                                          */
-  /*                                                                      */
-#ifndef FT_BASE
-
-#ifdef __cplusplus
-#define FT_BASE( x )  extern "C"  x
-#else
-#define FT_BASE( x )  extern  x
-#endif
-
-#endif /* !FT_BASE */
-
-
-#ifndef FT_BASE_DEF
-
-#ifdef __cplusplus
-#define FT_BASE_DEF( x )  x
-#else
-#define FT_BASE_DEF( x )  x
-#endif
-
-#endif /* !FT_BASE_DEF */
-
-
-  /* When compiling FreeType as a DLL or DSO with hidden visibility    */
-  /* some systems/compilers need a special attribute in front OR after */
-  /* the return type of function declarations.                         */
-  /*                                                                   */
-  /* Two macros are used within the FreeType source code to define     */
-  /* exported library functions: `FT_EXPORT` and `FT_EXPORT_DEF`.      */
-  /*                                                                   */
-  /* - `FT_EXPORT( return_type )`                                      */
-  /*                                                                   */
-  /*   is used in a function declaration, as in                        */
-  /*                                                                   */
-  /*   ```                                                             */
-  /*     FT_EXPORT( FT_Error )                                         */
-  /*     FT_Init_FreeType( FT_Library*  alibrary );                    */
-  /*   ```                                                             */
-  /*                                                                   */
-  /* - `FT_EXPORT_DEF( return_type )`                                  */
-  /*                                                                   */
-  /*   is used in a function definition, as in                         */
-  /*                                                                   */
-  /*   ```                                                             */
-  /*     FT_EXPORT_DEF( FT_Error )                                     */
-  /*     FT_Init_FreeType( FT_Library*  alibrary )                     */
-  /*     {                                                             */
-  /*       ... some code ...                                           */
-  /*       return FT_Err_Ok;                                           */
-  /*     }                                                             */
-  /*   ```                                                             */
-  /*                                                                   */
-  /* You can provide your own implementation of `FT_EXPORT` and        */
-  /* `FT_EXPORT_DEF` here if you want.                                 */
-  /*                                                                   */
-  /* To export a variable, use `FT_EXPORT_VAR`.                        */
-  /*                                                                   */
-#ifndef FT_EXPORT
-
-#ifdef FT2_BUILD_LIBRARY
-
-#if defined( _WIN32 ) && defined( DLL_EXPORT )
-#define FT_EXPORT( x )  __declspec( dllexport )  x
-#elif defined( __GNUC__ ) && __GNUC__ >= 4
-#define FT_EXPORT( x )  __attribute__(( visibility( "default" ) ))  x
-#elif defined( __SUNPRO_C ) && __SUNPRO_C >= 0x550
-#define FT_EXPORT( x )  __global  x
-#elif defined( __cplusplus )
-#define FT_EXPORT( x )  extern "C"  x
-#else
-#define FT_EXPORT( x )  extern  x
-#endif
-
-#else
-
-#if defined( _WIN32 ) && defined( DLL_IMPORT )
-#define FT_EXPORT( x )  __declspec( dllimport )  x
-#elif defined( __cplusplus )
-#define FT_EXPORT( x )  extern "C"  x
-#else
-#define FT_EXPORT( x )  extern  x
-#endif
-
-#endif
-
-#endif /* !FT_EXPORT */
-
-
-#ifndef FT_EXPORT_DEF
-
-#ifdef __cplusplus
-#define FT_EXPORT_DEF( x )  extern "C"  x
-#else
-#define FT_EXPORT_DEF( x )  extern  x
-#endif
-
-#endif /* !FT_EXPORT_DEF */
-
-
-#ifndef FT_EXPORT_VAR
-
-#ifdef __cplusplus
-#define FT_EXPORT_VAR( x )  extern "C"  x
-#else
-#define FT_EXPORT_VAR( x )  extern  x
-#endif
-
-#endif /* !FT_EXPORT_VAR */
-
-
-  /* The following macros are needed to compile the library with a   */
-  /* C++ compiler and with 16bit compilers.                          */
-  /*                                                                 */
-
-  /* This is special.  Within C++, you must specify `extern "C"` for */
-  /* functions which are used via function pointers, and you also    */
-  /* must do that for structures which contain function pointers to  */
-  /* assure C linkage -- it's not possible to have (local) anonymous */
-  /* functions which are accessed by (global) function pointers.     */
-  /*                                                                 */
-  /*                                                                 */
-  /* FT_CALLBACK_DEF is used to _define_ a callback function,        */
-  /* located in the same source code file as the structure that uses */
-  /* it.                                                             */
-  /*                                                                 */
-  /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare   */
-  /* and define a callback function, respectively, in a similar way  */
-  /* as FT_BASE and FT_BASE_DEF work.                                */
-  /*                                                                 */
-  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
-  /* contains pointers to callback functions.                        */
-  /*                                                                 */
-  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
-  /* that contains pointers to callback functions.                   */
-  /*                                                                 */
-  /*                                                                 */
-  /* Some 16bit compilers have to redefine these macros to insert    */
-  /* the infamous `_cdecl` or `__fastcall` declarations.             */
-  /*                                                                 */
-#ifndef FT_CALLBACK_DEF
-#ifdef __cplusplus
-#define FT_CALLBACK_DEF( x )  extern "C"  x
-#else
-#define FT_CALLBACK_DEF( x )  static  x
-#endif
-#endif /* FT_CALLBACK_DEF */
-
-#ifndef FT_BASE_CALLBACK
-#ifdef __cplusplus
-#define FT_BASE_CALLBACK( x )      extern "C"  x
-#define FT_BASE_CALLBACK_DEF( x )  extern "C"  x
-#else
-#define FT_BASE_CALLBACK( x )      extern  x
-#define FT_BASE_CALLBACK_DEF( x )  x
-#endif
-#endif /* FT_BASE_CALLBACK */
-
-#ifndef FT_CALLBACK_TABLE
-#ifdef __cplusplus
-#define FT_CALLBACK_TABLE      extern "C"
-#define FT_CALLBACK_TABLE_DEF  extern "C"
-#else
-#define FT_CALLBACK_TABLE      extern
-#define FT_CALLBACK_TABLE_DEF  /* nothing */
-#endif
-#endif /* FT_CALLBACK_TABLE */
-
-
-FT_END_HEADER
-
+#include <freetype/config/integer-types.h>
+#include <freetype/config/public-macros.h>
+#include <freetype/config/mac-support.h>
 
 #endif /* FTCONFIG_H_ */
 
 
 /* END */
--- a/modules/freetype2/builds/vms/ftsystem.c
+++ b/modules/freetype2/builds/vms/ftsystem.c
@@ -14,21 +14,21 @@
 /*  understand and accept it fully.                                        */
 /*                                                                         */
 /***************************************************************************/
 
 
 #include <ft2build.h>
   /* we use our special ftconfig.h file, not the standard one */
 #include <ftconfig.h>
-#include FT_INTERNAL_DEBUG_H
-#include FT_SYSTEM_H
-#include FT_ERRORS_H
-#include FT_TYPES_H
-#include FT_INTERNAL_OBJECTS_H
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
+#include <freetype/internal/ftobjs.h>
 
   /* memory-mapping includes and definitions */
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
 #include <sys/mman.h>
 #ifndef MAP_FILE
--- a/modules/freetype2/builds/wince/ftdebug.c
+++ b/modules/freetype2/builds/wince/ftdebug.c
@@ -36,19 +36,18 @@
    * - release mode:
    *
    *   No error message is sent or generated.  The code is free from any
    *   debugging parts.
    *
    */
 
 
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
 
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -149,17 +148,17 @@
   /* or `ft_trace_levels_disabled'                 */
   int*  ft_trace_levels;
 
   /* define array of trace toggle names */
 #define FT_TRACE_DEF( x )  #x ,
 
   static const char*  ft_trace_toggles[trace_count + 1] =
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     NULL
   };
 
 #undef FT_TRACE_DEF
 
 
   /* documentation is in ftdebug.h */
 
--- a/modules/freetype2/builds/wince/vc2005-ce/index.html
+++ b/modules/freetype2/builds/wince/vc2005-ce/index.html
@@ -16,17 +16,17 @@
 the following targets:
 
 <ul>
   <li>PPC/SP 2003 (Pocket PC 2003)</li>
   <li>PPC/SP WM5 (Windows Mobile 5)</li>
   <li>PPC/SP WM6 (Windows Mobile 6)</li>
 </ul>
 
-It compiles the following libraries from the FreeType 2.10.2 sources:</p>
+It compiles the following libraries from the FreeType 2.10.4 sources:</p>
 
 <ul>
   <pre>
     freetype.lib     - release build; single threaded
     freetype_D.lib   - debug build;   single threaded
     freetypeMT.lib   - release build; multi-threaded
     freetypeMT_D.lib - debug build;   multi-threaded</pre>
 </ul>
--- a/modules/freetype2/builds/wince/vc2008-ce/index.html
+++ b/modules/freetype2/builds/wince/vc2008-ce/index.html
@@ -16,17 +16,17 @@
 the following targets:
 
 <ul>
   <li>PPC/SP 2003 (Pocket PC 2003)</li>
   <li>PPC/SP WM5 (Windows Mobile 5)</li>
   <li>PPC/SP WM6 (Windows Mobile 6)</li>
 </ul>
 
-It compiles the following libraries from the FreeType 2.10.2 sources:</p>
+It compiles the following libraries from the FreeType 2.10.4 sources:</p>
 
 <ul>
   <pre>
     freetype.lib     - release build; single threaded
     freetype_D.lib   - debug build;   single threaded
     freetypeMT.lib   - release build; multi-threaded
     freetypeMT_D.lib - debug build;   multi-threaded</pre>
 </ul>
--- a/modules/freetype2/builds/windows/ftdebug.c
+++ b/modules/freetype2/builds/windows/ftdebug.c
@@ -36,19 +36,18 @@
    * - release mode:
    *
    *   No error message is sent or generated.  The code is free from any
    *   debugging parts.
    *
    */
 
 
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/freetype.h>
+#include <freetype/internal/ftdebug.h>
 
 
 #ifdef FT_DEBUG_LEVEL_ERROR
 
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -133,17 +132,17 @@
   /* or `ft_trace_levels_disabled'                 */
   int*  ft_trace_levels;
 
   /* define array of trace toggle names */
 #define FT_TRACE_DEF( x )  #x ,
 
   static const char*  ft_trace_toggles[trace_count + 1] =
   {
-#include FT_INTERNAL_TRACE_H
+#include <freetype/internal/fttrace.h>
     NULL
   };
 
 #undef FT_TRACE_DEF
 
 
   /* documentation is in ftdebug.h */
 
--- a/modules/freetype2/builds/windows/vc2010/index.html
+++ b/modules/freetype2/builds/windows/vc2010/index.html
@@ -7,17 +7,17 @@
 <body>
 <h1>
   FreeType&nbsp;2 Project Files for Visual&nbsp;C++&nbsp;2010 or newer
 </h1>
 
 <p>This directory contains solution and project files for
 Visual&nbsp;C++&nbsp;2010 or newer, named <tt>freetype.sln</tt>,
 and <tt>freetype.vcxproj</tt>.  It compiles the following libraries
-from the FreeType 2.10.2 sources:</p>
+from the FreeType 2.10.4 sources:</p>
 
 <ul>
   <li>freetype.dll using 'Release' or 'Debug' configurations</li>
   <li>freetype.lib using 'Release Static' or 'Debug Static' configurations</li>
 </ul>
 
 <p>Both Win32 and x64 builds are supported.  Build directories and target
 files are placed in the top-level <tt>objs</tt> directory.</p>
--- a/modules/freetype2/builds/windows/visualc/index.html
+++ b/modules/freetype2/builds/windows/visualc/index.html
@@ -7,17 +7,17 @@
 <body>
 <h1>
   FreeType&nbsp;2 Project Files for Visual&nbsp;C++ 6.0 and 2002-2008
 </h1>
 
 <p>This directory contains project files <tt>freetype.dsp</tt> for
 Visual C++ 6.0, and <tt>freetype.vcproj</tt> for Visual C++ 2002
 through 2008, which you might need to upgrade automatically.
-It compiles the following libraries from the FreeType 2.10.2 sources:</p>
+It compiles the following libraries from the FreeType 2.10.4 sources:</p>
 
 <ul>
   <li>freetype.dll using 'Release' or 'Debug' configurations</li>
   <li>freetype.lib using 'Release Static' or 'Debug Static' configurations</li>
 </ul>
 
 <p>Build directories and target files are placed in the top-level
 <tt>objs</tt> directory.</p>
--- a/modules/freetype2/builds/windows/visualce/index.html
+++ b/modules/freetype2/builds/windows/visualce/index.html
@@ -16,17 +16,17 @@
 the following targets:
 
 <ul>
   <li>PPC/SP 2003 (Pocket PC 2003)</li>
   <li>PPC/SP WM5 (Windows Mobile 5)</li>
   <li>PPC/SP WM6 (Windows Mobile 6)</li>
 </ul>
 
-It compiles the following libraries from the FreeType 2.10.2 sources:</p>
+It compiles the following libraries from the FreeType 2.10.4 sources:</p>
 
 <ul>
   <pre>
     freetype.lib     - release build; single threaded
     freetype_D.lib   - debug build;   single threaded
     freetypeMT.lib   - release build; multi-threaded
     freetypeMT_D.lib - debug build;   multi-threaded</pre>
 </ul>
--- a/modules/freetype2/devel/ftoption.h
+++ b/modules/freetype2/devel/ftoption.h
@@ -37,17 +37,17 @@ FT_BEGIN_HEADER
    *   cases where you would like to build several versions of the library
    *   from a single source directory.
    *
    * - You can put a copy of this file in your build directory, more
    *   precisely in `$BUILD/freetype/config/ftoption.h`, where `$BUILD` is
    *   the name of a directory that is included _before_ the FreeType include
    *   path during compilation.
    *
-   *   The default FreeType Makefiles and Jamfiles use the build directory
+   *   The default FreeType Makefiles use the build directory
    *   `builds/<system>` by default, but you can easily change that for your
    *   own projects.
    *
    * - Copy the file <ft2build.h> to `$BUILD/ft2build.h` and modify it
    *   slightly to pre-define the macro `FT_CONFIG_OPTIONS_H` used to locate
    *   this file during the build.  For example,
    *
    *   ```
@@ -116,20 +116,18 @@ FT_BEGIN_HEADER
   /**************************************************************************
    *
    * Uncomment the line below if you want to activate LCD rendering
    * technology similar to ClearType in this build of the library.  This
    * technology triples the resolution in the direction color subpixels.  To
    * mitigate color fringes inherent to this technology, you also need to
    * explicitly set up LCD filtering.
    *
-   * Note that this feature is covered by several Microsoft patents and
-   * should not be activated in any default build of the library.  When this
-   * macro is not defined, FreeType offers alternative LCD rendering
-   * technology that produces excellent output without LCD filtering.
+   * When this macro is not defined, FreeType offers alternative LCD
+   * rendering technology that produces excellent output.
    */
 /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
 
 
   /**************************************************************************
    *
    * Many compilers provide a non-ANSI 64-bit data type that can be used by
    * FreeType to speed up some computations.  However, this will create some
@@ -537,17 +535,17 @@ FT_BEGIN_HEADER
    * embedded bitmaps in all formats using the 'sfnt' module (namely
    * TrueType~& OpenType).
    */
 #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
 
   /**************************************************************************
    *
-   * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support coloured
+   * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored
    * outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt'
    * module (namely TrueType~& OpenType).
    */
 #define TT_CONFIG_OPTION_COLOR_LAYERS
 
 
   /**************************************************************************
    *
--- a/modules/freetype2/docs/CHANGES
+++ b/modules/freetype2/docs/CHANGES
@@ -1,9 +1,73 @@
-
+CHANGES BETWEEN 2.10.3 and 2.10.4
+
+  I. IMPORTANT BUG FIXES
+
+  - A heap buffer overflow has been found  in the handling of embedded
+    PNG bitmaps, introduced in FreeType version 2.6.
+
+      https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15999
+
+    If you  use option  FT_CONFIG_OPTION_USE_PNG  you  should  upgrade
+    immediately.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.10.2 and 2.10.3
+
+  I. IMPORTANT CHANGES
+
+  - New flag `FT_OUTLINE_OVERLAP'.  If set, make the smooth rasterizer
+    do  4x4 oversampling  to  mitigate artifacts  in pixels  partially
+    covered  by  overlapping  contours.    Note  that  this  at  least
+    quadruples the rendering time.
+
+    If  a  glyph  in  a  TrueType font  has  the  `OVERLAP_SIMPLE'  or
+    `OVERLAP_COMPOUND'  bit set,  FreeType automatically  selects this
+    rendering mode.
+
+
+  II. MISCELLANEOUS
+
+  - Using the  arcane method of  including FreeType header  files with
+    macros like  `FT_FREETYPE_H' is no longer  mandatory (but retained
+    as an optional feature for backward compatibility).
+
+  - Support for  building the library  with Meson.  Building  the demo
+    programs with Meson will follow in a forthcoming release.
+
+  - Minor improvements to the B/W rasterizer.
+
+  - Auto-hinter support for Medefaidrin script.
+
+  - Fix various  memory leaks (mainly  for CFF) and other  issues that
+    might cause crashes in rare circumstances.
+
+  - Jam support has been removed.
+
+  - In  `ftview', custom  LCD  filter values  are  now normalized  and
+    balanced.  Unorthodox filters are still available through the `-L'
+    command line option.
+
+  - The GUI demo programs can now be resized.
+
+  - Demo programs that accept command  line option `-k' can now handle
+    function keys, too.  The  corresponding character codes start with
+    0xF1.  As  an example, the  POSIX shell syntax (accepted  by bash,
+    ksh, and zsh)
+
+      -k $'\xF3q'
+
+    emulates the pressing of function key `F3' followed by key `q'.
+
+
+======================================================================
+
 CHANGES BETWEEN 2.10.1 and 2.10.2
 
   I. IMPORTANT CHANGES
 
   - Support  of  WOFF2  fonts.   This  code  contribution  was  Nikhil
     Ramakrishnan's GSoC 2019 project.
 
 
@@ -241,17 +305,17 @@ CHANGES BETWEEN 2.9 and 2.9.1
       various artifacts (bug introduced in version 2.8.1).
 
     - Use  of  the `freetype-config'  script  to  get compilation  and
       linking  options   is  deprecated   since  it   doesn't  support
       cross-compiling, among other  deficiencies.  Instead, you should
       use the `pkg-config' interface.
 
       The `configure'  script no longer installs  `freetype-config' by
-      default.  For  backwards compatibility,  a new  configure option
+      default.  For  backward  compatibility,  a new  configure option
       `--enable-freetype-config'   is  provided   that  reverts   this
       decision.
 
     - The auto-hinter script ranges have  been updated for Unicode 11.
       No support  for new scripts  have been added, however,  with the
       exception of Georgian Mtavruli.
 
     - Support for cmake has been improved.
--- a/modules/freetype2/docs/INSTALL.ANY
+++ b/modules/freetype2/docs/INSTALL.ANY
@@ -3,23 +3,25 @@ Instructions on how to build FreeType wi
 
 See  the  file `CUSTOMIZE'  to  learn  how  to customize  FreeType  to
 specific environments.
 
 
 I. Standard procedure
 ---------------------
 
-  * DISABLE PRE-COMPILED  HEADERS!  This is very  important for Visual
-    C++, because FreeType uses lines like:
+  * If you use macro names  for FreeType header files (while mandatory
+    in earlier versions,  this is now optional  since FreeType version
+    2.10.3) it  is necessary to disable pre-compiled headers.  This is
+    very important for Visual C++, because lines like
 
       #include FT_FREETYPE_H
 
-    which are not correctly supported by this compiler while being ISO
-    C compliant!
+    are not  correctly supported  by this compiler  while being  ISO C
+    compliant!
 
   * You need to add the directory `include' to your  include path when
     compiling the library.
 
   * FreeType 2 is made of  several components; each of them is located
     in    a   subdirectory    of   `freetype2/src'.     For   example,
     `freetype2/src/truetype/' contains the TrueType font driver.
 
--- a/modules/freetype2/docs/VERSIONS.TXT
+++ b/modules/freetype2/docs/VERSIONS.TXT
@@ -33,17 +33,17 @@ The platform-specific number is, unsurpr
 varies with  the operating system  you are using (several  variants of
 Linux, FreeBSD, Solaris, etc.).  You  should thus _never_ use it, even
 for simple tests.
 
 The libtool-specific number  does not equal the