Skip to content

Commit 6ef9d52

Browse files
authored
Merge 8702386 into 140ff02
2 parents 140ff02 + 8702386 commit 6ef9d52

File tree

8 files changed

+42
-181
lines changed

8 files changed

+42
-181
lines changed

build.linux32x86/third-party/Makefile.pkgconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ $(PKGCONFIGBIN): $(PKGCONFIGARCHIVE)
3232
&& make install
3333

3434
pkgconfig: $(PKGCONFIGBIN)
35+
36+
all: $(THIRDPARTYOUTDIR) $(THIRDPARTYINSTALLDIR) $(THIRDPARTYCACHEDIR) pkgconfig
37+
38+
install:
Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,19 @@
1+
# Instead build, copy dependency from mingw distribution
2+
13
ifndef THIRDPARTYDIR
24
include ../common/Makefile.lib.extra
35
endif
46
include ../../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
89
CAIROLIBNAME:=$(cairo_spec_product_name_windows)
9-
CAIRODIR:=$(THIRDPARTYDIR)/$(cairo_spec_unpack_dir_name)
10-
CAIROARCHIVE:=$(THIRDPARTYCACHEDIR)/$(cairo_spec_archive_name)
1110
CAIROLIB:=$(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

5219
cairo: $(CAIROLIB)
Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,15 @@
1+
# Instead build, copy dependency from mingw distribution
2+
13
ifndef THIRDPARTYDIR
24
include ../common/Makefile.lib.extra
35
endif
4-
include ../../third-party/freetype2.spec
6+
include ../../third-party/freetype2.spec.win64
57

6-
# plugin definitions
7-
FREETYPE2URL:=$(freetype2_spec_download_url)
8+
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
89
FREETYPE2LIBNAME:=$(freetype2_spec_product_name_windows)
9-
FREETYPE2DIR:=$(THIRDPARTYDIR)/$(freetype2_spec_unpack_dir_name)
10-
FREETYPE2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(freetype2_spec_archive_name)
1110
FREETYPE2LIB:=$(THIRDPARTYINSTALLDIR)/$(FREETYPE2LIBNAME)
1211

13-
# ensure third-party library is built and recognised by plugins
14-
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR) $(THIRDPARTYINCLUDEDIR)/freetype2
15-
EXTRALIBS:=$(EXTRALIBS) $(FREETYPE2LIB)
16-
PLUGINREQS:=$(PLUGINREQS) $(THIRDPARTYLIBS)
17-
18-
$(FREETYPE2ARCHIVE):
19-
$(WGET) -O $(FREETYPE2ARCHIVE) $(FREETYPE2URL)
20-
21-
$(THIRDPARTYLIBDIR)/$(FREETYPE2LIBNAME): $(FREETYPE2ARCHIVE)
22-
tar x -f $(FREETYPE2ARCHIVE) -C $(THIRDPARTYDIR)
23-
test -d $(FREETYPE2DIR)/build || mkdir $(FREETYPE2DIR)/build
24-
cp ../third-party/Toolchain-cross-mingw32-cygwin.cmake $(FREETYPE2DIR)/build
25-
cd $(FREETYPE2DIR)/build \
26-
&& $(THIRDPARTY_TOOLCHAIN) cmake ..\
27-
-DMINGW=YES \
28-
-DCMAKE_TOOLCHAIN_FILE=Toolchain-cross-mingw32-cygwin.cmake \
29-
-DCMAKE_INSTALL_PREFIX="$(THIRDPARTYOUTDIR)" \
30-
-DWITH_PNG=OFF \
31-
-DBUILD_SHARED_LIBS=ON \
32-
-DCMAKE_C_FLAGS="$(THIRDPARTY_CFLAGS)" \
33-
&& make \
34-
&& make install
12+
$(FREETYPE2LIB): pkgconfig libpng $(MINGWLIBDIR)/$(FREETYPE2LIBNAME)
13+
cp -f $(MINGWLIBDIR)/$(FREETYPE2LIBNAME) $(THIRDPARTYINSTALLDIR)
3514

36-
$(FREETYPE2LIB): pkgconfig libpng $(THIRDPARTYLIBDIR)/$(FREETYPE2LIBNAME)
37-
cp -f $(THIRDPARTYLIBDIR)/$(FREETYPE2LIBNAME) $(THIRDPARTYINSTALLDIR)
38-
3915
freetype2: $(FREETYPE2LIB)
Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,15 @@
1+
# Instead build, copy dependency from mingw distribution
2+
13
ifndef THIRDPARTYDIR
24
include ../common/Makefile.lib.extra
35
endif
46
include ../../third-party/libgit2.spec
57

6-
# plugin definitions
7-
LIBGIT2URL:=$(libgit2_spec_download_url)
8+
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
89
LIBGIT2LIBNAME:=$(libgit2_spec_product_name_windows)
9-
LIBGIT2DIR:=$(THIRDPARTYDIR)/$(libgit2_spec_unpack_dir_name)
10-
LIBGIT2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(libgit2_spec_archive_name)
1110
LIBGIT2LIB:=$(THIRDPARTYINSTALLDIR)/$(LIBGIT2LIBNAME)
1211

13-
# ensure third-party library is built and recognised by plugins
14-
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR)
15-
EXTRALIBS:=$(EXTRALIBS) $(LIBGIT2LIB)
16-
PLUGINREQS:=$(THIRDPARTYLIBS)
17-
18-
$(LIBGIT2ARCHIVE):
19-
$(WGET) -O $(LIBGIT2ARCHIVE) $(LIBGIT2URL)
20-
21-
$(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME): $(LIBGIT2ARCHIVE)
22-
tar x -f $(LIBGIT2ARCHIVE) -C $(THIRDPARTYDIR)
23-
cp ../third-party/Toolchain-cross-mingw32-cygwin.cmake $(LIBGIT2DIR)
24-
cd $(LIBGIT2DIR) \
25-
&& cmake \
26-
-DCMAKE_TOOLCHAIN_FILE=./Toolchain-cross-mingw32-cygwin.cmake \
27-
-DCMAKE_INSTALL_PREFIX=$(THIRDPARTYOUTDIR) \
28-
-DUSE_SSH=ON \
29-
-DBUILD_CLAR=OFF \
30-
-DLIBSSH2_FOUND=ON \
31-
-DLIBSSH2_INCLUDE_DIRS=$(THIRDPARTYINCLUDEDIR) \
32-
-DLIBSSH2_LIBRARIES=$(THIRDPARTYLIBDIR)/libssh2-1.dll \
33-
-DCMAKE_C_FLAGS="$(THIRDPARTY_CFLAGS)" \
34-
&& make \
35-
&& make install
36-
37-
$(LIBGIT2LIB): libssh2 $(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME)
38-
cp -f $(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME) $(THIRDPARTYINSTALLDIR)
12+
$(LIBGIT2LIB): libssh2 $(MINGWLIBDIR)/$(LIBGIT2LIBNAME)
13+
cp -f $(MINGWLIBDIR)/$(LIBGIT2LIBNAME) $(THIRDPARTYINSTALLDIR)
3914

4015
libgit2: $(LIBGIT2LIB)
Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,15 @@
1+
# Instead build, copy dependency from mingw distribution
2+
13
ifndef THIRDPARTYDIR
24
include ../common/Makefile.lib.extra
35
endif
46
include ../../third-party/libpng.spec.win
57

6-
# plugin definitions
7-
LIBPNGURL:=$(libpng_spec_download_url)
8+
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
89
LIBPNGLIBNAME:=$(libpng_spec_product_name_windows)
9-
LIBPNGDIR:=$(THIRDPARTYDIR)/$(libpng_spec_unpack_dir_name)
10-
LIBPNGARCHIVE:=$(THIRDPARTYCACHEDIR)/$(libpng_spec_archive_name)
1110
LIBPNGLIB:=$(THIRDPARTYINSTALLDIR)/$(LIBPNGLIBNAME)
1211

13-
# ensure third-party library is built and recognised by plugins
14-
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR)
15-
EXTRALIBS:=$(EXTRALIBS) $(LIBPNGLIB)
16-
PLUGINREQS:=$(THIRDPARTYLIBS)
17-
18-
$(LIBPNGARCHIVE):
19-
$(WGET) -O $(LIBPNGARCHIVE) $(LIBPNGURL)
20-
21-
$(THIRDPARTYLIBDIR)/$(LIBPNGLIBNAME): $(LIBPNGARCHIVE)
22-
tar x -f $(LIBPNGARCHIVE) -C $(THIRDPARTYDIR)
23-
cd $(LIBPNGDIR) \
24-
&& bash ./configure --prefix='$(THIRDPARTYOUTDIR)' \
25-
--host=x86_64-w64-mingw32 \
26-
CFLAGS='$(THIRDPARTY_CFLAGS) -I$(THIRDPARTYINCLUDEDIR)' \
27-
CPPFLAGS='$(THIRDPARTY_CFLAGS) -I$(THIRDPARTYINCLUDEDIR)' \
28-
LDFLAGS='$(THIRDPARTY_LDFLAGS) -L$(THIRDPARTYLIBDIR)' \
29-
&& make LN=CP LN_S=CP\
30-
&& make install LN=CP LN_S=CP
31-
32-
$(LIBPNGLIB): pkgconfig zlib $(THIRDPARTYLIBDIR)/$(LIBPNGLIBNAME)
33-
cp -f $(THIRDPARTYLIBDIR)/$(LIBPNGLIBNAME) $(THIRDPARTYINSTALLDIR)
12+
$(LIBPNGLIB): pkgconfig zlib $(MINGWLIBDIR)/$(LIBPNGLIBNAME)
13+
cp -f $(MINGWLIBDIR)/$(LIBPNGLIBNAME) $(THIRDPARTYINSTALLDIR)
3414

35-
libpng: $(LIBPNGLIB)
15+
libpng: $(LIBPNGLIB)
Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,15 @@
1+
# Instead build, copy dependency from mingw distribution
2+
13
ifndef THIRDPARTYDIR
24
include ../common/Makefile.lib.extra
35
endif
46
include ../../third-party/libssh2.spec
57

6-
# plugin definitions
7-
LIBSSH2URL:=$(libssh2_spec_download_url)
8+
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
89
LIBSSH2LIBNAME:=$(libssh2_spec_product_name_windows)
9-
LIBSSH2DIR:=$(THIRDPARTYDIR)/$(libssh2_spec_unpack_dir_name)
10-
LIBSSH2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(libssh2_spec_archive_name)
1110
LIBSSH2LIB:=$(THIRDPARTYINSTALLDIR)/$(LIBSSH2LIBNAME)
1211

13-
# ensure third-party library is built and recognised by plugins
14-
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR)
15-
EXTRALIBS:=$(EXTRALIBS) $(LIBSSH2LIB)
16-
PLUGINREQS:=$(THIRDPARTYLIBS)
17-
18-
$(LIBSSH2ARCHIVE):
19-
$(WGET) -O $(LIBSSH2ARCHIVE) $(LIBSSH2URL)
20-
21-
$(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME): $(LIBSSH2ARCHIVE)
22-
tar x -f $(LIBSSH2ARCHIVE) -C $(THIRDPARTYDIR)
23-
cd $(LIBSSH2DIR) \
24-
&& $(THIRDPARTY_TOOLCHAIN) ./configure \
25-
--prefix='$(THIRDPARTYOUTDIR)' \
26-
CFLAGS='$(THIRDPARTY_CFLAGS)' \
27-
LDFLAGS='$(THIRDPARTY_LDFLAGS)' \
28-
--disable-examples-build \
29-
&& make \
30-
&& make install
12+
$(LIBSSH2LIB): openssl $(MINGWLIBDIR)/$(LIBSSH2LIBNAME)
13+
cp -f $(MINGWLIBDIR)/$(LIBSSH2LIBNAME) $(THIRDPARTYINSTALLDIR)
3114

32-
$(LIBSSH2LIB): openssl $(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME)
33-
cp -f $(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME) $(THIRDPARTYINSTALLDIR)
34-
35-
libssh2: $(LIBSSH2LIB)
15+
libssh2: $(LIBSSH2LIB)
Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
1+
# Instead build, copy dependency from mingw distribution
2+
13
ifndef THIRDPARTYDIR
24
include ../common/Makefile.lib.extra
35
endif
46
include ../../third-party/pixman.spec
57

6-
# plugin definitions
7-
PIXMANURL:=$(pixman_spec_download_url)
8+
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
89
PIXMANLIBNAME:=$(pixman_spec_product_name_windows)
9-
PIXMANDIR:=$(THIRDPARTYDIR)/$(pixman_spec_unpack_dir_name)
10-
PIXMANARCHIVE:=$(THIRDPARTYCACHEDIR)/$(pixman_spec_archive_name)
1110
PIXMANLIB:=$(THIRDPARTYINSTALLDIR)/$(PIXMANLIBNAME)
1211

13-
# ensure third-party library is built and recognised by plugins
14-
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR)
15-
EXTRALIBS:=$(EXTRALIBS) $(PIXMANLIB)
16-
PLUGINREQS:=$(THIRDPARTYLIBS)
17-
18-
$(PIXMANARCHIVE):
19-
$(WGET) -O $(PIXMANARCHIVE) $(PIXMANURL)
20-
21-
$(THIRDPARTYLIBDIR)/$(PIXMANLIBNAME): $(PIXMANARCHIVE)
22-
tar x -f $(PIXMANARCHIVE) -C $(THIRDPARTYDIR)
23-
cd $(PIXMANDIR) \
24-
&& bash ./configure \
25-
--prefix='$(THIRDPARTYOUTDIR)' \
26-
--host=x86_64-w64-mingw32 \
27-
PKG_CONFIG="$(PKG_CONFIG)" \
28-
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
29-
CFLAGS='$(THIRDPARTY_CFLAGS)' \
30-
LDFLAGS='$(THIRDPARTY_LDFLAGS)' \
31-
&& make \
32-
&& make install
33-
34-
$(PIXMANLIB): pkgconfig libpng $(THIRDPARTYLIBDIR)/$(PIXMANLIBNAME)
35-
cp -f $(THIRDPARTYLIBDIR)/$(PIXMANLIBNAME) $(THIRDPARTYINSTALLDIR)
12+
$(PIXMANLIB): pkgconfig libpng $(MINGWLIBDIR)/$(PIXMANLIBNAME)
13+
cp -f $(MINGWLIBDIR)/$(PIXMANLIBNAME) $(THIRDPARTYINSTALLDIR)
3614

3715
pixman: $(PIXMANLIB)

third-party/freetype2.spec.win64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
freetype2_spec_product_name_windows:=libfreetype-6.dll

0 commit comments

Comments
 (0)