lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

On 28.09.18 14:52, Luiz Henrique de Figueiredo wrote:
> Attached is limath-100-1.rockspec, for the math library at
> http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#limath

attached is a simple rockspec that can build "limath" with luarocks's builtin
build type.

As demonstration I set up a github repository with travis and appveyor builds
that are showing that this rockspecs builds fine and the tests are running OK
for Linux, Mac OS, Windows MSVC & Windows MINGW using luarocks 2.4.4 and 3.0.2,
for Lua versions 5.1, 5.2, 5.3, luajit 2.0 & 2.1, see
https://github.com/osch/lua-limath-test

> Will it work for both LuaRocks 2 and 3? Does it need to?

IMHO it's better also to support LuaRocks 2 since it is still used in many Linux
distros, therefore I removed description.labels and rockspec_format = "3.0" to
remain backwards compatible.

Best regards,
Oliver
package = "limath"

version = "100-1"

source = {
	url = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/ar/limath-100.tar.gz";,
	md5 = "9787b02273ed95865d6f59024faca999",
}

description = {
	summary = "An arbitrary precision integer library",
	detailed = "limath is an arbitrary precision integer library for Lua based on imath.",
	homepage = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#limath";,
	license = "public domain/MIT + MIT",
}


dependencies = {
	"lua >= 5.1",
}

build = {
	type = "builtin",
	modules = {
	    imath = {
	        sources = {
	            "limath.c",
	            "src/imath.c"
	        },
	        incdirs = {
	            "src"
	        }
	    }
	}
}