Skip to content

Commit

Permalink
ghostscript: fix build w/ freetype 2.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstphrchvz authored and mf2k committed Oct 12, 2020
1 parent 7661cbb commit 90e5289
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions print/ghostscript/Portfile
Expand Up @@ -38,6 +38,11 @@ patchfiles patch-base_unix-dll.mak.diff \
# https://bugs.ghostscript.com/show_bug.cgi?id=702474
patchfiles-append patch-6756b355c238.diff

# Provide FT_CALLBACK_DEF macro removed from
# <freetype/config/ftconfig.h> in freetype 2.10.3
# https://trac.macports.org/ticket/61306
patchfiles-append patch-base_fapi_ft.c.diff

checksums ghostpdl-9.52.tar.gz \
rmd160 1e719f907c8dc6dd0000bf2c547eee54fd583b9f \
sha256 8f6e48325c106ae033bbae3e55e6c0b9ee5c6b57e54f7cd24fb80a716a93b06a \
Expand Down
21 changes: 21 additions & 0 deletions print/ghostscript/files/patch-base_fapi_ft.c.diff
@@ -0,0 +1,21 @@
Provide FT_CALLBACK_DEF macro removed from
<freetype/config/ftconfig.h> in freetype 2.10.3
https://trac.macports.org/ticket/61306

--- base/fapi_ft.c.orig
+++ base/fapi_ft.c
@@ -124,6 +124,14 @@
static void
delete_inc_int_info(gs_fapi_server * a_server,
FT_IncrementalRec * a_inc_int_info);
+
+#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(void *)
FF_alloc(FT_Memory memory, long size)

0 comments on commit 90e5289

Please sign in to comment.