From e386c652d1d752aaebf0f9921cf54bbe79042c33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 20 Jul 2015 16:56:57 +0200
Subject: [PATCH] shellinabox: add parrallel version from
 https://github.com/shellinabox/shellinabox

Interesting new features:
 * unix domain support
 * copy & paste with browser integration (Ctrl+C, Paste from browser in
 * popup)
 * warn before closing
 * fix bug when zooming from browser

For compatibility, the new shellinabox is named 'shellinabox-github'.
The previous component with ipv6 support is kept as 'shellinabox-2.10'
and is still the default when using 'shellinabox'
---
 component/shellinabox/buildout.cfg | 32 ++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/component/shellinabox/buildout.cfg b/component/shellinabox/buildout.cfg
index b6e9f9916..4498084e6 100644
--- a/component/shellinabox/buildout.cfg
+++ b/component/shellinabox/buildout.cfg
@@ -3,19 +3,47 @@ extends =
   ../zlib/buildout.cfg
   ../openssl/buildout.cfg
   ../patch/buildout.cfg
+  ../automake/buildout.cfg
+  ../autoconf/buildout.cfg
+  ../libtool/buildout.cfg
+  ../git/buildout.cfg
 
 parts = shellinabox
 
 [shellinabox]
+<= shellinabox-2.10
+
+[shellinabox-common]
 recipe = slapos.recipe.cmmi
-url = http://shellinabox.googlecode.com/files/shellinabox-2.10.tar.gz
-md5sum = 0e144910d85d92edc54702ab9c46f032
 environment =
     CFLAGS = -I${zlib:location}/include -I${openssl:location}/include
     LDFLAGS = -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib
     PKG_CONFIG_PATH = ${openssl:location}/lib/pkgconfig/
+
+[shellinabox-2.10]
+; This version is old, but we patch it for IPv6 support
+<= shellinabox-common
+url = http://shellinabox.googlecode.com/files/shellinabox-2.10.tar.gz
+md5sum = 0e144910d85d92edc54702ab9c46f032
 patch-binary = ${patch:location}/bin/patch
 patch-options = -p1
 patches =
     ${:_profile_base_location_}/0001-Switch-to-IPv6.patch#b61cb099c00e15a5fcaf6c98134fff45
     ${:_profile_base_location_}/0002-Allow-to-run-entire-command-path.patch#a506b4d83021e24c830f767501c1d3fc
+
+[shellinabox-git-repository]
+; This version has much more features, but does not support IPv6 (support unix domain though)
+recipe = slapos.recipe.build:gitclone
+repository = https://github.com/shellinabox/shellinabox
+revision = 458cd7aa8f513f41f7eee389fa5ff6a51acea593
+git-executable = ${git:location}/bin/git
+
+[shellinabox-github]
+<= shellinabox-common
+path = ${shellinabox-git-repository:location}
+configure-command =
+  ${libtool:location}/bin/libtoolize
+  ${autoconf:location}/bin/autoreconf -vif
+  ./configure
+environment =
+  PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:%(PATH)s
-- 
2.30.9