Browse Source

Commit based upon d6442850bde61f0c3e7e2ae3247b4a856073c5e0

RISCi_ATOM 6 years ago
parent
commit
9f5db9a6db
100 changed files with 5692 additions and 0 deletions
  1. 53 0
      lang/chardet/Makefile
  2. 48 0
      lang/django-appconf/Makefile
  3. 49 0
      lang/django-compressor/Makefile
  4. 48 0
      lang/django-constance/Makefile
  5. 48 0
      lang/django-jsonfield/Makefile
  6. 48 0
      lang/django-picklefield/Makefile
  7. 49 0
      lang/django-postoffice/Makefile
  8. 49 0
      lang/django-restframework/Makefile
  9. 48 0
      lang/django-statici18n/Makefile
  10. 65 0
      lang/django/Makefile
  11. 49 0
      lang/dkjson/Makefile
  12. 339 0
      lang/erlang/Makefile
  13. 11 0
      lang/erlang/patches/101-emulator_includes.patch
  14. 11 0
      lang/erlang/patches/102-musl_compat.patch
  15. 11 0
      lang/erlang/patches/103-disable_emacs.patch
  16. 48 0
      lang/et_xmlfile/Makefile
  17. 48 0
      lang/flup/Makefile
  18. 53 0
      lang/gunicorn/Makefile
  19. 67 0
      lang/jamvm/Makefile
  20. 48 0
      lang/jdcal/Makefile
  21. 52 0
      lang/json4lua/Makefile
  22. 48 0
      lang/lpeg/Makefile
  23. 49 0
      lang/lua-bencode/Makefile
  24. 56 0
      lang/lua-cjson/Makefile
  25. 62 0
      lang/lua-copas/Makefile
  26. 15 0
      lang/lua-copas/patches/makefile.patch
  27. 59 0
      lang/lua-coxpcall/Makefile
  28. 4 0
      lang/lua-coxpcall/patches/config.patch
  29. 58 0
      lang/lua-lsqlite3/Makefile
  30. 48 0
      lang/lua-lzlib/Makefile
  31. 12 0
      lang/lua-lzlib/patches/001-allow_optim_flags.patch
  32. 75 0
      lang/lua-md5/Makefile
  33. 19 0
      lang/lua-md5/patches/config.patch
  34. 10 0
      lang/lua-md5/patches/makefile.patch
  35. 56 0
      lang/lua-mobdebug/Makefile
  36. 42 0
      lang/lua-openssl/Makefile
  37. 135 0
      lang/lua-openssl/patches/0001-Revise-Makefile.patch
  38. 36 0
      lang/lua-openssl/patches/0010-Fix-Linkage.patch
  39. 41 0
      lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch
  40. 20 0
      lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch
  41. 46 0
      lang/lua-penlight/Makefile
  42. 54 0
      lang/lua-rings/Makefile
  43. 28 0
      lang/lua-rings/patches/config.patch
  44. 11 0
      lang/lua-rings/patches/makefile.patch
  45. 62 0
      lang/lua-rs232/Makefile
  46. 52 0
      lang/lua-sha2/Makefile
  47. 14 0
      lang/lua-sha2/patches/001-makefile.patch
  48. 95 0
      lang/lua-wsapi/Makefile
  49. 58 0
      lang/lua-xavante/Makefile
  50. 53 0
      lang/luabitop/Makefile
  51. 56 0
      lang/luaexpat/Makefile
  52. 97 0
      lang/luaexpat/files/compat-5.1r5/compat-5.1.c
  53. 13 0
      lang/luaexpat/files/compat-5.1r5/compat-5.1.h
  54. 267 0
      lang/luaexpat/files/compat-5.1r5/compat-5.1.lua
  55. 66 0
      lang/luafilesystem/Makefile
  56. 45 0
      lang/luai2c/Makefile
  57. 57 0
      lang/lualanes/Makefile
  58. 13 0
      lang/lualanes/patches/100-musl-compat.patch
  59. 61 0
      lang/luaposix/Makefile
  60. 30 0
      lang/luaposix/patches/100-eglibc-compat.patch
  61. 32 0
      lang/luaposix/patches/101-disable-curses.patch
  62. 20 0
      lang/luaposix/patches/102-disable-compat-deprecated.diff
  63. 62 0
      lang/luarocks/Makefile
  64. 13 0
      lang/luarocks/patches/01_dont_modify_bin_shebang.diff
  65. 37 0
      lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch
  66. 61 0
      lang/luasec/Makefile
  67. 56 0
      lang/luasoap/Makefile
  68. 63 0
      lang/luasocket/Makefile
  69. 237 0
      lang/luasocket/patches/0001-Add-interface-support.patch
  70. 118 0
      lang/luasql/Makefile
  71. 48 0
      lang/lzmq/Makefile
  72. 55 0
      lang/micropython-lib/Makefile
  73. 57 0
      lang/micropython/Makefile
  74. 13 0
      lang/micropython/patches/000-Makefile-no-errors
  75. 68 0
      lang/node-arduino-firmata/Makefile
  76. 306 0
      lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js
  77. 10 0
      lang/node-arduino-firmata/patches/000-new-serialport.patch
  78. 99 0
      lang/node-cylon/Makefile
  79. 12 0
      lang/node-cylon/patches/0001-serialport.patch
  80. 65 0
      lang/node-hid/Makefile
  81. 65 0
      lang/node-serialport/Makefile
  82. 94 0
      lang/node/Makefile
  83. 12 0
      lang/node/patches/001-hardfloat.patch
  84. 10 0
      lang/node/patches/002-addr_info.patch
  85. 12 0
      lang/node/patches/003-path.patch
  86. 48 0
      lang/openpyxl/Makefile
  87. 52 0
      lang/perl-cgi/Makefile
  88. 48 0
      lang/perl-compress-bzip2/Makefile
  89. 65 0
      lang/perl-dbi/Makefile
  90. 53 0
      lang/perl-device-serialport/Makefile
  91. 73 0
      lang/perl-device-usb/Makefile
  92. 8 0
      lang/perl-device-usb/README.patches
  93. 20 0
      lang/perl-device-usb/patches/100-fix_buildsystem.patch
  94. 30 0
      lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff
  95. 13 0
      lang/perl-device-usb/patches/120-use_libusb_0_1.patch
  96. 13 0
      lang/perl-device-usb/patches/130-provide-proper-library-paths.patch
  97. 219 0
      lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch
  98. 48 0
      lang/perl-encode-locale/Makefile
  99. 48 0
      lang/perl-file-listing/Makefile
  100. 64 0
      lang/perl-file-sharedir-install/Makefile

+ 53 - 0
lang/chardet/Makefile

@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2007-2016 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:=chardet
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=1
+PKG_LICENSE:=LGPL-2.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/c/chardet/
+PKG_MD5SUM:=25274d664ccb5130adae08047416e1a8
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/chardet
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=Universal encoding detector for Python 2 and 3
+  URL:=https://github.com/chardet/chardet
+  DEPENDS:=+python
+endef
+
+define Package/chardet/description
+  Universal encoding detector for Python 2 and 3
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/chardet/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \
+	    $(1)/usr/bin
+	# fix python exec path in scripts
+	sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect
+endef
+
+$(eval $(call BuildPackage,chardet))

+ 48 - 0
lang/django-appconf/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=django-appconf
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb0341dd6e5f2e6e39be177abe05e2cec8bd46e4/
+PKG_MD5SUM:=cc11511a47088bc56531df67cd5d6261
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-appconf
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=A helper class for handling configuration defaults of packaged apps gracefully.
+  URL:=http://django-appconf.readthedocs.org/
+  DEPENDS:=+python +django
+endef
+
+define Package/django-appconf/description
+  A helper class for handling configuration defaults of packaged apps gracefully.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-appconf/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-appconf))

+ 49 - 0
lang/django-compressor/Makefile

@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2007-2016 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:=django-compressor
+PKG_VERSION:=2.1
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/23/46/2c7d582255969ad5259937f5f9e14aec1f3349d0fc0651129330918d1c6d/
+PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/
+PKG_MD5SUM:=21ecfe4e8615eae64f7068a5599df9af
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-compressor
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=Compresses linked and inline JavaScript or CSS into single cached files.
+  URL:=http://django-compressor.readthedocs.org/
+  DEPENDS:=+python +django
+endef
+
+define Package/django-compressor/description
+  Compresses linked and inline JavaScript or CSS into single cached files.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-compressor/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-compressor))

+ 48 - 0
lang/django-constance/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=django-constance
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/0a/ff/1c1caae2b7be9c26f2aee0703236998e22cf5557fa56726347b5afa149d1/
+PKG_MD5SUM:=f9f8e527df50b0a1533149d9be0b814b
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-constance
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=Django live settings with pluggable backends, including Redis.
+  URL:=https://github.com/jazzband/django-constance
+  DEPENDS:=+python +django
+endef
+
+define Package/django-constance/description
+  Django live settings with pluggable backends, including Redis.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-constance/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-constance))

+ 48 - 0
lang/django-jsonfield/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=django-jsonfield
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf404e0bbfbb281a6bbf06966b775f5142ed159/
+PKG_MD5SUM:=2e5e737a3f93f3b5d7ae6026b1340167
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-jsonfield
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=JSONField for django models
+  URL:=https://github.com/bradjasper/django-jsonfield
+  DEPENDS:=+python +django
+endef
+
+define Package/django-jsonfield/description
+  JSONField for django models
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-jsonfield/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-jsonfield))

+ 48 - 0
lang/django-picklefield/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=django-picklefield
+PKG_VERSION:=0.3.2
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-picklefield/
+PKG_MD5SUM:=b2c17ca9e03704ce33890e6aefc7b2e5
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-picklefield
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=Pickled object field for Django
+  URL:=http://github.com/gintas/django-picklefield/
+  DEPENDS:=+python +django
+endef
+
+define Package/django-picklefield/description
+  Pickled object field for Django
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-picklefield/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-picklefield))

+ 49 - 0
lang/django-postoffice/Makefile

@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2007-2016 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:=django-postoffice
+PKG_VERSION:=2.0.8
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/52/25/cc0cfe923f183d7c19b162cac3bf8430ddaed7bad28202b8f93a97d248a4/
+PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/
+PKG_MD5SUM:=437bf62cef06381d346ae2bc087c0e3c
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-postoffice
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=A Django app to monitor and send mail asynchronously, complete with template support.
+  URL:=https://github.com/ui/django-postoffice
+  DEPENDS:=+python +django +django-jsonfield
+endef
+
+define Package/django-postoffice/description
+  A Django app to monitor and send mail asynchronously, complete with template support.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-postoffice/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-postoffice))

+ 49 - 0
lang/django-restframework/Makefile

@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2007-2016 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:=django-restframework
+PKG_VERSION:=3.3.3
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/djangorestframework/
+PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION)
+PKG_MD5SUM:=6f5ee9646e7fa87dad4385d3c7e7678d
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-restframework
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=Web APIs for Django, made easy.
+  URL:=http://www.django-rest-framework.org/
+  DEPENDS:=+python +django
+endef
+
+define Package/django-restframework/description
+  Web APIs for Django, made easy.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-restframework/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-restframework))

+ 48 - 0
lang/django-statici18n/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=django-statici18n
+PKG_VERSION:=1.2.1
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/72/76/6ee13019e1691bff6b759136068ee77fcc2982b700135caa134030937b28/
+PKG_MD5SUM:=67cac19909dd3272ae1fc73ad8d1dca3
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django-statici18n
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=A Django app that provides helper for generating JavaScript catalog to static files.
+  URL:=http://django-statici18n.readthedocs.org/
+  DEPENDS:=+python +django
+endef
+
+define Package/django-statici18n/description
+  A Django app that provides helper for generating JavaScript catalog to static files.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/django-statici18n/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,django-statici18n))

+ 65 - 0
lang/django/Makefile

@@ -0,0 +1,65 @@
+#
+# Copyright (C) 2007-2016 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:=django
+PKG_VERSION:=1.8.12
+PKG_RELEASE=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/django/django.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=c168aeba175dbb92c615460a360cb1ea978de5d3
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/django
+    SUBMENU:=Python
+    SECTION:=lang
+    CATEGORY:=Languages
+    TITLE:=The web framework for perfectionists with deadlines.
+    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+    URL:=https://www.djangoproject.com/
+    DEPENDS:=+python
+endef
+
+define Package/django/description
+    The web framework for perfectionists with deadlines.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
+	    $(1)/usr/bin
+endef
+
+define Package/django/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \
+	    $(1)/usr/bin
+	# fix python exec path
+	sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py
+endef
+
+$(eval $(call BuildPackage,django))

+ 49 - 0
lang/dkjson/Makefile

@@ -0,0 +1,49 @@
+#
+# Copyright (C) 20013-2014 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:=dkjson
+PKG_VERSION:=2.5
+PKG_RELEASE:=3
+
+PKG_SOURCE_URL:=https://github.com/LuaDist/dkjson.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=e72ba0c9f5d8b8746fc306f6189a819dbb5cd0be
+PKG_LICENSE:=MIT
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dkjson
+	SUBMENU:=Lua
+	SECTION:=lang
+	CATEGORY:=Languages
+	TITLE:=DKJSON
+	URL:=http://dkolf.de/src/dkjson-lua.fsl/home
+	MAINTAINER:=Lars Gierth <larsg@systemli.org>
+	DEPENDS:=+lua
+endef
+
+define Package/dkjson/description
+	Lua JSON parser/serializer with UTF-8 support
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/dkjson/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/dkjson.lua $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,dkjson))

+ 339 - 0
lang/erlang/Makefile

@@ -0,0 +1,339 @@
+#
+# Copyright (C) 2009-2015 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:=erlang
+PKG_VERSION:=17.5
+PKG_RELEASE:=3
+
+PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= http://www.erlang.org/download/ \
+	http://erlang.mirror.su.se/
+PKG_MD5SUM:=346dd0136bf1cc28cebc140e505206bb
+
+PKG_LICENSE:=ErlPL-1.1
+PKG_LICENSE_FILES:=EPLICENCE
+PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+
+PKG_BUILD_DEPENDS:=erlang/host openssl
+PKG_USE_MIPS16:=0
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/otp_src_$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/erlang/Default
+  SUBMENU:=Erlang
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Erlang/OTP programming language
+  URL:=http://www.erlang.org/
+endef
+
+define Package/erlang/Default/description
+ Erlang/OTP is a general-purpose programming language and runtime
+ environment. Erlang has built-in support for concurrency, distribution
+ and fault tolerance.
+endef
+
+define Package/erlang
+$(call Package/erlang/Default)
+  DEPENDS+= +libncurses +librt +zlib
+  PROVIDES:= erlang-erts=6.4 erlang-kernel=3.2 erlang-sasl=2.4.1 erlang-stdlib=2.4
+endef
+
+define Package/erlang/description
+$(call Package/erlang/Default/description)
+ .
+ This package contains the runtime implementation and a minimal set of
+ modules (erts, kernel, sasl & stdlib).
+endef
+
+
+define Package/erlang-asn1
+$(call Package/erlang/Default)
+  TITLE:=Abstract Syntax Notation One (ASN.1) support
+  VERSION:=3.0.4
+  DEPENDS+= +erlang +erlang-syntax-tools
+endef
+
+define Package/erlang-asn1/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides Abstract Syntax Notation One (ASN.1)
+ support.
+endef
+
+
+define Package/erlang-compiler
+$(call Package/erlang/Default)
+  TITLE:=Byte code compiler
+  VERSION:=5.0.4
+  DEPENDS+= +erlang +erlang-hipe
+endef
+
+define Package/erlang-compiler/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides a byte code compiler for Erlang which
+ produces highly compact code.
+endef
+
+
+define Package/erlang-crypto
+$(call Package/erlang/Default)
+  TITLE:=Cryptography support
+  VERSION:=3.5
+  DEPENDS+= +erlang +libopenssl
+endef
+
+define Package/erlang-crypto/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides functions for computation of message
+ digests, and encryption and decryption functions.
+endef
+
+
+define Package/erlang-hipe
+$(call Package/erlang/Default)
+  TITLE:=High Performance Erlang
+  VERSION:=3.11.3
+  DEPENDS+= +erlang
+endef
+
+define Package/erlang-hipe/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides HiPE (High Performance Erlang)
+ support.
+endef
+
+
+define Package/erlang-inets
+$(call Package/erlang/Default)
+  TITLE:=Internet clients and servers
+  VERSION:=5.10.6
+  DEPENDS+= +erlang
+endef
+
+define Package/erlang-inets/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides a container for Internet clients and
+ servers. Currently a FTP client, a HTTP client and server, and a tftp
+ client and server have been incorporated in Inets.
+endef
+
+
+define Package/erlang-mnesia
+$(call Package/erlang/Default)
+  TITLE:=Distributed database
+  VERSION:=4.12.5
+  DEPENDS+= +erlang
+endef
+
+define Package/erlang-mnesia/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides a distributed DataBase Management
+ System (DBMS), appropriate for telecommunications applications and
+ other Erlang applications which require continuous operation and
+ exhibit soft real-time properties.
+endef
+
+
+define Package/erlang-runtime-tools
+$(call Package/erlang/Default)
+  TITLE:=Low-profile debugging/tracing tools
+  VERSION:=1.8.16
+  DEPENDS+= +erlang
+endef
+
+define Package/erlang-runtime-tools/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides low footprint tracing/debugging tools
+ suitable for inclusion in a production system.
+endef
+
+
+define Package/erlang-snmp
+$(call Package/erlang/Default)
+  TITLE:=Simple Network Management Protocol (SNMP) support
+  VERSION:=5.1.1
+  DEPENDS+= +erlang +erlang-asn1
+endef
+
+define Package/erlang-snmp/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides Simple Network Management Protocol
+ (SNMP) support including a MIB compiler and tools for creating SNMP
+ agents.
+endef
+
+
+define Package/erlang-ssh
+$(call Package/erlang/Default)
+  TITLE:=Secure Shell (SSH) support
+  VERSION:=3.2
+  DEPENDS+= +erlang +erlang-crypto
+endef
+
+define Package/erlang-ssh/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides an implementation of the Secure Shell
+ protocol, with SSH & SFTP support.
+endef
+
+
+define Package/erlang-ssl
+$(call Package/erlang/Default)
+  TITLE:=Secure Sockets Layer (SSL) support
+  VERSION:=6.0
+  DEPENDS+= +erlang +erlang-crypto
+endef
+
+define Package/erlang-ssl/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides support for secure communication over
+ sockets.
+endef
+
+
+define Package/erlang-syntax-tools
+$(call Package/erlang/Default)
+  TITLE:=Abstract Erlang syntax trees handling support
+  VERSION:=1.6.18
+  DEPENDS+= +erlang
+endef
+
+define Package/erlang-syntax-tools/description
+$(call Package/erlang/Default/description)
+ .
+ This Erlang/OTP package provides support for handling abstract Erlang
+ syntax trees.
+endef
+
+
+# Host
+
+HOST_CONFIGURE_ARGS += \
+	--disable-hipe \
+	--disable-smp-support \
+	--without-javac
+
+HOST_CFLAGS += -D_GNU_SOURCE
+
+define Host/Compile
+	$(MAKE) -C $(HOST_BUILD_DIR) all
+endef
+
+define Host/Install
+	$(MAKE) -C $(HOST_BUILD_DIR) install
+endef
+
+
+# Target
+
+CONFIGURE_ARGS += \
+	--disable-hipe \
+	--disable-smp-support \
+	--without-javac \
+	--enable-dynamic-ssl-lib
+
+CONFIGURE_VARS += \
+	SHLIB_LD="$(TARGET_CC)" \
+	TARGET_ARCH="$(TARGET_ARCH)" \
+	ac_cv_func_mmap_fixed_mapped=yes \
+	ac_cv_path_WX_CONFIG_PATH=no \
+	erl_xcomp_getaddrinfo=no \
+	erl_xcomp_sysroot="$(STAGING_DIR)"
+
+EXTRA_CFLAGS+=-D_GNU_SOURCE
+EXTRA_LDFLAGS+=-lz
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		noboot
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
+		install
+endef
+
+define Package/erlang/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	for f in epmd erl erlc escript run_erl; do \
+		$(CP) $(PKG_INSTALL_DIR)/usr/bin/$$$$f $(1)/usr/bin/ ; \
+	done
+	$(INSTALL_DIR) $(1)/usr/lib/erlang/bin
+	for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl; do \
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/bin/$$$$f $(1)/usr/lib/erlang/bin/ ; \
+	done
+	$(INSTALL_DIR) $(1)/usr/lib/erlang/lib
+	for m in erts kernel sasl stdlib; do \
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$m-* $(1)/usr/lib/erlang/lib/ ; \
+		rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/examples ; \
+		rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/src ; \
+	done
+	$(INSTALL_DIR) $(1)/usr/lib/erlang
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/erts-* $(1)/usr/lib/erlang/
+	rm -rf $(1)/usr/lib/erlang/erts-*/{doc,include,lib,man,src}
+	rm -rf $(1)/usr/lib/erlang/erts-*/bin/*.src
+	$(INSTALL_DIR) $(1)/usr/lib/erlang/releases
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/releases/* $(1)/usr/lib/erlang/releases/
+	$(SED) 's,%ERL_ROOT%,/usr/lib/erlang,g' \
+		$(1)/usr/lib/erlang/releases/RELEASES.src
+	mv -f $(1)/usr/lib/erlang/releases/RELEASES.src \
+		$(1)/usr/lib/erlang/releases/RELEASES
+	for f in bin/erl bin/start erts-*/bin/erl erts-*/bin/start; do \
+		$(SED) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \
+			$(1)/usr/lib/erlang/$$$$f ; \
+	done
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_BUILD_DIR)/lib/erl_interface/obj/*/*.a $(1)/usr/lib/
+	$(INSTALL_DIR) $(1)/usr/include
+	$(CP) $(PKG_BUILD_DIR)/lib/erl_interface/include/*.h $(1)/usr/include/
+endef
+
+define BuildModule
+
+  define Package/erlang-$(1)/install
+	$(INSTALL_DIR) $$(1)/usr/lib/erlang/lib
+	for m in $(2); do \
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$$$$$m-* $$(1)/usr/lib/erlang/lib/ ; \
+		rm -rf $$(1)/usr/lib/erlang/lib/$$$$$$$$m-*/{examples,priv/obj,src} ; \
+	done
+  endef
+
+  $$(eval $$(call BuildPackage,erlang-$(1)))
+
+endef
+
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,erlang))
+$(eval $(call BuildModule,asn1,asn1))
+$(eval $(call BuildModule,compiler,compiler))
+$(eval $(call BuildModule,crypto,crypto))
+$(eval $(call BuildModule,hipe,hipe))
+$(eval $(call BuildModule,inets,inets))
+$(eval $(call BuildModule,mnesia,mnesia))
+$(eval $(call BuildModule,runtime-tools,runtime_tools))
+$(eval $(call BuildModule,snmp,snmp))
+$(eval $(call BuildModule,ssh,ssh))
+$(eval $(call BuildModule,ssl,ssl))
+$(eval $(call BuildModule,syntax-tools,syntax_tools))

+ 11 - 0
lang/erlang/patches/101-emulator_includes.patch

@@ -0,0 +1,11 @@
+--- a/erts/emulator/Makefile.in
++++ b/erts/emulator/Makefile.in
+@@ -682,7 +682,7 @@ $(OBJDIR)/beam_emu.o: beam/beam_emu.c
+ endif
+ 
+ $(OBJDIR)/%.o: beam/%.c
+-	$(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
++	$(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
+ 
+ $(OBJDIR)/%.o: $(TARGET)/%.c
+ 	$(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@

+ 11 - 0
lang/erlang/patches/102-musl_compat.patch

@@ -0,0 +1,11 @@
+--- a/lib/erl_interface/src/connect/ei_resolve.c
++++ b/lib/erl_interface/src/connect/ei_resolve.c
+@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const
+ #ifndef HAVE_GETHOSTBYNAME_R
+   return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
+ #else
+-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
++#if (defined(_GNU_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
+   struct hostent *result;
+ 
+   gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop);

+ 11 - 0
lang/erlang/patches/103-disable_emacs.patch

@@ -0,0 +1,11 @@
+--- a/lib/tools/Makefile
++++ b/lib/tools/Makefile
+@@ -23,7 +23,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
+ # Macros
+ # ----------------------------------------------------
+ 
+-SUB_DIRECTORIES = c_src src doc/src examples priv emacs
++SUB_DIRECTORIES = c_src src doc/src examples priv
+ 
+ include vsn.mk
+ VSN = $(TOOLS_VSN)

+ 48 - 0
lang/et_xmlfile/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=et_xmlfile
+PKG_VERSION:=1.0.1
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/
+PKG_MD5SUM:=f47940fd9d556375420b2e276476cfaf
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/et_xmlfile
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=An implementation of lxml.xmlfile for the standard library
+  URL:=https://bitbucket.org/openpyxl/et_xmlfile
+  DEPENDS:=+python
+endef
+
+define Package/et_xmlfile/description
+  An implementation of lxml.xmlfile for the standard library
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/et_xmlfile/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,et_xmlfile))

+ 48 - 0
lang/flup/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=flup
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/
+PKG_MD5SUM:=24dad7edc5ada31dddd49456ee8d5254
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/flup
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=Random assortment of WSGI servers
+  URL:=http://www.saddi.com/software/flup/
+  DEPENDS:=+python
+endef
+
+define Package/flup/description
+  Random assortment of WSGI servers
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/flup/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,flup))

+ 53 - 0
lang/gunicorn/Makefile

@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2007-2016 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:=gunicorn
+PKG_VERSION:=19.6.0
+PKG_RELEASE=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/84/ce/7ea5396efad1cef682bbc4068e72a0276341d9d9d0f501da609fab9fcb80/
+PKG_MD5SUM:=338e5e8a83ea0f0625f768dba4597530
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/gunicorn
+    SUBMENU:=Python
+    SECTION:=lang
+    CATEGORY:=Languages
+    TITLE:=WSGI HTTP Server for UNIX
+    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+    URL:=http://gunicorn.org/
+    DEPENDS:=+python +python-setuptools
+endef
+
+define Package/gunicorn/description
+    WSGI HTTP Server for UNIX
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/gunicorn/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunicorn* \
+	    $(1)/usr/bin
+	# fix python exec path in scripts
+	$(SED) 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/gunicorn*
+endef
+
+$(eval $(call BuildPackage,gunicorn))

+ 67 - 0
lang/jamvm/Makefile

@@ -0,0 +1,67 @@
+#
+# Copyright (C) 2006-2015 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:=jamvm
+PKG_VERSION:=2.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0+
+PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_MD5SUM:=a6e3321ef4b3cfb4afc20bd75452e11e
+
+PKG_USE_MIPS16:=0
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/jamvm
+  SUBMENU:=Java
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=A compact Java Virtual Machine
+  URL:=http://sourceforge.net/projects/jamvm
+  DEPENDS:=+zlib +libpthread +librt +classpath @!avr32
+endef
+
+define Package/jamvm/description
+ JamVM is a new Java Virtual Machine which conforms to the JVM
+ specification version (blue book). In comparison to most other VM's (free
+ and commercial) it is extremely small.However, unlike other small VMs
+ (e.g. KVM) it is designed to support the full specification, and includes
+ support for object finalisation, Soft/Weak/Phantom References, the Java
+ Native Interface (JNI) and the Reflection API.
+endef
+
+CONFIGURE_ARGS += \
+	--with-java-runtime-library=gnuclasspath \
+	--with-classpath-install-dir=/usr \
+	--disable-int-inlining \
+	--disable-shared \
+	--without-pic
+
+MAKE_FLAGS += \
+	GLIBJ_ZIP=$(STAGING_DIR)/usr/share/classpath/glibj.zip
+
+define Package/jamvm/install
+	$(INSTALL_DIR) $(1)/usr
+	$(CP) \
+		$(PKG_INSTALL_DIR)/usr/bin \
+		$(PKG_INSTALL_DIR)/usr/share \
+		$(1)/usr/
+endef
+
+define Build/InstallDev
+	$(CP) $(PKG_INSTALL_DIR)/* $(1)/
+endef
+
+$(eval $(call BuildPackage,jamvm))

+ 48 - 0
lang/jdcal/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=jdcal
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/j/jdcal/
+PKG_MD5SUM:=ab8d5ba300fd1eb01514f363d19b1eb9
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/jdcal
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=Julian dates from proleptic Gregorian and Julian calendars.
+  URL:=http://github.com/phn/jdcal
+  DEPENDS:=+python
+endef
+
+define Package/jdcal/description
+  Julian dates from proleptic Gregorian and Julian calendars.
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/jdcal/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,jdcal))

+ 52 - 0
lang/json4lua/Makefile

@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2006-2015 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:=json4lua
+PKG_VERSION:=0.9.53
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/amrhassan/json4lua.git
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+
+PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
+PKG_LICENSE=MIT
+
+LUA_MODULE_PATH:=/usr/lib/lua
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/json4lua
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=json4lua
+  URL:=https://github.com/amrhassan/json4lua
+  DEPENDS:=+lua +luasocket
+endef
+
+define Package/json4lua/description
+	JSON and JSONRPC for Lua
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/json4lua/install
+	$(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/json
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/json/json.lua $(1)/$(LUA_MODULE_PATH)/json.lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/json/rpc.lua $(1)/$(LUA_MODULE_PATH)/json/rpc.lua
+endef
+
+$(eval $(call BuildPackage,json4lua))

+ 48 - 0
lang/lpeg/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2015 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:=lpeg
+PKG_VERSION:=0.12.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.inf.puc-rio.br/~roberto/lpeg/
+PKG_MD5SUM:=fabb614eb46e370d4f6b8fd82d17ca7e
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lpeg
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=LPeg
+  URL:=http://www.inf.puc-rio.br/~roberto/lpeg/
+  DEPENDS:=+lua
+endef
+
+define Package/lpeg/description
+	LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs)
+endef
+
+define Build/Configure
+endef
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Package/lpeg/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lpeg.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lpeg))

+ 49 - 0
lang/lua-bencode/Makefile

@@ -0,0 +1,49 @@
+#
+# Copyright (C) 20013-2014 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:=lua-bencode
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/
+PKG_HASH:=4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-bencode
+	SUBMENU:=Lua
+	SECTION:=lang
+	CATEGORY:=Languages
+	TITLE:=lua-bencode
+	URL:=https://bitbucket.org/wilhelmy/lua-bencode
+	MAINTAINER:=Lars Gierth <larsg@systemli.org>
+	DEPENDS:=+lua
+endef
+
+define Package/lua-bencode/description
+	This is a module for the lua programming language for decoding and encoding
+	bencoded data which can be used to read and write torrent files for bittorrent.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+
+define Package/lua-bencode/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/bencode.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-bencode))

+ 56 - 0
lang/lua-cjson/Makefile

@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2015 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:=lua-cjson
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=2
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.kyne.com.au/~mark/software/download/
+PKG_MD5SUM:=24f270663e9f6ca8ba2a02cef19f7963
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+HOST_BUILD_DEPENDS:=lua/host
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lua-cjson
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua CJSON parser
+  URL:=https://github.com/mpx/lua-cjson
+  DEPENDS:= +lua
+endef
+
+define Package/lua-cjson/description
+  Lua CJSON is a fast JSON encoding/parsing module for Lua.
+endef
+
+CMAKE_OPTIONS += \
+	-DUSE_LUA=ON
+
+CMAKE_HOST_OPTIONS += \
+	-DLUA_MATH_LIBRARY=m
+
+define Package/lua-cjson/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/
+
+	$(INSTALL_DIR) $(1)/usr/lib/lua/cjson
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,lua-cjson))

+ 62 - 0
lang/lua-copas/Makefile

@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2009-2013 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:=lua-copas
+PKG_VERSION:=2.0.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/copas.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=f39a80add9f7c010ac979297652bbaaea0360a27
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-copas
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua-Copas
+  URL:=https://github.com/keplerproject/copas
+  DEPENDS:=+lua
+endef
+
+define Package/lua-copas/description
+  Copas is a dispatcher based on coroutines that can be used by TCP/IP servers.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		T="$(BUILD_VARIANT)" \
+		PREFIX="$(PKG_INSTALL_DIR)/usr" \
+		install
+endef
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Package/lua-copas/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DIR) $(1)/usr/lib/lua/copas
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas.lua $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/ftp.lua $(1)/usr/lib/lua/copas
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/smtp.lua $(1)/usr/lib/lua/copas
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/http.lua $(1)/usr/lib/lua/copas
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/limit.lua $(1)/usr/lib/lua/copas
+endef
+
+$(eval $(call BuildPackage,lua-copas))

+ 15 - 0
lang/lua-copas/patches/makefile.patch

@@ -0,0 +1,15 @@
+--- lua-copas-1.2.1_org/Makefile	2014-06-04 16:39:17.451563827 +0800
++++ lua-copas-1.2.1/Makefile	2014-06-04 16:39:41.115563309 +0800
+@@ -1,10 +1,10 @@
+ # $Id: Makefile,v 1.3 2007/10/29 22:50:16 carregal Exp $
+ 
+ # Default prefix
+-PREFIX = /usr/local
++PREFIX ?= $(DESTDIR)/usr
+ 
+ # System's lua directory (where Lua libraries are installed)
+-LUA_DIR= $(PREFIX)/share/lua/5.1
++LUA_DIR= $(PREFIX)/lib/lua
+ 
+ install:
+ 	mkdir -p $(LUA_DIR)/copas

+ 59 - 0
lang/lua-coxpcall/Makefile

@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2009-2013 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:=lua-coxpcall
+PKG_VERSION:=1.15.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=979257892884816c97391dfd7b0a7b30dcc8f479
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-coxpcall
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua-Coxpcall
+  URL:=https://github.com/keplerproject/coxpcall
+  DEPENDS:=+lua
+endef
+
+define Package/lua-coxpcall/description
+  Coxpcall encapsulates the protected calls with a coroutine based loop,
+  so errors can be dealed without the usual pcall/xpcall issues with coroutines.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Build/Configure
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		T="$(BUILD_VARIANT)" \
+		LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
+		install
+endef
+
+define Package/lua-coxpcall/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-coxpcall))

+ 4 - 0
lang/lua-coxpcall/patches/config.patch

@@ -0,0 +1,4 @@
+--- lua-coxpcall-1.15.0_org/config	1970-01-01 08:00:00.000000000 +0800
++++ lua-coxpcall-1.15.0/config	2014-06-04 16:51:55.487547258 +0800
+@@ -0,0 +1 @@
++LUA_DIR ?=$(DESTDIR)/usr/lib/lua

+ 58 - 0
lang/lua-lsqlite3/Makefile

@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2006-2016 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:=lsqlite3
+PKG_VERSION:=0.9.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09w.zip
+PKG_MD5SUM:=8e16ef4fda82eb73295bf2f1050d14f1
+
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)_fsl09w.zip
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lsqlite3
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua wrapper for the SQLite3 library
+  URL:=http://lua.sqlite.org
+  DEPENDS:= +lua +libsqlite3
+endef
+
+define Package/lsqlite3/description
+ LuaSQLite3 is a thin wrapper around the public domain SQLite3 database engine.
+endef
+
+TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_CPPFLAGS += -DLUA_USE_LINUX
+TARGET_LDFLAGS += -llua -lsqlite3 -lpthread
+
+define Build/Compile
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
+		-c $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.c \
+		-o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \
+		-DSQLITE_VERSION="$(PKG_VERSION)"
+	$(TARGET_CC) $(TARGET_LDFLAGS) -shared \
+		$(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \
+		-o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.so
+endef
+
+define Package/lsqlite3/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/*.so $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,lsqlite3))

+ 48 - 0
lang/lua-lzlib/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2015 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:=lua-lzlib
+PKG_VERSION:=0.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/LuaDist/lzlib.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=79329a07d8f79c19eadd7ea2752b4c4e1574b015
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-lzlib
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua zlib binding
+  URL:=http://github.com/LuaDist/lzlib
+  DEPENDS:= +lua +zlib
+endef
+
+define Package/lua-lzlib/description
+	A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package. 
+endef
+
+MAKE_FLAGS += \
+	LUA="$(STAGING_DIR)/usr" \
+	OFLAGS="$(TARGET_CFLAGS)" \
+
+define Package/lua-lzlib/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/zlib.so $(1)/usr/lib/lua/
+
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/gzip.lua $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,lua-lzlib))

+ 12 - 0
lang/lua-lzlib/patches/001-allow_optim_flags.patch

@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,8 @@ LUABIN= $(LUA)/bin
+ ZLIB=../zlib-1.2.3
+ 
+ # no need to change anything below here
+-CFLAGS= $(INCS) $(DEFS) $(WARN) -O0 -fPIC
++CFLAGS= $(INCS) $(DEFS) $(WARN) $(OFLAGS) -fPIC
++OFLAGS= -O0
+ WARN= -g -Werror -Wall -pedantic #-ansi
+ INCS= -I$(LUAINC) -I$(ZLIB)
+ LIBS= -L$(ZLIB) -lz -L$(LUALIB) -L$(LUABIN) #-llua51

+ 75 - 0
lang/lua-md5/Makefile

@@ -0,0 +1,75 @@
+#
+# Copyright (C) 2015 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:=lua-md5
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=024b65738b4434860777fc43d7cacaefea29ec60
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-md5
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua-MD5
+  URL:=https://github.com/keplerproject/md5
+  DEPENDS:=+lua
+endef
+
+define Package/lua-md5/description
+  MD5 offers basic cryptographic facilities for Lua
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Build/Configure
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		PREFIX="$(STAGING_DIR)/usr" \
+		LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
+		clean
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		PREFIX="$(STAGING_DIR)/usr" \
+		LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
+		LIB_OPTION="-shared" \
+		CC="$(TARGET_CROSS)gcc" \
+		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+		all
+endef
+
+define Build/Install
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
+		LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
+		install
+endef
+
+define Package/lua-md5/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/md5.lua $(1)/usr/lib/lua
+	$(INSTALL_DIR) $(1)/usr/lib/lua/md5
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/core.so $(1)/usr/lib/lua/md5/core.so
+endef
+
+$(eval $(call BuildPackage,lua-md5))

+ 19 - 0
lang/lua-md5/patches/config.patch

@@ -0,0 +1,19 @@
+--- lua-md5-1.2/config	2014-06-04 16:55:50.000000000 +0800
++++ lua-md5-1.2_new/config	2014-06-04 16:57:54.223539416 +0800
+@@ -1,13 +1,13 @@
+ # Installation directories
+ 
+ # Default prefix
+-PREFIX = /usr/local
++PREFIX = /usr
+ 
+ # System's libraries directory (where binary libraries are installed)
+-LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
++LUA_LIBDIR= $(PREFIX)/lib/lua
+ 
+ # System's lua directory (where Lua libraries are installed)
+-LUA_DIR= $(PREFIX)/share/lua/5.1
++LUA_DIR= $(PREFIX)/lib/lua
+ 
+ # Lua includes directory
+ LUA_INC= $(PREFIX)/include

+ 10 - 0
lang/lua-md5/patches/makefile.patch

@@ -0,0 +1,10 @@
+--- a/Makefile.orig	2014-06-04 17:16:40.083514808 +0800
++++ b/Makefile	2014-06-04 17:17:27.111513780 +0800
+@@ -1,6 +1,6 @@
+ # $Id: Makefile,v 1.7 2007/10/11 00:02:56 carregal Exp $
+ 
+-CONFIG= ./config
++CFLAGS+= -fPIC
+ 
+ include $(CONFIG)
+ 

+ 56 - 0
lang/lua-mobdebug/Makefile

@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2015 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:=lua-mobdebug
+PKG_VERSION:=0.61
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/pkulchenko/MobDebug.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=9a03aa59696647ba3b7f9ae2f29a9f28532a4feb
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-mobdebug
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua-MobDebug
+  URL:=https://github.com/pkulchenko/MobDebug
+  DEPENDS:=+lua
+endef
+
+define Package/lua-mobdebug/description
+  MobDebug is a remote debugger for Lua (including Lua 5.1, Lua 5.2, Lua 5.3, and LuaJIT 2.x).
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Build/Install
+endef
+
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Package/lua-mobdebug/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/mobdebug.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-mobdebug))

+ 42 - 0
lang/lua-openssl/Makefile

@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2016 Amnon Paz <pazamnon@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-openssl
+PKG_VERSION:=0.6.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Amnon Paz <pazamnon@gmail.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=1b950e6ff8617205cda1a1b612637ef21b9daf96
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua openSSL binding
+  URL:=http://github.com/zhaozg/lua-openssl
+  DEPENDS:=+lua +libopenssl +librt
+endef
+
+define Package/lua-openssl/description
+    A free, MIT-licensed OpenSSL binding for Lua.
+endef
+
+define Package/$(PKG_NAME)/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/openssl.so $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))

+ 135 - 0
lang/lua-openssl/patches/0001-Revise-Makefile.patch

@@ -0,0 +1,135 @@
+diff --git a/Makefile b/Makefile
+index 6cb1176..6605879 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,85 +1,45 @@
+-T=openssl
+-
+-PREFIX		?=/usr/local
+-LIB_OPTION	?= -shared 
+-
+-#Lua auto detect
+-LUA_VERSION ?= $(shell pkg-config luajit --print-provides)
+-ifeq ($(LUA_VERSION),)                         ############ Not use luajit
+-LUAV		?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-LUA_CFLAGS	?= -I$(PREFIX)/include/lua$(LUAV)
+-LUA_LIBS	?= -L$(PREFIX)/lib 
+-LUA_LIBDIR	?= $(PREFIX)/lib/lua/$(LUAV)
+-else
+-LUAV		?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)")
+-LUA_CFLAGS	?= $(shell pkg-config luajit --cflags)
+-LUA_LIBS	?= $(shell pkg-config luajit --libs)
+-LUA_LIBDIR	?= $(PREFIX)/lib/lua/$(LUAV)
+-endif
+-
+-#OS auto detect
+-SYS := $(shell gcc -dumpmachine)
+-
+-ifneq (, $(findstring linux, $(SYS)))
+-# Do linux things
+-LDFLAGS		    = -fPIC -lrt -ldl
+-OPENSSL_LIBS	?= $(shell pkg-config openssl --libs) 
+-OPENSSL_CFLAGS	?= $(shell pkg-config openssl --cflags)
+-CFLAGS		    = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) 
+-endif
+-ifneq (, $(findstring apple, $(SYS)))
+-# Do darwin things
+-LDFLAGS		    = -fPIC -lrt -ldl
+-OPENSSL_LIBS	?= $(shell pkg-config openssl --libs) 
+-OPENSSL_CFLAGS	?= $(shell pkg-config openssl --cflags)
+-CFLAGS		    = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+-endif
+-ifneq (, $(findstring mingw, $(SYS)))
+-# Do mingw things
+-V			= $(shell lua -e "v=string.gsub('$(LUAV)','%.','');print(v)")
+-LDFLAGS		= -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll 
+-LUA_CFLAGS	= -DLUA_LIB -DLUA_BUILD_AS_DLL -I$(PREFIX)/include/
+-CFLAGS		= $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+-endif
+-ifneq (, $(findstring cygwin, $(SYS)))
+-# Do cygwin things
+-OPENSSL_LIBS	?= $(shell pkg-config openssl --libs) 
+-OPENSSL_CFLAGS  ?= $(shell pkg-config openssl --cflags)
+-CFLAGS		= -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
+-endif
+-#custome config
+-ifeq (.config, $(wildcard .config))
+-include .config
+-endif
+-
+-LIBNAME= $T.so.$V
+-
+-#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
+-
+-# Compilation directives
+-WARN_MOST	= -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
+-WARN		= -Wall -Wno-unused-value
+-WARN_MIN	= 
+-CFLAGS		+= $(WARN_MIN) -DPTHREADS 
+-CC= gcc -g $(CFLAGS) -Ideps
+-
+-
+-OBJS=src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \
+-src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o    \
+-src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o 
+-
+-.c.o:
+-	$(CC) -c -o $@ $?
+-
+-all: $T.so
+-	echo $(SYS)
+-
+-$T.so: $(OBJS)
+-	MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS)
+-
+-install: all
+-	mkdir -p $(LUA_LIBDIR)
+-	cp $T.so $(LUA_LIBDIR)
+-
+-clean:
+-	rm -f $T.so $(OBJS) 
++.PHONY: install clean
++
++PKGC ?= pkg-config
++
++LIBNAME = openssl.so
++LIB_OPTION = -shared
++
++# lua's package config can be under various names
++LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \
++		$(PKGC) --exists $$pc && echo $$pc && break; \
++	done)
++
++BUILD_DIR = $(shell pwd)
++
++# LUA include/libraries build flags
++LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC))
++LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC))
++LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC))
++
++# openssl include/libraries build flags
++OPENSSL_LIBS	= $(shell $(PKGC) openssl --libs)
++OPENSSL_CFLAGS	= $(shell $(PKGC) openssl --cflags)
++
++# openssl include/libraries build flags
++LOCAL_INCLUDE = -I$(BUILD_DIR)/deps
++
++CFLAGS	+= -fPIC -DPTHREADS -g $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS)
++LDFLAGS += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS)
++
++OBJS = src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o
++
++all: clean $(LIBNAME)
++
++$(LIBNAME): $(OBJS)
++	$(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@
++
++%.o: %.c
++	$(CC) $(CFLAGS) -c $< -o $@
++
++install: all
++	mkdir -p $(LUA_LIBDIR)
++	cp $(LIBNAME) $(LUA_LIBDIR)
++
++clean:
++	rm -f $(LIBNAME) $(OBJS)

+ 36 - 0
lang/lua-openssl/patches/0010-Fix-Linkage.patch

@@ -0,0 +1,36 @@
+diff --git a/deps/lua-compat/c-api/compat-5.3.c b/deps/lua-compat/c-api/compat-5.3.c
+index 4395bbc..4a8877c 100644
+--- a/deps/lua-compat/c-api/compat-5.3.c
++++ b/deps/lua-compat/c-api/compat-5.3.c
+@@ -491,17 +491,6 @@ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i) {
+ }
+
+
+-COMPAT53_API int lua_isinteger (lua_State *L, int index) {
+-  if (lua_type(L, index) == LUA_TNUMBER) {
+-    lua_Number n = lua_tonumber(L, index);
+-    lua_Integer i = lua_tointeger(L, index);
+-    if (i == n)
+-      return 1;
+-  }
+-  return 0;
+-}
+-
+-
+ static void compat53_reverse (lua_State *L, int a, int b) {
+   for (; a < b; ++a, --b) {
+     lua_pushvalue(L, a);
+diff --git a/deps/lua-compat/c-api/compat-5.3.h b/deps/lua-compat/c-api/compat-5.3.h
+index 2309294..8e67bae 100644
+--- a/deps/lua-compat/c-api/compat-5.3.h
++++ b/deps/lua-compat/c-api/compat-5.3.h
+@@ -244,9 +244,6 @@ typedef int (*lua_KFunction)(lua_State *L, int status, lua_KContext ctx);
+ #define lua_geti COMPAT53_CONCAT(COMPAT53_PREFIX, _geti)
+ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i);
+
+-#define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger)
+-COMPAT53_API int lua_isinteger (lua_State *L, int index);
+-
+ #define lua_numbertointeger(n, p) \
+   ((*(p) = (lua_Integer)(n)), 1)
+

+ 41 - 0
lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch

@@ -0,0 +1,41 @@
+--- lua-openssl-0.6.0.old/src/ssl.c	2016-09-19 08:30:43.735075695 +0200
++++ lua-openssl-0.6.0/src/ssl.c	2016-09-19 09:02:45.733813437 +0200
+@@ -24,12 +24,17 @@
+   SSL_METHOD* method = NULL;
+   const char* ciphers;
+   SSL_CTX* ctx;
+-  if (strcmp(meth, "SSLv3") == 0)
++  if (0);
++
++#ifndef OPENSSL_NO_SSL3
++  else if (strcmp(meth, "SSLv3") == 0)
+     method = SSLv3_method();    /* SSLv3 */
+   else if (strcmp(meth, "SSLv3_server") == 0)
+     method = SSLv3_server_method(); /* SSLv3 */
+   else if (strcmp(meth, "SSLv3_client") == 0)
+     method = SSLv3_client_method(); /* SSLv3 */
++#endif
++
+   else if (strcmp(meth, "SSLv23") == 0)
+     method = SSLv23_method();   /* SSLv3 but can rollback to v2 */
+   else if (strcmp(meth, "SSLv23_server") == 0)
+@@ -79,15 +84,15 @@
+ #endif
+   else
+     luaL_error(L, "#1:%s not supported\n"
+-               "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
+-               "default is SSLv3",
++               "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
++               "default is TLSv1",
+                meth);
+   ciphers = luaL_optstring(L, 2, SSL_DEFAULT_CIPHER_LIST);
+   ctx = SSL_CTX_new(method);
+   if (!ctx)
+     luaL_error(L, "#1:%s not supported\n"
+-               "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
+-               "default is SSLv3",
++               "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n",
++               "default is TLSv1",
+                meth);
+   openssl_newvalue(L, ctx);
+   SSL_CTX_set_cipher_list(ctx, ciphers);

+ 20 - 0
lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch

@@ -0,0 +1,20 @@
+--- lua-openssl-0.6.0.old/src/ssl.c	2016-09-19 08:30:43.735075695 +0200
++++ lua-openssl-0.6.0/src/ssl.c	2016-09-19 08:48:37.393737125 +0200
+@@ -1245,7 +1250,7 @@
+   lua_pushinteger(L, st);
+   return 2;
+ }
+-#ifndef LIBRESSL_VERSION_NUMBER
++#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER)
+ static int openssl_ssl_current_compression(lua_State *L)
+ {
+   SSL* s = CHECK_OBJECT(1, SSL, "openssl.ssl");
+@@ -1803,7 +1808,7 @@
+   {"getfd",     openssl_ssl_getfd},
+
+   {"current_cipher",        openssl_ssl_current_cipher},
+-#ifndef LIBRESSL_VERSION_NUMBER
++#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER)
+   {"current_compression",   openssl_ssl_current_compression},
+ #endif
+   {"getpeerverification",   openssl_ssl_getpeerverification},

+ 46 - 0
lang/lua-penlight/Makefile

@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2014 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:=lua-penlight
+PKG_VERSION:=1.3.2
+PKG_RELEASE:=2
+PKG_BUILD_DIR:=$(BUILD_DIR)/Penlight-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/stevedonovan/Penlight/archive/
+PKG_MD5SUM:=0315a39834bb6fab07741ec04ede1bf4
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.md
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Penlight
+  URL:=http://stevedonovan.github.io/Penlight/api/manual/01-introduction.md.html
+  DEPENDS:=+luafilesystem
+  MAINTAINER:= Karl Palsson <karlp@remake.is>
+endef
+
+define Package/$(PKG_NAME)/description
+  It is often said of Lua that it does not include batteries.
+  Penlight is the batteries.
+endef
+
+define Build/Compile
+	echo "Nothing to compile, pure lua package"
+endef
+
+define Package/$(PKG_NAME)/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(CP) $(PKG_BUILD_DIR)/lua/pl $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))

+ 54 - 0
lang/lua-rings/Makefile

@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2015 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:=lua-rings
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/rings.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=2b8a900f8b9dbde304859a3ac9d437795c3fdde3
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_FIXUP:=autoreconf
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-rings
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua-Rings
+  URL:=http://keplerproject.github.io/rings/
+  DEPENDS:=+lua
+endef
+
+define Package/lua-rings/description
+  Rings is a library which provides a way to create new Lua states from within Lua.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+# add make variable overrides here
+MAKE_FLAGS +=
+
+define Build/Configure
+endef
+
+define Package/lua-rings/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rings.so $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/stable.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-rings))

+ 28 - 0
lang/lua-rings/patches/config.patch

@@ -0,0 +1,28 @@
+--- lua-rings-1.3.0_org/config	2014-06-04 15:24:24.223662038 +0800
++++ lua-rings-1.3.0/config	2014-06-04 16:16:15.183594040 +0800
+@@ -1,15 +1,15 @@
+ # Installation directories
+ 
+ # Default prefix
+-PREFIX ?= /usr/local
++PREFIX ?= /usr
+ 
+ DESTDIR ?= /
+ 
+ # System's libraries directory (where binary libraries are installed)
+-LUA_LIBDIR ?= $(PREFIX)/lib/lua/5.1
++LUA_LIBDIR ?= $(PREFIX)/lib/lua
+ 
+ # System's lua directory (where Lua libraries are installed)
+-LUA_DIR ?= $(PREFIX)/share/lua/5.1
++LUA_DIR ?= $(PREFIX)/lib/lua
+ 
+ # Lua includes directory
+ LUA_INC ?= $(PREFIX)/include
+@@ -24,6 +24,5 @@
+ WARN ?= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -Wpointer-arith -pedantic
+ INCS ?= -I$(LUA_INC)
+ CFLAGS ?= $(WARN) $(INCS)
+-CC ?= gcc
+ 
+ # $Id: config,v 1.7 2007/10/29 22:51:39 carregal Exp $

+ 11 - 0
lang/lua-rings/patches/makefile.patch

@@ -0,0 +1,11 @@
+--- lua-rings-1.3.0_org/Makefile	2014-06-04 15:24:37.583661746 +0800
++++ lua-rings-1.3.0/Makefile	2014-06-04 15:23:41.611662970 +0800
+@@ -3,6 +3,8 @@
+ T= rings
+ CONFIG= ./config
+ 
++CFLAGS+= -fPIC
++
+ include $(CONFIG)
+ 
+ SRCS= src/rings.c

+ 62 - 0
lang/lua-rs232/Makefile

@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2015 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:=lua-rs232
+PKG_VERSION:=1.0.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/srdgame/librs232.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=a9d463181e7f7034fe6a55bc38e845fb04fa93ba
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-rs232
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua Serial Library
+  URL:=https://github.com/srdgame/librs232
+  DEPENDS:= +lua
+endef
+
+define Package/lua-rs232/description
+  multiplatform library for serial communications over RS-232
+endef
+
+CONFIGURE_ARGS += \
+	--with-lua-inc=$(STAGING_DIR)/usr/include \
+	--with-lua-lib=$(STAGING_DIR)/usr/lib
+
+#define Build/Configure
+#	( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
+#	$(call Build/Configure/Default)
+#endef
+define Build/Configure
+endef
+
+define Build/Compile
+	(cd "$(PKG_BUILD_DIR)"; $(TARGET_CC)  src/rs232.c src/rs232_posix.c bindings/lua/luars232.c -DLUAROCKS_HACK -std=gnu99 -I./include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib -fPIC -shared -o luars232.so)
+endef
+
+define Build/Install
+endef
+
+define Package/lua-rs232/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/luars232.so $(1)/usr/lib/lua/
+endef
+
+$(eval $(call BuildPackage,lua-rs232))

+ 52 - 0
lang/lua-sha2/Makefile

@@ -0,0 +1,52 @@
+#
+# Copyright (C) 20013-2014 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:=lua-sha2
+PKG_VERSION:=0.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-sha2
+	SUBMENU:=Lua
+	SECTION:=lang
+	CATEGORY:=Languages
+	TITLE:=Lua binding for Aaron Gifford's SHA-2 implementation
+	URL:=https://code.google.com/p/sha2/
+	MAINTAINER:=Lars Gierth <larsg@systemli.org>
+	DEPENDS:=+lua
+endef
+
+define Package/lua-sha2/description
+	Lua Binding for the SHA-2 (SHA-256/384/512) BSD-licensed C implementation by Aaron Gifford.
+	Also contains a HMAC implementation in Lua.
+endef
+
+TARGET_CFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
+TARGET_LDFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
+
+define Build/Configure
+endef
+
+define Package/lua-sha2/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua/hmac
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/sha2.so $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac
+endef
+
+$(eval $(call BuildPackage,lua-sha2))

+ 14 - 0
lang/lua-sha2/patches/001-makefile.patch

@@ -0,0 +1,14 @@
+From: Lars Gierth <larsg@systemli.org>
+Date: Tue, 2 Sep 2014 00:05:39 +0200
+
+    Add rump Makefile
+
+new file mode 100644
+index 0000000..f081d38
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,4 @@
++all: sha2.o sha2lib.o
++	$(CC) -shared -o sha2.so sha2.o sha2lib.o
++
++.PHONY: all

+ 95 - 0
lang/lua-wsapi/Makefile

@@ -0,0 +1,95 @@
+#
+# Copyright (C) 2015 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:=lua-wsapi
+PKG_VERSION:=1.6.1
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-wsapi/Default
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua WSAPI
+  URL:=https://keplerproject.github.io/wsapi/
+  DEPENDS:= +lua
+endef
+
+define Package/lua-wsapi/Default/description
+  WSAPI is an API that abstracts the web server from Lua web applications
+endef
+
+
+define Package/lua-wsapi-base
+$(call Package/lua-wsapi/Default)
+  TITLE+= base
+  DEPENDS+= +luafilesystem
+  VARIANT:=base
+endef
+
+define Package/lua-wsapi-base/description
+$(call Package/lua-wsapi/Default/description)
+ .
+ This package contains the basic stuff.
+endef
+
+define Package/lua-wsapi-xavante
+$(call Package/lua-wsapi/Default)
+  TITLE+= xavante
+  DEPENDS+= +lua-wsapi-base +lua-xavante
+  VARIANT:=xavante
+endef
+
+define Package/lua-wsapi-xavante/description
+$(call Package/lua-wsapi/Default/description)
+ .
+ This package contains the Xavante stuff.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Build/Install
+endef
+
+define Package/lua-wsapi-base/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi.lua $(1)/usr/lib/lua
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi.cgi $(1)/usr/bin
+
+	$(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/{common,request,response,util,cgi,sapi,ringer,mock}.lua $(1)/usr/lib/lua/wsapi
+endef
+
+define Package/lua-wsapi-xavante/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi $(1)/usr/bin
+
+	$(INSTALL_DIR) $(1)/usr/lib/lua/wsapi
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi
+endef
+
+
+$(eval $(call BuildPackage,lua-wsapi-base))
+$(eval $(call BuildPackage,lua-wsapi-xavante))

+ 58 - 0
lang/lua-xavante/Makefile

@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2015 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:=lua-xavante
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/xavante.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=9825b905133e14d37a4c179f2d02367ab93f1ef6
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lua-xavante
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Xavante Web Server
+  URL:=http://keplerproject.github.io/xavante/
+  DEPENDS:= +lua
+endef
+
+define Package/lua-xavante/description
+  Xavante is a Lua HTTP 1.1 Web server that uses a modular architecture based on URI mapped handlers.
+endef
+
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Build/Install
+endef
+
+define Package/lua-xavante/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/sajax/sajax.lua $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/xavante.lua $(1)/usr/lib/lua
+
+	$(INSTALL_DIR) $(1)/usr/lib/lua/xavante
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/{cgiluahandler,encoding,filehandler,httpd,mime,patternhandler,redirecthandler,vhostshandler,indexhandler,urlhandler,ruleshandler}.lua $(1)/usr/lib/lua/xavante
+endef
+
+$(eval $(call BuildPackage,lua-xavante))

+ 53 - 0
lang/luabitop/Makefile

@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2014 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:=luabitop
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
+
+_BASENAME:=LuaBitOp
+
+PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
+PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://bitop.luajit.org/download/
+PKG_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION)
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luabitop
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=luabitop
+  URL:=http://bitop.luajit.org/
+  DEPENDS:=+liblua
+endef
+
+define Package/luabitop/description
+Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers.
+endef
+
+define Build/Configure
+endef
+
+
+TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE
+
+define Build/Compile
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c
+endef
+
+define Package/luabitop/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,luabitop))

+ 56 - 0
lang/luaexpat/Makefile

@@ -0,0 +1,56 @@
+# 
+# Copyright (C) 2009 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:=luaexpat
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://matthewwild.co.uk/projects/luaexpat
+PKG_MD5SUM:=3c20b5795e7107f847f8da844fbfe2da
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luaexpat
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=LuaExpat 
+  URL:=http://matthewwild.co.uk/projects/luaexpat/
+  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+  DEPENDS:=+lua +libexpat
+endef
+
+define Package/luaexpat/description
+  LuaExpat is a SAX XML parser based on the Expat library.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+	$(CP) files/compat-5.1r5 $(PKG_BUILD_DIR)/compat-5.1r5
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+	EXPAT_INC="-I$(STAGING_DIR)/usr/include/" \
+	LUA_INC="-I$(STAGING_DIR)/usr/include/" \
+	LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \
+	COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \
+	LDFLAGS="-shared $(TARGET_LDFLAGS)" \
+	CC="$(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -std=c99" \
+	LD="$(TARGET_CROSS)ld -shared" 
+endef
+
+define Package/luaexpat/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp.so $(1)/usr/lib/lua/lxp.so
+	$(INSTALL_DIR) $(1)/usr/lib/lua/lxp
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/lib/lua/lxp
+endef
+
+$(eval $(call BuildPackage,luaexpat))

+ 97 - 0
lang/luaexpat/files/compat-5.1r5/compat-5.1.c

@@ -0,0 +1,97 @@
+/*
+** Compat-5.1
+** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat)
+** $Id: compat-5.1.c,v 1.13 2006/02/20 21:12:47 carregal Exp $
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include "lua.h"
+#include "lauxlib.h"
+#include "compat-5.1.h"
+
+static void getfield(lua_State *L, int idx, const char *name) {
+    const char *end = strchr(name, '.');
+    lua_pushvalue(L, idx);
+    while (end) {
+        lua_pushlstring(L, name, end - name);
+        lua_gettable(L, -2);
+        lua_remove(L, -2);
+        if (lua_isnil(L, -1)) return;
+        name = end+1;
+        end = strchr(name, '.');
+    }
+    lua_pushstring(L, name);
+    lua_gettable(L, -2);
+    lua_remove(L, -2);
+}
+
+static void setfield(lua_State *L, int idx, const char *name) {
+    const char *end = strchr(name, '.');
+    lua_pushvalue(L, idx);
+    while (end) {
+        lua_pushlstring(L, name, end - name);
+        lua_gettable(L, -2);
+        /* create table if not found */
+        if (lua_isnil(L, -1)) {
+            lua_pop(L, 1);
+            lua_newtable(L);
+            lua_pushlstring(L, name, end - name);
+            lua_pushvalue(L, -2);
+            lua_settable(L, -4);
+        }
+        lua_remove(L, -2);
+        name = end+1;
+        end = strchr(name, '.');
+    }
+    lua_pushstring(L, name);
+    lua_pushvalue(L, -3);
+    lua_settable(L, -3);
+    lua_pop(L, 2);
+}
+
+LUALIB_API void luaL_module(lua_State *L, const char *libname,
+                              const luaL_reg *l, int nup) {
+  if (libname) {
+    getfield(L, LUA_GLOBALSINDEX, libname);  /* check whether lib already exists */
+    if (lua_isnil(L, -1)) { 
+      int env, ns;
+      lua_pop(L, 1); /* get rid of nil */
+      lua_pushliteral(L, "require");
+      lua_gettable(L, LUA_GLOBALSINDEX); /* look for require */
+      lua_getfenv(L, -1); /* getfenv(require) */
+      lua_remove(L, -2); /* remove function require */
+      env = lua_gettop(L);
+
+      lua_newtable(L); /* create namespace for lib */
+      ns = lua_gettop(L);
+      getfield(L, env, "package.loaded"); /* get package.loaded table */
+      if (lua_isnil(L, -1)) { /* create package.loaded table */
+          lua_pop(L, 1); /* remove previous result */
+          lua_newtable(L);
+          lua_pushvalue(L, -1);
+          setfield(L, env, "package.loaded");
+      }
+      else if (!lua_istable(L, -1))
+        luaL_error(L, "name conflict for library `%s'", libname);
+      lua_pushstring(L, libname);
+      lua_pushvalue(L, ns); 
+      lua_settable(L, -3); /* package.loaded[libname] = ns */
+      lua_pop(L, 1); /* get rid of package.loaded table */
+      lua_pushvalue(L, ns); /* copy namespace */
+      setfield(L, LUA_GLOBALSINDEX, libname);
+      lua_remove (L, env); /* remove env */
+    }
+    lua_insert(L, -(nup+1));  /* move library table to below upvalues */
+  }
+  for (; l->name; l++) {
+    int i;
+    lua_pushstring(L, l->name);
+    for (i=0; i<nup; i++)  /* copy upvalues to the top */
+      lua_pushvalue(L, -(nup+1));
+    lua_pushcclosure(L, l->func, nup);
+    lua_settable(L, -(nup+3));
+  }
+  lua_pop(L, nup);  /* remove upvalues */
+}
+

+ 13 - 0
lang/luaexpat/files/compat-5.1r5/compat-5.1.h

@@ -0,0 +1,13 @@
+/*
+** Compat-5.1
+** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat/)
+** $Id: compat-5.1.h,v 1.8 2006/02/20 21:12:47 carregal Exp $
+*/
+
+#ifndef COMPAT_H
+
+LUALIB_API void luaL_module(lua_State *L, const char *libname,
+                                       const luaL_reg *l, int nup);
+#define luaL_openlib luaL_module
+
+#endif

+ 267 - 0
lang/luaexpat/files/compat-5.1r5/compat-5.1.lua

@@ -0,0 +1,267 @@
+--
+-- Compat-5.1
+-- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat)
+-- According to Lua 5.1
+-- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $
+--
+
+_COMPAT51 = "Compat-5.1 R5"
+
+local LUA_DIRSEP = '/'
+local LUA_OFSEP = '_'
+local OLD_LUA_OFSEP = ''
+local POF = 'luaopen_'
+local LUA_PATH_MARK = '?'
+local LUA_IGMARK = ':'
+
+local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type
+local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub
+
+--
+-- avoid overwriting the package table if it's already there
+--
+package = package or {}
+local _PACKAGE = package
+
+package.path = LUA_PATH or os.getenv("LUA_PATH") or
+             ("./?.lua;" ..
+              "/usr/local/share/lua/5.0/?.lua;" ..
+              "/usr/local/share/lua/5.0/?/?.lua;" ..
+              "/usr/local/share/lua/5.0/?/init.lua" )
+ 
+package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or
+             "./?.so;" ..
+             "./l?.so;" ..
+             "/usr/local/lib/lua/5.0/?.so;" ..
+             "/usr/local/lib/lua/5.0/l?.so"
+
+--
+-- make sure require works with standard libraries
+--
+package.loaded = package.loaded or {}
+package.loaded.debug = debug
+package.loaded.string = string
+package.loaded.math = math
+package.loaded.io = io
+package.loaded.os = os
+package.loaded.table = table 
+package.loaded.base = _G
+package.loaded.coroutine = coroutine
+local _LOADED = package.loaded
+
+--
+-- avoid overwriting the package.preload table if it's already there
+--
+package.preload = package.preload or {}
+local _PRELOAD = package.preload
+
+
+--
+-- looks for a file `name' in given path
+--
+local function findfile (name, pname)
+	name = gsub (name, "%.", LUA_DIRSEP)
+	local path = _PACKAGE[pname]
+	assert (type(path) == "string", format ("package.%s must be a string", pname))
+	for c in gfind (path, "[^;]+") do
+		c = gsub (c, "%"..LUA_PATH_MARK, name)
+		local f = io.open (c)
+		if f then
+			f:close ()
+			return c
+		end
+	end
+	return nil -- not found
+end
+
+
+--
+-- check whether library is already loaded
+--
+local function loader_preload (name)
+	assert (type(name) == "string", format (
+		"bad argument #1 to `require' (string expected, got %s)", type(name)))
+	assert (type(_PRELOAD) == "table", "`package.preload' must be a table")
+	return _PRELOAD[name]
+end
+
+
+--
+-- Lua library loader
+--
+local function loader_Lua (name)
+	assert (type(name) == "string", format (
+		"bad argument #1 to `require' (string expected, got %s)", type(name)))
+	local filename = findfile (name, "path")
+	if not filename then
+		return false
+	end
+	local f, err = loadfile (filename)
+	if not f then
+		error (format ("error loading module `%s' (%s)", name, err))
+	end
+	return f
+end
+
+
+local function mkfuncname (name)
+	name = gsub (name, "^.*%"..LUA_IGMARK, "")
+	name = gsub (name, "%.", LUA_OFSEP)
+	return POF..name
+end
+
+local function old_mkfuncname (name)
+	--name = gsub (name, "^.*%"..LUA_IGMARK, "")
+	name = gsub (name, "%.", OLD_LUA_OFSEP)
+	return POF..name
+end
+
+--
+-- C library loader
+--
+local function loader_C (name)
+	assert (type(name) == "string", format (
+		"bad argument #1 to `require' (string expected, got %s)", type(name)))
+	local filename = findfile (name, "cpath")
+	if not filename then
+		return false
+	end
+	local funcname = mkfuncname (name)
+	local f, err = loadlib (filename, funcname)
+	if not f then
+		funcname = old_mkfuncname (name)
+		f, err = loadlib (filename, funcname)
+		if not f then
+			error (format ("error loading module `%s' (%s)", name, err))
+		end
+	end
+	return f
+end
+
+
+local function loader_Croot (name)
+	local p = gsub (name, "^([^.]*).-$", "%1")
+	if p == "" then
+		return
+	end
+	local filename = findfile (p, "cpath")
+	if not filename then
+		return
+	end
+	local funcname = mkfuncname (name)
+	local f, err, where = loadlib (filename, funcname)
+	if f then
+		return f
+	elseif where ~= "init" then
+		error (format ("error loading module `%s' (%s)", name, err))
+	end
+end
+
+-- create `loaders' table
+package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, }
+local _LOADERS = package.loaders
+
+
+--
+-- iterate over available loaders
+--
+local function load (name, loaders)
+	-- iterate over available loaders
+	assert (type (loaders) == "table", "`package.loaders' must be a table")
+	for i, loader in ipairs (loaders) do
+		local f = loader (name)
+		if f then
+			return f
+		end
+	end
+	error (format ("module `%s' not found", name))
+end
+
+-- sentinel
+local sentinel = function () end
+
+--
+-- new require
+--
+function _G.require (modname)
+	assert (type(modname) == "string", format (
+		"bad argument #1 to `require' (string expected, got %s)", type(name)))
+	local p = _LOADED[modname]
+	if p then -- is it there?
+		if p == sentinel then
+			error (format ("loop or previous error loading module '%s'", modname))
+		end
+		return p -- package is already loaded
+	end
+	local init = load (modname, _LOADERS)
+	_LOADED[modname] = sentinel
+	local actual_arg = _G.arg
+	_G.arg = { modname }
+	local res = init (modname)
+	if res then
+		_LOADED[modname] = res
+	end
+	_G.arg = actual_arg
+	if _LOADED[modname] == sentinel then
+		_LOADED[modname] = true
+	end
+	return _LOADED[modname]
+end
+
+
+-- findtable
+local function findtable (t, f)
+	assert (type(f)=="string", "not a valid field name ("..tostring(f)..")")
+	local ff = f.."."
+	local ok, e, w = find (ff, '(.-)%.', 1)
+	while ok do
+		local nt = rawget (t, w)
+		if not nt then
+			nt = {}
+			t[w] = nt
+		elseif type(t) ~= "table" then
+			return sub (f, e+1)
+		end
+		t = nt
+		ok, e, w = find (ff, '(.-)%.', e+1)
+	end
+	return t
+end
+
+--
+-- new package.seeall function
+--
+function _PACKAGE.seeall (module)
+	local t = type(module)
+	assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")")
+	local meta = getmetatable (module)
+	if not meta then
+		meta = {}
+		setmetatable (module, meta)
+	end
+	meta.__index = _G
+end
+
+
+--
+-- new module function
+--
+function _G.module (modname, ...)
+	local ns = _LOADED[modname]
+	if type(ns) ~= "table" then
+		ns = findtable (_G, modname)
+		if not ns then
+			error (string.format ("name conflict for module '%s'", modname))
+		end
+		_LOADED[modname] = ns
+	end
+	if not ns._NAME then
+		ns._NAME = modname
+		ns._M = ns
+		ns._PACKAGE = gsub (modname, "[^.]*$", "")
+	end
+	setfenv (2, ns)
+	for i, f in ipairs (arg) do
+		f (ns)
+	end
+end

+ 66 - 0
lang/luafilesystem/Makefile

@@ -0,0 +1,66 @@
+#
+# Copyright (C) 2008-2010 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:=luafilesystem
+PKG_VERSION:=1.6.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git
+PKG_SOURCE_VERSION:=2fd989cd6c777583be1c93616018c55b2cbb1bcf
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luafilesystem
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=LuaFileSystem
+  URL:=http://keplerproject.github.com/luafilesystem/
+  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+  DEPENDS:=+liblua
+endef
+
+define Package/luafilesystem/description
+ This package contains the LuaFileSystem library, a set of portable
+ functions for directory creation, listing and deletion and for file
+ locking.
+endef
+
+define Build/Configure
+endef
+
+TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS)
+
+TARGET_LDFLAGS += -llua
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		$(TARGET_CONFIGURE_OPTS) \
+		CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
+		LDFLAGS="$(TARGET_LDFLAGS)"
+	$(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/include
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua
+endef
+
+define Package/luafilesystem/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so
+endef
+
+$(eval $(call BuildPackage,luafilesystem))

+ 45 - 0
lang/luai2c/Makefile

@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2016 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:=luai2c
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=3
+PKG_MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/mrpace2/i2c-lua.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luai2c
+	SUBMENU:=Lua
+	SECTION:=lang
+	CATEGORY:=Languages
+	TITLE:=Lua I2C binding
+	URL:=https://github.com/mrpace2/i2c-lua/
+	DEPENDS:=+liblua +kmod-i2c-core
+	MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
+endef
+
+define Package/luai2c/description
+	This is the Lua binding for I2C. It provides access to I2C slaves supported by the kernel.
+endef
+
+define Package/luai2c/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/i2c.so $(1)/usr/lib/lua
+	$(INSTALL_DIR) $(1)/usr/lib/lua/i2c
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/* $(1)/usr/lib/lua/i2c
+endef
+
+$(eval $(call BuildPackage,luai2c))

+ 57 - 0
lang/lualanes/Makefile

@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2007-2014 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:=lualanes
+PKG_REV:=aa9bfcf2dd49f55f11b27e7c21d5b75d81ccfc7e
+PKG_VERSION:=3.9.4
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
+PKG_SOURCE_URL:=https://github.com/LuaLanes/lanes.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_BUILD_DEPENDS:=lua/host luac/host
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lualanes
+	SUBMENU:=Lua
+	SECTION:=lang
+	CATEGORY:=Languages
+	TITLE:=LuaLanes
+	URL:=http://luaforge.net/projects/lanes/
+	DEPENDS:=+lua +luac +liblua +libpthread
+	MAINTAINER:=Vladimir Malyutin <first-leon@yandex.ru>
+endef
+
+define Package/lualanes/description
+	Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 and 5.2.
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) all \
+        CC="$(TARGET_CC)" \
+        LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \
+        LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \
+        OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield"
+endef
+
+define Package/lualanes/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/
+	$(INSTALL_DIR) $(1)/usr/lib/lua/lanes
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so
+endef
+
+$(eval $(call BuildPackage,lualanes))

+ 13 - 0
lang/lualanes/patches/100-musl-compat.patch

@@ -0,0 +1,13 @@
+diff --git a/src/threading.h b/src/threading.h
+index bfa9ab8..7b3d6a1 100644
+--- a/src/threading.h
++++ b/src/threading.h
+@@ -128,7 +128,7 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
+   #endif // PLATFORM_WIN32
+   #include <pthread.h>
+ 
+-  #ifdef PLATFORM_LINUX
++  #if defined(PLATFORM_LINUX) && defined(__UCLIBC__)
+   # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
+   #else
+     /* OS X, ... */

+ 61 - 0
lang/luaposix/Makefile

@@ -0,0 +1,61 @@
+#
+# 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:=luaposix
+PKG_VERSION:=v33.2.1
+PKG_RELEASE:=5
+
+PKG_SOURCE:=release-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/
+PKG_MD5SUM:=aa68b5c07ab1ecea81bb466c81e88056
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
+PKG_REMOVE_FILES:=aclocal.m4
+PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luaposix
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=luaposix
+  URL:=http://luaforge.net/projects/luaposix/
+  DEPENDS:=+lua +librt
+  PKG_BUILD_DEPENDS:=+lua/host
+endef
+
+define Package/luaposix/description
+  luaposix is a general POSIX library for Lua providing access
+  to various low level libc functions.
+endef
+
+CONFIGURE_VARS += ac_cv_path_LDOC="true"
+
+TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
+ifeq ($(CONFIG_USE_MUSL),y)
+  TARGET_CFLAGS += -D_POSIX_PRIORITY_SCHEDULING
+endif
+
+ifneq ($(CONFIG_USE_GLIBC),)
+  ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
+    TARGET_CFLAGS += -DNO_GETLOGIN
+  endif
+endif
+
+
+define Package/luaposix/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua/posix
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix.so $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,luaposix))

+ 30 - 0
lang/luaposix/patches/100-eglibc-compat.patch

@@ -0,0 +1,30 @@
+diff --git a/ext/posix/unistd.c b/ext/posix/unistd.c
+index 9276640..69c8cef 100644
+--- a/ext/posix/unistd.c
++++ b/ext/posix/unistd.c
+@@ -525,6 +525,7 @@ Pgetgroups(lua_State *L)
+ #endif
+ 
+ 
++#ifndef NO_GETLOGIN
+ /***
+ Current logged-in user.
+ @treturn[1] string username, if successful
+@@ -537,6 +538,7 @@ Pgetlogin(lua_State *L)
+ 	checknargs(L, 0);
+ 	return pushstringresult(getlogin());
+ }
++#endif
+ 
+ 
+ /***
+@@ -1044,7 +1046,9 @@ static const luaL_Reg posix_unistd_fns[] =
+ 	LPOSIX_FUNC( Pgetegid		),
+ 	LPOSIX_FUNC( Pgeteuid		),
+ 	LPOSIX_FUNC( Pgetgid		),
++#ifndef NO_GETLOGIN
+ 	LPOSIX_FUNC( Pgetlogin		),
++#endif
+ 	LPOSIX_FUNC( Pgetpgrp		),
+ 	LPOSIX_FUNC( Pgetpid		),
+ 	LPOSIX_FUNC( Pgetppid		),

+ 32 - 0
lang/luaposix/patches/101-disable-curses.patch

@@ -0,0 +1,32 @@
+diff --git a/configure.ac b/configure.ac
+index dfd4199..19924d0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -153,15 +153,6 @@ AC_CHECK_LIB([rt], [clock_gettime])
+ AC_SUBST([LIBRT], [$LIBS])
+ LIBS=$save_LIBS
+ 
+-## Curses
+-AX_WITH_CURSES
+-AC_ARG_VAR(CURSES_LIB, [linker flags for curses library])
+-
+-save_LIBS=$LIBS
+-LIBS="$CURSES_LIB $LIBS"
+-AC_CHECK_FUNCS([resizeterm])
+-LIBS=$save_LIBS
+-
+ ## Use system implementation, or bundled replacement?
+ AC_CHECK_FUNCS([strlcpy])
+ 
+diff --git a/ext/posix/posix.c b/ext/posix/posix.c
+index 6019df0..2d75487 100644
+--- a/ext/posix/posix.c
++++ b/ext/posix/posix.c
+@@ -12,7 +12,6 @@
+ 
+ #include "bit32.c"
+ #include "ctype.c"
+-#include "curses.c"
+ #include "dirent.c"
+ #include "errno.c"
+ #include "fcntl.c"

+ 20 - 0
lang/luaposix/patches/102-disable-compat-deprecated.diff

@@ -0,0 +1,20 @@
+diff --git a/lib/posix.lua.in b/lib/posix.lua.in
+index 17ef39a..a248d9b 100644
+--- a/lib/posix.lua.in
++++ b/lib/posix.lua.in
+@@ -35,15 +35,6 @@ for _, sub in ipairs {
+   end
+ end
+ 
+-
+--- Inject deprecated APIs (overwriting submodules) for backwards compatibility.
+-for k, v in pairs (require "posix.deprecated") do
+-  M[k] = v
+-end
+-for k, v in pairs (require "posix.compat") do
+-  M[k] = v
+-end
+-
+ M.version = "posix for " .. _VERSION .. " / @PACKAGE_STRING@"
+ 
+ 

+ 62 - 0
lang/luarocks/Makefile

@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2006-2015 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:=luarocks
+PKG_VERSION:=2.2.2
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks.git
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+
+PKG_MAINTAINER:=Amr Hassan <amr.hassan@gmail.com>
+PKG_INSTALL=1
+PKG_BUILD_DEPENDS:=lua/host luac/host
+PKG_LICENSE=GPL
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luarocks
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=luarocks
+  URL:=https://github.com/keplerproject/luarocks
+  DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec
+endef
+
+define Package/luarocks/description
+	LuaRocks is a deployment and management system for Lua modules.
+endef
+
+# My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk
+CONFIGURE_ARGS = \
+    --prefix=$(CONFIGURE_PREFIX) \
+    --sysconfdir=/etc \
+    --with-lua=$(STAGING_DIR_HOSTPKG)
+
+CONFIGURE_VARS = \
+	LUAROCKS_UNAME_S="Linux" \
+	LUAROCKS_UNAME_M="$(ARCH)"
+
+define Build/Compile
+	$(call Build/Compile/Default,build)
+endef
+
+define Package/luarocks/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin
+	$(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share
+	$(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc
+endef
+
+$(eval $(call BuildPackage,luarocks))

+ 13 - 0
lang/luarocks/patches/01_dont_modify_bin_shebang.diff

@@ -0,0 +1,13 @@
+diff -rupN luarocks/Makefile luarocks.new/Makefile
+--- luarocks/Makefile	2015-02-19 13:24:07.027310956 +0200
++++ luarocks.new/Makefile	2015-02-22 13:28:24.497353543 +0200
+@@ -104,7 +104,7 @@ build_bins: cleanup_bins
+ 	for f in $(BIN_FILES) ;\
+ 	do \
+ 	   sed "1d" src/bin/$$f > src/bin/$$f.bak ;\
+-	   echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\
++	   echo "#!/usr/bin/env lua" > src/bin/$$f ;\
+ 	   echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\
+ 	   cat src/bin/$$f.bak >> src/bin/$$f ;\
+ 	   chmod +x src/bin/$$f ;\
+Binary files luarocks/src/bin/.luarocks.swp and luarocks.new/src/bin/.luarocks.swp differ

+ 37 - 0
lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch

@@ -0,0 +1,37 @@
+Index: luarocks-2.2.2/configure
+===================================================================
+--- luarocks-2.2.2.orig/configure
++++ luarocks-2.2.2/configure
+@@ -388,18 +388,22 @@ then
+ fi
+ 
+ echo_n "Configuring for system... "
+-if uname -s
+-then
+-   LUAROCKS_UNAME_S=`uname -s`
+-else
+-   die "Could not determine operating system. 'uname -s' failed."
++if [ -z "$LUAROCKS_UNAME_S" ]; then
++    if uname -s
++    then
++        LUAROCKS_UNAME_S=`uname -s`
++    else
++        die "Could not determine operating system. 'uname -s' failed."
++    fi
+ fi
+ echo_n "Configuring for architecture... "
+-if uname -m
+-then
+-   LUAROCKS_UNAME_M=`uname -m`
+-else
+-   die "Could not determine processor architecture. 'uname -m' failed."
++if [ -z "$LUAROCKS_UNAME_M" ]; then
++    if uname -m
++    then
++        LUAROCKS_UNAME_M=`uname -m`
++    else
++        die "Could not determine processor architecture. 'uname -m' failed."
++    fi
+ fi
+ 
+ for v in 5.1 5.2 5.3; do

+ 61 - 0
lang/luasec/Makefile

@@ -0,0 +1,61 @@
+#
+# Copyright (C) 2009-2014 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:=luasec
+PKG_VERSION:=0.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/
+PKG_MD5SUM:=14e1aef6d2aae96bbf98afc6b6634af2
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
+
+MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luasec
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=LuaSec
+  URL:=https://github.com/brunoos/luasec
+  DEPENDS:=+lua +libopenssl +luasocket
+endef
+
+define Package/luasec/description
+  LuaSec is a binding for OpenSSL library to provide TLS/SSL communication.
+endef
+
+define Build/Configure
+endef
+
+MAKE_FLAGS += \
+	INCDIR="$(TARGET_CPPFLAGS) -I." \
+	LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
+	LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
+	LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
+
+define Build/Compile
+$(call Build/Compile/Default,linux)
+endef
+
+define Package/luasec/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/
+	$(INSTALL_DIR) $(1)/usr/lib/lua/ssl
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/
+endef
+
+$(eval $(call BuildPackage,luasec))

+ 56 - 0
lang/luasoap/Makefile

@@ -0,0 +1,56 @@
+#
+# 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:=luasoap
+PKG_VERSION:=2014-08-21
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/tomasguisasola/luasoap.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=af1e100281cee4b972df10121e37e51d53367a98
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_MIRROR_MD5SUM:=
+
+PKG_MAINTAINER:=Liu Peng <pengliu@credosemi.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luasoap
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=LuaSOAP
+  URL:=https://github.com/tomasguisasola/luasoap
+  DEPENDS:=+lua +luaexpat +luasec +luasocket
+endef
+
+define Package/luasoap/description
+  LuaSOAP is a library of functions to deal with SOAP.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/luasoap/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/soap.lua $(1)/usr/lib/lua/
+	$(INSTALL_DIR) $(1)/usr/lib/lua/soap
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{client,server}.lua $(1)/usr/lib/lua/soap/
+	$(INSTALL_DIR) $(1)/usr/lib/lua/soap/client
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/client/https.lua $(1)/usr/lib/lua/soap/client/
+	$(INSTALL_DIR) $(1)/usr/lib/lua/soap/tests
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/test{,-http,-server}.lua $(1)/usr/lib/lua/soap/tests/
+endef
+
+$(eval $(call BuildPackage,luasoap))

+ 63 - 0
lang/luasocket/Makefile

@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2009-2013 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:=luasocket
+PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
+PKG_VERSION:=3.0-rc1-20130909
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luasocket
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=LuaSocket
+  URL:=http://luasocket.luaforge.net/
+  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+  DEPENDS:=+lua
+endef
+
+define Package/luasocket/description
+  LuaSocket is the most comprehensive networking support
+  library for the Lua language. It provides easy access to
+  TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR)/ \
+		LIBDIR="$(TARGET_LDFLAGS)" \
+		CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
+		LD="$(TARGET_CROSS)ld -shared" \
+		all
+endef
+
+
+define Package/luasocket/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua
+	$(INSTALL_DIR) $(1)/usr/lib/lua/mime
+	ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so
+	$(INSTALL_DIR) $(1)/usr/lib/lua/socket
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket
+	ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so
+endef
+
+$(eval $(call BuildPackage,luasocket))

+ 237 - 0
lang/luasocket/patches/0001-Add-interface-support.patch

@@ -0,0 +1,237 @@
+From 96fdf07acf78ecfc9be76a8b0591f38fe6f1a875 Mon Sep 17 00:00:00 2001
+From: Steven Barth <steven@midlink.org>
+Date: Sat, 9 Nov 2013 12:01:42 +0100
+Subject: [PATCH] Add interface resolving
+
+---
+ src/if.c        | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/if.h        |  27 ++++++++++++++
+ src/luasocket.c |   2 +
+ src/makefile    |   2 +
+ src/options.c   |   9 +++++
+ 5 files changed, 153 insertions(+)
+ create mode 100644 src/if.c
+ create mode 100644 src/if.h
+
+diff --git a/src/if.c b/src/if.c
+new file mode 100644
+index 0000000..db231aa
+--- /dev/null
++++ b/src/if.c
+@@ -0,0 +1,113 @@
++/*
++ * $Id: if.c $
++ *
++ * Author: Markus Stenberg <fingon@iki.fi>
++ *
++ * Copyright (c) 2012 cisco Systems, Inc.
++ *
++ * Created:       Tue Dec  4 14:50:34 2012 mstenber
++ * Last modified: Wed Dec  5 18:51:08 2012 mstenber
++ * Edit time:     24 min
++ *
++ */
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <net/if.h>
++
++#include "if.h"
++
++#include "lauxlib.h"
++
++static int if_global_indextoname(lua_State *L);
++static int if_global_nametoindex(lua_State *L);
++static int if_global_nameindex(lua_State *L);
++
++static luaL_Reg func[] = {
++    { "indextoname", if_global_indextoname},
++    { "nametoindex", if_global_nametoindex},
++    { "nameindex", if_global_nameindex},
++    { NULL, NULL}
++};
++
++int if_open(lua_State *L)
++{
++    lua_pushstring(L, "iface");
++    lua_newtable(L);
++    luaL_openlib(L, NULL, func, 0);
++    lua_settable(L, -3);
++    return 0;
++}
++
++int if_global_indextoname(lua_State *L)
++{
++  unsigned int ifnumber;
++  const char *name;
++  char buf[IF_NAMESIZE+1];
++
++  if (!lua_isnumber(L, 1))
++    {
++      lua_pushnil(L);
++      lua_pushstring(L, "indextoname expects only number argument");
++      return 2;
++    }
++  ifnumber = lua_tonumber(L, 1);
++  if (!(name = if_indextoname(ifnumber, buf)))
++    {
++      lua_pushnil(L);
++      lua_pushstring(L, "nonexistent interface");
++      return 2;
++    }
++  lua_pushstring(L, name);
++  return 1;
++}
++
++int if_global_nametoindex(lua_State *L)
++{
++  unsigned int ifnumber;
++  if (!lua_isstring(L, 1))
++    {
++      lua_pushnil(L);
++      lua_pushstring(L, "nametoindex expects only string argument");
++      return 2;
++    }
++  if (!(ifnumber = if_nametoindex(lua_tostring(L, 1))))
++    {
++      lua_pushnil(L);
++      lua_pushstring(L, "nonexistent interface");
++      return 2;
++    }
++  lua_pushnumber(L, ifnumber);
++  return 1;
++}
++
++int if_global_nameindex(lua_State *L)
++{
++  struct if_nameindex *ni, *oni;
++  int i = 1;
++  oni = ni = if_nameindex();
++  lua_newtable(L);
++  while (ni && ni->if_index && *(ni->if_name))
++    {
++      /* at result[i], we store.. */
++      lua_pushnumber(L, i);
++
++      /* new table with two items - index, name*/
++      lua_newtable(L);
++      lua_pushstring(L, "index");
++      lua_pushnumber(L, ni->if_index);
++      lua_settable(L, -3);
++
++      lua_pushstring(L, "name");
++      lua_pushstring(L, ni->if_name);
++      lua_settable(L, -3);
++
++      /* Then, actually store it */
++      lua_settable(L, -3);
++
++      i++;
++      ni++;
++    }
++  if_freenameindex(oni);
++  return 1;
++}
+diff --git a/src/if.h b/src/if.h
+new file mode 100644
+index 0000000..dc7faf8
+--- /dev/null
++++ b/src/if.h
+@@ -0,0 +1,27 @@
++/*
++ * $Id: if.h $
++ *
++ * Author: Markus Stenberg <fingon@iki.fi>
++ *
++ *  Copyright (c) 2012 cisco Systems, Inc.
++ *
++ * Created:       Tue Dec  4 14:37:24 2012 mstenber
++ * Last modified: Tue Dec  4 14:51:43 2012 mstenber
++ * Edit time:     7 min
++ *
++ */
++
++/* This module provides Lua wrapping for the advanced socket API
++ * defined in RFC3542, or mainly, the access to the system's interface
++ * list. It is necessary for use of recvmsg/sendmsg.
++ *
++ * TODO - Do something clever with Windows?
++ */
++#ifndef IF_H
++#define IF_H
++
++#include "lua.h"
++
++int if_open(lua_State *L);
++
++#endif /* IF_H */
+diff --git a/src/luasocket.c b/src/luasocket.c
+index e6ee747..85d41a6 100644
+--- a/src/luasocket.c
++++ b/src/luasocket.c
+@@ -31,6 +31,7 @@
+ #include "tcp.h"
+ #include "udp.h"
+ #include "select.h"
++#include "if.h"
+ 
+ /*-------------------------------------------------------------------------*\
+ * Internal function prototypes
+@@ -51,6 +52,7 @@ static const luaL_Reg mod[] = {
+     {"tcp", tcp_open},
+     {"udp", udp_open},
+     {"select", select_open},
++    {"iface", if_open},
+     {NULL, NULL}
+ };
+ 
+diff --git a/src/makefile b/src/makefile
+index 8d3521e..09d4882 100644
+--- a/src/makefile
++++ b/src/makefile
+@@ -262,6 +262,7 @@ SOCKET_OBJS= \
+ 	auxiliar.$(O) \
+ 	options.$(O) \
+ 	inet.$(O) \
++	if.$(O) \
+ 	$(SOCKET) \
+ 	except.$(O) \
+ 	select.$(O) \
+@@ -387,6 +388,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h
+ buffer.$(O): buffer.c buffer.h io.h timeout.h
+ except.$(O): except.c except.h
+ inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h
++if.$(O): if.c if.h
+ io.$(O): io.c io.h timeout.h
+ luasocket.$(O): luasocket.c luasocket.h auxiliar.h except.h \
+ 	timeout.h buffer.h io.h inet.h socket.h usocket.h tcp.h \
+diff --git a/src/options.c b/src/options.c
+index 8ac2a14..1c73e6f 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -3,6 +3,9 @@
+ * LuaSocket toolkit
+ \*=========================================================================*/
+ #include <string.h> 
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <net/if.h>
+ 
+ #include "lauxlib.h"
+ 
+@@ -285,6 +288,12 @@ static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name)
+     if (!lua_isnil(L, -1)) {
+         if (lua_isnumber(L, -1)) {
+             val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1);
++        } else if (lua_isstring(L, -1)) {
++            if (!(val.ipv6mr_interface = if_nametoindex(lua_tostring(L, -1)))) {
++                lua_pushnil(L);
++                lua_pushstring(L, "nonexistent interface");
++                return 2;
++            }
+         } else
+           luaL_argerror(L, -1, "number 'interface' field expected");
+     }
+-- 
+1.8.4.rc3
+

+ 118 - 0
lang/luasql/Makefile

@@ -0,0 +1,118 @@
+#
+# Copyright (C) 2010-2014 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:=luasql
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/keplerproject/luasql.git
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=docs/us/license.html
+PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luasql/Default
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua SQL binding
+  URL:=http://keplerproject.github.io/luasql/
+  DEPENDS:= +lua
+endef
+
+define Package/luasql/Default/description
+ LuaSQL is a simple interface from Lua to a DBMS.
+endef
+
+
+define Package/luasql-mysql
+$(call Package/luasql/Default)
+  TITLE+= for MySQL
+  DEPENDS+= +libmysqlclient
+  VARIANT:=mysql
+endef
+
+define Package/luasql-mysql/description
+$(call Package/luasql/Default/description)
+ .
+ This package contains the MySQL binding.
+endef
+
+
+define Package/luasql-pgsql
+$(call Package/luasql/Default)
+  TITLE+= for PostgreSQL
+  DEPENDS+= +libpq
+  VARIANT:=postgres
+endef
+
+define Package/luasql-pgsql/description
+$(call Package/luasql/Default/description)
+ .
+ This package contains the PostgreSQL binding.
+endef
+
+
+define Package/luasql-sqlite3
+$(call Package/luasql/Default)
+  TITLE+= for SQLite 3
+  DEPENDS+= +libsqlite3
+  VARIANT:=sqlite3
+endef
+
+define Package/luasql-sqlite3/description
+$(call Package/luasql/Default/description)
+ .
+ This package contains the SQLite 3 binding.
+endef
+
+
+TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_CPPFLAGS += -DLUA_USE_LINUX
+
+ifeq ($(BUILD_VARIANT),mysql)
+  TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql
+  TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz
+endif
+
+ifeq ($(BUILD_VARIANT),postgres)
+  TARGET_LDFLAGS += -lpq
+endif
+
+ifeq ($(BUILD_VARIANT),sqlite3)
+  TARGET_LDFLAGS += -lsqlite3 -lpthread
+endif
+
+MAKE_FLAGS += \
+	T="$(BUILD_VARIANT)" \
+	DRIVER_INCS="$(TARGET_CPPFLAGS)" \
+	DRIVER_LIBS="$(TARGET_LDFLAGS)" \
+	CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+	lib
+
+define Package/Install/Default
+	$(INSTALL_DIR) $(1)/usr/lib/lua/luasql
+	$(CP) $(PKG_BUILD_DIR)/src/*.so $(1)/usr/lib/lua/luasql/
+endef
+
+Package/luasql-mysql/install = $(Package/Install/Default)
+Package/luasql-pgsql/install = $(Package/Install/Default)
+Package/luasql-sqlite3/install = $(Package/Install/Default)
+
+$(eval $(call BuildPackage,luasql-mysql))
+$(eval $(call BuildPackage,luasql-pgsql))
+$(eval $(call BuildPackage,luasql-sqlite3))

+ 48 - 0
lang/lzmq/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2015 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:=lzmq
+PKG_VERSION:=0.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)?
+PKG_MD5SUM:=c4e51a60a5a26987bdce59e45d674a9e
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lzmq
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Lua ZeroMQ binding
+  URL:=https://github.com/moteus/lzmq/
+  DEPENDS:= +lua +libzmq
+endef
+
+define Package/lzmq/description
+ LZMQ is a Lua binding to ZeroMQ.
+endef
+
+CMAKE_OPTIONS += \
+	-DUSE_LUA=ON
+
+define Package/lzmq/install
+	$(INSTALL_DIR) $(1)/usr/lib/lua
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq.so $(1)/usr/lib/lua/
+
+	$(INSTALL_DIR) $(1)/usr/lib/lua/lzmq
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq/timer.so $(1)/usr/lib/lua/lzmq
+	$(CP) -R $(PKG_BUILD_DIR)/src/lua/lzmq/* $(1)/usr/lib/lua/lzmq
+endef
+
+$(eval $(call BuildPackage,lzmq))

+ 55 - 0
lang/micropython-lib/Makefile

@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2008-2015 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:=micropython-lib
+PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION)
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
+PKG_LICENSE:=MIT, PSFL
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
+PKG_SOURCE_VERSION:=f81e979c56dddb771ad36ec381b7f2c6cd12111f
+
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/micropython-lib
+    SUBMENU:=Python
+    SECTION:=lang
+    CATEGORY:=Languages
+    TITLE:=micropython-lib
+    URL:=https://github.com/micropython/micropython-lib
+    DEPENDS:=+micropython
+endef
+
+define Package/micropython-lib/description
+    This package contains micropython-lib, a project to develop a non-monolothic
+    standard library for Micro Python. Note that this is a work in progress and
+    several libraries may be missing, incomplete or buggy.
+endef
+
+MAKE_FLAGS:=\
+	-C $(PKG_BUILD_DIR) \
+	PREFIX=$(PKG_BUILD_DIR)/_install_tmp \
+	install
+
+define Package/micropython-lib/install
+	$(INSTALL_DIR) $(1)/usr/lib/micropython
+	$(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython
+endef
+
+$(eval $(call BuildPackage,micropython-lib))
+

+ 57 - 0
lang/micropython/Makefile

@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2008-2015 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:=micropython
+PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION)
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/micropython/micropython.git
+PKG_SOURCE_VERSION:=5a1d63fc14dae788f705403a43c2d8639b7dd9cd
+
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/micropython
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Micro Python
+  URL:=http://micropython.org
+  DEPENDS:=+libffi
+endef
+
+define Package/micropython/description
+ This package contains Micro Python, a lean and fast implementation of the Python 3.4 programming language
+ that is optimised to run on a microcontroller (and low power computers).
+endef
+
+
+MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix 
+
+define Build/Compile
+	$(call Build/Compile/Default,axtls) 
+	$(call Build/Compile/Default) 
+
+endef
+
+define Package/micropython/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython
+endef
+
+$(eval $(call BuildPackage,micropython))

+ 13 - 0
lang/micropython/patches/000-Makefile-no-errors

@@ -0,0 +1,13 @@
+Index: micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile
+===================================================================
+--- micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755.orig/unix/Makefile	2016-11-17 02:43:13.000000000 +0100
++++ micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile	2016-11-17 16:49:02.937809018 +0100
+@@ -21,7 +21,7 @@
+ INC += -I$(BUILD)
+ 
+ # compiler settings
+-CWARN = -Wall -Werror
++CWARN = -Wall
+ CWARN += -Wpointer-arith -Wuninitialized
+ CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
+ 

+ 68 - 0
lang/node-arduino-firmata/Makefile

@@ -0,0 +1,68 @@
+#
+# Copyright (C) 2014 Arduino LLC
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=arduino-firmata
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=0.3.3
+PKG_RELEASE:=5
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
+PKG_SOURCE_VERSION:=16e76007edf218d72df590adbd711ac6b7432845
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_NODE_VERSION:=4.4.5
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-arduino-firmata
+  DEPENDS:=+node
+  SUBMENU:=Node.js
+  SECTION:=lang
+  CATEGORY:=Languages
+  DEPENDS:=+node +node-serialport
+  TITLE:=Node.js package to access serial ports for reading and writing
+  URL:=https://www.npmjs.org/package/serialport
+endef
+
+define Package/node-arduino-firmata/description
+ Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
+endef
+
+define Build/Prepare
+	/bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
+	$(Build/Patch)
+endef
+
+EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+
+define Build/Compile
+	$(MAKE_FLAGS) \
+	npm_config_arch=$(CONFIG_ARCH) \
+	npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+	npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
+	PREFIX="$(PKG_INSTALL_DIR)/usr/" \
+	npm install -g $(PKG_BUILD_DIR)
+endef
+
+define Package/node-arduino-firmata/install
+	mkdir -p $(1)/usr/lib/node
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node
+	rm -rf $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ 
+	$(CP) ./files/* $(1)/
+endef
+
+$(eval $(call BuildPackage,node-arduino-firmata))
+

+ 306 - 0
lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js

@@ -0,0 +1,306 @@
+(function() {
+  'use strict';
+  var ArduinoFirmata, SerialPort, debug, events, exports, serialport,
+    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+    hasProp = {}.hasOwnProperty;
+
+  events = require('eventemitter2');
+
+  SerialPort = (serialport = require('serialport')).SerialPort;
+
+  debug = require('debug')('arduino-firmata');
+
+  exports = module.exports = ArduinoFirmata = (function(superClass) {
+    extend(ArduinoFirmata, superClass);
+
+    ArduinoFirmata.Status = {
+      CLOSE: 0,
+      OPEN: 1
+    };
+
+    ArduinoFirmata.INPUT = 0;
+
+    ArduinoFirmata.OUTPUT = 1;
+
+    ArduinoFirmata.ANALOG = 2;
+
+    ArduinoFirmata.PWM = 3;
+
+    ArduinoFirmata.SERVO = 4;
+
+    ArduinoFirmata.SHIFT = 5;
+
+    ArduinoFirmata.I2C = 6;
+
+    ArduinoFirmata.LOW = 0;
+
+    ArduinoFirmata.HIGH = 1;
+
+    ArduinoFirmata.MAX_DATA_BYTES = 32;
+
+    ArduinoFirmata.DIGITAL_MESSAGE = 0x90;
+
+    ArduinoFirmata.ANALOG_MESSAGE = 0xE0;
+
+    ArduinoFirmata.REPORT_ANALOG = 0xC0;
+
+    ArduinoFirmata.REPORT_DIGITAL = 0xD0;
+
+    ArduinoFirmata.SET_PIN_MODE = 0xF4;
+
+    ArduinoFirmata.REPORT_VERSION = 0xF9;
+
+    ArduinoFirmata.SYSTEM_RESET = 0xFF;
+
+    ArduinoFirmata.START_SYSEX = 0xF0;
+
+    ArduinoFirmata.END_SYSEX = 0xF7;
+
+    ArduinoFirmata.list = function(callback) {
+      return serialport.list(function(err, ports) {
+        var devices, j, len, port;
+        if (err) {
+          return callback(err);
+        }
+        devices = [];
+        for (j = 0, len = ports.length; j < len; j++) {
+          port = ports[j];
+          if (/usb|acm|com\d+/i.test(port.comName)) {
+            devices.push(port.comName);
+          }
+        }
+        return callback(null, devices);
+      });
+    };
+
+    function ArduinoFirmata() {
+      this.status = ArduinoFirmata.Status.CLOSE;
+      this.wait_for_data = 0;
+      this.execute_multi_byte_command = 0;
+      this.multi_byte_channel = 0;
+      this.stored_input_data = [];
+      this.parsing_sysex = false;
+      this.sysex_bytes_read = 0;
+      this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+      this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+      this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+      this.boardVersion = null;
+    }
+
+    ArduinoFirmata.prototype.isOldArduinoDevice = function() {
+      return /usbserial|USB/.test(this.serialport_name);
+    };
+
+    ArduinoFirmata.prototype.connect = function(serialport_name, opts) {
+      this.serialport_name = serialport_name;
+      if (opts == null) {
+        opts = {
+          baudrate: 57600
+        };
+      }
+      opts.parser = serialport.parsers.raw;
+      if (!this.serialport_name) {
+        ArduinoFirmata.list((function(_this) {
+          return function(err, devices) {
+            return _this.connect(devices[0], opts);
+          };
+        })(this));
+        return this;
+      }
+      this.once('boardReady', function() {
+        var io_init_wait;
+        debug('boardReady');
+        io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100);
+        debug("wait " + io_init_wait + "(msec)");
+        return setTimeout((function(_this) {
+          return function() {
+            var i, j, k;
+            for (i = j = 0; j < 6; i = ++j) {
+              _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
+            }
+            for (i = k = 0; k < 2; i = ++k) {
+              _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
+            }
+            debug('init IO ports');
+            return _this.emit('connect');
+          };
+        })(this), io_init_wait);
+      });
+      this.serialport = new SerialPort(this.serialport_name, opts);
+      this.serialport.once('open', (function(_this) {
+        return function() {
+          var cid;
+          cid = setInterval(function() {
+            debug('request REPORT_VERSION');
+            return _this.write([ArduinoFirmata.REPORT_VERSION]);
+          }, 500);
+          _this.once('boardVersion', function(version) {
+            clearInterval(cid);
+            _this.status = ArduinoFirmata.Status.OPEN;
+            return _this.emit('boardReady');
+          });
+          return _this.serialport.on('data', function(data) {
+            var byte, j, len, results;
+            results = [];
+            for (j = 0, len = data.length; j < len; j++) {
+              byte = data[j];
+              results.push(_this.process_input(byte));
+            }
+            return results;
+          });
+        };
+      })(this));
+      return this;
+    };
+
+    ArduinoFirmata.prototype.isOpen = function() {
+      return this.status === ArduinoFirmata.Status.OPEN;
+    };
+
+    ArduinoFirmata.prototype.close = function(callback) {
+      this.status = ArduinoFirmata.Status.CLOSE;
+      return this.serialport.close(callback);
+    };
+
+    ArduinoFirmata.prototype.reset = function(callback) {
+      return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
+    };
+
+    ArduinoFirmata.prototype.write = function(bytes, callback) {
+      return this.serialport.write(bytes, callback);
+    };
+
+    ArduinoFirmata.prototype.sysex = function(command, data, callback) {
+      var write_data;
+      if (data == null) {
+        data = [];
+      }
+      data = data.map(function(i) {
+        return i & 0x7f;
+      });
+      write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
+      return this.write(write_data, callback);
+    };
+
+    ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) {
+      switch (mode) {
+        case true:
+          mode = ArduinoFirmata.OUTPUT;
+          break;
+        case false:
+          mode = ArduinoFirmata.INPUT;
+      }
+      return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
+    };
+
+    ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) {
+      var port_num;
+      this.pinMode(pin, ArduinoFirmata.OUTPUT);
+      port_num = (pin >>> 3) & 0x0F;
+      if (value === 0 || value === false) {
+        this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
+      } else {
+        this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+      }
+      return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
+    };
+
+    ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) {
+      value = Math.floor(value);
+      this.pinMode(pin, ArduinoFirmata.PWM);
+      return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
+    };
+
+    ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) {
+      this.pinMode(pin, ArduinoFirmata.SERVO);
+      return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
+    };
+
+    ArduinoFirmata.prototype.digitalRead = function(pin) {
+      return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
+    };
+
+    ArduinoFirmata.prototype.analogRead = function(pin) {
+      return this.analog_input_data[pin];
+    };
+
+    ArduinoFirmata.prototype.process_input = function(input_data) {
+      var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
+      if (this.parsing_sysex) {
+        if (input_data === ArduinoFirmata.END_SYSEX) {
+          this.parsing_sysex = false;
+          sysex_command = this.stored_input_data[0];
+          sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
+          return this.emit('sysex', {
+            command: sysex_command,
+            data: sysex_data
+          });
+        } else {
+          this.stored_input_data[this.sysex_bytes_read] = input_data;
+          return this.sysex_bytes_read += 1;
+        }
+      } else if (this.wait_for_data > 0 && input_data < 128) {
+        this.wait_for_data -= 1;
+        this.stored_input_data[this.wait_for_data] = input_data;
+        if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
+          switch (this.execute_multi_byte_command) {
+            case ArduinoFirmata.DIGITAL_MESSAGE:
+              input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+              diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
+              this.digital_input_data[this.multi_byte_channel] = input_data;
+              if (this.listeners('digitalChange').length > 0) {
+                results = [];
+                for (i = j = 0; j <= 13; i = ++j) {
+                  if (((0x01 << i) & diff) > 0) {
+                    stat = (input_data & diff) > 0;
+                    results.push(this.emit('digitalChange', {
+                      pin: i + this.multi_byte_channel * 8,
+                      value: stat,
+                      old_value: !stat
+                    }));
+                  } else {
+                    results.push(void 0);
+                  }
+                }
+                return results;
+              }
+              break;
+            case ArduinoFirmata.ANALOG_MESSAGE:
+              analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+              old_analog_value = this.analogRead(this.multi_byte_channel);
+              this.analog_input_data[this.multi_byte_channel] = analog_value;
+              if (old_analog_value !== analog_value) {
+                return this.emit('analogChange', {
+                  pin: this.multi_byte_channel,
+                  value: analog_value,
+                  old_value: old_analog_value
+                });
+              }
+              break;
+            case ArduinoFirmata.REPORT_VERSION:
+              this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0];
+              return this.emit('boardVersion', this.boardVersion);
+          }
+        }
+      } else {
+        if (input_data < 0xF0) {
+          command = input_data & 0xF0;
+          this.multi_byte_channel = input_data & 0x0F;
+        } else {
+          command = input_data;
+        }
+        if (command === ArduinoFirmata.START_SYSEX) {
+          this.parsing_sysex = true;
+          return this.sysex_bytes_read = 0;
+        } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
+          this.wait_for_data = 2;
+          return this.execute_multi_byte_command = command;
+        }
+      }
+    };
+
+    return ArduinoFirmata;
+
+  })(events.EventEmitter2);
+
+}).call(this);

+ 10 - 0
lang/node-arduino-firmata/patches/000-new-serialport.patch

@@ -0,0 +1,10 @@
+--- a/package.json
++++ b/package.json
+@@ -30,7 +30,6 @@
+   "author": "Sho Hashimoto <hashimoto@shokai.org>",
+   "license": "MIT",
+   "dependencies": {
+-    "serialport": "*",
+     "eventemitter2": "*",
+     "debug": "*"
+   },

+ 99 - 0
lang/node-cylon/Makefile

@@ -0,0 +1,99 @@
+#
+# Copyright (C) 2014 Arduino LLC
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=cylon
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=0.22.0
+PKG_RELEASE:=5
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
+PKG_SOURCE_VERSION:=0c37da77e48b3e2cc3a8d566822a17689de91b40
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_NODE_VERSION:=4.4.5
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-cylon/default
+  DEPENDS:=+node $(2)
+  SUBMENU:=Node.js
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=CylonJS - $(1)
+  URL:=https://www.npmjs.org/package/cylon
+endef
+
+define Package/node-cylon
+  $(call Package/node-cylon/default,Core)
+endef
+
+define Package/node-cylon-i2c
+  $(call Package/node-cylon/default,I2C,+node-cylon)
+endef
+
+define Package/node-cylon-gpio
+  $(call Package/node-cylon/default,GPIO,+node-cylon)
+endef
+
+define Package/node-cylon-firmata
+  $(call Package/node-cylon/default,Firmata,+node-cylon-gpio +node-cylon-i2c +node-arduino-firmata)
+endef
+
+define Package/node-cylon/description
+	JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
+endef
+
+define Build/Prepare
+	/bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
+	$(Build/Patch)
+endef
+
+EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+
+define Build/Compile
+	$(MAKE_FLAGS) \
+	npm_config_arch=$(CONFIG_ARCH) \
+	npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+	npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
+	PREFIX="$(PKG_INSTALL_DIR)/usr/" \
+	npm install -g $(PKG_BUILD_DIR)
+endef
+
+define Package/node-cylon/install
+	mkdir -p $(1)/usr/lib/node/cylon
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/
+endef
+
+define Package/node-cylon-i2c/install
+	mkdir -p $(1)/usr/lib/node/cylon-i2c
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/
+endef
+
+define Package/node-cylon-gpio/install
+	mkdir -p $(1)/usr/lib/node/cylon-gpio
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/
+endef
+
+define Package/node-cylon-firmata/install
+	mkdir -p $(1)/usr/lib/node/cylon-firmata
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/
+endef
+
+$(eval $(call BuildPackage,node-cylon))
+$(eval $(call BuildPackage,node-cylon-i2c))
+$(eval $(call BuildPackage,node-cylon-gpio))
+$(eval $(call BuildPackage,node-cylon-firmata))
+

+ 12 - 0
lang/node-cylon/patches/0001-serialport.patch

@@ -0,0 +1,12 @@
+Index: node-cylon-0.22.0/package.json
+===================================================================
+--- node-cylon-0.22.0.orig/package.json	2015-10-20 20:32:48.000000000 +0200
++++ node-cylon-0.22.0/package.json	2015-10-21 10:42:20.616109122 +0200
+@@ -38,7 +38,6 @@
+   },
+ 
+   "dependencies": {
+-    "firmata":    ">= 0.3.2",
+     "cylon":      "1.1.0",
+     "cylon-gpio": "0.26.0",
+     "cylon-i2c":  "0.22.0"

+ 65 - 0
lang/node-hid/Makefile

@@ -0,0 +1,65 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=hid
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=0.5.1
+PKG_RELEASE:=5
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=35d830b7810c87d32484d0a346621568c4849441
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_NODE_VERSION:=4.4.5
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_LICENSE:=Custom
+PKG_LICENSE_FILES:=
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-hid
+  DEPENDS:=+node
+  SUBMENU:=Node.js
+  SECTION:=lang
+  CATEGORY:=Languages
+  DEPENDS:=+libusb-1.0 +hidapi +libstdcpp
+  TITLE:=Node.js package to access HID devices
+  URL:=https://github.com/node-hid/node-hid
+endef
+
+define Package/node-hid/description
+ Node.js package to access HID devices
+endef
+
+CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+
+EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
+
+define Build/Compile
+	git init $(PKG_BUILD_DIR)
+	$(MAKE_VARS) \
+	$(MAKE_FLAGS) \
+	npm_config_arch=$(CONFIG_ARCH) \
+	npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+	npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
+	PREFIX="$(PKG_INSTALL_DIR)/usr/" \
+	npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR)
+endef
+
+define Package/node-hid/install
+	mkdir -p $(1)/usr/lib/node/node-hid/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
+endef
+
+$(eval $(call BuildPackage,node-hid))
+

+ 65 - 0
lang/node-serialport/Makefile

@@ -0,0 +1,65 @@
+#
+# Copyright (C) 2014 Arduino LLC
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=serialport
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=3.0.0
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_MD5SUM:=ea20a17746dd64e72d5f6f2019d9e28d
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_NODE_VERSION:=4.4.5
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_LICENSE:=Custom
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-serialport
+  DEPENDS:=+node
+  SUBMENU:=Node.js
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Node.js package to access serial ports for reading and writing
+  URL:=https://www.npmjs.org/package/serialport
+endef
+
+define Package/node-serialport/description
+ Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
+endef
+
+define Build/Prepare
+	/bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
+	$(Build/Patch)
+endef
+
+CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+
+EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+
+define Build/Compile
+	$(MAKE_FLAGS) \
+	npm_config_arch=$(CONFIG_ARCH) \
+	npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+	npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
+	PREFIX="$(PKG_INSTALL_DIR)/usr/" \
+	npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR)
+endef
+
+define Package/node-serialport/install
+	mkdir -p $(1)/usr/lib/node/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
+endef
+
+$(eval $(call BuildPackage,node-serialport))
+

+ 94 - 0
lang/node/Makefile

@@ -0,0 +1,94 @@
+#
+# Copyright (C) 2006-2016 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:=node
+PKG_VERSION:=v4.4.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
+PKG_MD5SUM:=376140907bbe362f36065a30af04f020
+
+HOST_BUILD_DEPENDS:=python/host
+PKG_BUILD_DEPENDS:=python/host
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+HOST_BUILD_PARALLEL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_LICENSE:=
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Node.js
+  TITLE:=Node.js is a platform built on Chrome's JavaScript runtime
+  URL:=http://nodejs.org/
+  DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +zlib
+endef
+
+define Package/node/description
+  Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses
+  an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js'
+   package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
+endef
+
+CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))
+
+MAKE_VARS += \
+	DESTCPU=$(CPU)
+
+CONFIGURE_ARGS= \
+	--dest-cpu=$(CPU) \
+	--dest-os=linux \
+	--without-snapshot \
+	--shared-zlib \
+	--shared-openssl \
+	--prefix=/usr
+
+ifneq ($(findstring arm,$(ARCH)),)
+CONFIGURE_ARGS+= \
+	$(if $(CONFIG_SOFT_FLOAT),--with-arm-float-abi=soft,--with-arm-float-abi=hard)
+endif
+
+ifneq ($(findstring mips,$(ARCH)),)
+CONFIGURE_ARGS+= \
+	$(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft,--with-mips-float-abi=hard)
+endif
+
+HOST_CONFIGURE_VARS:=
+
+HOST_CONFIGURE_ARGS:= \
+	--dest-os=linux \
+	--without-snapshot \
+	--prefix=$(STAGING_DIR_HOSTPKG)
+
+HOST_CONFIGURE_CMD:=python ./configure
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)/usr/include
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+endef
+
+define Package/node/install
+	mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules}
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/{node,npm} $(1)/usr/bin/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(1)/usr/lib/node_modules/npm
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,node))

+ 12 - 0
lang/node/patches/001-hardfloat.patch

@@ -0,0 +1,12 @@
+diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc
+index 4f58720..1f3071e 100644
+--- a/deps/v8/src/base/cpu.cc
++++ b/deps/v8/src/base/cpu.cc
+@@ -143,6 +143,7 @@ int __detect_fp64_mode(void) {
+       ".set push\n\t"
+       ".set noreorder\n\t"
+       ".set oddspreg\n\t"
++      ".set hardfloat\n\t"
+       "lui $t0, 0x3FF0\n\t"
+       "ldc1 $f0, %0\n\t"
+       "mtc1 $t0, $f1\n\t"

+ 10 - 0
lang/node/patches/002-addr_info.patch

@@ -0,0 +1,10 @@
+--- a/deps/uv/src/unix/getaddrinfo.c
++++ b/deps/uv/src/unix/getaddrinfo.c
+@@ -99,6 +99,7 @@ static void uv__getaddrinfo_work(struct
+   int err;
+ 
+   req = container_of(w, uv_getaddrinfo_t, work_req);
++   req->hints->ai_flags &= ~AI_V4MAPPED;
+   err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
+   req->retcode = uv__getaddrinfo_translate_error(err);
+ }

+ 12 - 0
lang/node/patches/003-path.patch

@@ -0,0 +1,12 @@
+--- a/lib/module.js
++++ b/lib/module.js
+@@ -453,7 +453,8 @@ Module._initPaths = function() {
+     homeDir = process.env.HOME;
+   }
+ 
+-  var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
++  var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node'),
++    path.resolve(process.execPath, '..', '..', 'lib', 'node_modules')];
+ 
+   if (homeDir) {
+     paths.unshift(path.resolve(homeDir, '.node_libraries'));

+ 48 - 0
lang/openpyxl/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2016 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:=openpyxl
+PKG_VERSION:=2.4.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/7e/75/9bb309f80e4f75d139ecc55e9edf65c5844336b5a84966a609267255f961/
+PKG_MD5SUM:=e3376d1fce0681fd0b4047ab89218af4
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/openpyxl
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+  TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files
+  URL:=https://openpyxl.readthedocs.org/
+  DEPENDS:=+python +django
+endef
+
+define Package/openpyxl/description
+  A Python library to read/write Excel 2010 xlsx/xlsm files
+endef
+
+define Build/Compile
+	$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+endef
+
+define Package/openpyxl/install
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+	$(CP) \
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+	    $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call BuildPackage,openpyxl))

+ 52 - 0
lang/perl-cgi/Makefile

@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2016 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:=perl-cgi
+PKG_VERSION:=4.35
+PKG_RELEASE:=2
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
+PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=15e63942c02354426b25f056f2a4467c
+
+PKG_LICENSE:=GPL Artistic-2.0
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
+		Philip Prindeville <philipp@redfish-solutions.com>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION)
+
+# don't strip comments because that will mangle this module
+PKG_LEAVE_COMMENTS:=1
+
+include $(INCLUDE_DIR)/package.mk
+include ../perl/perlmod.mk
+
+define Package/perl-cgi
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Handle Common Gateway Interface requests and responses
+  URL:=http://search.cpan.org/dist/CGI/
+  DEPENDS:=perl +perl-html-parser +perlbase-base +perlbase-config +perlbase-encode +perlbase-essential +perlbase-file +perlbase-if +perlbase-utf8
+endef
+
+define Build/Configure
+        $(call perlmod/Configure,,)
+endef
+
+define Build/Compile
+        $(call perlmod/Compile,,)
+endef
+
+define Package/perl-cgi/install
+        $(call perlmod/Install,$(1),CGI CGI.pm auto/CGI)
+endef
+
+
+$(eval $(call BuildPackage,perl-cgi))

+ 48 - 0
lang/perl-compress-bzip2/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2014, 2015 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:=perl-compress-bzip2
+PKG_VERSION:=2.24
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/
+PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=d5ef04d1e51fe45743b3044abad967d2
+
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Compress-Bzip2-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../perl/perlmod.mk
+
+define Package/perl-compress-bzip2
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Perl interface to bzip2 compression library
+  URL:=http://search.cpan.org/dist/Compress-Bzip2/
+  DEPENDS:=perl +libbz2 +perlbase-autoloader +perlbase-config +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-getopt +perlbase-test +perlbase-xsloader
+endef
+
+define Build/Configure
+	$(call perlmod/Configure,,BUILD_BZLIB=0)
+endef
+
+define Build/Compile
+	$(call perlmod/Compile,,)
+endef
+
+define Package/perl-compress-bzip2/install
+	$(call perlmod/Install,$(1),Compress auto/Compress)
+endef
+
+
+$(eval $(call BuildPackage,perl-compress-bzip2))

+ 65 - 0
lang/perl-dbi/Makefile

@@ -0,0 +1,65 @@
+#
+# Copyright (C) 2014, 2015 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:=perl-dbi
+PKG_VERSION:=1.634
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
+PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=4ad15a9c2cc9b68e3fe1f5cadf9cdb30
+
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/DBI-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/DBI-$(PKG_VERSION)
+
+HOST_BUILD_DEPENDS:=perl/host
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../perl/perlmod.mk
+
+define Package/perl-dbi
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Database independent interface for Perl
+  URL:=http://search.cpan.org/dist/DBI/
+  DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-data +perlbase-dynaloader +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-io +perlbase-ipc +perlbase-scalar +perlbase-storable +perlbase-symbol +perlbase-tie +perlbase-universal +perlbase-utf8
+endef
+
+define Build/Configure
+	$(call perlmod/Configure,,)
+endef
+
+define Build/Compile
+	$(call perlmod/Compile,,)
+endef
+
+define Host/Configure
+	$(call perlmod/host/Configure,,)
+endef
+
+define Host/Compile
+	$(call perlmod/host/Compile,,)
+endef
+
+define Host/Install
+	$(call perlmod/host/Install,$(1),)
+endef
+
+define Package/perl-dbi/install
+	$(call perlmod/Install,$(1),DB* auto/DBI,DBI/W32ODBC.pm auto/DBI/*.h)
+endef
+
+
+$(eval $(call BuildPackage,perl-dbi))
+$(eval $(call HostBuild))

+ 53 - 0
lang/perl-device-serialport/Makefile

@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2014, 2015 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:=perl-device-serialport
+PKG_VERSION:=1.04
+PKG_RELEASE:=3
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CO/COOK/
+PKG_SOURCE:=Device-SerialPort-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=82c698151f934eb28c65d1838cee7d9e
+
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_MAINTAINER:=Paul Oranje <por@xs4all.nl>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-SerialPort-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../perl/perlmod.mk
+
+define Package/perl-device-serialport
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=A POSIX-based version of the Win32::SerialPort module
+  URL:=http://search.cpan.org/dist/Device-SerialPort/
+  DEPENDS:=perl +perlbase-essential +perlbase-io +perlbase-posix +perlbase-test +perlbase-xsloader
+endef
+
+define Package/perl-device-serialport/description
+  A POSIX-based version of the Win32::SerialPort module
+  that provides modem support to Perl applications
+endef
+
+define Build/Configure
+	$(call perlmod/Configure,,)
+endef
+
+define Build/Compile
+	$(call perlmod/Compile,,)
+endef
+
+define Package/perl-device-serialport/install
+        $(call perlmod/Install,$(1),Device auto/Device)
+endef
+
+
+$(eval $(call BuildPackage,perl-device-serialport))

+ 73 - 0
lang/perl-device-usb/Makefile

@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2015 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:=perl-device-usb
+PKG_VERSION:=0.36
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWADEJ/
+PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=aa91bee777f7ed7a18225a84f8795344
+
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-USB-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=perl-inline-c/host
+
+include $(INCLUDE_DIR)/package.mk
+include ../perl/perlmod.mk
+
+define Package/perl-device-usb
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=libusb library wrapper
+  URL:=http://search.cpan.org/dist/Device-USB/
+  DEPENDS:=perl +libusb-compat +perl-inline +perl-inline-c +perlbase-essential +perlbase-test
+endef
+
+# Device::USB will generate a second Makefile.PL to build it's native code
+# using Inline::C under _Inline/. The goal here is to prevent Inline::C from
+# running that one automatically, as we need to supply a bunch of overrides via
+# perlmod/Configure.
+# _INLINE_C_NO_COMPILE_ is an OpenWRT-specific environment variable to Inline::C
+# that does just that.
+define Build/Configure
+	$(call perlmod/Configure,,)
+	
+	# Prepare a library directory where we can link againt lusb-0.1(as
+	# opposed to -lusb) to avoid confusion at runtime
+	mkdir $(PKG_BUILD_DIR)/syslib
+	$(LN) $(STAGING_DIR)/usr/lib/libusb.so $(PKG_BUILD_DIR)/syslib/libusb-0.1.so
+	
+	# Generate _Inline
+	$(call perlmod/Compile,config,LIBUSB_LIBDIR=$(PKG_BUILD_DIR)/syslib \
+	                              _INLINE_C_NO_COMPILE_=1 \
+	                              _INLINE_C_SYSTEM_TYPEMAP_=$(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/ExtUtils/typemap)
+	$(call perlmod/Compile,dynamic,_INLINE_C_NO_COMPILE_=1)
+	
+	# Configure _Inline
+	$(call perlmod/Configure,,,$(PKG_BUILD_DIR)/_Inline/build/Device/USB)
+	
+	# Prevent re-configuring Inline code
+	sed 's/^dynamic :: D.*$$$$//' -i $(PKG_BUILD_DIR)/Makefile
+endef
+
+define Build/Compile
+	$(call perlmod/Compile,,,$(PKG_BUILD_DIR)/_Inline/build/Device/USB)
+	$(call perlmod/Compile,,)
+endef
+
+define Package/perl-device-usb/install
+        $(call perlmod/Install,$(1),Device auto/Device)
+endef
+
+
+$(eval $(call BuildPackage,perl-device-usb))

+ 8 - 0
lang/perl-device-usb/README.patches

@@ -0,0 +1,8 @@
+This package contains some patches taken directly from Debian Jessie(stable at 
+the time of writing). 
+Namely, these are:
+- 100-fix_buildsystem.patch
+- 110-just_assume_libusb_is_there.diff
+
+The other patches are specific to OpenWRT, fixing bugs and resolving conflicts
+where necessary.

+ 20 - 0
lang/perl-device-usb/patches/100-fix_buildsystem.patch

@@ -0,0 +1,20 @@
+Description: Ignore files we do not want installed.
+Forwarded: not-needed
+Author: Tim Retout <diocles@debian.org>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2013-10-28
+
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -2,6 +2,11 @@
+ use warnings;
+ use Inline::MakeMaker;
+ 
++sub MY::libscan {
++	return if ($_[1] eq 'USB.pm' or $_[1] eq 'dump_usb.pl');
++	return $_[1];
++}
++
+ if($^O eq 'MSWin32')
+ {
+     if(!$ENV{LIBUSB_LIBDIR} or !$ENV{LIBUSB_INCDIR})

+ 30 - 0
lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff

@@ -0,0 +1,30 @@
+Subject: Just assume libusb is out there
+ Makefile.PL should not try to check for libusb in a given list of directories
+ as the compiler might look in other places as well.
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/639677
+Forwarded: not-needed
+From: Ansgar Burchardt <ansgar@debian.org>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2013-10-28
+
+--- libdevice-usb-perl.orig/Makefile.PL
++++ libdevice-usb-perl/Makefile.PL
+@@ -21,7 +21,7 @@
+     }
+ }
+ 
+-unless(header_found())
++unless(1 || header_found())
+ {
+     die <<"END";
+ ERROR: Can't find usb.h header.
+@@ -36,7 +36,7 @@
+ END
+ }
+ 
+-unless(lib_found())
++unless(1 || lib_found())
+ {
+     die <<"END";
+ ERROR: Can't find libusb library.

+ 13 - 0
lang/perl-device-usb/patches/120-use_libusb_0_1.patch

@@ -0,0 +1,13 @@
+--- a/lib/Device/USB.pm
++++ b/lib/Device/USB.pm
+@@ -9,8 +9,8 @@ use Inline (
+         C => "DATA",
+         ($ENV{LIBUSB_LIBDIR}
+             ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " .
+-                        ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb') )
+-            : ( LIBS => '-lusb', )
++                        ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb-0.1') )
++            : ( LIBS => '-lusb-0.1', )
+         ),
+         ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ),
+         NAME => 'Device::USB',

+ 13 - 0
lang/perl-device-usb/patches/130-provide-proper-library-paths.patch

@@ -0,0 +1,13 @@
+--- a/lib/Device/USB.pm
++++ b/lib/Device/USB.pm
+@@ -8,8 +8,8 @@ use Carp;
+ use Inline (
+         C => "DATA",
+         ($ENV{LIBUSB_LIBDIR}
+-            ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " .
+-                        ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb-0.1') )
++            ? ( LIBS => "-L$ENV{LIBUSB_LIBDIR} " .
++                        ($^O eq 'MSWin32' ? ' -llibusb -L$ENV{WINDDK}\\lib\\crt\\i386 -lmsvcrt ' : '-lusb-0.1') )
+             : ( LIBS => '-lusb-0.1', )
+         ),
+         ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ),

+ 219 - 0
lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch

@@ -0,0 +1,219 @@
+--- a/lib/Device/USB.pm
++++ b/lib/Device/USB.pm
+@@ -15,6 +15,7 @@ use Inline (
+         ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ),
+         NAME => 'Device::USB',
+         VERSION => '0.36',
++        PREFIX => 'deviceusb_',
+    );
+ 
+ Inline->init();
+@@ -540,74 +541,74 @@ unsigned DeviceUSBDebugLevel()
+     return debugLevel;
+ }
+ 
+-void libusb_init()
++void deviceusb_libusb_init()
+ {
+     usb_init();
+ }
+ 
+-int libusb_find_busses()
++int deviceusb_libusb_find_busses()
+ {
+     return usb_find_busses();
+ }
+ 
+-int libusb_find_devices()
++int deviceusb_libusb_find_devices()
+ {
+     return usb_find_devices();
+ }
+ 
+-void *libusb_get_busses()
++void *deviceusb_libusb_get_busses()
+ {
+     return usb_get_busses();
+ }
+ 
+-void *libusb_open(void *dev)
++void *deviceusb_libusb_open(void *dev)
+ {
+     return usb_open( (struct usb_device*)dev );
+ }
+ 
+-int libusb_close(void *dev)
++int deviceusb_libusb_close(void *dev)
+ {
+     return usb_close((usb_dev_handle *)dev);
+ }
+ 
+-int libusb_set_configuration(void *dev, int configuration)
++int deviceusb_libusb_set_configuration(void *dev, int configuration)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_set_configuration( %d )\n", configuration );
++        printf( "deviceusb_libusb_set_configuration( %d )\n", configuration );
+     }
+     return usb_set_configuration((usb_dev_handle *)dev, configuration);
+ }
+ 
+-int libusb_set_altinterface(void *dev, int alternate)
++int deviceusb_libusb_set_altinterface(void *dev, int alternate)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_set_altinterface( %d )\n", alternate );
++        printf( "deviceusb_libusb_set_altinterface( %d )\n", alternate );
+     }
+     return usb_set_altinterface((usb_dev_handle *)dev, alternate);
+ }
+ 
+-int libusb_clear_halt(void *dev, unsigned int ep)
++int deviceusb_libusb_clear_halt(void *dev, unsigned int ep)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_clear_halt( %d )\n", ep );
++        printf( "deviceusb_libusb_clear_halt( %d )\n", ep );
+     }
+     return usb_clear_halt((usb_dev_handle *)dev, ep);
+ }
+ 
+-int libusb_reset(void *dev)
++int deviceusb_libusb_reset(void *dev)
+ {
+     return usb_reset((usb_dev_handle *)dev);
+ }
+ 
+-int libusb_get_driver_np(void *dev, int interface, char *name, unsigned int namelen)
++int deviceusb_libusb_get_driver_np(void *dev, int interface, char *name, unsigned int namelen)
+ {
+     int ret = 0;
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_get_driver_np( %d )\n", interface );
++        printf( "deviceusb_libusb_get_driver_np( %d )\n", interface );
+     }
+ #if LIBUSB_HAS_GET_DRIVER_NP
+     ret = usb_get_driver_np((usb_dev_handle *)dev, interface, name, namelen);
+@@ -618,11 +619,11 @@ int libusb_get_driver_np(void *dev, int
+ #endif
+ }
+ 
+-int libusb_detach_kernel_driver_np(void *dev, int interface)
++int deviceusb_libusb_detach_kernel_driver_np(void *dev, int interface)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_detach_kernel_driver_np( %d )\n", interface );
++        printf( "deviceusb_libusb_detach_kernel_driver_np( %d )\n", interface );
+     }
+ #if LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP
+     return usb_detach_kernel_driver_np((usb_dev_handle *)dev, interface);
+@@ -631,25 +632,25 @@ int libusb_detach_kernel_driver_np(void
+ #endif
+ }
+ 
+-int libusb_claim_interface(void *dev, int interface)
++int deviceusb_libusb_claim_interface(void *dev, int interface)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_claim_interface( %d )\n", interface );
++        printf( "deviceusb_libusb_claim_interface( %d )\n", interface );
+     }
+     return usb_claim_interface((usb_dev_handle *)dev, interface);
+ }
+ 
+-int libusb_release_interface(void *dev, int interface)
++int deviceusb_libusb_release_interface(void *dev, int interface)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_release_interface( %d )\n", interface );
++        printf( "deviceusb_libusb_release_interface( %d )\n", interface );
+     }
+     return usb_release_interface((usb_dev_handle *)dev, interface);
+ }
+ 
+-void libusb_control_msg(void *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout)
++void deviceusb_libusb_control_msg(void *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout)
+ {
+     int i = 0;
+     int retval = 0;
+@@ -658,7 +659,7 @@ void libusb_control_msg(void *dev, int r
+ 
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_control_msg( %#04x, %#04x, %#04x, %#04x, %p, %d, %d )\n",
++        printf( "deviceusb_libusb_control_msg( %#04x, %#04x, %#04x, %#04x, %p, %d, %d )\n",
+             requesttype, request, value, index, bytes, size, timeout
+         );
+         /* maybe need to add support for printing the bytes string. */
+@@ -691,54 +692,54 @@ void libusb_control_msg(void *dev, int r
+     Inline_Stack_Done;
+ }
+ 
+-int libusb_get_string(void *dev, int index, int langid, char *buf, size_t buflen)
++int deviceusb_libusb_get_string(void *dev, int index, int langid, char *buf, size_t buflen)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_get_string( %d, %d, %p, %lu )\n",
++        printf( "deviceusb_libusb_get_string( %d, %d, %p, %lu )\n",
+             index, langid, buf, (unsigned long)buflen
+         );
+     }
+     return usb_get_string((usb_dev_handle *)dev, index, langid, buf, buflen);
+ }
+ 
+-int libusb_get_string_simple(void *dev, int index, char *buf, size_t buflen)
++int deviceusb_libusb_get_string_simple(void *dev, int index, char *buf, size_t buflen)
+ {
+     if(DeviceUSBDebugLevel())
+     {
+-        printf( "libusb_get_string_simple( %d, %p, %lu )\n",
++        printf( "deviceusb_libusb_get_string_simple( %d, %p, %lu )\n",
+             index, buf, (unsigned long)buflen
+         );
+     }
+     return usb_get_string_simple((usb_dev_handle *)dev, index, buf, buflen);
+ }
+ 
+-int libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size)
++int deviceusb_libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size)
+ {
+     return usb_get_descriptor((usb_dev_handle *)dev, type, index, buf, size);
+ }
+ 
+-int libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size)
++int deviceusb_libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size)
+ {
+     return usb_get_descriptor_by_endpoint((usb_dev_handle *)dev, ep, type, index, buf, size);
+ }
+ 
+-int libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout)
++int deviceusb_libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout)
+ {
+     return usb_bulk_write((usb_dev_handle *)dev, ep, bytes, size, timeout);
+ }
+ 
+-int libusb_bulk_read(void *dev, int ep, char *bytes, int size, int timeout)
++int deviceusb_libusb_bulk_read(void *dev, int ep, char *bytes, int size, int timeout)
+ {
+     return usb_bulk_read((usb_dev_handle *)dev, ep, bytes, size, timeout);
+ }
+ 
+-int libusb_interrupt_write(void *dev, int ep, char *bytes, int size, int timeout)
++int deviceusb_libusb_interrupt_write(void *dev, int ep, char *bytes, int size, int timeout)
+ {
+     return usb_interrupt_write((usb_dev_handle *)dev, ep, bytes, size, timeout);
+ }
+ 
+-int libusb_interrupt_read(void *dev, int ep, char *bytes, int size, int timeout)
++int deviceusb_libusb_interrupt_read(void *dev, int ep, char *bytes, int size, int timeout)
+ {
+     return usb_interrupt_read((usb_dev_handle *)dev, ep, bytes, size, timeout);
+ }

+ 48 - 0
lang/perl-encode-locale/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2015 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:=perl-encode-locale
+PKG_VERSION:=1.05
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
+PKG_SOURCE:=Encode-Locale-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=fcfdb8e4ee34bcf62aed429b4a23db27
+
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Encode-Locale-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../perl/perlmod.mk
+
+define Package/perl-encode-locale
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Determine the locale encoding
+  URL:=http://search.cpan.org/dist/Encode-Locale/
+  DEPENDS:=perl +perlbase-base +perlbase-encode +perlbase-essential
+endef
+
+define Build/Configure
+        $(call perlmod/Configure,,)
+endef
+
+define Build/Compile
+        $(call perlmod/Compile,,)
+endef
+
+define Package/perl-encode-locale/install
+        $(call perlmod/Install,$(1),Encode auto/Encode)
+endef
+
+
+$(eval $(call BuildPackage,perl-encode-locale))

+ 48 - 0
lang/perl-file-listing/Makefile

@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2015 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:=perl-file-listing
+PKG_VERSION:=6.04
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS
+PKG_SOURCE:=File-Listing-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=83f636b477741f3a014585bb9cc079a6
+
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-Listing-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../perl/perlmod.mk
+
+define Package/perl-file-listing
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Parse directory listing
+  URL:=http://search.cpan.org/dist/File-Listing/
+  DEPENDS:=perl +perl-http-date +perlbase-essential
+endef
+
+define Build/Configure
+        $(call perlmod/Configure,,)
+endef
+
+define Build/Compile
+        $(call perlmod/Compile,,)
+endef
+
+define Package/perl-file-listing/install
+        $(call perlmod/Install,$(1),File auto/File)
+endef
+
+
+$(eval $(call BuildPackage,perl-file-listing))

+ 64 - 0
lang/perl-file-sharedir-install/Makefile

@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2015 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:=perl-file-sharedir-install
+PKG_VERSION:=0.10
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWYN
+PKG_SOURCE:=File-ShareDir-Install-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=37fb7fa72ce7184516dd022aba62f524
+
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/File-ShareDir-Install-$(PKG_VERSION)
+HOST_BUILD_DEPENDS:=perl/host
+PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-ShareDir-Install-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../perl/perlmod.mk
+
+define Package/perl-file-sharedir-install
+  SUBMENU:=Perl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Install read-only data files
+  URL:=http://search.cpan.org/dist/File-ShareDir-Install/
+  DEPENDS:=perl +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-io
+endef
+
+define Host/Configure
+        $(call perlmod/host/Configure,,,)
+endef
+
+define Host/Compile
+        $(call perlmod/host/Compile,,)
+endef
+
+define Host/Install
+        $(call perlmod/host/Install,$(1),)
+endef
+
+define Build/Configure
+        $(call perlmod/Configure,,)
+endef
+
+define Build/Compile
+        $(call perlmod/Compile,,)
+endef
+
+define Package/perl-file-sharedir-install/install
+        $(call perlmod/Install,$(1),File auto/File)
+endef
+
+
+$(eval $(call BuildPackage,perl-file-sharedir-install))
+$(eval $(call HostBuild))

Some files were not shown because too many files changed in this diff