Commit Graph

2 Commits

Author SHA1 Message Date
David Turner 843d03e36d [gzip] Update sources to zlib 1.2.11
* src/gzip/ftgzip.c, src/gzip/rules.mk: Updated for new zlib
  sources. Also removed the temporary fix introduced in
  commit 6a431038 [1] to work-around the fact that the
  internal sources were too old.

* src/gzip/README.freetype: Small README file
  describing the origin of the sources and how they
  were modified.

* src/gzip/patches/*: Patch files applied to original
  sources.

* src/gzip/*: Updated all zlib sources to 1.2.11 plus
  the patch from src/gzip/patches/ applied.

This can be tested by building with the Unix development build:

  make setup devel
  make

Or by building the freetype-demos programs with:

  meson setup build -Dfreetype2:zlib=internal
  meson compile -C out

Then trying to run 'ftview' with a .pcf.gz font file.

[1] 6a431038c9
2021-08-19 09:04:03 +02:00
Werner Lemberg 602be7c810 [gzip] Improve building with external zlib (#49673).
Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
the following error.

  ftgzip.c
  zlib-1.2.8\zlib.h(86): error C2061:
                         syntax error: identifier 'z_const'
  zlib-1.2.8\zlib.h(94): error C2054:
                         expected '(' to follow 'z_const'
  zlib-1.2.8\zlib.h(94): error C2085:
                         'msg': not in formal parameter list
  ...
  zlib-1.2.8\zlib.h(877): fatal error C1003:
                          error count exceeds 100; stopping compilation

The error happens because FreeType keeps an own copy of zlib-1.1.4
under `src/gzip'.  When building `src/gzip/ftgzip.c' with
FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses

  #include <zlib.h>

which correctly finds an external `zlib.h', but `zlib.h' itself has
a line

  #include "zconf.h"

which makes Visual Studio 2015 find `src/gzip/zconf.h' while
compiling the files in `src/gzip'.

* src/gzip/zconf.h: Rename to...
* src/gzip/ftzconf.h: ... this.
* src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
2016-12-01 11:36:37 +01:00