aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2017-01-19 17:20:35 -0500
committerCory Fields <cory-nospam-@coryfields.com>2017-01-28 01:54:30 -0500
commit8efa34fb772bb320e657d18751f1751a4ee48731 (patch)
tree368c63ce784e72f3db5542b8d80adbfb62a56bdc /depends
parent342eb9618abf53c21bd860bfccdf5b5195aab094 (diff)
depends: add a zlib build
qt5.7 changed the location of some of its symbols, creating a circular dependency in Qt5Core. Rather than trying to fix that up, build our own zlib rather than having it built for us.
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/packages.mk2
-rw-r--r--depends/packages/qt.mk4
-rw-r--r--depends/packages/zlib.mk25
3 files changed, 28 insertions, 3 deletions
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
index 4cf44385b8..088723ebd0 100644
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -2,7 +2,7 @@ packages:=boost openssl libevent zeromq
native_packages := native_ccache
qt_native_packages = native_protobuf
-qt_packages = qrencode protobuf
+qt_packages = qrencode protobuf zlib
qt_x86_64_linux_packages:=qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
qt_i686_linux_packages:=$(qt_x86_64_linux_packages)
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 6e38d1ac6a..7898927a81 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -4,7 +4,7 @@ $(package)_download_path=http://download.qt.io/official_releases/qt/5.7/$($(pack
$(package)_suffix=opensource-src-$($(package)_version).tar.gz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
-$(package)_dependencies=openssl
+$(package)_dependencies=openssl zlib
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
@@ -73,7 +73,7 @@ $(package)_config_opts += -prefix $(host_prefix)
$(package)_config_opts += -qt-libpng
$(package)_config_opts += -qt-libjpeg
$(package)_config_opts += -qt-pcre
-$(package)_config_opts += -qt-zlib
+$(package)_config_opts += -system-zlib
$(package)_config_opts += -reduce-exports
$(package)_config_opts += -static
$(package)_config_opts += -silent
diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk
new file mode 100644
index 0000000000..7ff5d00bbd
--- /dev/null
+++ b/depends/packages/zlib.mk
@@ -0,0 +1,25 @@
+package=zlib
+$(package)_version=1.2.11
+$(package)_download_path=http://www.zlib.net
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
+
+define $(package)_set_vars
+$(package)_build_opts= CC="$($(package)_cc)"
+$(package)_build_opts+=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
+$(package)_build_opts+=AR="$($(package)_ar)"
+$(package)_build_opts+=RANLIB="$($(package)_ranlib)"
+endef
+
+define $(package)_config_cmds
+ ./configure --static --prefix=$(host_prefix)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts) libz.a
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install $($(package)_build_opts)
+endef
+