Merge #9646: depends: Fix cross build for qt5.7
b5f374f
qt: fix build with zlib for target (Cory Fields)8efa34f
depends: add a zlib build (Cory Fields)342eb96
build: find qt's renamed helper libs from 5.7 (Cory Fields)
This commit is contained in:
commit
720b579480
5 changed files with 43 additions and 15 deletions
|
@ -473,8 +473,8 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
|
||||||
])
|
])
|
||||||
|
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
|
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
|
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([jpeg] ,[main],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
|
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([jpeg_create_decompress] ,[qtjpeg jpeg],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
|
||||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
|
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
|
||||||
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
|
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
|
||||||
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
|
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
|
||||||
|
|
|
@ -2,7 +2,7 @@ packages:=boost openssl libevent zeromq
|
||||||
native_packages := native_ccache
|
native_packages := native_ccache
|
||||||
|
|
||||||
qt_native_packages = native_protobuf
|
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_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)
|
qt_i686_linux_packages:=$(qt_x86_64_linux_packages)
|
||||||
|
|
|
@ -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)_suffix=opensource-src-$($(package)_version).tar.gz
|
||||||
$(package)_file_name=qtbase-$($(package)_suffix)
|
$(package)_file_name=qtbase-$($(package)_suffix)
|
||||||
$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
|
$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
|
||||||
$(package)_dependencies=openssl
|
$(package)_dependencies=openssl zlib
|
||||||
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
|
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
|
||||||
$(package)_build_subdir=qtbase
|
$(package)_build_subdir=qtbase
|
||||||
$(package)_qt_libs=corelib network widgets gui plugins testlib
|
$(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-libpng
|
||||||
$(package)_config_opts += -qt-libjpeg
|
$(package)_config_opts += -qt-libjpeg
|
||||||
$(package)_config_opts += -qt-pcre
|
$(package)_config_opts += -qt-pcre
|
||||||
$(package)_config_opts += -qt-zlib
|
$(package)_config_opts += -system-zlib
|
||||||
$(package)_config_opts += -reduce-exports
|
$(package)_config_opts += -reduce-exports
|
||||||
$(package)_config_opts += -static
|
$(package)_config_opts += -static
|
||||||
$(package)_config_opts += -silent
|
$(package)_config_opts += -silent
|
||||||
|
@ -140,12 +140,13 @@ define $(package)_preprocess_cmds
|
||||||
patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
|
patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
|
||||||
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
|
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
|
||||||
patch -p1 < $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
|
patch -p1 < $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
|
||||||
echo "QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
||||||
echo "QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
||||||
echo "QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
||||||
sed -i.old "s|QMAKE_CFLAGS = |QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
|
sed -i.old "s|QMAKE_CFLAGS = |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
|
||||||
sed -i.old "s|QMAKE_LFLAGS = |QMAKE_LFLAGS = $($(package)_ldflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
|
sed -i.old "s|QMAKE_LFLAGS = |!host_build: QMAKE_LFLAGS = $($(package)_ldflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
|
||||||
sed -i.old "s|QMAKE_CXXFLAGS = |QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf
|
sed -i.old "s|QMAKE_CXXFLAGS = |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
|
@ -153,6 +154,8 @@ define $(package)_config_cmds
|
||||||
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
|
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
|
||||||
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
|
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
|
||||||
./configure $($(package)_config_opts) && \
|
./configure $($(package)_config_opts) && \
|
||||||
|
echo "host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs/qconfig.pri && \
|
||||||
|
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
|
||||||
$(MAKE) sub-src-clean && \
|
$(MAKE) sub-src-clean && \
|
||||||
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
|
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
|
||||||
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
|
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
|
||||||
|
|
25
depends/packages/zlib.mk
Normal file
25
depends/packages/zlib.mk
Normal file
|
@ -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
|
||||||
|
|
|
@ -14,10 +14,10 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH}
|
||||||
QMAKE_MAC_SDK.macosx.platform_name = macosx
|
QMAKE_MAC_SDK.macosx.platform_name = macosx
|
||||||
QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
|
QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
|
||||||
QMAKE_MAC_SDK.macosx.PlatformPath = /phony
|
QMAKE_MAC_SDK.macosx.PlatformPath = /phony
|
||||||
QMAKE_CFLAGS += -target $${MAC_TARGET}
|
!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET}
|
||||||
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
|
!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
|
||||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
|
!host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
|
||||||
QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION}
|
!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION}
|
||||||
QMAKE_AR = $${CROSS_COMPILE}ar cq
|
QMAKE_AR = $${CROSS_COMPILE}ar cq
|
||||||
QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
|
QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
|
||||||
QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool
|
QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool
|
||||||
|
|
Loading…
Reference in a new issue