-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
31 additions
and
199 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,19 @@ | ||
# Instead build, copy dependency from mingw distribution | ||
|
||
ifndef THIRDPARTYDIR | ||
include ../common/Makefile.lib.extra | ||
endif | ||
include ../../third-party/cairo.spec | ||
|
||
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin | ||
CAIROLIBNAME:=$(cairo_spec_product_name_windows) | ||
CAIROURL:=http://files.pharo.org/vm/pharo-spur64/win/third-party/$(CAIROLIBNAME) | ||
CAIROLIB:=$(THIRDPARTYINSTALLDIR)/$(CAIROLIBNAME) | ||
CAIRODEPS:= libfontconfig-1.dll libexpat-1.dll libbz2-1.dll | ||
|
||
$(THIRDPARTYLIBDIR)/$(CAIROLIBNAME): | ||
$(WGET) -O $(THIRDPARTYLIBDIR)/$(CAIROLIBNAME) $(CAIROURL) | ||
|
||
$(CAIROLIB): pkgconfig libpng freetype2 pixman $(THIRDPARTYLIBDIR)/$(CAIROLIBNAME) | ||
cp -f $(THIRDPARTYLIBDIR)/$(CAIROLIBNAME) $(THIRDPARTYINSTALLDIR) | ||
|
||
# plugin definitions | ||
#CAIROURL:=$(cairo_spec_download_url) | ||
#CAIROLIBNAME:=$(cairo_spec_product_name_windows) | ||
#CAIRODIR:=$(THIRDPARTYDIR)/$(cairo_spec_unpack_dir_name) | ||
#CAIROARCHIVE:=$(THIRDPARTYCACHEDIR)/$(cairo_spec_archive_name) | ||
#CAIROLIB:=$(THIRDPARTYINSTALLDIR)/$(CAIROLIBNAME) | ||
|
||
# ensure third-party library is built and recognised by plugins | ||
#INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR) | ||
#EXTRALIBS:=$(EXTRALIBS) $(CAIROLIB) | ||
#PLUGINREQS:=$(THIRDPARTYLIBS) | ||
|
||
#$(CAIROARCHIVE): | ||
# $(WGET) -O $(CAIROARCHIVE) $(CAIROURL) | ||
|
||
## IMPORTANT: The hack for editing test/Makefile after ./confgit igure | ||
## is required on cygwin because it fails to truncate the file | ||
## test/cairo-test-constructors.c | ||
## when it overwrites it, causing compilation to fail on trailing lines | ||
## We thus add a rule for removing the file before generating it if it exists | ||
## sed '/pattern/i newLine' | ||
## This works in version 1.14.28 but somehow fragile. | ||
## If this cygwin bug is confirmed, the line should be added to Makefile.am | ||
## and any other relevant file, and the change pushed back to cairo repository. | ||
#$(THIRDPARTYLIBDIR)/$(CAIROLIBNAME): $(CAIROARCHIVE) | ||
# tar x -f $(CAIROARCHIVE) -C $(THIRDPARTYDIR) | ||
# cd $(CAIRODIR) \ | ||
# && bash ./configure \ | ||
# --prefix="$(THIRDPARTYOUTDIR)" \ | ||
# --host=x86_64-w64-mingw32 \ | ||
# PKG_CONFIG="$(PKG_CONFIG)" \ | ||
# PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \ | ||
# CFLAGS='$(THIRDPARTY_CFLAGS) -I$(THIRDPARTYINCLUDEDIR)' \ | ||
# LDFLAGS='$(THIRDPARTY_LDFLAGS) -L$(THIRDPARTYLIBDIR)' \ | ||
# --disable-silent-rules \ | ||
# --disable-xlib \ | ||
# --disable-dependency-tracking \ | ||
# --enable-xcb=no \ | ||
# --enable-fc=no \ | ||
# && sed -i '/.* sh .\/make-/i\\ttest -e \$$\@ \&\& rm \$$\@' test/Makefile \ | ||
# && make \ | ||
# && make install | ||
|
||
#$(CAIROLIB): pkgconfig libpng freetype2 pixman $(THIRDPARTYLIBDIR)/$(CAIROLIBNAME) | ||
# cp -f $(THIRDPARTYLIBDIR)/$(CAIROLIBNAME) $(THIRDPARTYINSTALLDIR) | ||
$(CAIROLIB): pkgconfig libpng freetype2 pixman $(MINGWLIBDIR)/$(CAIROLIBNAME) | ||
cp -f $(MINGWLIBDIR)/$(CAIROLIBNAME) $(THIRDPARTYINSTALLDIR) | ||
for each in $(CAIRODEPS); do \ | ||
cp -f $(MINGWLIBDIR)/$$each $(THIRDPARTYINSTALLDIR); \ | ||
done | ||
|
||
cairo: $(CAIROLIB) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,15 @@ | ||
# Instead build, copy dependency from mingw distribution | ||
|
||
ifndef THIRDPARTYDIR | ||
include ../common/Makefile.lib.extra | ||
endif | ||
include ../../third-party/freetype2.spec | ||
|
||
# plugin definitions | ||
FREETYPE2URL:=$(freetype2_spec_download_url) | ||
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin | ||
FREETYPE2LIBNAME:=$(freetype2_spec_product_name_windows) | ||
FREETYPE2DIR:=$(THIRDPARTYDIR)/$(freetype2_spec_unpack_dir_name) | ||
FREETYPE2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(freetype2_spec_archive_name) | ||
FREETYPE2LIB:=$(THIRDPARTYINSTALLDIR)/$(FREETYPE2LIBNAME) | ||
|
||
# ensure third-party library is built and recognised by plugins | ||
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR) $(THIRDPARTYINCLUDEDIR)/freetype2 | ||
EXTRALIBS:=$(EXTRALIBS) $(FREETYPE2LIB) | ||
PLUGINREQS:=$(PLUGINREQS) $(THIRDPARTYLIBS) | ||
|
||
$(FREETYPE2ARCHIVE): | ||
$(WGET) -O $(FREETYPE2ARCHIVE) $(FREETYPE2URL) | ||
|
||
$(THIRDPARTYLIBDIR)/$(FREETYPE2LIBNAME): $(FREETYPE2ARCHIVE) | ||
tar x -f $(FREETYPE2ARCHIVE) -C $(THIRDPARTYDIR) | ||
test -d $(FREETYPE2DIR)/build || mkdir $(FREETYPE2DIR)/build | ||
cp ../third-party/Toolchain-cross-mingw32-cygwin.cmake $(FREETYPE2DIR)/build | ||
cd $(FREETYPE2DIR)/build \ | ||
&& $(THIRDPARTY_TOOLCHAIN) cmake ..\ | ||
-DMINGW=YES \ | ||
-DCMAKE_TOOLCHAIN_FILE=Toolchain-cross-mingw32-cygwin.cmake \ | ||
-DCMAKE_INSTALL_PREFIX="$(THIRDPARTYOUTDIR)" \ | ||
-DWITH_PNG=OFF \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_C_FLAGS="$(THIRDPARTY_CFLAGS)" \ | ||
&& make \ | ||
&& make install | ||
$(FREETYPE2LIB): pkgconfig libpng $(MINGWLIBDIR)/$(FREETYPE2LIBNAME) | ||
cp -f $(MINGWLIBDIR)/$(FREETYPE2LIBNAME) $(THIRDPARTYINSTALLDIR) | ||
|
||
$(FREETYPE2LIB): pkgconfig libpng $(THIRDPARTYLIBDIR)/$(FREETYPE2LIBNAME) | ||
cp -f $(THIRDPARTYLIBDIR)/$(FREETYPE2LIBNAME) $(THIRDPARTYINSTALLDIR) | ||
|
||
freetype2: $(FREETYPE2LIB) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,15 @@ | ||
# Instead build, copy dependency from mingw distribution | ||
|
||
ifndef THIRDPARTYDIR | ||
include ../common/Makefile.lib.extra | ||
endif | ||
include ../../third-party/libpng.spec.win | ||
|
||
# plugin definitions | ||
LIBPNGURL:=$(libpng_spec_download_url) | ||
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin | ||
LIBPNGLIBNAME:=$(libpng_spec_product_name_windows) | ||
LIBPNGDIR:=$(THIRDPARTYDIR)/$(libpng_spec_unpack_dir_name) | ||
LIBPNGARCHIVE:=$(THIRDPARTYCACHEDIR)/$(libpng_spec_archive_name) | ||
LIBPNGLIB:=$(THIRDPARTYINSTALLDIR)/$(LIBPNGLIBNAME) | ||
|
||
# ensure third-party library is built and recognised by plugins | ||
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR) | ||
EXTRALIBS:=$(EXTRALIBS) $(LIBPNGLIB) | ||
PLUGINREQS:=$(THIRDPARTYLIBS) | ||
|
||
$(LIBPNGARCHIVE): | ||
$(WGET) -O $(LIBPNGARCHIVE) $(LIBPNGURL) | ||
|
||
$(THIRDPARTYLIBDIR)/$(LIBPNGLIBNAME): $(LIBPNGARCHIVE) | ||
tar x -f $(LIBPNGARCHIVE) -C $(THIRDPARTYDIR) | ||
cd $(LIBPNGDIR) \ | ||
&& bash ./configure --prefix='$(THIRDPARTYOUTDIR)' \ | ||
--host=x86_64-w64-mingw32 \ | ||
CFLAGS='$(THIRDPARTY_CFLAGS) -I$(THIRDPARTYINCLUDEDIR)' \ | ||
CPPFLAGS='$(THIRDPARTY_CFLAGS) -I$(THIRDPARTYINCLUDEDIR)' \ | ||
LDFLAGS='$(THIRDPARTY_LDFLAGS) -L$(THIRDPARTYLIBDIR)' \ | ||
&& make LN=CP LN_S=CP\ | ||
&& make install LN=CP LN_S=CP | ||
|
||
$(LIBPNGLIB): pkgconfig zlib $(THIRDPARTYLIBDIR)/$(LIBPNGLIBNAME) | ||
cp -f $(THIRDPARTYLIBDIR)/$(LIBPNGLIBNAME) $(THIRDPARTYINSTALLDIR) | ||
$(LIBPNGLIB): pkgconfig zlib $(MINGWLIBDIR)/$(LIBPNGLIBNAME) | ||
cp -f $(MINGWLIBDIR)/$(LIBPNGLIBNAME) $(THIRDPARTYINSTALLDIR) | ||
|
||
libpng: $(LIBPNGLIB) | ||
libpng: $(LIBPNGLIB) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,15 @@ | ||
# Instead build, copy dependency from mingw distribution | ||
|
||
ifndef THIRDPARTYDIR | ||
include ../common/Makefile.lib.extra | ||
endif | ||
include ../../third-party/pixman.spec | ||
|
||
# plugin definitions | ||
PIXMANURL:=$(pixman_spec_download_url) | ||
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin | ||
PIXMANLIBNAME:=$(pixman_spec_product_name_windows) | ||
PIXMANDIR:=$(THIRDPARTYDIR)/$(pixman_spec_unpack_dir_name) | ||
PIXMANARCHIVE:=$(THIRDPARTYCACHEDIR)/$(pixman_spec_archive_name) | ||
PIXMANLIB:=$(THIRDPARTYINSTALLDIR)/$(PIXMANLIBNAME) | ||
|
||
# ensure third-party library is built and recognised by plugins | ||
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR) | ||
EXTRALIBS:=$(EXTRALIBS) $(PIXMANLIB) | ||
PLUGINREQS:=$(THIRDPARTYLIBS) | ||
|
||
$(PIXMANARCHIVE): | ||
$(WGET) -O $(PIXMANARCHIVE) $(PIXMANURL) | ||
|
||
$(THIRDPARTYLIBDIR)/$(PIXMANLIBNAME): $(PIXMANARCHIVE) | ||
tar x -f $(PIXMANARCHIVE) -C $(THIRDPARTYDIR) | ||
cd $(PIXMANDIR) \ | ||
&& bash ./configure \ | ||
--prefix='$(THIRDPARTYOUTDIR)' \ | ||
--host=x86_64-w64-mingw32 \ | ||
PKG_CONFIG="$(PKG_CONFIG)" \ | ||
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \ | ||
CFLAGS='$(THIRDPARTY_CFLAGS)' \ | ||
LDFLAGS='$(THIRDPARTY_LDFLAGS)' \ | ||
&& make \ | ||
&& make install | ||
|
||
$(PIXMANLIB): pkgconfig libpng $(THIRDPARTYLIBDIR)/$(PIXMANLIBNAME) | ||
cp -f $(THIRDPARTYLIBDIR)/$(PIXMANLIBNAME) $(THIRDPARTYINSTALLDIR) | ||
$(PIXMANLIB): pkgconfig libpng $(MINGWLIBDIR)/$(PIXMANLIBNAME) | ||
cp -f $(MINGWLIBDIR)/$(PIXMANLIBNAME) $(THIRDPARTYINSTALLDIR) | ||
|
||
pixman: $(PIXMANLIB) |
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