Created
September 9, 2010 14:48
-
-
Save miyamuko/571967 to your computer and use it in GitHub Desktop.
cairo install script for MinGW.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# cairo install script for MinGW. | |
# | |
# - zlib 1.2.5 | |
# - libpng 1.4.3 | |
# - pixman 0.18.4 | |
# - cairo 1.10.0 | |
# | |
# | |
# Config | |
# | |
PREFIX=/usr | |
ZLIB_VERSION=1.2.5 | |
LIBPNG_VERSION=1.4.3 | |
PIXMAN_VERSION=0.18.4 | |
CAIRO_VERSION=1.10.0 | |
# | |
# Install msys tools. | |
# | |
mingw-get update | |
mingw-get install msys-wget msys-unzip msys-perl | |
# | |
# Install pkg-config | |
# | |
wget http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.24/glib_2.24.0-2_win32.zip | |
wget http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip | |
unzip -n glib_2.24.0-2_win32.zip -d /usr | |
unzip -n pkg-config_0.23-3_win32.zip -d /usr | |
rm glib_2.24.0-2_win32.zip | |
rm pkg-config_0.23-3_win32.zip | |
pkg-config --version | |
# | |
# Install zlib | |
# | |
wget http://zlib.net/zlib-$ZLIB_VERSION.tar.gz | |
tar zxvf zlib-$ZLIB_VERSION.tar.gz | |
cd zlib-$ZLIB_VERSION | |
make install -f win32/Makefile.gcc SHARED_MODE=1 BINARY_PATH=$PREFIX/bin INCLUDE_PATH=$PREFIX/include LIBRARY_PATH=$PREFIX/lib | |
cp $PREFIX/lib/libzdll.a $PREFIX/lib/libz.dll.a | |
cd .. | |
# | |
# Install libpng | |
# | |
wget http://download.sourceforge.net/libpng/libpng-$LIBPNG_VERSION.tar.gz | |
tar zxvf libpng-$LIBPNG_VERSION.tar.gz | |
cd libpng-$LIBPNG_VERSION | |
perl -pe "s{\tinstall}{\t/bin/install}g" scripts/makefile.mingw > Makefile | |
make install prefix=$PREFIX ZLIBLIB=$PREFIX/lib ZLIBINC=$PREFIX/include | |
cd .. | |
# | |
# Install pixman | |
# | |
wget http://cairographics.org/releases/pixman-$PIXMAN_VERSION.tar.gz | |
tar zxvf pixman-$PIXMAN_VERSION.tar.gz | |
cd pixman-$PIXMAN_VERSION | |
./configure --prefix=$PREFIX | |
make | |
make install | |
cd .. | |
# | |
# Install cairo | |
# | |
wget http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.gz | |
tar zxvf cairo-$CAIRO_VERSION.tar.gz | |
cd cairo-$CAIRO_VERSION | |
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig | |
./configure --disable-ft --prefix=$PREFIX CFLAGS=-I$PREFIX/include LDFLAGS=-L$PREFIX/lib | |
make | |
make install | |
cd .. | |
# | |
# Finish!!! | |
# | |
cd $PREFIX/bin | |
ls -1 *cairo* *png* *pixman* *zlib* | grep dll | |
echo "*** DONE ***" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Autotools-based builds on Windows are so fragile... GNU autoconf explicitly documents it does not support any special characters in paths yet the default installation directory for most programs on Windows is
C:/Program Files
.