changeset 5495:fb50ae69121c

Add build rule for python3 (bug #58689). * src/build-python3.mk: Add build rule for python3 version 3.8.3. * dist-files.mk: Add new file to list. * index.html: Add new package to list. * src/build-setuptools.mk: Update to version 44.1.1 (last version compatible with python2). Use python2. Set installation prefix. * src/build-mako.mk: Use python2. Set installation prefix. * src/build-markupsafe.mk: Use python2. Set installation prefix. * src/mesa.mk: Windows rule depends on scons. Use python2. * src/nsis.mk: Depend on scons. Use python2.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 05 Jul 2020 12:21:53 +0200
parents 898c27394c57
children eca02b351da6
files Makefile.in dist-files.mk index.html src/build-mako.mk src/build-markupsafe.mk src/build-python3.mk src/build-setuptools.mk src/mesa.mk src/nsis.mk
diffstat 9 files changed, 44 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Sat Jul 04 12:14:29 2020 -0400
+++ b/Makefile.in	Sun Jul 05 12:21:53 2020 +0200
@@ -281,7 +281,7 @@
 # use the a native python in native mingw
 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
   REQUIREMENTS += python3
-  BUILD_TOOLS := $(filter-out build-python, $(BUILD_TOOLS))
+  BUILD_TOOLS := $(filter-out build-python3, $(BUILD_TOOLS))
 endif
 PYTHON3 ?= python3
 
--- a/dist-files.mk	Sat Jul 04 12:14:29 2020 -0400
+++ b/dist-files.mk	Sun Jul 05 12:21:53 2020 +0200
@@ -42,6 +42,7 @@
   build-pkg-config-1-fixes.patch \
   build-pkg-config.mk \
   build-python.mk \
+  build-python3.mk \
   build-scons.mk \
   build-sed.mk \
   build-setuptools.mk \
--- a/index.html	Sat Jul 04 12:14:29 2020 -0400
+++ b/index.html	Sun Jul 05 12:21:53 2020 +0200
@@ -1051,7 +1051,11 @@
     </tr>
     <tr>
         <td class="package">build-python</td>
-        <td class="website"><a href="http://www.python.org">python</a></td>
+        <td class="website"><a href="https://www.python.org/dev/peps/pep-0373/">python2</a></td>
+    </tr>
+    <tr>
+        <td class="package">build-python3</td>
+        <td class="website"><a href="http://www.python.org">python3</a></td>
     </tr>
     <tr>
         <td class="package">build-scons</td>
--- a/src/build-mako.mk	Sat Jul 04 12:14:29 2020 -0400
+++ b/src/build-mako.mk	Sun Jul 05 12:21:53 2020 +0200
@@ -16,5 +16,5 @@
 endef
 
 define $(PKG)_BUILD
-    cd '$(1)' && python setup.py install
+    cd '$(1)' && python2 setup.py install --prefix='$(BUILD_TOOLS_PREFIX)'
 endef
--- a/src/build-markupsafe.mk	Sat Jul 04 12:14:29 2020 -0400
+++ b/src/build-markupsafe.mk	Sun Jul 05 12:21:53 2020 +0200
@@ -16,6 +16,6 @@
 endef
 
 define $(PKG)_BUILD
-    cd '$(1)' && python setup.py install
+    cd '$(1)' && python2 setup.py install --prefix='$(BUILD_TOOLS_PREFIX)'
 endef
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/build-python3.mk	Sun Jul 05 12:21:53 2020 +0200
@@ -0,0 +1,27 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := build-python3
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 3.8.3
+$(PKG)_CHECKSUM := 3bafa40df1cd069c112761c388a9f2e94b5d33dd
+$(PKG)_SUBDIR   := Python-$($(PKG)_VERSION)
+$(PKG)_FILE     := Python-$($(PKG)_VERSION).tar.xz
+$(PKG)_URL      := http://www.python.org/ftp/python/$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_DEPS     := 
+ifneq ($(USE_SYSTEM_GCC),yes)
+    $(PKG)_DEPS     += build-gcc
+endif
+
+define $(PKG)_UPDATE
+    echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2;
+    echo $($(PKG)_VERSION)
+endef
+
+define $(PKG)_BUILD
+    mkdir '$(1)/.build'
+    cd    '$(1)/.build' && '$(1)/configure' \
+        --prefix='$(BUILD_TOOLS_PREFIX)'
+    $(MAKE) -C '$(1)/.build' -j '$(JOBS)'
+    $(MAKE) -C '$(1)/.build' -j 1 install
+endef
--- a/src/build-setuptools.mk	Sat Jul 04 12:14:29 2020 -0400
+++ b/src/build-setuptools.mk	Sun Jul 05 12:21:53 2020 +0200
@@ -3,11 +3,11 @@
 
 PKG             := build-setuptools
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 36.5.0
-$(PKG)_CHECKSUM := 4edca327d0666d6956d05cef8fd6dfcce6e701db
+$(PKG)_VERSION  := 44.1.1
+$(PKG)_CHECKSUM := d1ba6f62520e09956bc3163291a26b185fdff2c6
 $(PKG)_SUBDIR   := setuptools-$($(PKG)_VERSION)
 $(PKG)_FILE     := setuptools-$($(PKG)_VERSION).zip
-$(PKG)_URL      := https://pypi.python.org/packages/a4/c8/9a7a47f683d54d83f648d37c3e180317f80dc126a304c45dc6663246233a/$($(PKG)_FILE)
+$(PKG)_URL      := https://files.pythonhosted.org/packages/b2/40/4e00501c204b457f10fe410da0c97537214b2265247bc9a5bc6edd55b9e4/$($(PKG)_FILE)
 $(PKG)_DEPS     := build-python
 
 define $(PKG)_UPDATE
@@ -16,5 +16,5 @@
 endef
 
 define $(PKG)_BUILD
-    cd '$(1)' && python setup.py install
+    cd '$(1)' && python2 setup.py install --prefix='$(BUILD_TOOLS_PREFIX)'
 endef
--- a/src/mesa.mk	Sat Jul 04 12:14:29 2020 -0400
+++ b/src/mesa.mk	Sun Jul 05 12:21:53 2020 +0200
@@ -11,6 +11,7 @@
 
 $(PKG)_PKG_CONFIG_PATH := $(PKG_CONFIG_PATH)
 ifeq ($(MXE_WINDOWS_BUILD),yes)
+  $(PKG)_DEPS += build-scons
   ifeq ($(USE_SYSTEM_OPENGL),no)
     $(PKG)_SCONS_OPENGL_OPTIONS := libgl-gdi
   endif
@@ -48,7 +49,7 @@
     $(PKG)_MACHINE := x86
   endif
   define $(PKG)_BUILD
-    cd '$(1)' && LLVM=$(HOST_PREFIX) scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 build=release $($(PKG)_SCONS_OPENGL_OPTIONS)
+    cd '$(1)' && LLVM=$(HOST_PREFIX) python2 $(shell which scons) platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 build=release $($(PKG)_SCONS_OPENGL_OPTIONS)
 
     ## Do the scons config files have useful install targets?
     $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL';
--- a/src/nsis.mk	Sat Jul 04 12:14:29 2020 -0400
+++ b/src/nsis.mk	Sun Jul 05 12:21:53 2020 +0200
@@ -8,7 +8,7 @@
 $(PKG)_SUBDIR   := nsis-$($(PKG)_VERSION)-src
 $(PKG)_FILE     := nsis-$($(PKG)_VERSION)-src.tar.bz2
 $(PKG)_URL      := https://$(SOURCEFORGE_MIRROR)/project/nsis/NSIS 3/$($(PKG)_VERSION)/$($(PKG)_FILE)
-$(PKG)_DEPS     :=
+$(PKG)_DEPS     := build-scons
 
 define $(PKG)_UPDATE
     $(WGET) -q -O- 'https://nsis.sourceforge.io/Download' | \
@@ -26,7 +26,7 @@
 
 define $(PKG)_BUILD
     $($(PKG)_PREBUILD)
-    cd '$(1)' && scons VERBOSE=1 \
+    cd '$(1)' && python2 $(shell which scons) VERBOSE=1 \
         PATH='$(PATH)' \
         XGCC_W32_PREFIX='$(MXE_TOOL_PREFIX)' \
         PREFIX='$(BUILD_TOOLS_PREFIX)' \