Bump minimal LGI version to 0.8.0 (#1350)

Turns out that menubar already uses features that were only added in
that version.

Fixes: https://github.com/awesomeWM/awesome/issues/1348
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-01-02 19:53:02 +01:00 committed by Daniel Hahler
parent 0f755c8f12
commit 1078a9f395
4 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ env:
# Note: luarocks does not work with Lua 5.0.
- LUA=5.1 LUANAME=lua5.1 BUILD_IN_DIR=/tmp/awesome-build
# Lua 5.2 with older lgi and screen size not divisible by 2.
- LUA=5.2 LUANAME=lua5.2 LGIVER=0.7.1 TESTS_SCREEN_SIZE=1921x1079
- LUA=5.2 LUANAME=lua5.2 LGIVER=0.8.0 TESTS_SCREEN_SIZE=1921x1079
# Lua 5.3 isn't available in Ubuntu Trusty, so some magic below installs it.
- LUA=5.3 LUANAME=lua5.3 LUALIBRARY=/usr/lib/liblua.so DO_COVERAGE=codecov
global:

View File

@ -27,9 +27,9 @@ lua -e 'require("lgi")' || die
# Check the version number.
# Keep this in sync with lib/gears/surface.lua.in and .travis.yml (LGIVER)!
lua -e '_, _, major_minor, patch = string.find(require("lgi.version"), "^(%d%.%d)%.(%d)");
if tonumber(major_minor) < 0.7 or (tonumber(major_minor) == 0.7 and tonumber(patch) < 1) then
if tonumber(major_minor) < 0.8 or (tonumber(major_minor) == 0.8 and tonumber(patch) < 0) then
error(string.format("lgi is too old, need at least version %s, got %s.",
"0.7.1", require("lgi.version"))) end' || die
"0.8.0", require("lgi.version"))) end' || die
# Check for the needed gi files
lua -e 'l = require("lgi") assert(l.cairo, l.Pango, l.PangoCairo, l.GLib, l.Gio)' || die

View File

@ -37,7 +37,7 @@ environment):
- [CMake >= 3.0.0](https://cmake.org)
- [Lua >= 5.1.0](https://www.lua.org) or [LuaJIT](http://luajit.org)
- [LGI >= 0.7.1](https://github.com/pavouk/lgi)
- [LGI >= 0.8.0](https://github.com/pavouk/lgi)
- [xproto >= 7.0.15](https://www.x.org/archive//individual/proto/)
- [libxcb >= 1.6](https://xcb.freedesktop.org/) with support for the RandR, XTest, Xinerama, SHAPE and
XKB extensions

View File

@ -14,8 +14,8 @@ local hierarchy = require("wibox.hierarchy")
-- Keep this in sync with build-utils/lgi-check.sh!
local ver_major, ver_minor, ver_patch = string.match(require('lgi.version'), '(%d)%.(%d)%.(%d)')
if tonumber(ver_major) <= 0 and (tonumber(ver_minor) < 7 or (tonumber(ver_minor) == 7 and tonumber(ver_patch) < 1)) then
error("lgi too old, need at least version 0.7.1")
if tonumber(ver_major) <= 0 and (tonumber(ver_minor) < 8 or (tonumber(ver_minor) == 8 and tonumber(ver_patch) < 0)) then
error("lgi too old, need at least version 0.8.0")
end
local surface = { mt = {} }