Optimize the depends builds for faster compilation

This includes more fine grained configure options and skipping the
openssl and zlib dependencies when compiling qt. The zlib and libevent
packages are removed.
This commit is contained in:
TheCharlatan 2018-12-08 00:16:27 +01:00
parent 961bb1bd28
commit b4433abc64
No known key found for this signature in database
GPG key ID: 9B79B45691DB4173
5 changed files with 7 additions and 67 deletions

View file

@ -6,7 +6,7 @@ $(package)_sha256_hash=1f912c54035533fb4268809701d65c7468d00e292efbc31e644490845
$(package)_patches=icu-001-dont-build-static-dynamic-twice.patch $(package)_patches=icu-001-dont-build-static-dynamic-twice.patch
define $(package)_set_vars define $(package)_set_vars
$(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 --std=gnu++0x -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC" $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 --std=gnu++0x -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC -DENABLE_STATIC=YES -DPGKDATA_MODE=static"
endef endef
define $(package)_config_cmds define $(package)_config_cmds
@ -17,7 +17,7 @@ define $(package)_config_cmds
sh ../source/runConfigureICU Linux &&\ sh ../source/runConfigureICU Linux &&\
make &&\ make &&\
cd ../buildb &&\ cd ../buildb &&\
sh ../source/$($(package)_autoconf) --enable-static=yes --enable-shared=yes --disable-layoutex --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\ sh ../source/$($(package)_autoconf) --enable-static=yes --disable-shared --disable-layout --disable-layoutex --disable-tests --disable-samples --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\
$(MAKE) $($(package)_build_opts) $(MAKE) $($(package)_build_opts)
endef endef

View file

@ -1,30 +0,0 @@
package=libevent
$(package)_version=2.1.8-stable
$(package)_download_path=https://github.com/libevent/libevent/archive/
$(package)_file_name=release-$($(package)_version).tar.gz
$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
define $(package)_preprocess_cmds
./autogen.sh
endef
define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
$(package)_config_opts_release=--disable-debug-mode
$(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
define $(package)_postprocess_cmds
endef

View file

@ -1,4 +1,4 @@
packages:=boost openssl libevent zeromq cppzmq zlib expat ldns cppzmq readline libiconv qt hidapi protobuf libusb packages:=boost openssl zeromq cppzmq expat ldns cppzmq readline libiconv qt hidapi protobuf libusb
native_packages := native_ccache native_protobuf native_packages := native_ccache native_protobuf
darwin_native_packages = native_biplist native_ds_store native_mac_alias darwin_native_packages = native_biplist native_ds_store native_mac_alias
@ -17,6 +17,5 @@ endif
ifneq ($(build_os),darwin) ifneq ($(build_os),darwin)
darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
packages += readline
endif endif

View file

@ -4,7 +4,6 @@ $(package)_download_path=https://download.qt.io/archive/qt/5.7/5.7.1/submodules
$(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 zlib
$(package)_build_subdir=qtbase $(package)_build_subdir=qtbase
$(package)_qt_libs=corelib $(package)_qt_libs=corelib
$(package)_patches=pidlist_absolute.patch fix_qt_pkgconfig.patch qfixed-coretext.patch $(package)_patches=pidlist_absolute.patch fix_qt_pkgconfig.patch qfixed-coretext.patch
@ -62,14 +61,14 @@ $(package)_config_opts += -no-xrender
$(package)_config_opts += -nomake examples $(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests $(package)_config_opts += -nomake tests
$(package)_config_opts += -opensource $(package)_config_opts += -opensource
$(package)_config_opts += -openssl-linked $(package)_config_opts += -no-openssl
$(package)_config_opts += -optimized-qmake $(package)_config_opts += -optimized-qmake
$(package)_config_opts += -pch $(package)_config_opts += -pch
$(package)_config_opts += -pkg-config $(package)_config_opts += -pkg-config
$(package)_config_opts += -qt-libpng $(package)_config_opts += -no-libpng
$(package)_config_opts += -qt-libjpeg $(package)_config_opts += -no-libjpeg
$(package)_config_opts += -qt-pcre $(package)_config_opts += -qt-pcre
$(package)_config_opts += -system-zlib $(package)_config_opts += -no-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
@ -124,7 +123,6 @@ 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 && \ 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 && \

View file

@ -1,27 +0,0 @@
package=zlib
$(package)_version=1.2.11
$(package)_download_path=https://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+=RANLIB="$($(package)_ranlib)"
$(package)_build_opts+=AR="$($(package)_ar)"
$(package)_build_opts_darwin+=AR="$($(package)_libtool)"
$(package)_build_opts_darwin+=ARFLAGS="-o"
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