From 66866c69cb1453db2642f976933c2b3f22addc79 Mon Sep 17 00:00:00 2001 From: osch Date: Sun, 1 Aug 2021 17:49:33 +0200 Subject: [PATCH] rockspecs --- rockspecs/lpugl-0.0.1-1.rockspec | 71 +++++++++++++++++ .../lpugl-scm-0.rockspec | 0 rockspecs/lpugl_cairo-0.0.1-1.rockspec | 74 ++++++++++++++++++ .../lpugl_cairo-scm-0.rockspec | 0 rockspecs/lpugl_opengl-0.0.1-1.rockspec | 77 +++++++++++++++++++ .../lpugl_opengl-scm-0.rockspec | 0 6 files changed, 222 insertions(+) create mode 100644 rockspecs/lpugl-0.0.1-1.rockspec rename lpugl-scm-0.rockspec => rockspecs/lpugl-scm-0.rockspec (100%) create mode 100644 rockspecs/lpugl_cairo-0.0.1-1.rockspec rename lpugl_cairo-scm-0.rockspec => rockspecs/lpugl_cairo-scm-0.rockspec (100%) create mode 100644 rockspecs/lpugl_opengl-0.0.1-1.rockspec rename lpugl_opengl-scm-0.rockspec => rockspecs/lpugl_opengl-scm-0.rockspec (100%) diff --git a/rockspecs/lpugl-0.0.1-1.rockspec b/rockspecs/lpugl-0.0.1-1.rockspec new file mode 100644 index 0000000..955851c --- /dev/null +++ b/rockspecs/lpugl-0.0.1-1.rockspec @@ -0,0 +1,71 @@ +package = "lpugl" +version = "0.0.1-1" +local versionNumber = version:gsub("^(.*)-.-$", "%1") +source = { + url = "https://github.com/osch/lua-lpugl/archive/v"..versionNumber..".zip", + dir = "lua-lpugl-"..versionNumber, +} +description = { + summary = "Minimal API for building GUIs", + homepage = "https://github.com/osch/lua-lpugl", + license = "MIT/X11", + detailed = [[ + LPugl is a minimal portable Lua-API for building GUIs. + Currently there are two drawing backends available, + see packages "lpugl_cairo" and "lpugl_opengl". + Supported platforms: X11, Windows and Mac OS X. + LPugl is based on Pugl, a minimal portable API for embeddable GUIs, + see: https://drobilla.net/software/pugl + ]], +} +dependencies = { + "lua >= 5.1, <= 5.4", + "luarocks-build-extended" +} +build = { + type = "extended", + platforms = { + linux = { + modules = { + lpugl = { + libraries = { "pthread", "X11" }, + } + } + }, + windows = { + modules = { + lpugl = { + libraries = { "kernel32", "gdi32", "user32" }, + } + } + }, + macosx = { + modules = { + lpugl = { + sources = { "src/pugl.m" }, + variables = { + LIBFLAG_EXTRAS = { "-framework", "Cocoa" } + } + } + } + }, + }, + modules = { + lpugl = { + sources = { "src/pugl.c", + "src/async_util.c", + "src/error.c", + "src/lpugl.c", + "src/lpugl_compat.c", + "src/util.c", + "src/view.c", + "src/world.c" }, + defines = { + "LPUGL_VERSION="..version:gsub("^(.*)-.-$", "%1"), + "LPUGL_BUILD_DATE=$(BUILD_DATE)" + }, + incdirs = { "pugl-repo/include", "." }, + libdirs = { }, + }, + } +} diff --git a/lpugl-scm-0.rockspec b/rockspecs/lpugl-scm-0.rockspec similarity index 100% rename from lpugl-scm-0.rockspec rename to rockspecs/lpugl-scm-0.rockspec diff --git a/rockspecs/lpugl_cairo-0.0.1-1.rockspec b/rockspecs/lpugl_cairo-0.0.1-1.rockspec new file mode 100644 index 0000000..3599114 --- /dev/null +++ b/rockspecs/lpugl_cairo-0.0.1-1.rockspec @@ -0,0 +1,74 @@ +package = "lpugl_cairo" +version = "0.0.1-1" +local versionNumber = version:gsub("^(.*)-.-$", "%1") +source = { + url = "https://github.com/osch/lua-lpugl/archive/v"..versionNumber..".zip", + dir = "lua-lpugl-"..versionNumber, +} +description = { + summary = "Cairo backend for LPugl, a minimal API for building GUIs", + homepage = "https://github.com/osch/lua-lpugl", + license = "MIT/X11", + detailed = [[ + LPugl is a minimal portable Lua-API for building GUIs. + Supported platforms: X11, Windows and Mac OS X. + LPugl is based on Pugl, a minimal portable API for embeddable GUIs, + see: https://drobilla.net/software/pugl + ]], +} +dependencies = { + "lua >= 5.1, <= 5.4", + "luarocks-build-extended", + "lpugl", "oocairo" +} +external_dependencies = { + CAIRO = { + header = "cairo/cairo.h", + library = "cairo", + } +} +build = { + type = "extended", + platforms = { + linux = { + modules = { + ["lpugl_cairo"] = { + libraries = { "cairo", "pthread" }, + } + } + }, + windows = { + modules = { + ["lpugl_cairo"] = { + libraries = { "cairo", "kernel32", "gdi32", "user32" }, + } + } + }, + macosx = { + modules = { + ["lpugl_cairo"] = { + sources = { "src/pugl_cairo.m" }, + libraries = { "cairo" }, + variables = { + LIBFLAG_EXTRAS = { + "-framework", "Cocoa" + } + } + } + } + }, + }, + modules = { + ["lpugl_cairo"] = { + sources = { "src/pugl_cairo.c", + "src/lpugl_cairo.c", + "src/lpugl_compat.c" }, + defines = { + "LPUGL_VERSION="..version:gsub("^(.*)-.-$", "%1"), + "LPUGL_BUILD_DATE=$(BUILD_DATE)" + }, + incdirs = { "pugl-repo/include", ".", "$(CAIRO_INCDIR)/cairo" }, + libdirs = { "$(CAIRO_LIBDIR)" }, + }, + } +} diff --git a/lpugl_cairo-scm-0.rockspec b/rockspecs/lpugl_cairo-scm-0.rockspec similarity index 100% rename from lpugl_cairo-scm-0.rockspec rename to rockspecs/lpugl_cairo-scm-0.rockspec diff --git a/rockspecs/lpugl_opengl-0.0.1-1.rockspec b/rockspecs/lpugl_opengl-0.0.1-1.rockspec new file mode 100644 index 0000000..a2e429b --- /dev/null +++ b/rockspecs/lpugl_opengl-0.0.1-1.rockspec @@ -0,0 +1,77 @@ +package = "lpugl_opengl" +version = "0.0.1-1" +local versionNumber = version:gsub("^(.*)-.-$", "%1") +source = { + url = "https://github.com/osch/lua-lpugl/archive/v"..versionNumber..".zip", + dir = "lua-lpugl-"..versionNumber, +} +description = { + summary = "OpenGL backend for LPugl, a minimal API for building GUIs", + homepage = "https://github.com/osch/lua-lpugl", + license = "MIT/X11", + detailed = [[ + LPugl is a minimal portable Lua-API for building GUIs. + Supported platforms: X11, Windows and Mac OS X. + LPugl is based on Pugl, a minimal portable API for embeddable GUIs, + see: https://drobilla.net/software/pugl + ]], +} +dependencies = { + "lua >= 5.1, <= 5.4", + "luarocks-build-extended", + "lpugl", +} +build = { + type = "extended", + + external_dependencies = { + GL = { header = "GL/gl.h" }, + }, + platforms = { + linux = { + modules = { + ["lpugl_opengl"] = { + libraries = { "GL", "pthread" }, + } + } + }, + windows = { + modules = { + ["lpugl_opengl"] = { + libraries = { "opengl32", "kernel32", "gdi32", "user32" }, + } + } + }, + macosx = { + external_dependencies = { + -- for Mac OS: OpenGL headers are under "$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks/OpenGL.framework/Headers" + -- (e.g. /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers) + -- They must be included using "OpenGL/gl.h" and cannot be found by luarocks in the file system + GL = { header = false }, + }, + modules = { + ["lpugl_opengl"] = { + sources = { "src/pugl_opengl.m" }, + variables = { + LIBFLAG_EXTRAS = { "-framework", "Cocoa", + "-framework", "OpenGL", + } + } + } + } + }, + }, + modules = { + ["lpugl_opengl"] = { + sources = { "src/pugl_opengl.c", + "src/lpugl_opengl.c", + "src/lpugl_compat.c" }, + defines = { + "LPUGL_VERSION="..version:gsub("^(.*)-.-$", "%1"), + "LPUGL_BUILD_DATE=$(BUILD_DATE)" + }, + incdirs = { "pugl-repo/include", ".", "$(GL_INCDIR)" }, + libdirs = { "$(GL_LIBDIR)" }, + }, + } +} diff --git a/lpugl_opengl-scm-0.rockspec b/rockspecs/lpugl_opengl-scm-0.rockspec similarity index 100% rename from lpugl_opengl-scm-0.rockspec rename to rockspecs/lpugl_opengl-scm-0.rockspec