-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0416445
commit 091146c
Showing
20 changed files
with
630 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
SDKs/ | ||
work/ | ||
built/ | ||
sources/ | ||
config.site | ||
x86_64* | ||
i686* | ||
mips* | ||
arm* | ||
aarch64* | ||
riscv32* | ||
riscv64* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
.NOTPARALLEL : | ||
|
||
SOURCES_PATH ?= $(BASEDIR)/sources | ||
WORK_PATH = $(BASEDIR)/work | ||
BASE_CACHE ?= $(BASEDIR)/built | ||
SDK_PATH ?= $(BASEDIR)/SDKs | ||
NO_QT ?= | ||
NO_WALLET ?= | ||
NO_UPNP ?= | ||
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources | ||
|
||
BUILD = $(shell ./config.guess) | ||
HOST ?= $(BUILD) | ||
PATCHES_PATH = $(BASEDIR)/patches | ||
BASEDIR = $(CURDIR) | ||
HASH_LENGTH:=11 | ||
DOWNLOAD_CONNECT_TIMEOUT:=10 | ||
DOWNLOAD_RETRIES:=3 | ||
HOST_ID_SALT ?= salt | ||
BUILD_ID_SALT ?= salt | ||
|
||
host:=$(BUILD) | ||
ifneq ($(HOST),) | ||
host:=$(HOST) | ||
endif | ||
|
||
ifneq ($(DEBUG),) | ||
release_type=debug | ||
else | ||
release_type=release | ||
endif | ||
|
||
base_build_dir=$(WORK_PATH)/build | ||
base_staging_dir=$(WORK_PATH)/staging | ||
base_download_dir=$(WORK_PATH)/download | ||
canonical_host:=$(shell ./config.sub $(HOST)) | ||
build:=$(shell ./config.sub $(BUILD)) | ||
|
||
build_arch =$(firstword $(subst -, ,$(build))) | ||
build_vendor=$(word 2,$(subst -, ,$(build))) | ||
full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build)) | ||
build_os:=$(findstring linux,$(full_build_os)) | ||
build_os+=$(findstring darwin,$(full_build_os)) | ||
build_os:=$(strip $(build_os)) | ||
ifeq ($(build_os),) | ||
build_os=$(full_build_os) | ||
endif | ||
|
||
host_arch=$(firstword $(subst -, ,$(canonical_host))) | ||
host_vendor=$(word 2,$(subst -, ,$(canonical_host))) | ||
full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host)) | ||
host_os:=$(findstring linux,$(full_host_os)) | ||
host_os+=$(findstring darwin,$(full_host_os)) | ||
host_os+=$(findstring mingw32,$(full_host_os)) | ||
host_os:=$(strip $(host_os)) | ||
ifeq ($(host_os),) | ||
host_os=$(full_host_os) | ||
endif | ||
|
||
$(host_arch)_$(host_os)_prefix=$(BASEDIR)/$(host) | ||
$(host_arch)_$(host_os)_host=$(host) | ||
host_prefix=$($(host_arch)_$(host_os)_prefix) | ||
build_prefix=$(host_prefix)/native | ||
build_host=$(build) | ||
|
||
AT_$(V):= | ||
AT_:=@ | ||
AT:=$(AT_$(V)) | ||
|
||
all: install | ||
|
||
include hosts/$(host_os).mk | ||
include hosts/default.mk | ||
include builders/$(build_os).mk | ||
include builders/default.mk | ||
include packages/packages.mk | ||
|
||
build_id_string:=$(BUILD_ID_SALT) | ||
build_id_string+=$(shell $(build_CC) --version 2>/dev/null) | ||
build_id_string+=$(shell $(build_AR) --version 2>/dev/null) | ||
build_id_string+=$(shell $(build_CXX) --version 2>/dev/null) | ||
build_id_string+=$(shell $(build_RANLIB) --version 2>/dev/null) | ||
build_id_string+=$(shell $(build_STRIP) --version 2>/dev/null) | ||
|
||
$(host_arch)_$(host_os)_id_string:=$(HOST_ID_SALT) | ||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_CC) --version 2>/dev/null) | ||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_AR) --version 2>/dev/null) | ||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_CXX) --version 2>/dev/null) | ||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null) | ||
$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null) | ||
|
||
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) | ||
wallet_packages_$(NO_WALLET) = $(wallet_packages) | ||
upnp_packages_$(NO_UPNP) = $(upnp_packages) | ||
|
||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_) | ||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) | ||
|
||
ifneq ($(qt_packages_),) | ||
native_packages += $(qt_native_packages) | ||
endif | ||
|
||
all_packages = $(packages) $(native_packages) | ||
|
||
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk | ||
|
||
$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain) | ||
|
||
include funcs.mk | ||
|
||
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin) | ||
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in) | ||
final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)) | ||
$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) | ||
$(AT)rm -rf $(@D) | ||
$(AT)mkdir -p $(@D) | ||
$(AT)echo copying packages: $^ | ||
$(AT)echo to: $(@D) | ||
$(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); ) | ||
$(AT)touch $@ | ||
|
||
$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id) | ||
$(AT)@mkdir -p $(@D) | ||
$(AT)sed -e 's|@HOST@|$(host)|' \ | ||
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \ | ||
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \ | ||
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \ | ||
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \ | ||
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \ | ||
-e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \ | ||
-e 's|@build_os@|$(build_os)|' \ | ||
-e 's|@host_os@|$(host_os)|' \ | ||
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \ | ||
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \ | ||
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \ | ||
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \ | ||
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \ | ||
-e 's|@no_qt@|$(NO_QT)|' \ | ||
-e 's|@no_wallet@|$(NO_WALLET)|' \ | ||
-e 's|@no_upnp@|$(NO_UPNP)|' \ | ||
-e 's|@debug@|$(DEBUG)|' \ | ||
$< > $@ | ||
$(AT)touch $@ | ||
|
||
|
||
define check_or_remove_cached | ||
mkdir -p $(BASE_CACHE)/$(host)/$(package) && cd $(BASE_CACHE)/$(host)/$(package); \ | ||
$(build_SHA256SUM) -c $($(package)_cached_checksum) >/dev/null 2>/dev/null || \ | ||
( rm -f $($(package)_cached_checksum); \ | ||
if test -f "$($(package)_cached)"; then echo "Checksum mismatch for $(package). Forcing rebuild.."; rm -f $($(package)_cached_checksum) $($(package)_cached); fi ) | ||
endef | ||
|
||
define check_or_remove_sources | ||
mkdir -p $($(package)_source_dir); cd $($(package)_source_dir); \ | ||
test -f $($(package)_fetched) && ( $(build_SHA256SUM) -c $($(package)_fetched) >/dev/null 2>/dev/null || \ | ||
( echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; \ | ||
rm -f $($(package)_all_sources) $($(1)_fetched))) || true | ||
endef | ||
|
||
check-packages: | ||
@$(foreach package,$(all_packages),$(call check_or_remove_cached,$(package));) | ||
check-sources: | ||
@$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));) | ||
|
||
$(host_prefix)/share/config.site: check-packages | ||
|
||
check-packages: check-sources | ||
|
||
clean-all: clean | ||
@rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64* riscv32* riscv64* | ||
|
||
clean: | ||
@rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) | ||
|
||
install: check-packages $(host_prefix)/share/config.site | ||
|
||
|
||
download-one: check-sources $(all_sources) | ||
|
||
download-osx: | ||
@$(MAKE) -s HOST=x86_64-apple-darwin14 download-one | ||
download-linux: | ||
@$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one | ||
download-win: | ||
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one | ||
download: download-osx download-linux download-win | ||
|
||
.PHONY: install cached clean clean-all download-one download-osx download-linux download-win download check-packages check-sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- cdrkit-1.1.11.old/genisoimage/tree.c 2008-10-21 19:57:47.000000000 -0400 | ||
+++ cdrkit-1.1.11/genisoimage/tree.c 2013-12-06 00:23:18.489622668 -0500 | ||
@@ -1139,8 +1139,9 @@ | ||
scan_directory_tree(struct directory *this_dir, char *path, | ||
struct directory_entry *de) | ||
{ | ||
- DIR *current_dir; | ||
+ int current_file; | ||
char whole_path[PATH_MAX]; | ||
+ struct dirent **d_list; | ||
struct dirent *d_entry; | ||
struct directory *parent; | ||
int dflag; | ||
@@ -1164,7 +1165,8 @@ | ||
this_dir->dir_flags |= DIR_WAS_SCANNED; | ||
|
||
errno = 0; /* Paranoia */ | ||
- current_dir = opendir(path); | ||
+ //current_dir = opendir(path); | ||
+ current_file = scandir(path, &d_list, NULL, alphasort); | ||
d_entry = NULL; | ||
|
||
/* | ||
@@ -1173,12 +1175,12 @@ | ||
*/ | ||
old_path = path; | ||
|
||
- if (current_dir) { | ||
+ if (current_file >= 0) { | ||
errno = 0; | ||
- d_entry = readdir(current_dir); | ||
+ d_entry = d_list[0]; | ||
} | ||
|
||
- if (!current_dir || !d_entry) { | ||
+ if (current_file < 0 || !d_entry) { | ||
int ret = 1; | ||
|
||
#ifdef USE_LIBSCHILY | ||
@@ -1191,8 +1193,8 @@ | ||
de->isorec.flags[0] &= ~ISO_DIRECTORY; | ||
ret = 0; | ||
} | ||
- if (current_dir) | ||
- closedir(current_dir); | ||
+ if(d_list) | ||
+ free(d_list); | ||
return (ret); | ||
} | ||
#ifdef ABORT_DEEP_ISO_ONLY | ||
@@ -1208,7 +1210,7 @@ | ||
errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n"); | ||
errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n"); | ||
} | ||
- closedir(current_dir); | ||
+ free(d_list); | ||
return (1); | ||
} | ||
#endif | ||
@@ -1250,13 +1252,13 @@ | ||
* The first time through, skip this, since we already asked | ||
* for the first entry when we opened the directory. | ||
*/ | ||
- if (dflag) | ||
- d_entry = readdir(current_dir); | ||
+ if (dflag && current_file >= 0) | ||
+ d_entry = d_list[current_file]; | ||
dflag++; | ||
|
||
- if (!d_entry) | ||
+ if (current_file < 0) | ||
break; | ||
- | ||
+ current_file--; | ||
/* OK, got a valid entry */ | ||
|
||
/* If we do not want all files, then pitch the backups. */ | ||
@@ -1348,7 +1350,7 @@ | ||
insert_file_entry(this_dir, whole_path, d_entry->d_name); | ||
#endif /* APPLE_HYB */ | ||
} | ||
- closedir(current_dir); | ||
+ free(d_list); | ||
|
||
#ifdef APPLE_HYB | ||
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- old/qtbase/mkspecs/features/mac/sdk.prf 2018-02-08 10:24:48.000000000 -0800 | ||
+++ new/qtbase/mkspecs/features/mac/sdk.prf 2018-03-23 10:38:56.000000000 -0700 | ||
@@ -8,21 +8,21 @@ | ||
defineReplace(xcodeSDKInfo) { | ||
info = $$1 | ||
equals(info, "Path"): \ | ||
- info = --show-sdk-path | ||
+ infoarg = --show-sdk-path | ||
equals(info, "PlatformPath"): \ | ||
- info = --show-sdk-platform-path | ||
+ infoarg = --show-sdk-platform-path | ||
equals(info, "SDKVersion"): \ | ||
- info = --show-sdk-version | ||
+ infoarg = --show-sdk-version | ||
sdk = $$2 | ||
isEmpty(sdk): \ | ||
sdk = $$QMAKE_MAC_SDK | ||
|
||
isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { | ||
- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null") | ||
+ QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null") | ||
# --show-sdk-platform-path won't work for Command Line Tools; this is fine | ||
# only used by the XCTest backend to testlib | ||
- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \ | ||
- error("Could not resolve SDK $$info for \'$$sdk\'") | ||
+ isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \ | ||
+ error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg") | ||
cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) | ||
} | ||
|
||
--- old/qtbase/configure 2018-02-08 10:24:48.000000000 -0800 | ||
+++ new/qtbase/configure 2018-03-23 05:42:29.000000000 -0700 | ||
@@ -232,8 +232,13 @@ | ||
|
||
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1") | ||
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi | ||
- sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null) | ||
- if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi | ||
+ sysroot=$(getSingleQMakeVariable "QMAKE_MAC_SDK_PATH" "$1") | ||
+ | ||
+ echo "sysroot pre-configured as $sysroot"; | ||
+ if [ -z "$sysroot" ]; then | ||
+ sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null) | ||
+ if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi | ||
+ fi | ||
|
||
case "$sdk" in | ||
macosx*) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h | ||
+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h | ||
@@ -52,6 +52,7 @@ | ||
// | ||
|
||
#include <QtCore/qglobal.h> | ||
+#include <qpa/qplatformprintdevice.h> | ||
|
||
#ifndef QT_NO_PRINTER | ||
|
||
--- x/qtbase/src/plugins/plugins.pro | ||
+++ y/qtbase/src/plugins/plugins.pro | ||
@@ -8,6 +8,3 @@ qtHaveModule(gui) { | ||
qtConfig(imageformatplugin): SUBDIRS *= imageformats | ||
!android:qtConfig(library): SUBDIRS *= generic | ||
} | ||
- | ||
-!winrt:qtHaveModule(printsupport): \ | ||
- SUBDIRS += printsupport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- old/qtbase/mkspecs/features/qt_module.prf | ||
+++ new/qtbase/mkspecs/features/qt_module.prf | ||
@@ -245,7 +245,7 @@ | ||
load(qt_targets) | ||
|
||
# this builds on top of qt_common | ||
-!internal_module:!lib_bundle:if(unix|mingw) { | ||
+unix|mingw { | ||
CONFIG += create_pc | ||
QMAKE_PKGCONFIG_DESTDIR = pkgconfig | ||
host_build: \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- old/qtbase/src/tools/rcc/rcc.cpp | ||
+++ new/qtbase/src/tools/rcc/rcc.cpp | ||
@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) | ||
if (lib.formatVersion() >= 2) { | ||
// last modified time stamp | ||
const QDateTime lastModified = m_fileInfo.lastModified(); | ||
- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0)); | ||
+ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); | ||
+ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); | ||
+ if (sourceDate != 0) | ||
+ lastmod = sourceDate; | ||
+ lib.writeNumber8(lastmod); | ||
if (text || pass1) | ||
lib.writeChar('\n'); | ||
} |
Oops, something went wrong.