Skip to content

Commit 66866c6

Browse files
committed
rockspecs
1 parent ca650e1 commit 66866c6

File tree

6 files changed

+222
-0
lines changed

6 files changed

+222
-0
lines changed

rockspecs/lpugl-0.0.1-1.rockspec

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package = "lpugl"
2+
version = "0.0.1-1"
3+
local versionNumber = version:gsub("^(.*)-.-$", "%1")
4+
source = {
5+
url = "https://github.com/osch/lua-lpugl/archive/v"..versionNumber..".zip",
6+
dir = "lua-lpugl-"..versionNumber,
7+
}
8+
description = {
9+
summary = "Minimal API for building GUIs",
10+
homepage = "https://github.com/osch/lua-lpugl",
11+
license = "MIT/X11",
12+
detailed = [[
13+
LPugl is a minimal portable Lua-API for building GUIs.
14+
Currently there are two drawing backends available,
15+
see packages "lpugl_cairo" and "lpugl_opengl".
16+
Supported platforms: X11, Windows and Mac OS X.
17+
LPugl is based on Pugl, a minimal portable API for embeddable GUIs,
18+
see: https://drobilla.net/software/pugl
19+
]],
20+
}
21+
dependencies = {
22+
"lua >= 5.1, <= 5.4",
23+
"luarocks-build-extended"
24+
}
25+
build = {
26+
type = "extended",
27+
platforms = {
28+
linux = {
29+
modules = {
30+
lpugl = {
31+
libraries = { "pthread", "X11" },
32+
}
33+
}
34+
},
35+
windows = {
36+
modules = {
37+
lpugl = {
38+
libraries = { "kernel32", "gdi32", "user32" },
39+
}
40+
}
41+
},
42+
macosx = {
43+
modules = {
44+
lpugl = {
45+
sources = { "src/pugl.m" },
46+
variables = {
47+
LIBFLAG_EXTRAS = { "-framework", "Cocoa" }
48+
}
49+
}
50+
}
51+
},
52+
},
53+
modules = {
54+
lpugl = {
55+
sources = { "src/pugl.c",
56+
"src/async_util.c",
57+
"src/error.c",
58+
"src/lpugl.c",
59+
"src/lpugl_compat.c",
60+
"src/util.c",
61+
"src/view.c",
62+
"src/world.c" },
63+
defines = {
64+
"LPUGL_VERSION="..version:gsub("^(.*)-.-$", "%1"),
65+
"LPUGL_BUILD_DATE=$(BUILD_DATE)"
66+
},
67+
incdirs = { "pugl-repo/include", "." },
68+
libdirs = { },
69+
},
70+
}
71+
}
File renamed without changes.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
package = "lpugl_cairo"
2+
version = "0.0.1-1"
3+
local versionNumber = version:gsub("^(.*)-.-$", "%1")
4+
source = {
5+
url = "https://github.com/osch/lua-lpugl/archive/v"..versionNumber..".zip",
6+
dir = "lua-lpugl-"..versionNumber,
7+
}
8+
description = {
9+
summary = "Cairo backend for LPugl, a minimal API for building GUIs",
10+
homepage = "https://github.com/osch/lua-lpugl",
11+
license = "MIT/X11",
12+
detailed = [[
13+
LPugl is a minimal portable Lua-API for building GUIs.
14+
Supported platforms: X11, Windows and Mac OS X.
15+
LPugl is based on Pugl, a minimal portable API for embeddable GUIs,
16+
see: https://drobilla.net/software/pugl
17+
]],
18+
}
19+
dependencies = {
20+
"lua >= 5.1, <= 5.4",
21+
"luarocks-build-extended",
22+
"lpugl", "oocairo"
23+
}
24+
external_dependencies = {
25+
CAIRO = {
26+
header = "cairo/cairo.h",
27+
library = "cairo",
28+
}
29+
}
30+
build = {
31+
type = "extended",
32+
platforms = {
33+
linux = {
34+
modules = {
35+
["lpugl_cairo"] = {
36+
libraries = { "cairo", "pthread" },
37+
}
38+
}
39+
},
40+
windows = {
41+
modules = {
42+
["lpugl_cairo"] = {
43+
libraries = { "cairo", "kernel32", "gdi32", "user32" },
44+
}
45+
}
46+
},
47+
macosx = {
48+
modules = {
49+
["lpugl_cairo"] = {
50+
sources = { "src/pugl_cairo.m" },
51+
libraries = { "cairo" },
52+
variables = {
53+
LIBFLAG_EXTRAS = {
54+
"-framework", "Cocoa"
55+
}
56+
}
57+
}
58+
}
59+
},
60+
},
61+
modules = {
62+
["lpugl_cairo"] = {
63+
sources = { "src/pugl_cairo.c",
64+
"src/lpugl_cairo.c",
65+
"src/lpugl_compat.c" },
66+
defines = {
67+
"LPUGL_VERSION="..version:gsub("^(.*)-.-$", "%1"),
68+
"LPUGL_BUILD_DATE=$(BUILD_DATE)"
69+
},
70+
incdirs = { "pugl-repo/include", ".", "$(CAIRO_INCDIR)/cairo" },
71+
libdirs = { "$(CAIRO_LIBDIR)" },
72+
},
73+
}
74+
}
File renamed without changes.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
package = "lpugl_opengl"
2+
version = "0.0.1-1"
3+
local versionNumber = version:gsub("^(.*)-.-$", "%1")
4+
source = {
5+
url = "https://github.com/osch/lua-lpugl/archive/v"..versionNumber..".zip",
6+
dir = "lua-lpugl-"..versionNumber,
7+
}
8+
description = {
9+
summary = "OpenGL backend for LPugl, a minimal API for building GUIs",
10+
homepage = "https://github.com/osch/lua-lpugl",
11+
license = "MIT/X11",
12+
detailed = [[
13+
LPugl is a minimal portable Lua-API for building GUIs.
14+
Supported platforms: X11, Windows and Mac OS X.
15+
LPugl is based on Pugl, a minimal portable API for embeddable GUIs,
16+
see: https://drobilla.net/software/pugl
17+
]],
18+
}
19+
dependencies = {
20+
"lua >= 5.1, <= 5.4",
21+
"luarocks-build-extended",
22+
"lpugl",
23+
}
24+
build = {
25+
type = "extended",
26+
27+
external_dependencies = {
28+
GL = { header = "GL/gl.h" },
29+
},
30+
platforms = {
31+
linux = {
32+
modules = {
33+
["lpugl_opengl"] = {
34+
libraries = { "GL", "pthread" },
35+
}
36+
}
37+
},
38+
windows = {
39+
modules = {
40+
["lpugl_opengl"] = {
41+
libraries = { "opengl32", "kernel32", "gdi32", "user32" },
42+
}
43+
}
44+
},
45+
macosx = {
46+
external_dependencies = {
47+
-- for Mac OS: OpenGL headers are under "$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks/OpenGL.framework/Headers"
48+
-- (e.g. /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers)
49+
-- They must be included using "OpenGL/gl.h" and cannot be found by luarocks in the file system
50+
GL = { header = false },
51+
},
52+
modules = {
53+
["lpugl_opengl"] = {
54+
sources = { "src/pugl_opengl.m" },
55+
variables = {
56+
LIBFLAG_EXTRAS = { "-framework", "Cocoa",
57+
"-framework", "OpenGL",
58+
}
59+
}
60+
}
61+
}
62+
},
63+
},
64+
modules = {
65+
["lpugl_opengl"] = {
66+
sources = { "src/pugl_opengl.c",
67+
"src/lpugl_opengl.c",
68+
"src/lpugl_compat.c" },
69+
defines = {
70+
"LPUGL_VERSION="..version:gsub("^(.*)-.-$", "%1"),
71+
"LPUGL_BUILD_DATE=$(BUILD_DATE)"
72+
},
73+
incdirs = { "pugl-repo/include", ".", "$(GL_INCDIR)" },
74+
libdirs = { "$(GL_LIBDIR)" },
75+
},
76+
}
77+
}
File renamed without changes.

0 commit comments

Comments
 (0)