Navigation Menu

Skip to content

Commit

Permalink
Merge fc78908 into 140ff02
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Jun 26, 2018
2 parents 140ff02 + fc78908 commit a424970
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 181 deletions.
4 changes: 4 additions & 0 deletions build.linux32x86/third-party/Makefile.pkgconfig
Expand Up @@ -32,3 +32,7 @@ $(PKGCONFIGBIN): $(PKGCONFIGARCHIVE)
&& make install

pkgconfig: $(PKGCONFIGBIN)

all: $(THIRDPARTYOUTDIR) $(THIRDPARTYINSTALLDIR) $(THIRDPARTYCACHEDIR) pkgconfig

install:
51 changes: 9 additions & 42 deletions build.win64x64/third-party/Makefile.cairo
@@ -1,52 +1,19 @@
# Instead build, copy dependency from mingw distribution

ifndef THIRDPARTYDIR
include ../common/Makefile.lib.extra
endif
include ../../third-party/cairo.spec

# plugin definitions
CAIROURL:=$(cairo_spec_download_url)
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
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 ./configure
# 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
CAIRODEPS:= libfontconfig-1.dll libexpat-1.dll libbz2-1.dll

$(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)
34 changes: 5 additions & 29 deletions build.win64x64/third-party/Makefile.freetype2
@@ -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)
35 changes: 5 additions & 30 deletions build.win64x64/third-party/Makefile.libgit2
@@ -1,40 +1,15 @@
# Instead build, copy dependency from mingw distribution

ifndef THIRDPARTYDIR
include ../common/Makefile.lib.extra
endif
include ../../third-party/libgit2.spec

# plugin definitions
LIBGIT2URL:=$(libgit2_spec_download_url)
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
LIBGIT2LIBNAME:=$(libgit2_spec_product_name_windows)
LIBGIT2DIR:=$(THIRDPARTYDIR)/$(libgit2_spec_unpack_dir_name)
LIBGIT2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(libgit2_spec_archive_name)
LIBGIT2LIB:=$(THIRDPARTYINSTALLDIR)/$(LIBGIT2LIBNAME)

# ensure third-party library is built and recognised by plugins
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR)
EXTRALIBS:=$(EXTRALIBS) $(LIBGIT2LIB)
PLUGINREQS:=$(THIRDPARTYLIBS)

$(LIBGIT2ARCHIVE):
$(WGET) -O $(LIBGIT2ARCHIVE) $(LIBGIT2URL)

$(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME): $(LIBGIT2ARCHIVE)
tar x -f $(LIBGIT2ARCHIVE) -C $(THIRDPARTYDIR)
cp ../third-party/Toolchain-cross-mingw32-cygwin.cmake $(LIBGIT2DIR)
cd $(LIBGIT2DIR) \
&& cmake \
-DCMAKE_TOOLCHAIN_FILE=./Toolchain-cross-mingw32-cygwin.cmake \
-DCMAKE_INSTALL_PREFIX=$(THIRDPARTYOUTDIR) \
-DUSE_SSH=ON \
-DBUILD_CLAR=OFF \
-DLIBSSH2_FOUND=ON \
-DLIBSSH2_INCLUDE_DIRS=$(THIRDPARTYINCLUDEDIR) \
-DLIBSSH2_LIBRARIES=$(THIRDPARTYLIBDIR)/libssh2-1.dll \
-DCMAKE_C_FLAGS="$(THIRDPARTY_CFLAGS)" \
&& make \
&& make install

$(LIBGIT2LIB): libssh2 $(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME)
cp -f $(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME) $(THIRDPARTYINSTALLDIR)
$(LIBGIT2LIB): libssh2 $(MINGWLIBDIR)/$(LIBGIT2LIBNAME)
cp -f $(MINGWLIBDIR)/$(LIBGIT2LIBNAME) $(THIRDPARTYINSTALLDIR)

libgit2: $(LIBGIT2LIB)
32 changes: 6 additions & 26 deletions build.win64x64/third-party/Makefile.libpng
@@ -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)
32 changes: 6 additions & 26 deletions build.win64x64/third-party/Makefile.libssh2
@@ -1,35 +1,15 @@
# Instead build, copy dependency from mingw distribution

ifndef THIRDPARTYDIR
include ../common/Makefile.lib.extra
endif
include ../../third-party/libssh2.spec

# plugin definitions
LIBSSH2URL:=$(libssh2_spec_download_url)
MINGWLIBDIR:=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
LIBSSH2LIBNAME:=$(libssh2_spec_product_name_windows)
LIBSSH2DIR:=$(THIRDPARTYDIR)/$(libssh2_spec_unpack_dir_name)
LIBSSH2ARCHIVE:=$(THIRDPARTYCACHEDIR)/$(libssh2_spec_archive_name)
LIBSSH2LIB:=$(THIRDPARTYINSTALLDIR)/$(LIBSSH2LIBNAME)

# ensure third-party library is built and recognised by plugins
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR)
EXTRALIBS:=$(EXTRALIBS) $(LIBSSH2LIB)
PLUGINREQS:=$(THIRDPARTYLIBS)

$(LIBSSH2ARCHIVE):
$(WGET) -O $(LIBSSH2ARCHIVE) $(LIBSSH2URL)

$(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME): $(LIBSSH2ARCHIVE)
tar x -f $(LIBSSH2ARCHIVE) -C $(THIRDPARTYDIR)
cd $(LIBSSH2DIR) \
&& $(THIRDPARTY_TOOLCHAIN) ./configure \
--prefix='$(THIRDPARTYOUTDIR)' \
CFLAGS='$(THIRDPARTY_CFLAGS)' \
LDFLAGS='$(THIRDPARTY_LDFLAGS)' \
--disable-examples-build \
&& make \
&& make install
$(LIBSSH2LIB): openssl $(MINGWLIBDIR)/$(LIBSSH2LIBNAME)
cp -f $(MINGWLIBDIR)/$(LIBSSH2LIBNAME) $(THIRDPARTYINSTALLDIR)

$(LIBSSH2LIB): openssl $(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME)
cp -f $(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME) $(THIRDPARTYINSTALLDIR)

libssh2: $(LIBSSH2LIB)
libssh2: $(LIBSSH2LIB)
32 changes: 5 additions & 27 deletions build.win64x64/third-party/Makefile.pixman
@@ -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)
2 changes: 1 addition & 1 deletion third-party/freetype2.spec
Expand Up @@ -3,5 +3,5 @@ freetype2_spec_archive_name:=freetype-2.6.5.tar.gz
freetype2_spec_unpack_dir_name:=freetype-2.6.5
freetype2_spec_product_name_macOS:=libfreetype.6.dylib
freetype2_spec_product_name_linux:=
freetype2_spec_product_name_windows:=libfreetype.dll
freetype2_spec_product_name_windows:=libfreetype-6.dll
freetype2_spec_symlinks_macOS:=libfreetype*.dylib

0 comments on commit a424970

Please sign in to comment.