--- /dev/null
+#
+# Copyright (C) 2009 Qi Hardware Inc.
+# Author: Xiangfu Liu <xiangfu@qi-hardware.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# modified 16/08/2010
+# author: jmoore@zedstar.org
+
+# install the "guile" in your HOST pc for compile this package
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=guile
+PKG_VERSION:=1.8.7
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/guile/
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/guile
+ MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
+ TITLE:=guile
+ SECTION:=lang
+ CATEGORY:=Languages
+ DEPENDS:=+libgmp +libpthread +libltdl +libncurses +libreadline
+ URL:=http://savannah.gnu.org/projects/guile/
+endef
+
+define Package/guile/description
+ GNU Guile is an interpreter for Scheme, packaged as a library that you can link into your applications to give them their own scripting language.
+endef
+
+TARGET_LDFLAGS+="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
+
+# should fix issue with threads
+CONFIGURE_ARGS += --without-threads --without-gettext
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include \
+ $(1)/usr/lib \
+ $(1)/usr/lib/pkgconfig
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/* \
+ $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/* \
+ $(1)/usr/include/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig \
+ $(1)/usr/lib/
+endef
+
+define Package/guile/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/share/guile/1.8
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/bin/* \
+ $(1)/usr/bin/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libguile*.so* \
+ $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/share/guile/1.8/* \
+ $(1)/usr/share/guile/1.8/
+
+endef
+
+$(eval $(call RequireCommand,guile,$(PKG_NAME) requires guile on the host system.))
+$(eval $(call BuildPackage,guile))
--- /dev/null
+diff --git a/configure b/configure\r
+index a57297d..98857ae 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -35053,6 +35053,8 @@ fi\r
+ \r
+ if test "$with_threads" = pthreads; then\r
+ \r
++cat >> /dev/null << end_pthread_attr_getstack_check_part1\r
++\r
+ { $as_echo "$as_me:$LINENO: checking whether pthread_attr_getstack works for the main thread" >&5\r
+ $as_echo_n "checking whether pthread_attr_getstack works for the main thread... " >&6; }\r
+ old_CFLAGS="$CFLAGS"\r
+@@ -35121,12 +35123,15 @@ $as_echo "$ac_try_echo") >&5\r
+ ac_status=$?\r
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5\r
+ (exit $ac_status); }; }; then\r
++\r
++end_pthread_attr_getstack_check_part1\r
+ works=yes\r
+ \r
+ cat >>confdefs.h <<\_ACEOF\r
+ #define PTHREAD_ATTR_GETSTACK_WORKS 1\r
+ _ACEOF\r
+ \r
++cat >> /dev/null << end_pthread_attr_getstack_check_part2\r
+ else\r
+ $as_echo "$as_me: program exited with status $ac_status" >&5\r
+ $as_echo "$as_me: failed program was:" >&5\r
+@@ -35138,6 +35143,7 @@ fi\r
+ rm -rf conftest.dSYM\r
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\r
+ fi\r
++end_pthread_attr_getstack_check_part2\r
+ \r
+ \r
+ CFLAGS="$old_CFLAGS"\r
+diff --git a/configure.in b/configure.in\r
+index 217ac83..c4c16fc 100644\r
+--- a/configure.in\r
++++ b/configure.in\r
+@@ -854,7 +854,7 @@ main (void)\r
+ }]])],\r
+ [guile_cv_use_csqrt=yes],\r
+ [guile_cv_use_csqrt="no, glibc 2.3 bug"],\r
+- [guile_cv_use_csqrt="yes, hopefully (cross-compiling)"])])\r
++ [guile_cv_use_csqrt="no, Ben NanoNote (cross-compiling)"])])\r
+ case $guile_cv_use_csqrt in\r
+ yes*)\r
+ AC_DEFINE(HAVE_USABLE_CSQRT, 1, [Define to 1 if csqrt is bug-free])\r
--- /dev/null
+--- guile-1.8.7.or/libguile/guile-snarf-docs.in 2011-03-17 13:55:24.328184439 +0300
++++ guile-1.8.7/libguile/guile-snarf-docs.in 2011-03-17 13:55:56.753058827 +0300
+@@ -23,4 +23,4 @@
+ ## Let the user override the preprocessor autoconf found.
+ test -n "${CPP+set}" || CPP="@CPP@"
+
+-${CPP} -DSCM_MAGIC_SNARF_DOCS "$@"
++${CPP} -P -DSCM_MAGIC_SNARF_DOCS "$@"
--- /dev/null
+#
+# Copyright (C) 2009 Qi Hardware Inc.
+# Author: Xiangfu Liu <xiangfu@qi-hardware.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# modified 16/08/2010
+# author: jmoore@zedstar.org
+
+
+# modified 20/02/2012
+# author: jnbagale@gmail.com
+
+# modified 23/10/2012
+# fix depends
+
+
+# Install libffi-dev on the host computer
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=guile
+PKG_VERSION:=2.0.5
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/guile/
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
+
+PKG_BUILD_DEPENDS:=guile2/host
+HOST_BUILD_DEPENDS:=gettext/host libiconv/host gc/host
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/guile2
+ MAINTAINER:="Xiangfu Liu" <xiangfu@openmobilefree.net>
+ TITLE:=guile2
+ SECTION:=lang
+ CATEGORY:=Languages
+ DEPENDS:=+libgmp +libpthread +libltdl +libncurses +libreadline +libffi +libunistring +gc +librt
+ URL:=http://savannah.gnu.org/projects/guile/
+endef
+
+define Package/guile2/description
+ GNU Guile is an interpreter for Scheme, packaged as a library that you can link into your applications to give them their own scripting language.
+endef
+
+CONFIGURE_ARGS += --with-libgmp-prefix --with-libunistring-prefix --with-libltdl-prefix
+CONFIGURE_VARS += gl_cv_func_duplocale_works=yes guile_cv_use_csqrt="no, Ben NanoNote (cross-compiling)"
+
+HOST_CONFIGURE_ARGS += --disable-shared --with-libgmp-prefix --with-libunistring-prefix --with-libltdl-prefix
+HOST_CONFIGURE_VARS += PKG_CONFIG=true LIBFFI_LIBS=-lffi BDW_GC_LIBS=-lgc
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+endef
+
+define Host/Configure
+ $(call Host/Configure/Default)
+endef
+
+## On the host, we only compile and install guile2 used for bootstrapping
+define Host/Compile
+ $(call Host/Compile/Default)
+endef
+
+define Host/Install
+ $(call Host/Install/Default)
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include \
+ $(1)/usr/lib \
+ $(1)/usr/lib/pkgconfig
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/* \
+ $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/* \
+ $(1)/usr/include/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
+ $(1)/usr/lib/pkgconfig/
+endef
+
+
+
+define Package/guile2/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/lib/guile/2.0
+ $(INSTALL_DIR) $(1)/usr/share/guile/2.0
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/bin/* \
+ $(1)/usr/bin/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libguile*.so* \
+ $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/guile/2.0/* \
+ $(1)/usr/lib/guile/2.0/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/share/guile/2.0/* \
+ $(1)/usr/share/guile/2.0/
+
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,guile2))
--- /dev/null
+--- guile-2.0.2/libguile/i18n.c 2011-08-12 16:47:52.538234245 +0200
++++ guile-2.0.2m/libguile/i18n.c 2011-08-12 16:47:11.027419164 +0200
+@@ -865,7 +865,7 @@
+ *dst = '\0';
+ }
+
+-#ifdef USE_GNU_LOCALE_API
++#ifdef USE_GNU_LOCALE_API_DISABLED
+ static inline void
+ str_upcase_l (register char *dst, register const char *src,
+ scm_t_locale locale)
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=smalltalk
+PKG_VERSION:=3.2.3
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/smalltalk/
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_RELEASE:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/smalltalk
+ TITLE:=smalltalk
+ SECTION:=lang
+ CATEGORY:=Languages
+ DEPENDS:=@BROKEN
+ URL:=http://smalltalk.gnu.org/
+endef
+
+define Package/smalltalk/description
+ GNU Smalltalk is a free implementation of the Smalltalk-80 language
+endef
+
+define Build/Compile
+ $(call Build/Compile/Default)
+endef
+
+define Package/smalltalk/install
+ $(INSTALL_DIR) $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,smalltalk))
+# The following comments configure the Emacs editor. Just ignore them.
+# Local Variables:
+# compile-command: "make -C ~/openwrt-xburst.full_system package/smalltalk/{clean,compile} -j2 V=99"
+# End:
--- /dev/null
+#
+# Copyright (C) 2012 Xiangfu Liu <xiangfu@openmobilefree.net>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=xburst-tools
+PKG_VERSION:=20120605
+PKG_REV:=ff28d4c923a489cef1af0b761b9026e1c65a7a48
+PKG_RELEASE:=1
+PKG_INSTALL:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
+PKG_SOURCE_URL:=git://projects.qi-hardware.com/xburst-tools.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+
+define Package/xburst-tools
+ MAINTAINER:="Xiangfu Liu" <xiangfu@openmobilefree.net>
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Xburst-Tools
+ URL:=http://projects.qi-hardware.com/p/xburst-tools/
+ DEPENDS:=+libusb +libusb-1.0 +confuse +libreadline +libncurses
+endef
+
+define Package/xburst-tools/description
+Tools for Ingenic XBurst CPU USB boot and NAND flash access
+endef
+
+define Build/Configure
+ ( cd $(PKG_BUILD_DIR); ./autogen.sh );
+ $(call Build/Configure/Default, \
+ --disable-firmware \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ )
+endef
+
+define Package/xburst-tools/install
+ (cd $(PKG_BUILD_DIR) && \
+ wget http://projects.qi-hardware.com/media/upload/xburst-tools/files/xburst-tools-firmware-201105.tar.bz2 && \
+ tar xvf xburst-tools-firmware-201105.tar.bz2)
+
+ $(INSTALL_DIR) $(1)/usr/share/xburst-tools/
+ $(CP) $(PKG_BUILD_DIR)/xburst-tools-firmware/* $(1)/usr/share/xburst-tools/
+
+ $(CP) $(PKG_BUILD_DIR)/ipkg-install/* $(1)/
+endef
+
+$(eval $(call BuildPackage,xburst-tools))