tools: add scons (patch by Dave Taht)
authorFelix Fietkau <nbd@openwrt.org>
Sat, 5 May 2012 17:37:34 +0000 (17:37 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 5 May 2012 17:37:34 +0000 (17:37 +0000)
This makes it more possible to build scons based applications
for openwrt.

SVN-Revision: 31618

include/scons.mk [new file with mode: 0644]
tools/Makefile
tools/scons/Makefile [new file with mode: 0644]

diff --git a/include/scons.mk b/include/scons.mk
new file mode 100644 (file)
index 0000000..223aede
--- /dev/null
@@ -0,0 +1,21 @@
+SCONS_VARS = \
+       CC="$(TARGET_CC)" \
+       CXX="$(TARGET_CXX)" \
+       CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
+       DESTDIR="$(PKG_INSTALL_DIR)"
+
+define Build/Configure/Default
+       (cd $(PKG_BUILD_DIR); \
+               $(SCONS_VARS) \
+               scons \
+                       prefix=/usr \
+                       $(SCONS_OPTIONS) \
+               install \
+       )
+endef
+
+define Build/Compile
+endef
index 7381ad24cab1426f9fdc0303a55abe0ffd20c2c2..f4ee0a96ea3c2c2602d3e02d27e517a9556b74fc 100644 (file)
@@ -16,7 +16,7 @@ endif
 tools-y += m4 libtool autoconf automake flex bison pkg-config sed mklibs
 tools-y += sstrip ipkg-utils genext2fs e2fsprogs mtd-utils mkimage
 tools-y += firmware-utils patch-cmdline quilt yaffs2 flock padjffs2
-tools-y += mm-macros xorg-macros xfce-macros missing-macros xz cmake
+tools-y += mm-macros xorg-macros xfce-macros missing-macros xz cmake scons
 tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
 tools-$(CONFIG_powerpc) += upx
 tools-$(CONFIG_TARGET_x86) += qemu
diff --git a/tools/scons/Makefile b/tools/scons/Makefile
new file mode 100644 (file)
index 0000000..aadeb28
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=scons
+PKG_VERSION:=2.1.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/scons
+PKG_MD5SUM:=47daf989e303a045b76c11236df719df
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Configure
+endef
+
+define Host/Compile
+endef
+
+define Host/Install
+       python $(HOST_BUILD_DIR)/setup.py install --prefix=$(STAGING_DIR_HOST)
+endef
+
+$(eval $(call HostBuild))