host-toolchain plugin: use new BUILD_DIR, SOURCE_DIR, $(PKG)_PATCHES variables

pull/1436/head
Tony Theodore 8 years ago
parent e9299c0204
commit bc5c058fe7

@ -16,8 +16,7 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
mkdir '$(1).build'
cd '$(1).build' && '$(TARGET)-cmake' '$(1)'
$(MAKE) -C '$(1).build' -j '$(JOBS)'
$(MAKE) -C '$(1).build' -j 1 install
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)'
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
endef

@ -7,6 +7,7 @@ $(PKG)_VERSION = $(gcc_VERSION)
$(PKG)_CHECKSUM = $(gcc_CHECKSUM)
$(PKG)_SUBDIR = $(gcc_SUBDIR)
$(PKG)_FILE = $(gcc_FILE)
$(PKG)_PATCHES = $(realpath $(sort $(wildcard $(addsuffix /gcc-[0-9]*.patch, $(TOP_DIR)/src))))
$(PKG)_URL = $(gcc_URL)
$(PKG)_URL_2 = $(gcc_URL_2)
$(PKG)_DEPS := gcc binutils-host cloog gmp isl mpfr mpc pthreads
@ -16,8 +17,7 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
--host='$(TARGET)' \
--target='$(TARGET)' \
--build='$(BUILD)' \
@ -39,8 +39,8 @@ define $(PKG)_BUILD
--with-{cloog,gmp,isl,mpc,mpfr}='$(PREFIX)/$(TARGET)' \
$($(PKG)_CONFIGURE_OPTS)
$(MAKE) -C '$(1).build' -j '$(JOBS)'
$(MAKE) -C '$(1).build' -j 1 install
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
# test compilation on host
# strip and compare cross and host-built tests

@ -16,11 +16,11 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
cd '$(1)' && ./autogen.sh
cd '$(1)' && ./configure \
cd '$(SOURCE_DIR)' && ./autogen.sh
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
# create pkg-config script with relative paths
(echo '#!/bin/sh'; \

@ -13,38 +13,37 @@ $(PKG)_DEPS := gcc gcc-host make-w32-bin qtbase
define $(PKG)_BUILD
$(SED) -i 's,BUILD_ON_MAC=yes,BUILD_ON_MAC=no,g' '$(1)/configure'
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
-prefix '$(PREFIX)/$(TARGET)/qt5' \
-static \
-release \
-c++std c++11 \
-platform win32-g++ \
-host-option CROSS_COMPILE=${TARGET}- \
-external-hostbindir '$(PREFIX)/$(TARGET)/qt5/bin' \
-device-option PKG_CONFIG='${TARGET}-pkg-config' \
-device-option CROSS_COMPILE=${TARGET}- \
-force-pkg-config \
-no-icu \
-no-sql-{db2,ibase,mysql,oci,odbc,psql,sqlite,sqlite2,tds} \
-no-use-gold-linker \
-nomake examples \
-nomake tests \
-opensource \
-confirm-license \
-continue \
-verbose
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
-prefix '$(PREFIX)/$(TARGET)/qt5' \
-static \
-release \
-c++std c++11 \
-platform win32-g++ \
-host-option CROSS_COMPILE=${TARGET}- \
-external-hostbindir '$(PREFIX)/$(TARGET)/qt5/bin' \
-device-option PKG_CONFIG='$(TARGET)-pkg-config' \
-device-option CROSS_COMPILE=$(TARGET)- \
-force-pkg-config \
-no-icu \
-no-sql-{db2,ibase,mysql,oci,odbc,psql,sqlite,sqlite2,tds} \
-no-use-gold-linker \
-nomake examples \
-nomake tests \
-opensource \
-confirm-license \
-continue \
-verbose
# generate remaining build configuration (qmake is created by configure)
$(MAKE) -C '$(1).build' -j $(JOBS) \
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) \
sub-src-qmake_all
# build other tools
$(MAKE) -C '$(1).build/src' -j $(JOBS) \
$(MAKE) -C '$(BUILD_DIR)/src' -j $(JOBS) \
sub-{moc,qdbuscpp2xml,qdbusxml2cpp,qlalr,rcc,uic}-all
# install tools and create `qt.conf` for runtime config
cp '$(1).build/bin'/*.exe '$(PREFIX)/$(TARGET)/qt5/bin/'
cp '$(BUILD_DIR)/bin'/*.exe '$(PREFIX)/$(TARGET)/qt5/bin/'
(printf '[Paths]\r\n'; \
printf 'Prefix = ..\r\n'; \
) > '$(PREFIX)/$(TARGET)/qt5/bin/qt.conf'

Loading…
Cancel
Save