From 8a3e5da6a1b32d295c739db0e5978635ab9e90c3 Mon Sep 17 00:00:00 2001 From: Thomas BERNARD Date: Tue, 27 Nov 2018 11:19:29 +0100 Subject: [PATCH] Enable libSDL2-ttf with Mac OS X again. Tested with Mac OS X 10.9.5 --- src/Makefile | 5 ++++- src/text.c | 6 +----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Makefile b/src/Makefile index d93d809b..0a33c953 100644 --- a/src/Makefile +++ b/src/Makefile @@ -198,6 +198,8 @@ ifeq ($(API),sdl2) SDLCOPT = $(shell sdl2-config --cflags) SDLLOPT = $(shell sdl2-config --libs) $(shell pkg-config --libs SDL2_image) SDLLOPT += -Wl,-framework,Cocoa + #TTFCOPT = $(shell pkg-config --cflags SDL2_ttf) + TTFLOPT = $(shell pkg-config --libs SDL2_ttf) endif # these are for use with macports @@ -224,6 +226,7 @@ ifdef MACOSX_LION LOPT = $(SDLLOPT) $(LUALOPT) -framework libpng14 -lz else LOPT = $(SDLLOPT) $(LUALOPT) + LOPT += $(TTFLOPT) LIBPNGCONFIG := $(shell libpng-config) ifneq ($(LIBPNGCONFIG), ) COPT += $(shell libpng-config --cflags) @@ -246,7 +249,7 @@ ifeq ($(API),sdl) endif FCLOPT = MACAPPEXE = Grafx2.app/Contents/MacOS/Grafx2 - NOTTF = 1 + #NOTTF = 1 else ifeq ($(PLATFORM),AROS) # 3 #AROS specific diff --git a/src/text.c b/src/text.c index f6b71a5d..be377bb8 100644 --- a/src/text.c +++ b/src/text.c @@ -32,11 +32,7 @@ // TrueType #ifndef NOTTF -#if defined(__macosx__) - #include -#else - #include -#endif +#include #if defined(__CAANOO__) || defined(__WIZ__) || defined(__GP2X__) // No fontconfig