summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlastair Feille2016-08-27 19:16:05 -0500
committerAlastair Feille2016-08-27 19:16:05 -0500
commit3f1530189d2f77ed3d57e56057deca38a8d10fa2 (patch)
tree999262bfc45991d080abd8d063744aa089460aec
downloadaur-3f1530189d2f77ed3d57e56057deca38a8d10fa2.tar.gz
Initial commit
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD34
-rw-r--r--lua.patch36
-rw-r--r--ssl.patch11
4 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8c0a6f198b02
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = wget-lua
+ pkgdesc = Wget with Lua scripting
+ pkgver = 1.14
+ pkgrel = 1
+ url = http://archiveteam.org/index.php?title=Wget_with_Lua_hooks
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = perl
+ depends = openssl
+ depends = libidn
+ depends = pcre
+ depends = lua
+ optdepends = ca-certificates: HTTPS Downloads
+ provides = wget-lua
+ source = http://warriorhq.archiveteam.org/downloads/wget-lua/wget-1.14.lua.LATEST.tar.bz2
+ source = lua.patch
+ source = ssl.patch
+ sha1sums = 3fdc939d7b66c5f0fa0bf00b366ec01a4b306afa
+ sha1sums = 3f9d9f483fb0435624faa8d51e7171b11b3542cb
+ sha1sums = 7e06d0272f90325c46b4ef609dce7c471342f077
+
+pkgname = wget-lua
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7f61b1524f79
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Alastair Feille <me@alastair.se>
+
+pkgname=wget-lua
+pkgver=1.14
+pkgrel=1
+pkgdesc="Wget with Lua scripting"
+url="http://archiveteam.org/index.php?title=Wget_with_Lua_hooks"
+license=('GPL')
+depends=('openssl' 'libidn' 'pcre' 'lua')
+optdepends=("ca-certificates: HTTPS Downloads")
+makedepends=('git' 'perl')
+provides=('wget-lua')
+arch=('i686' 'x86_64')
+source=("http://warriorhq.archiveteam.org/downloads/wget-lua/wget-1.14.lua.LATEST.tar.bz2"
+ "lua.patch"
+ "ssl.patch")
+sha1sums=('3fdc939d7b66c5f0fa0bf00b366ec01a4b306afa'
+ '3f9d9f483fb0435624faa8d51e7171b11b3542cb'
+ '7e06d0272f90325c46b4ef609dce7c471342f077')
+build() {
+ cd "$srcdir"/wget-1.14.lua.20*/
+ patch -p0 -i $srcdir/lua.patch
+ patch -p0 -i $srcdir/ssl.patch
+
+ ./configure --with-ssl=openssl --disable-nls
+ make
+}
+
+package() {
+ cd "$srcdir"/wget-1.14.lua.20*/src
+ mkdir -p "$pkgdir/usr/bin/"
+ cp wget "$pkgdir/usr/bin/wget-lua"
+}
+
diff --git a/lua.patch b/lua.patch
new file mode 100644
index 000000000000..d71bbd768293
--- /dev/null
+++ b/lua.patch
@@ -0,0 +1,36 @@
+--- src/luahooks.c.1 2013-05-02 20:30:23.000000000 +0000
++++ src/luahooks.c 2013-08-29 05:24:54.088977360 +0000
+@@ -24,6 +24,16 @@
+
+ static lua_State *lua;
+
++static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize)
++{
++ if (nsize == 0) {
++ free(ptr);
++ return NULL;
++ } else {
++ return realloc(ptr, nsize);
++ }
++}
++
+ static luahook_action_t
+ string_to_luahook_action (const char * s)
+ {
+@@ -144,7 +154,7 @@
+ if (opt.lua_filename == NULL)
+ return;
+
+- lua = lua_open ();
++ lua = lua_newstate (l_alloc, NULL);
+ luaL_openlibs (lua);
+
+ /* Initialize constants. */
+@@ -460,7 +470,7 @@
+ return NULL;
+
+ /* Copy to the buffer. */
+- size_t ret_l = lua_strlen(lua, -1);
++ size_t ret_l = lua_rawlen(lua, -1);
+ ret_l = (ret_l <= MAX_HOST_LENGTH) ? ret_l : MAX_HOST_LENGTH;
+ strncpy (lookup_host_result, ret, ret_l);
diff --git a/ssl.patch b/ssl.patch
new file mode 100644
index 000000000000..b90d18f370c0
--- /dev/null
+++ b/ssl.patch
@@ -0,0 +1,11 @@
+--- src/openssl.c.old 2016-08-27 19:05:16.656510223 -0500
++++ src/openssl.c 2016-08-27 18:54:53.263219445 -0500
+@@ -192,7 +192,7 @@
+ break;
+ #endif
+ case secure_protocol_sslv3:
+- meth = SSLv3_client_method ();
++ meth = SSLv2_client_method ();
+ break;
+ case secure_protocol_tlsv1:
+ meth = TLSv1_client_method ();