luarocks: Add patch and mark platform-independent
authorFredrik Fornwall <fredrik@fornwall.net>
Wed, 18 Jan 2017 00:45:10 +0000 (01:45 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Wed, 18 Jan 2017 00:45:10 +0000 (01:45 +0100)
packages/luarocks/build.sh
packages/luarocks/configure.patch [new file with mode: 0644]

index 772ae2c..3d139e3 100644 (file)
@@ -2,8 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://luarocks.org/
 TERMUX_PKG_DESCRIPTION="Deployment and management system for Lua modules"
 TERMUX_PKG_VERSION=2.4.2
 TERMUX_PKG_SRCURL=https://luarocks.org/releases/luarocks-${TERMUX_PKG_VERSION}.tar.gz
+TERMUX_PKG_SHA256=0e1ec34583e1b265e0fbafb64c8bd348705ad403fe85967fd05d3a659f74d2e5
 TERMUX_PKG_DEPENDS="curl, lua"
 TERMUX_PKG_BUILD_IN_SRC=yes
+TERMUX_PKG_PLATFORM_INDEPENDENT=yes
 
 termux_step_configure () {
        ./configure --prefix=$TERMUX_PREFIX \
diff --git a/packages/luarocks/configure.patch b/packages/luarocks/configure.patch
new file mode 100644 (file)
index 0000000..ed4c8dd
--- /dev/null
@@ -0,0 +1,30 @@
+diff -u -r ../luarocks-2.4.2/configure ./configure
+--- ../luarocks-2.4.2/configure        2016-11-30 13:49:34.000000000 +0100
++++ ./configure        2017-01-18 01:34:32.289341721 +0100
+@@ -305,26 +305,6 @@
+    }
+ fi
+-if [ "$lua_interp_found" != "yes" ]
+-then
+-   [ "$LUA_VERSION_SET" ] && { interp="Lua $LUA_VERSION" ;} || { interp="Lua" ;}
+-   [ "$LUA_DIR_SET" -o "$LUA_BINDIR_SET" ] && { where="$LUA_BINDIR" ;} || { interp="\$PATH" ;}
+-   echo "$interp interpreter not found in $where"
+-   die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-suffix. See --help."
+-fi
+-
+-if [ "$LUA_VERSION_SET" = "yes" ]
+-then
+-   echo_n "Checking if $LUA_BINDIR/lua$LUA_SUFFIX is Lua version $LUA_VERSION... "
+-   if detect_lua_version "$LUA_BINDIR/lua$LUA_SUFFIX"
+-   then
+-      echo "yes"
+-   else
+-      echo "no"
+-      die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-suffix. See --help."
+-   fi
+-fi
+-
+ if [ "$LUA_INCDIR_SET" != "yes" ]
+ then
+    LUA_INCDIR="$LUA_DIR/include"