diff options
author | Tony Theodore <tonyt@logyst.com> | 2020-12-05 05:00:09 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2020-12-10 01:38:39 (GMT) |
commit | 7af19687e295a79a4d0ff62f649fe2a8865aa54e (patch) | |
tree | 373d20280ade38aef9db379c63dd9b54ced999d5 | |
parent | 22bde36de17ff465aa84dbb623cdd62ae326d062 (diff) | |
download | mxe-7af19687e295a79a4d0ff62f649fe2a8865aa54e.zip mxe-7af19687e295a79a4d0ff62f649fe2a8865aa54e.tar.gz mxe-7af19687e295a79a4d0ff62f649fe2a8865aa54e.tar.bz2 |
scons: add PREP helper, use python wrapper, and pin 3x versions
-rw-r--r-- | src/mesa.mk | 5 | ||||
-rw-r--r-- | src/nsis.mk | 3 | ||||
-rw-r--r-- | src/scons-local.mk | 8 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa.mk b/src/mesa.mk index 15bc3fe..c3d160c 100644 --- a/src/mesa.mk +++ b/src/mesa.mk @@ -7,9 +7,8 @@ $(PKG)_URL := ftp://ftp.freedesktop.org/pub/mesa/$($(PKG)_FILE) $(PKG)_DEPS := gcc scons-local define $(PKG)_BUILD - mkdir -p '$(BUILD_DIR).scons' - $(call PREPARE_PKG_SOURCE,scons-local,'$(BUILD_DIR).scons') - cd '$(1)' && \ + $(SCONS_PREP) + cd '$(SOURCE_DIR)' && \ MINGW_PREFIX='$(TARGET)-' $(SCONS_LOCAL) \ platform=windows \ toolchain=crossmingw \ diff --git a/src/nsis.mk b/src/nsis.mk index 4f14cbc..8e707c9 100644 --- a/src/nsis.mk +++ b/src/nsis.mk @@ -31,8 +31,7 @@ endef define $(PKG)_BUILD # scons supports -j option but nsis parallel build fails # nsis uses it's own BUILD_PREFIX which isn't user configurable - mkdir -p '$(BUILD_DIR).scons' - $(call PREPARE_PKG_SOURCE,scons-local,'$(BUILD_DIR).scons') + $(SCONS_PREP) $(if $(findstring x86_64-w64-mingw32,$(TARGET)),\ $(SED) -i 's/pei-i386/pei-x86-64/' '$(1)/SCons/Config/linker_script' && \ $(SED) -i 's/m_target_type=TARGET_X86ANSI/m_target_type=TARGET_AMD64/' '$(SOURCE_DIR)/Source/build.cpp') diff --git a/src/scons-local.mk b/src/scons-local.mk index c21c5a3..3096c18 100644 --- a/src/scons-local.mk +++ b/src/scons-local.mk @@ -3,7 +3,8 @@ PKG := scons-local $(PKG)_WEBSITE := https://scons.org/ $(PKG)_DESCR := Standalone SCons -$(PKG)_IGNORE := +# scons 4x requires python3.5+ while 3x supports both 2.7+/3.5+ +$(PKG)_IGNORE := 4% $(PKG)_VERSION := 3.1.2 $(PKG)_CHECKSUM := 642e90860b746fa18fac08c7a22de6bfa86110ae7c56d7f136f7e5fb0d8f4f44 $(PKG)_SUBDIR := . @@ -19,4 +20,7 @@ endef # unpack sources into build dir and execute directly with python2 # scons does various PATH manipulations that don't play well with ccache SCONS_LOCAL = \ - PATH='$(PREFIX)/bin:$(PATH)' $(PYTHON2) '$(BUILD_DIR).scons/scons.py' + PATH='$(PREFIX)/bin:$(PATH)' $(BUILD)-python$(PY_XY_VER) '$(BUILD_DIR).scons/scons.py' +SCONS_PREP = \ + mkdir -p '$(BUILD_DIR).scons' && \ + $(call PREPARE_PKG_SOURCE,scons-local,'$(BUILD_DIR).scons') |