commit:     fb6f43da4a1fa2c3d442baaa32016593bbe816e1
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  7 16:43:55 2023 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Fri Jul  7 16:45:00 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb6f43da

media-gfx/geeqie: use lua.hpp to fix lua plugin compilation

This can be replaced later by upstream official fix

Bug: https://bugs.gentoo.org/909302
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 media-gfx/geeqie/files/geeqie-2.1-lua_hpp.patch | 19 +++++++++++++++++++
 media-gfx/geeqie/geeqie-2.1.ebuild              |  7 ++++---
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/media-gfx/geeqie/files/geeqie-2.1-lua_hpp.patch 
b/media-gfx/geeqie/files/geeqie-2.1-lua_hpp.patch
new file mode 100644
index 000000000000..a0c816b5fb3c
--- /dev/null
+++ b/media-gfx/geeqie/files/geeqie-2.1-lua_hpp.patch
@@ -0,0 +1,19 @@
+---
+ src/lua.cc | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/lua.cc b/src/lua.cc
+index 84aa549a..458b658a 100644
+--- a/src/lua.cc
++++ b/src/lua.cc
+@@ -24,9 +24,7 @@
+ 
+ #define _XOPEN_SOURCE
+ 
+-#include <lua.h>
+-#include <lauxlib.h>
+-#include <lualib.h>
++#include <lua.hpp>
+ 
+ #include <stdio.h>
+ #include <glib.h>

diff --git a/media-gfx/geeqie/geeqie-2.1.ebuild 
b/media-gfx/geeqie/geeqie-2.1.ebuild
index 9553979fc1d4..62d485ca97b3 100644
--- a/media-gfx/geeqie/geeqie-2.1.ebuild
+++ b/media-gfx/geeqie/geeqie-2.1.ebuild
@@ -45,6 +45,10 @@ BDEPEND="
 
 REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-lua_hpp.patch
+)
+
 pkg_setup() {
        # Do not require setting LUA_SINGLE_TARGET if lua is not used
        use lua && lua-single_pkg_setup
@@ -55,9 +59,6 @@ src_prepare() {
 
        # Disable doc build - not useful most of the time per upstream
        sed -e "/subdir('doc')/d" -i meson.build || die
-
-       # Lua version
-       sed -e "s/lua5.[0-9]/${LUA_SINGLE_TARGET/-/.}/" -i meson.build || die
 }
 
 src_configure() {

Reply via email to