Browse Source

depends: Add a package for qt4.6. Linux uses it by default.

We're not ready to switch to a static qt5 for Linux yet due to missing plugin
support. This adds a recipe for building a shared qt4 that we build and link
against, but don't distribute.

make USE_LINUX_STATIC_QT5=1 can be used to build static qt5 as before.
0.10
Cory Fields 10 years ago
parent
commit
5f93ec2028
  1. 1
      depends/Makefile
  2. 1
      depends/README.usage
  3. 23
      depends/packages/libICE.mk
  4. 23
      depends/packages/libSM.mk
  5. 13
      depends/packages/packages.mk
  6. 67
      depends/packages/qt46.mk
  7. 10
      depends/patches/qt46/stlfix.patch

1
depends/Makefile

@ -6,6 +6,7 @@ SDK_PATH ?= $(BASEDIR)/SDKs
NO_QT ?= NO_QT ?=
NO_WALLET ?= NO_WALLET ?=
NO_UPNP ?= NO_UPNP ?=
USE_LINUX_STATIC_QT5 ?=
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
BUILD = $(shell ./config.guess) BUILD = $(shell ./config.guess)

1
depends/README.usage

@ -23,6 +23,7 @@ NO_QT: Don't download/build/cache qt and its dependencies
NO_WALLET: Don't download/build/cache libs needed to enable the wallet NO_WALLET: Don't download/build/cache libs needed to enable the wallet
NO_UPNP: Don't download/build/cache packages needed for enabling upnp NO_UPNP: Don't download/build/cache packages needed for enabling upnp
DEBUG: disable some optimizations and enable more runtime checking DEBUG: disable some optimizations and enable more runtime checking
USE_LINUX_STATIC_QT5: Build a static qt5 rather than shared qt4. Linux only.
If some packages are not built, for example 'make NO_WALLET=1', the appropriate If some packages are not built, for example 'make NO_WALLET=1', the appropriate
options will be passed to bitcoin's configure. In this case, --disable-wallet. options will be passed to bitcoin's configure. In this case, --disable-wallet.

23
depends/packages/libICE.mk

@ -0,0 +1,23 @@
package=libICE
$(package)_version=1.0.9
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
$(package)_dependencies=xtrans xproto
define $(package)_set_vars
$(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
$(package)_config_opts_linux=--with-pic
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

23
depends/packages/libSM.mk

@ -0,0 +1,23 @@
package=libSM
$(package)_version=1.2.2
$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
$(package)_dependencies=xtrans xproto libICE
define $(package)_set_vars
$(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static
$(package)_config_opts_linux=--with-pic
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

13
depends/packages/packages.mk

@ -2,8 +2,17 @@ packages:=boost openssl gmp
native_packages := native_ccache native_comparisontool native_packages := native_ccache native_comparisontool
qt_native_packages = native_protobuf qt_native_packages = native_protobuf
qt_packages = qt qrencode protobuf qt_packages = qrencode protobuf
qt_linux_packages=expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
qt46_linux_packages = qt46 expat dbus libxcb xcb_proto libXau xproto freetype libX11 xextproto libXext xtrans libICE libSM
qt5_linux_packages= qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
qt_darwin_packages=qt
qt_mingw32_packages=qt
qt_linux_$(USE_LINUX_STATIC_QT5):=$(qt5_linux_packages)
qt_linux_:=$(qt46_linux_packages)
qt_linux_packages:=$(qt_linux_$(USE_LINUX_STATIC_QT5))
wallet_packages=bdb wallet_packages=bdb

67
depends/packages/qt46.mk

@ -0,0 +1,67 @@
PACKAGE=qt46
$(package)_version=4.6.2
$(package)_download_path=http://download.qt-project.org/archive/qt/4.6/
$(package)_file_name=qt-everywhere-opensource-src-$($(package)_version).tar.gz
$(package)_sha256_hash=176f51ddb06dce67ab4b2efc6b327dc21ed8f764c5d97acc15ff1f907c2affae
$(package)_dependencies=openssl
$(package)_linux_dependencies=freetype dbus libX11 xproto libXext libICE libSM
$(package)_patches=stlfix.patch
define $(package)_set_vars
$(package)_config_opts = -prefix $(host_prefix) -headerdir $(host_prefix)/include/qt4 -bindir $(build_prefix)/bin
$(package)_config_opts += -release -no-separate-debug-info -opensource -confirm-license
$(package)_config_opts += -stl -qt-zlib
$(package)_config_opts += -nomake examples -nomake tests -nomake tools -nomake translations -nomake demos -nomake docs
$(package)_config_opts += -no-audio-backend -no-glib -no-nis -no-cups -no-iconv -no-gif -no-pch
$(package)_config_opts += -no-xkb -no-xrender -no-xrandr -no-xfixes -no-xcursor -no-xinerama -no-xsync -no-xinput -no-mitshm -no-xshape
$(package)_config_opts += -no-libtiff -no-fontconfig -openssl-linked
$(package)_config_opts += -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql
$(package)_config_opts += -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2
$(package)_config_opts += -no-xmlpatterns -no-multimedia -no-phonon -no-scripttools -no-declarative
$(package)_config_opts += -no-phonon-backend -no-webkit -no-javascript-jit -no-script
$(package)_config_opts += -no-svg -no-libjpeg -no-libtiff -no-libpng -no-libmng -no-qt3support -no-opengl
$(package)_config_opts_x86_64_linux += -platform linux-g++-64
$(package)_config_opts_i686_linux = -platform linux-g++-32
$(package)_build_env = QT_RCC_TEST=1
endef
define $(package)_preprocess_cmds
sed -i.old "s|/include /usr/include||" config.tests/unix/freetype/freetype.pri && \
sed -i.old "s|src_plugins.depends = src_gui src_sql src_svg|src_plugins.depends = src_gui src_sql|" src/src.pro && \
sed -i.old "s|\.lower(|\.toLower(|g" src/network/ssl/qsslsocket_openssl.cpp && \
sed -i.old "s|Key_BackSpace|Key_Backspace|" src/gui/itemviews/qabstractitemview.cpp && \
sed -i.old "s|/usr/X11R6/lib64|$(host_prefix)/lib|" mkspecs/*/*.conf && \
sed -i.old "s|/usr/X11R6/lib|$(host_prefix)/lib|" mkspecs/*/*.conf && \
sed -i.old "s|/usr/X11R6/include|$(host_prefix)/include|" mkspecs/*/*.conf && \
sed -i.old "s|QMAKE_LFLAGS_SHLIB += -shared|QMAKE_LFLAGS_SHLIB += -shared -Wl,--exclude-libs,ALL|" mkspecs/common/g++.conf && \
sed -i.old "/SSLv2_client_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
sed -i.old "/SSLv2_server_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
patch -p1 < $($(package)_patch_dir)/stlfix.patch
endef
define $(package)_config_cmds
export PKG_CONFIG_SYSROOT_DIR=/ && \
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
export CPATH=$(host_prefix)/include && \
OPENSSL_LIBS='-L$(host_prefix)/lib -lssl -lcrypto' ./configure $($(package)_config_opts) && \
cd tools/linguist/lrelease; ../../../bin/qmake -o Makefile lrelease.pro
endef
define $(package)_build_cmds
export CPATH=$(host_prefix)/include && \
$(MAKE) -C src && \
$(MAKE) -C tools/linguist/lrelease
endef
define $(package)_stage_cmds
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) install && \
$(MAKE) -C tools/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm -rf mkspecs/ lib/cmake/ && \
find native/bin -type f -exec mv {} {}-qt4 \;
endef

10
depends/patches/qt46/stlfix.patch

@ -0,0 +1,10 @@
--- old/config.tests/unix/stl/stltest.cpp 2011-06-23 03:45:23.000000000 -0400
+++ new/config.tests/unix/stl/stltest.cpp 2014-08-28 00:54:04.154837604 -0400
@@ -49,6 +49,7 @@
#include <vector>
#include <algorithm>
#include <iostream>
+#include <cstddef>
// something mean to see if the compiler and C++ standard lib are good enough
template<class K, class T>
Loading…
Cancel
Save