Skip to content

Instantly share code, notes, and snippets.

@akrisiun
Forked from mtolly/mac-libgdiplus.sh
Last active May 29, 2016 10:32
Show Gist options
  • Save akrisiun/5af66b83f0083c42dc2e4d04015ab41d to your computer and use it in GitHub Desktop.
Save akrisiun/5af66b83f0083c42dc2e4d04015ab41d to your computer and use it in GitHub Desktop.
How to build and install the Mono libgdiplus.dll on a Mac with Homebrew
#!/bin/bash
# First install XQuartz, then...
locate libgdiplus.dylib
brew install freetype fontconfig libpng pgk-config
pkg-config --cflags freetype2
pkg-config --cflags freetype2
ln -s /opt/X11/include/X11 /usr/local/include/X11
git clone https://github.com/mono/libgdiplus.git
cd libgdiplus
#./autogen.sh
./autogen.sh CPPFLAGS="-I/usr/X11/include" CFLAGS="-L/usr/X11/lib"
sudo mkdir /opt
sudo mkdir /opt/mono
./configure --prefix=/opt/mono
# for x64
make
sudo make install
# for Win32 rebuild
rm -rf /opt/mono
# ./configure --prefix=/opt/mono CFLAGS='-m32 -arch i386'
./configure --prefix=/opt/mono CFLAGS='-m32 -arch x86_64'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment