From 1078a9f395a8e84ce8f31bbe21e5a37fdf2fef79 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 2 Jan 2017 19:53:02 +0100 Subject: [PATCH] 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 --- .travis.yml | 2 +- build-utils/lgi-check.sh | 4 ++-- docs/01-readme.md | 2 +- lib/gears/surface.lua | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e8fe27b..035942a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/build-utils/lgi-check.sh b/build-utils/lgi-check.sh index f315513d..d4ceec98 100755 --- a/build-utils/lgi-check.sh +++ b/build-utils/lgi-check.sh @@ -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 diff --git a/docs/01-readme.md b/docs/01-readme.md index 7f2ecedc..dc712a03 100644 --- a/docs/01-readme.md +++ b/docs/01-readme.md @@ -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 diff --git a/lib/gears/surface.lua b/lib/gears/surface.lua index 78f22168..21b5c795 100644 --- a/lib/gears/surface.lua +++ b/lib/gears/surface.lua @@ -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 = {} }