Merge pull request #11035 from jefferyto/scons-local

scons: Switch to standalone version, update to 3.1.2
This commit is contained in:
Rosen Penev 2020-01-16 16:47:19 -08:00 committed by GitHub
commit 621e5a69a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 29 deletions

View file

@ -8,20 +8,21 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=scons PKG_NAME:=scons
PKG_VERSION:=3.1.1 PKG_VERSION:=3.1.2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-local-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/scons \ PKG_SOURCE_URL:=@SF/scons
https://fossies.org/linux/misc/ PKG_HASH:=642e90860b746fa18fac08c7a22de6bfa86110ae7c56d7f136f7e5fb0d8f4f44
PKG_HASH:=4cea417fdd7499a36f407923d03b4b7000b0f9e8fd7b31b316b9ce7eba9143a5
PKG_LICENSE:=MIT PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=scons-LICENSE
PKG_MAINTAINER:= PKG_MAINTAINER:=
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
HOST_UNPACK:=$(DECOMPRESS_CMD) $(HOST_TAR) -C $(HOST_BUILD_DIR) $(TAR_OPTIONS)
define Package/scons define Package/scons
SECTION:=devel SECTION:=devel
CATEGORY:=Development CATEGORY:=Development
@ -44,12 +45,16 @@ define Host/Compile
endef endef
define Host/Install define Host/Install
./files/pywrap.sh $(HOST_BUILD_DIR)/setup.py install --prefix=$(STAGING_DIR_HOST) $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
rm -f $(STAGING_DIR_HOST)/bin/scons*.py for py in $(HOST_BUILD_DIR)/*.py; do \
for bin in $(STAGING_DIR_HOST)/bin/scons*; do \ bin=$$$${py%.py} ; \
mv "$$$$bin" "$$$$bin.py"; \ $(CP) $$$$py $$$$bin ; \
cp ./files/pywrap.sh "$$$$bin"; \ $(SED) '1c#!$(STAGING_DIR_HOST)/bin/python' $$$$bin ; \
$(INSTALL_BIN) $$$$bin $(STAGING_DIR_HOSTPKG)/bin/ ; \
done done
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/scons
$(CP) $(HOST_BUILD_DIR)/scons-local-$(PKG_VERSION)/* $(STAGING_DIR_HOSTPKG)/lib/scons/
endef endef
$(eval $(call BuildPackage,scons)) $(eval $(call BuildPackage,scons))

View file

@ -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

View file

@ -1,5 +1,5 @@
--- a/engine/SCons/Platform/__init__.py --- a/scons-local-3.1.2/SCons/Platform/__init__.py
+++ b/engine/SCons/Platform/__init__.py +++ b/scons-local-3.1.2/SCons/Platform/__init__.py
@@ -65,6 +65,8 @@ def platform_default(): @@ -65,6 +65,8 @@ def platform_default():
care about the machine architecture. care about the machine architecture.
""" """

View file

@ -227,7 +227,7 @@ endef
define Build/Configure define Build/Configure
(cd $(PKG_BUILD_DIR); \ (cd $(PKG_BUILD_DIR); \
$(SCONS_VARS) \ $(SCONS_VARS) \
python2.7 $(STAGING_DIR_HOST)/bin/scons.py \ python2.7 $(STAGING_DIR_HOSTPKG)/bin/scons \
$(SCONS_OPTIONS) \ $(SCONS_OPTIONS) \
) )
endef endef