1+ # Instead build , copy dependency from mingw distribution
2+
13ifndef THIRDPARTYDIR
24 include .. / common / Makefile . lib. extra
35endif
46include .. / .. / third - party / cairo . spec
57
6- # plugin definitions
7- CAIROURL : = $ (cairo_spec_download_url )
8+ MINGWLIBDIR : = / usr / x86_64 - w64 - mingw32 / sys - root / mingw / bin
89CAIROLIBNAME : = $ (cairo_spec_product_name_windows )
9- CAIRODIR : = $ (THIRDPARTYDIR )/ $ (cairo_spec_unpack_dir_name )
10- CAIROARCHIVE : = $ (THIRDPARTYCACHEDIR )/ $ (cairo_spec_archive_name )
1110CAIROLIB : = $ (THIRDPARTYINSTALLDIR )/ $ (CAIROLIBNAME )
12-
13- # ensure third - party library is built and recognised by plugins
14- INCDIRS : = $ (INCDIRS ) $ (THIRDPARTYINCLUDEDIR )
15- EXTRALIBS : = $ (EXTRALIBS ) $ (CAIROLIB )
16- PLUGINREQS : = $ (THIRDPARTYLIBS )
17-
18- $ (CAIROARCHIVE ):
19- $ (WGET ) - O $ (CAIROARCHIVE ) $ (CAIROURL )
20-
21- # IMPORTANT : The hack for editing test / Makefile after . / configure
22- # is required on cygwin because it fails to truncate the file
23- # test / cairo - test - constructors . c
24- # when it overwrites it , causing compilation to fail on trailing lines
25- # We thus add a rule for removing the file before generating it if it exists
26- # sed ' /pattern/i newLine'
27- # This works in version 1.14 . 28 but somehow fragile .
28- # If this cygwin bug is confirmed , the line should be added to Makefile . am
29- # and any other relevant file , and the change pushed back to cairo repository .
30- $ (THIRDPARTYLIBDIR )/ $ (CAIROLIBNAME ): $ (CAIROARCHIVE )
31- tar x - f $ (CAIROARCHIVE ) - C $ (THIRDPARTYDIR )
32- cd $ (CAIRODIR ) \
33- && bash . / configure \
34- -- prefix = " $(THIRDPARTYOUTDIR)" \
35- -- host = x86_64 - w64 - mingw32 \
36- PKG_CONFIG = " $(PKG_CONFIG)" \
37- PKG_CONFIG_PATH = " $(PKG_CONFIG_PATH)" \
38- CFLAGS = ' $(THIRDPARTY_CFLAGS) -I$(THIRDPARTYINCLUDEDIR)' \
39- LDFLAGS = ' $(THIRDPARTY_LDFLAGS) -L$(THIRDPARTYLIBDIR)' \
40- -- disable - silent - rules \
41- -- disable - xlib \
42- -- disable - dependency - tracking \
43- -- enable - xcb = no \
44- -- enable - fc = no \
45- && sed - i ' /.* sh .\ / make-/i\ \ ttest -e \ $ $\ @ \ &\ & rm \ $ $\ @' test / Makefile \
46- && make \
47- && make install
11+ CAIRODEPS : = libfontconfig - 1. dll libexpat - 1. dll libbz2 - 1. dll
4812
49- $ (CAIROLIB ): pkgconfig libpng freetype2 pixman $ (THIRDPARTYLIBDIR )/ $ (CAIROLIBNAME )
50- cp - f $ (THIRDPARTYLIBDIR )/ $ (CAIROLIBNAME ) $ (THIRDPARTYINSTALLDIR )
13+ $ (CAIROLIB ): pkgconfig libpng freetype2 pixman $ (MINGWLIBDIR )/ $ (CAIROLIBNAME )
14+ cp - f $ (MINGWLIBDIR )/ $ (CAIROLIBNAME ) $ (THIRDPARTYINSTALLDIR )
15+ for each in $ (CAIRODEPS ); do \
16+ cp - f $ (MINGWLIBDIR )/ $$ each $ (THIRDPARTYINSTALLDIR ); \
17+ done
5118
5219cairo : $ (CAIROLIB )
0 commit comments