mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 12:09:50 +00:00
225 lines
12 KiB
Makefile
225 lines
12 KiB
Makefile
package=native_qt
|
|
$(package)_version=6.4.1
|
|
$(package)_download_path=https://download.qt.io/official_releases/qt/6.4/$($(package)_version)/submodules
|
|
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
|
|
$(package)_file_name=qtbase-$($(package)_suffix)
|
|
$(package)_sha256_hash=532ad71cc0f9c8f7cb92766c47bc3d23263c60876becd9053802f9727af24fae
|
|
$(package)_dependencies=native_cmake native_libxcb native_libxkbcommon native_libxcb_util native_libxcb_util_render native_libxcb_util_keysyms native_libxcb_util_image native_libxcb_util_wm
|
|
$(package)_qt_libs=corelib network widgets gui plugins testlib
|
|
$(package)_linguist_tools = lrelease lupdate lconvert
|
|
$(package)_patches = dont_hardcode_pwd.patch
|
|
$(package)_patches += fast_fixed_dtoa_no_optimize.patch
|
|
$(package)_patches += guix_cross_lib_path.patch
|
|
$(package)_patches += mac-qmake.conf
|
|
$(package)_patches += no_pthread_cond_clockwait.patch
|
|
$(package)_patches += no-renameat2.patch
|
|
$(package)_patches += no-statx.patch
|
|
$(package)_patches += no-xlib.patch
|
|
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
|
|
$(package)_patches += rcc_hardcode_timestamp.patch
|
|
$(package)_patches += remove-shaders.patch
|
|
$(package)_patches += root_CMakeLists.txt
|
|
$(package)_patches += Use-consistent-ordering-in-QShader.patch
|
|
$(package)_patches += QShader_map.patch
|
|
|
|
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
|
$(package)_qttranslations_sha256_hash=44dbc6f1d256d2048c96fa665c240e0075c2e67188c93986a39ede3556a16a12
|
|
|
|
$(package)_qttools_file_name=qttools-$($(package)_suffix)
|
|
$(package)_qttools_sha256_hash=9e20562c6b04c21fbdb4ed89e59226169ffeaafaab8f45f7d81ea49b0e4b0933
|
|
|
|
$(package)_qtsvg_file_name=qtsvg-$($(package)_suffix)
|
|
$(package)_qtsvg_sha256_hash=5e5345c5941567db883f9daf8ab25108c6f3a527453b1a13c62290849bce9ce5
|
|
|
|
$(package)_qtmultimedia_file_name=qtmultimedia-$($(package)_suffix)
|
|
$(package)_qtmultimedia_sha256_hash=c086d43a026e6090971fd7a697ef8370c5c455115240609cd08d5e2f840dbaaf
|
|
|
|
$(package)_qtshadertools_file_name=qtshadertools-$($(package)_suffix)
|
|
$(package)_qtshadertools_sha256_hash=6bc1748326088c87f562fa3a68140e33fde162fd1333fbfecb775aeb66114504
|
|
|
|
$(package)_extra_sources = $($(package)_qttranslations_file_name)
|
|
$(package)_extra_sources += $($(package)_qttools_file_name)
|
|
$(package)_extra_sources += $($(package)_qtsvg_file_name)
|
|
$(package)_extra_sources += $($(package)_qtmultimedia_file_name)
|
|
$(package)_extra_sources += $($(package)_qtshadertools_file_name)
|
|
|
|
define $(package)_set_vars
|
|
$(package)_config_opts_release = -release
|
|
$(package)_config_opts_debug = -debug
|
|
$(package)_config_opts_debug += -optimized-tools
|
|
$(package)_config_opts += -libexecdir $(build_prefix)/qt-host/bin
|
|
$(package)_config_opts += -c++std c++17
|
|
$(package)_config_opts += -confirm-license
|
|
$(package)_config_opts += -no-cups
|
|
$(package)_config_opts += -no-egl
|
|
$(package)_config_opts += -no-eglfs
|
|
$(package)_config_opts += -no-evdev
|
|
$(package)_config_opts += -no-gif
|
|
$(package)_config_opts += -no-glib
|
|
$(package)_config_opts += -no-icu
|
|
$(package)_config_opts += -no-ico
|
|
$(package)_config_opts += -no-kms
|
|
$(package)_config_opts += -no-linuxfb
|
|
#$(package)_config_opts += -no-libjpeg # Needed
|
|
#$(package)_config_opts += -no-libproxy # Needed
|
|
$(package)_config_opts += -no-libudev
|
|
$(package)_config_opts += -no-mtdev
|
|
$(package)_config_opts += -no-openssl
|
|
#$(package)_config_opts += -openssl-linked
|
|
$(package)_config_opts += -no-openvg
|
|
$(package)_config_opts += -no-reduce-relocations
|
|
$(package)_config_opts += -no-schannel
|
|
$(package)_config_opts += -no-sctp
|
|
$(package)_config_opts += -no-securetransport
|
|
$(package)_config_opts += -no-system-proxies
|
|
$(package)_config_opts += -no-use-gold-linker
|
|
$(package)_config_opts += -no-zstd
|
|
$(package)_config_opts += -nomake examples
|
|
$(package)_config_opts += -nomake tests
|
|
$(package)_config_opts += -opensource
|
|
$(package)_config_opts += -pkg-config
|
|
$(package)_config_opts += -prefix $(build_prefix)/qt-host
|
|
$(package)_config_opts += -qt-libpng
|
|
$(package)_config_opts += -qt-pcre
|
|
$(package)_config_opts += -qt-harfbuzz
|
|
$(package)_config_opts += -qt-zlib
|
|
$(package)_config_opts += -static
|
|
$(package)_config_opts += -no-feature-colordialog
|
|
#$(package)_config_opts += -no-feature-concurrent # Needed
|
|
$(package)_config_opts += -no-feature-dial
|
|
$(package)_config_opts += -no-feature-fontcombobox
|
|
$(package)_config_opts += -no-feature-http
|
|
$(package)_config_opts += -no-feature-image_heuristic_mask
|
|
$(package)_config_opts += -no-feature-keysequenceedit
|
|
$(package)_config_opts += -no-feature-lcdnumber
|
|
$(package)_config_opts += -no-feature-networkdiskcache
|
|
#$(package)_config_opts += -no-feature-networkproxy # Needed
|
|
$(package)_config_opts += -no-feature-pdf
|
|
$(package)_config_opts += -no-feature-printdialog
|
|
$(package)_config_opts += -no-feature-printer
|
|
$(package)_config_opts += -no-feature-printpreviewdialog
|
|
$(package)_config_opts += -no-feature-printpreviewwidget
|
|
$(package)_config_opts += -no-feature-sessionmanager
|
|
#$(package)_config_opts += -no-feature-socks5 # Needed
|
|
$(package)_config_opts += -no-feature-sql
|
|
$(package)_config_opts += -no-feature-syntaxhighlighter
|
|
#$(package)_config_opts += -no-feature-textbrowser # Needed
|
|
$(package)_config_opts += -no-feature-textmarkdownwriter
|
|
$(package)_config_opts += -no-feature-textodfwriter
|
|
$(package)_config_opts += -no-feature-topleveldomain
|
|
#$(package)_config_opts += -no-feature-udpsocket # Neede
|
|
$(package)_config_opts += -no-feature-undocommand
|
|
$(package)_config_opts += -no-feature-undogroup
|
|
$(package)_config_opts += -no-feature-undostack
|
|
$(package)_config_opts += -no-feature-undoview
|
|
$(package)_config_opts += -no-feature-vnc
|
|
#$(package)_config_opts += -no-feature-wizard # Needed
|
|
$(package)_config_opts += -no-feature-fontconfig
|
|
|
|
$(package)_config_opts += -xcb
|
|
$(package)_config_opts += -no-xcb-xlib
|
|
$(package)_config_opts += -no-feature-xlib
|
|
#$(package)_config_opts += -feature-ffmpeg
|
|
#$(package)_config_opts += -feature-pulseaudio
|
|
|
|
# https://bugreports.qt.io/browse/QTBUG-99957
|
|
$(package)_config_opts += -no-pch
|
|
|
|
$(package)_config_opts += -no-opengl
|
|
$(package)_config_opts += -no-feature-vulkan
|
|
ifneq ($(LTO),)
|
|
$(package)_config_opts += -ltcg
|
|
endif
|
|
$(package)_config_opts += -platform linux-g++ -xplatform bitcoin-linux-g++
|
|
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))
|
|
$(package)_config_opts_x86_64 = -xplatform linux-clang-libc++
|
|
endif
|
|
|
|
$(package)_config_opts_aarch64_android += -android-arch arm64-v8a
|
|
$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a
|
|
$(package)_config_opts_x86_64_android += -android-arch x86_64
|
|
|
|
endef
|
|
|
|
define $(package)_fetch_cmds
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtsvg_file_name),$($(package)_qtsvg_file_name),$($(package)_qtsvg_sha256_hash)) && \
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtmultimedia_file_name),$($(package)_qtmultimedia_file_name),$($(package)_qtmultimedia_sha256_hash)) && \
|
|
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtshadertools_file_name),$($(package)_qtshadertools_file_name),$($(package)_qtshadertools_sha256_hash))
|
|
endef
|
|
|
|
define $(package)_extract_cmds
|
|
mkdir -p $($(package)_extract_dir) && \
|
|
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
echo "$($(package)_qtsvg_sha256_hash) $($(package)_source_dir)/$($(package)_qtsvg_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
echo "$($(package)_qtmultimedia_sha256_hash) $($(package)_source_dir)/$($(package)_qtmultimedia_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
echo "$($(package)_qtshadertools_sha256_hash) $($(package)_source_dir)/$($(package)_qtshadertools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
|
mkdir qtbase && \
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
|
|
mkdir qttranslations && \
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
|
|
mkdir qttools && \
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \
|
|
mkdir qtsvg && \
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtsvg_file_name) -C qtsvg && \
|
|
mkdir qtmultimedia && \
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtmultimedia_file_name) -C qtmultimedia && \
|
|
mkdir qtshadertools && \
|
|
$(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtshadertools_file_name) -C qtshadertools
|
|
endef
|
|
|
|
define $(package)_preprocess_cmds
|
|
cp $($(package)_patch_dir)/root_CMakeLists.txt CMakeLists.txt && \
|
|
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/no-statx.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/no-renameat2.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/no_pthread_cond_clockwait.patch && \
|
|
cd qtbase && \
|
|
patch -p1 -i $($(package)_patch_dir)/Use-consistent-ordering-in-QShader.patch && \
|
|
patch -p1 -i $($(package)_patch_dir)/QShader_map.patch && \
|
|
cd .. && \
|
|
cd qtmultimedia && \
|
|
patch -p1 -i $($(package)_patch_dir)/remove-shaders.patch && \
|
|
cd .. && \
|
|
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
|
|
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
|
|
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
|
|
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
|
|
sed -i.old "s|arm-linux-gnueabi-gcc|$($($(package)_type)_CC)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
sed -i.old "s|arm-linux-gnueabi-g++|$($($(package)_type)_CXX)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
sed -i.old "s|arm-linux-gnueabi-ar|$($($(package)_type)_AR)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
sed -i.old "s|arm-linux-gnueabi-objcopy|$($($(package)_type)_OBJCOPY)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
sed -i.old "s|arm-linux-gnueabi-nm|$($($(package)_type)_NM)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
sed -i.old "s|arm-linux-gnueabi-strip|$($($(package)_type)_STRIP)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
|
|
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
|
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
|
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
|
|
sed -i.old "s|QMAKE_CC = \$$$$\$$$${CROSS_COMPILE}clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \
|
|
sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf
|
|
endef
|
|
|
|
define $(package)_config_cmds
|
|
export PKG_CONFIG_SYSROOT_DIR=/ && \
|
|
export PKG_CONFIG_LIBDIR=$(build_prefix)/lib/pkgconfig && \
|
|
export QT_MAC_SDK_NO_VERSION_CHECK=1 && \
|
|
cd qtbase && \
|
|
./configure -top-level $($(package)_config_opts)
|
|
endef
|
|
|
|
define $(package)_build_cmds
|
|
$(MAKE)
|
|
endef
|
|
|
|
define $(package)_stage_cmds
|
|
DESTDIR=$($(package)_staging_dir) cmake --install .
|
|
endef
|