From a8a0aee3f3e48efcc79fcd351d3a2f2da2d98e1e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 17 Dec 2018 13:00:43 -0600 Subject: [PATCH] Add patch to fix windows.h include in freetype (#10075) * Add patch to fix windows.h include in freetype * Fix patch --- .../builtin/packages/freetype/package.py | 6 +++-- .../builtin/packages/freetype/windows.patch | 27 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/freetype/windows.patch diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py index acecc649ad..974af462bc 100644 --- a/var/spack/repos/builtin/packages/freetype/package.py +++ b/var/spack/repos/builtin/packages/freetype/package.py @@ -13,9 +13,9 @@ class Freetype(AutotoolsPackage): of most vector and bitmap font formats.""" homepage = "https://www.freetype.org/index.html" - url = "http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gz" + url = "https://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.gz" - version('2.9.1', 'ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce') + version('2.9.1', sha256='ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce') version('2.7.1', '78701bee8d249578d83bb9a2f3aa3616') version('2.7', '337139e5c7c5bd645fe130608e0fa8b5') version('2.5.3', 'cafe9f210e45360279c730d27bf071e9') @@ -24,6 +24,8 @@ class Freetype(AutotoolsPackage): depends_on('bzip2') depends_on('pkgconfig', type='build') + patch('windows.patch', when='@2.9.1') + def configure_args(self): args = ['--with-harfbuzz=no'] if self.spec.satisfies('@2.9.1:'): diff --git a/var/spack/repos/builtin/packages/freetype/windows.patch b/var/spack/repos/builtin/packages/freetype/windows.patch new file mode 100644 index 0000000000..ce858e7500 --- /dev/null +++ b/var/spack/repos/builtin/packages/freetype/windows.patch @@ -0,0 +1,27 @@ +https://github.com/spack/spack/issues/9729 +https://savannah.nongnu.org/bugs/index.php?54967 +http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=3b6e65f7bf674601b9419d02ce0aa633e2e882fb +--- a/builds/unix/configure 2018-12-14 22:08:30.000000000 -0600 ++++ b/builds/unix/configure 2018-12-14 22:07:56.000000000 -0600 +@@ -11853,7 +11853,9 @@ + # Only expand once: + + +-if test -n "$ac_tool_prefix"; then ++ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" ++if test "x$ac_cv_header_windows_h" = xyes; then : ++ if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. + set dummy ${ac_tool_prefix}windres; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +@@ -12022,6 +12024,9 @@ + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + ++fi ++ ++ + + + # checks for native programs to generate building tool +