Mercurial > mxe-octave
comparison src/cairo.mk @ 3167:6aaa1723e277
[MSVC] enable Cairo compilation (and bump version to 1.12.14)
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Mon, 22 Jul 2013 15:40:11 -0400 |
parents | 5ef49fb3299d |
children | 81ef4be24f2e |
comparison
equal
deleted
inserted
replaced
3166:b52db21b9dcd | 3167:6aaa1723e277 |
---|---|
1 # This file is part of MXE. | 1 # This file is part of MXE. |
2 # See index.html for further information. | 2 # See index.html for further information. |
3 | 3 |
4 PKG := cairo | 4 PKG := cairo |
5 $(PKG)_IGNORE := | 5 $(PKG)_IGNORE := |
6 $(PKG)_CHECKSUM := 56a10bf3b804367c97734d655c23a9f652d5c297 | 6 $(PKG)_CHECKSUM := 9106ab09b2e7b9f90521b18dd4a7e9577eba6c15 |
7 $(PKG)_SUBDIR := cairo-$($(PKG)_VERSION) | 7 $(PKG)_SUBDIR := cairo-$($(PKG)_VERSION) |
8 $(PKG)_FILE := cairo-$($(PKG)_VERSION).tar.xz | 8 $(PKG)_FILE := cairo-$($(PKG)_VERSION).tar.xz |
9 $(PKG)_URL := http://cairographics.org/releases/$($(PKG)_FILE) | 9 $(PKG)_URL := http://cairographics.org/releases/$($(PKG)_FILE) |
10 $(PKG)_DEPS := zlib libpng fontconfig freetype pixman | 10 $(PKG)_DEPS := zlib libpng fontconfig freetype pixman glib |
11 | 11 |
12 define $(PKG)_UPDATE | 12 define $(PKG)_UPDATE |
13 $(WGET) -q -O- 'http://cairographics.org/releases/?C=M;O=D' | \ | 13 $(WGET) -q -O- 'http://cairographics.org/releases/?C=M;O=D' | \ |
14 $(SED) -n 's,.*"cairo-\([0-9][^"]*\)\.tar.*,\1,p' | \ | 14 $(SED) -n 's,.*"cairo-\([0-9][^"]*\)\.tar.*,\1,p' | \ |
15 head -1 | 15 head -1 |
16 endef | 16 endef |
17 | |
18 $(PKG)_EXTRA_CONFIGURE_OPTIONS := | |
19 # FIXME: Not sure why i was disabled... | |
20 #$(PKG)_EXTRA_CONFIGURE_OPTIONS += --disable-atomic | |
21 # Add special flag for static Win32 builds | |
22 ifneq ($(filter mingw msvc,$(MXE_SYSTEM)),) | |
23 ifeq ($(BUILD_STATIC),yes) | |
24 $(PKG)_EXTRA_CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS) -DCAIRO_WIN32_STATIC_BUILD" | |
25 endif | |
26 endif | |
27 | |
28 # Configure script to detect float word endianness fails on MSVC. | |
29 ifeq ($(MXE_SYSTEM),msvc) | |
30 $(PKG)_EXTRA_CONFIGURE_OPTIONS += ax_cv_c_float_words_bigendian=no | |
31 endif | |
17 | 32 |
18 define $(PKG)_BUILD | 33 define $(PKG)_BUILD |
19 $(SED) -i 's,libpng12,libpng,g' '$(1)/configure' | 34 $(SED) -i 's,libpng12,libpng,g' '$(1)/configure' |
20 $(SED) -i 's,^\(Libs:.*\),\1 @CAIRO_NONPKGCONFIG_LIBS@,' '$(1)/src/cairo.pc.in' | 35 $(SED) -i 's,^\(Libs:.*\),\1 @CAIRO_NONPKGCONFIG_LIBS@,' '$(1)/src/cairo.pc.in' |
21 cd '$(1)' && ./configure \ | 36 cd '$(1)' && ./configure \ |
32 --disable-quartz-font \ | 47 --disable-quartz-font \ |
33 --disable-quartz-image \ | 48 --disable-quartz-image \ |
34 --disable-os2 \ | 49 --disable-os2 \ |
35 --disable-beos \ | 50 --disable-beos \ |
36 --disable-directfb \ | 51 --disable-directfb \ |
37 --disable-atomic \ | |
38 --enable-win32 \ | 52 --enable-win32 \ |
39 --enable-win32-font \ | 53 --enable-win32-font \ |
40 --enable-png \ | 54 --enable-png \ |
41 --enable-ft \ | 55 --enable-ft \ |
42 --enable-ps \ | 56 --enable-ps \ |
43 --enable-pdf \ | 57 --enable-pdf \ |
44 --enable-svg \ | 58 --enable-svg \ |
45 --disable-pthread \ | 59 --disable-pthread \ |
46 CFLAGS="$(CFLAGS) -DCAIRO_WIN32_STATIC_BUILD" \ | 60 $($(PKG)_EXTRA_CONFIGURE_OPTIONS) \ |
47 LIBS="-lmsimg32 -lgdi32 `$(MXE_PKG_CONFIG) pixman-1 --libs`" | 61 PKG_CONFIG='$(MXE_PKG_CONFIG)' \ |
48 $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= | 62 PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' \ |
63 && $(CONFIGURE_POST_HOOK) | |
64 $(MAKE) -C '$(1)' -j '$(JOBS)' install noinst_PROGRAMS= | |
65 $(SED) -i 's,^Libs:,& -L$${libdir} -lcairo-script ,' '$(HOST_LIBDIR)/pkgconfig/cairo-script.pc' | |
49 endef | 66 endef |