Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#
# LuaGObject: Dynamic binding to GObject-based libraries using
# GObject-Introspection.
#
# LuaGObject: Dynamic binding to GObject-based libraries using GObject-Introspection.
# Author: Pavel Holejsovsky <pavel.holejsovsky@gmail.com>
# License: MIT
#

VERSION = 0.10.2
VERSION = 0.10.3
MAKE ?= make

ROCK = luagobject-$(VERSION)-1.rockspec
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ LuaGObject is also built on the work of LGI's developers, listed below in no par

## History

### 0.10.3 (2025-12-29)

- When used in contexts where an unsigned integer is expected, negative numbers now underflow into the expected numeric range instead of generating an error (see issue #14)

### 0.10.2 (2025-09-22)

- Adds the `extra_css_classes` attribute to `Gtk.Widget` and all subclasses, allowing extra CSS classes to be added at construct-time without overwriting CSS classes added by a class' implementation
Expand Down
81 changes: 41 additions & 40 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,59 +1,60 @@
project('LuaGObject', 'c',
version: '0.10.2',
meson_version: '>= 0.50.0',
default_options: [
'warning_level=2',
'buildtype=debugoptimized',
],
version: '0.10.3',
meson_version: '>= 0.50.0',
default_options: [
'warning_level=2',
'buildtype=debugoptimized',
],
)

cc = meson.get_compiler('c')
test_c_args = []

if cc.get_id() == 'msvc'
test_c_args += '-FImsvc_recommended_pragmas.h'
test_c_args += '-FImsvc_recommended_pragmas.h'
endif

add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')

lua_possible_names = [
'lua',
'lua5.4', 'lua54',
'lua5.3', 'lua53',
'lua5.2', 'lua52',
'lua5.1', 'lua51',
'luajit'
'lua',
'lua5.5', 'lua55',
'lua5.4', 'lua54',
'lua5.3', 'lua53',
'lua5.2', 'lua52',
'lua5.1', 'lua51',
'luajit'
]

lua_bin = get_option('lua-bin')
lua_name = get_option('lua-pc')

if lua_name == 'auto'
lua_found = false
lua_found = false

foreach name : lua_possible_names
if not lua_found
lua_dep = dependency(name, required: false)
lua_found = lua_dep.found()
lua_name = name
endif
endforeach
foreach name : lua_possible_names
if not lua_found
lua_dep = dependency(name, required: false)
lua_found = lua_dep.found()
lua_name = name
endif
endforeach

if not lua_found
error('Failed to find lua pkg-config file, you can specify it manually with `-Dlua-pc=lua54`')
endif
if not lua_found
error('Failed to find lua pkg-config file, you can specify it manually with `-Dlua-pc=lua54`')
endif

if lua_bin == 'lua' and lua_name == 'luajit'
lua_bin = 'luajit'
endif
if lua_bin == 'lua' and lua_name == 'luajit'
lua_bin = 'luajit'
endif

else
lua_dep = dependency(lua_name)
lua_dep = dependency(lua_name)
endif

lua_prog = find_program(lua_bin, required: false)
if not lua_prog.found()
error('Failed to find lua binary, you can specify it manually with `-Dlua-bin=lua54`')
error('Failed to find lua binary, you can specify it manually with `-Dlua-bin=lua54`')
endif

# lua doesn't have an official pkg-config file so we guess off its version
Expand All @@ -62,17 +63,17 @@ lua_abi_version = '@0@.@1@'.format(lua_version_split[0], lua_version_split[1])

# These are defined by the luajit.pc and some distros lua.pc
if lua_dep.type_name() == 'pkgconfig'
lua_cpath = lua_dep.get_pkgconfig_variable('INSTALL_CMOD',
define_variable: ['prefix', get_option('prefix')],
default: join_paths(get_option('libdir'), 'lua', lua_abi_version),
)
lua_path = lua_dep.get_pkgconfig_variable('INSTALL_LMOD',
define_variable: ['prefix', get_option('prefix')],
default: join_paths(get_option('datadir'), 'lua', lua_abi_version)
)
lua_cpath = lua_dep.get_pkgconfig_variable('INSTALL_CMOD',
define_variable: ['prefix', get_option('prefix')],
default: join_paths(get_option('libdir'), 'lua', lua_abi_version),
)
lua_path = lua_dep.get_pkgconfig_variable('INSTALL_LMOD',
define_variable: ['prefix', get_option('prefix')],
default: join_paths(get_option('datadir'), 'lua', lua_abi_version)
)
else
lua_cpath = join_paths(get_option('libdir'), 'lua', lua_abi_version)
lua_path = join_paths(get_option('datadir'), 'lua', lua_abi_version)
lua_cpath = join_paths(get_option('libdir'), 'lua', lua_abi_version)
lua_path = join_paths(get_option('datadir'), 'lua', lua_abi_version)
endif

gi_dep = dependency('girepository-2.0', version: '>= 2.80')
Expand All @@ -81,5 +82,5 @@ gi_datadir = gi_dep.get_pkgconfig_variable('gidatadir')
install_data('LuaGObject.lua', install_dir: lua_path)
subdir('LuaGObject')
if get_option('tests')
subdir('tests')
subdir('tests')
endif
38 changes: 19 additions & 19 deletions rockspec.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ package = 'LuaGObject'
version = '%VERSION%-1'

description = {
summary = "Use GObject libraries from Lua",
detailed = [[
Dynamically bind to any GObject-based library which supports
GObject-Introspection—such as Gtk, Adwaita, Glib, and more—allowing the
use of these libraries directly from Lua.
]],
license = 'MIT/X11',
homepage = 'https://github.com/vtrlx/LuaGObject'
summary = "Use GObject libraries from Lua",
detailed = [[
Dynamically bind to any GObject-based library which supports
GObject-Introspection—such as Gtk, Adwaita, Glib, and more—allowing the
use of these libraries directly from Lua.
]],
license = 'MIT/X11',
homepage = 'https://github.com/vtrlx/LuaGObject'
}

supported_platforms = { 'unix', 'mingw' }

source = {
url = 'git://github.com/vtrlx/LuaGObject.git',
tag = '%VERSION%'
url = 'git://github.com/vtrlx/LuaGObject.git',
tag = '%VERSION%'
}

dependencies = { 'lua >= 5.1' }

build = {
type = 'make',
variables = {
PREFIX = '$(PREFIX)',
LUA_LIBDIR = '$(LIBDIR)',
LUA_SHAREDIR = '$(LUADIR)',
LUA_CFLAGS = '$(CFLAGS) -I$(LUA_INCDIR)',
LIBFLAG = '$(LIBFLAG)',
},
copy_directories = { 'docs', 'samples' }
type = 'make',
variables = {
PREFIX = '$(PREFIX)',
LUA_LIBDIR = '$(LIBDIR)',
LUA_SHAREDIR = '$(LUADIR)',
LUA_CFLAGS = '$(CFLAGS) -I$(LUA_INCDIR)',
LIBFLAG = '$(LIBFLAG)',
},
copy_directories = { 'docs', 'samples' }
}