gpick-0.3 rebuild lua.

This commit is contained in:
4fury-c3440d8
2023-01-04 19:02:11 +03:00
parent 0e8cc00bc5
commit b29bcbb813
3 changed files with 252 additions and 5 deletions
+1 -3
View File
@@ -4,9 +4,7 @@
# Licensed under the GNU General Public License, version 3.
# See the file https://www.gnu.org/licenses/gpl-3.0.txt
from pisi.actionsapi import cmaketools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
from pisi.actionsapi import cmaketools, pisitools, get
def setup():
cmaketools.configure("-DUSE_GTK3=1")
@@ -0,0 +1,239 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb6c670..5141263 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,8 +30,8 @@ if (PkgConfig_FOUND)
pkg_check_modules(GTK2 gtk+-2.0>=2.24)
pkg_check_modules(GioUnix gio-unix-2.0>=2.24)
endif()
- pkg_search_module(Lua lua5.4-c++>=5.4 lua5-c++>=5.4 lua5.3-c++>=5.3 lua5-c++>=5.3 lua-c++>=5.3 lua5.2-c++>=5.2 lua-c++>=5.2)
- pkg_check_modules(Expat expat>=1.0)
+ pkg_search_module(Lua lua5.4>=5.4 lua5>=5.4 lua5.3>=5.3 lua5>=5.3 lua>=5.3 lua5.2>=5.2 lua>=5.2)
+ pkg_check_modules(Expat expat>=1.0)
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
diff --git a/source/ColorSpaceType.cpp b/source/ColorSpaceType.cpp
index 8f5d124..a1c0c22 100644
--- a/source/ColorSpaceType.cpp
+++ b/source/ColorSpaceType.cpp
@@ -22,7 +22,9 @@
#include "lua/Color.h"
#include "lua/Script.h"
#include "lua/Callbacks.h"
+extern "C" {
#include <lua.h>
+}
#include <iostream>
using namespace std;
diff --git a/source/Converter.cpp b/source/Converter.cpp
index ee9d7d7..9e82b34 100644
--- a/source/Converter.cpp
+++ b/source/Converter.cpp
@@ -33,8 +33,10 @@
#include <vector>
#include <iostream>
#include <functional>
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
using namespace std;
Converter::Converter(const char *name, const char *label, lua::Ref &&serialize, lua::Ref &&deserialize):
m_name(name),
diff --git a/source/GlobalState.cpp b/source/GlobalState.cpp
index ca6542b..c848141 100644
--- a/source/GlobalState.cpp
+++ b/source/GlobalState.cpp
@@ -37,8 +37,10 @@
#include <filesystem>
#include <stdlib.h>
#include <glib/gstdio.h>
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
#include <fstream>
#include <iostream>
struct GlobalState::Impl {
diff --git a/source/layout/Layout.cpp b/source/layout/Layout.cpp
index c81a927..6ba7bf9 100644
--- a/source/layout/Layout.cpp
+++ b/source/layout/Layout.cpp
@@ -20,8 +20,10 @@
#include "System.h"
#include "../lua/Layout.h"
#include <iostream>
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
using namespace std;
namespace layout
{
diff --git a/source/lua/Color.cpp b/source/lua/Color.cpp
index 724831a..47d6bf4 100644
--- a/source/lua/Color.cpp
+++ b/source/lua/Color.cpp
@@ -18,8 +18,10 @@
#include "Color.h"
#include "../Color.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
namespace lua
{
static int newColor(lua_State *L)
diff --git a/source/lua/ColorObject.cpp b/source/lua/ColorObject.cpp
index a1971b5..19f15e6 100644
--- a/source/lua/ColorObject.cpp
+++ b/source/lua/ColorObject.cpp
@@ -20,8 +20,10 @@
#include "Color.h"
#include "Script.h"
#include "../ColorObject.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
namespace lua
{
static int newColorObject(lua_State *L)
diff --git a/source/lua/DynvSystem.cpp b/source/lua/DynvSystem.cpp
index ff3508c..dfbba25 100644
--- a/source/lua/DynvSystem.cpp
+++ b/source/lua/DynvSystem.cpp
@@ -17,8 +17,10 @@
*/
#include "DynvSystem.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
namespace lua {
dynv::Ref checkDynvSystem(lua_State *L, int index) {
void *ud = luaL_checkudata(L, index, "dynvSystem");
diff --git a/source/lua/Extensions.cpp b/source/lua/Extensions.cpp
index 62c6c1b..6e14e84 100644
--- a/source/lua/Extensions.cpp
+++ b/source/lua/Extensions.cpp
@@ -31,8 +31,10 @@
#include "../Converters.h"
#include "../Converter.h"
#include "version/Version.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
namespace lua
{
static void checkArgumentIsFunctionOrNil(lua_State *L, int index)
diff --git a/source/lua/GlobalState.cpp b/source/lua/GlobalState.cpp
index 8908538..984bb91 100644
--- a/source/lua/GlobalState.cpp
+++ b/source/lua/GlobalState.cpp
@@ -18,8 +18,10 @@
#include "GlobalState.h"
#include "../GlobalState.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
namespace lua
{
void setGlobalState(lua_State *L, GlobalState &global_state)
diff --git a/source/lua/I18N.cpp b/source/lua/I18N.cpp
index 6791c97..f7fd0e6 100644
--- a/source/lua/I18N.cpp
+++ b/source/lua/I18N.cpp
@@ -18,8 +18,10 @@
#include "I18N.h"
#include "../I18N.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
namespace lua
{
int getText(lua_State *L)
diff --git a/source/lua/Layout.cpp b/source/lua/Layout.cpp
index be83686..b2dfd2b 100644
--- a/source/lua/Layout.cpp
+++ b/source/lua/Layout.cpp
@@ -23,8 +23,10 @@
#include "../layout/Box.h"
#include "../layout/System.h"
#include "../layout/Layout.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
#include <typeinfo>
#include <iostream>
using namespace std;
diff --git a/source/lua/Ref.cpp b/source/lua/Ref.cpp
index 9b1acc7..96c108f 100644
--- a/source/lua/Ref.cpp
+++ b/source/lua/Ref.cpp
@@ -17,8 +17,10 @@
*/
#include "Ref.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
namespace lua
{
Ref::Ref():
diff --git a/source/lua/Script.cpp b/source/lua/Script.cpp
index a39e3eb..6358327 100644
--- a/source/lua/Script.cpp
+++ b/source/lua/Script.cpp
@@ -18,8 +18,10 @@
#include "Script.h"
#include <sstream>
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
#include <iostream>
using namespace std;
namespace lua
diff --git a/source/test/Script.cpp b/source/test/Script.cpp
index 8fdeaa9..55a6c3e 100644
--- a/source/test/Script.cpp
+++ b/source/test/Script.cpp
@@ -19,8 +19,10 @@
#include <boost/test/unit_test.hpp>
#include "lua/Script.h"
#include "common/Scoped.h"
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
using namespace lua;
static int test(lua_State *L) {
lua_pushstring(L, "ok");
diff --git a/source/uiDialogOptions.cpp b/source/uiDialogOptions.cpp
index e70debb..b072944 100644
--- a/source/uiDialogOptions.cpp
+++ b/source/uiDialogOptions.cpp
@@ -28,8 +28,10 @@
#include "lua/Callbacks.h"
#include <string>
#include <iostream>
+extern "C" {
#include <lualib.h>
#include <lauxlib.h>
+}
using namespace std;
static const struct{
const char *label;
+12 -2
View File
@@ -15,8 +15,8 @@
<Description>
Gpick is an application that allows you to sample any color from anywhere on the desktop, and use it to create palettes (i.e. collections of colors) for use in graphic design applications.
</Description>
<Archive sha1sum="b0e51feb274a39aea6063f0c72a8562824ce1010" type="targz">
https://github.com/thezbyg/gpick/archive/gpick-0.2.6.tar.gz
<Archive sha1sum="e24a210d17b646dfe07ef7e2cf78b58498798c1d" type="targz">
https://github.com/thezbyg/gpick/releases/download/v0.3/gpick-0.3.tar.gz
</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
@@ -26,6 +26,9 @@
<Dependency>expat-devel</Dependency>
<Dependency>boost-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level='1'>archlinux/buildfix.patch</Patch>
</Patches>
</Source>
<Package>
@@ -51,6 +54,13 @@
</Package>
<History>
<Update release="3">
<Date>2023-01-04</Date>
<Version>0.3</Version>
<Comment>Version bump.</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="2">
<Date>2021-11-04</Date>
<Version>0.2.6</Version>