#! /bin/sh
# --- a small hack to fix a bug in the FreeType build system for OSX ---
# --- First you'll need to change these lines in src/base/ftmac.c ---
#include <Resources.h>
#include <Fonts.h>
#include <Errors.h>
#include <Files.h>
#include <TextUtils.h>
# --- to these ----
#if TARGET_API_MAC_CARBON
#include <Carbon/Carbon.h>
#else
#include <Resources.h>
#include <Fonts.h>
#include <Errors.h>
#include <Files.h>
#include <TextUtils.h>
#endif
# --- and then run this script ---

make
cc -c src/base/ftmac.c  -I. -I./include -I./src -DTARGET_API_MAC_CARBON
mv ftmac.o objs/.libs
cd objs/.libs
ar -x libfreetype.a
rm lib*
ar rcu libfreetype.a *.o 
ranlib libfreetype.a

