aboutsummaryrefslogtreecommitdiff
path: root/devel/scons
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2020-01-16 20:04:37 +0800
committerJeffery To <jeffery.to@gmail.com>2020-01-16 20:25:48 +0800
commit644a16f962be7e14214efc024a59e08d067215dc (patch)
tree0da4b7b0d7faf2bff479ae6922b13e2b7237e0da /devel/scons
parent1fbdc4d1a419242cbcec317d1eb76889c7804f4f (diff)
scons: Switch to standalone version, update to 3.1.2
* Install the standalone (scons-local) version Advantages: - The regular version of SCons requires distutils during installation; the standalone version does not have this requirement Disadvantages: - The scons-local package is not available from the Fossies mirror - The patch will need to be manually updated with each version update * Install files to $(STAGING_DIR_HOSTPKG) instead of $(STAGING_DIR_HOST) * Write the correct shebang into scripts instead of using the wrapper * Update to 3.1.2 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'devel/scons')
-rw-r--r--devel/scons/Makefile27
-rwxr-xr-xdevel/scons/files/pywrap.sh15
-rw-r--r--devel/scons/patches/001-platform_env.patch4
3 files changed, 18 insertions, 28 deletions
diff --git a/devel/scons/Makefile b/devel/scons/Makefile
index fa18487ca..13e636f03 100644
--- a/devel/scons/Makefile
+++ b/devel/scons/Makefile
@@ -8,20 +8,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=scons
-PKG_VERSION:=3.1.1
+PKG_VERSION:=3.1.2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/scons \
- https://fossies.org/linux/misc/
-PKG_HASH:=4cea417fdd7499a36f407923d03b4b7000b0f9e8fd7b31b316b9ce7eba9143a5
+PKG_SOURCE:=$(PKG_NAME)-local-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/scons
+PKG_HASH:=642e90860b746fa18fac08c7a22de6bfa86110ae7c56d7f136f7e5fb0d8f4f44
PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE
+PKG_LICENSE_FILES:=scons-LICENSE
PKG_MAINTAINER:=
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
+HOST_UNPACK:=$(DECOMPRESS_CMD) $(HOST_TAR) -C $(HOST_BUILD_DIR) $(TAR_OPTIONS)
+
define Package/scons
SECTION:=devel
CATEGORY:=Development
@@ -44,12 +45,16 @@ define Host/Compile
endef
define Host/Install
- ./files/pywrap.sh $(HOST_BUILD_DIR)/setup.py install --prefix=$(STAGING_DIR_HOST)
- rm -f $(STAGING_DIR_HOST)/bin/scons*.py
- for bin in $(STAGING_DIR_HOST)/bin/scons*; do \
- mv "$$$$bin" "$$$$bin.py"; \
- cp ./files/pywrap.sh "$$$$bin"; \
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+ for py in $(HOST_BUILD_DIR)/*.py; do \
+ bin=$$$${py%.py} ; \
+ $(CP) $$$$py $$$$bin ; \
+ $(SED) '1c#!$(STAGING_DIR_HOST)/bin/python' $$$$bin ; \
+ $(INSTALL_BIN) $$$$bin $(STAGING_DIR_HOSTPKG)/bin/ ; \
done
+
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/scons
+ $(CP) $(HOST_BUILD_DIR)/scons-local-$(PKG_VERSION)/* $(STAGING_DIR_HOSTPKG)/lib/scons/
endef
$(eval $(call BuildPackage,scons))
diff --git a/devel/scons/files/pywrap.sh b/devel/scons/files/pywrap.sh
deleted file mode 100755
index bb990290b..000000000
--- a/devel/scons/files/pywrap.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-case "${0##*/}" in
- pywrap.sh) arg1="";;
- *) arg1="$0.py" ;;
-esac
-
-for bin in python python3; do
- case "$($bin -V 2>&1)" in
- "Python 3"*) exec $bin $arg1 "$@" ;;
- esac
-done
-
-echo "Unable to find a Python 3.x interpreter for executing ${arg1:+$arg1 }$* !" >&2
-exit 1
diff --git a/devel/scons/patches/001-platform_env.patch b/devel/scons/patches/001-platform_env.patch
index 2be31470c..4e4dc2b8e 100644
--- a/devel/scons/patches/001-platform_env.patch
+++ b/devel/scons/patches/001-platform_env.patch
@@ -1,5 +1,5 @@
---- a/engine/SCons/Platform/__init__.py
-+++ b/engine/SCons/Platform/__init__.py
+--- a/scons-local-3.1.2/SCons/Platform/__init__.py
++++ b/scons-local-3.1.2/SCons/Platform/__init__.py
@@ -65,6 +65,8 @@ def platform_default():
care about the machine architecture.
"""