File: 0007-Build-with-Debian-packaged-Lua.patch

package info (click to toggle)
scite 4.4.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,928 kB
  • sloc: cpp: 145,539; ansic: 19,277; python: 6,120; makefile: 806; perl: 200; sh: 184; sql: 160; objc: 18; ruby: 6; tcl: 6; php: 4
file content (78 lines) | stat: -rw-r--r-- 2,809 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From: =?utf-8?q?Andreas_R=C3=B6nnquist?= <gusnan@debian.org>
Date: Tue, 19 Jun 2018 15:34:57 +0200
Subject: Build with Debian packaged Lua
Forwarded: not-needed

---
 scite/gtk/deps.mak |  6 +-----
 scite/gtk/makefile | 30 ++++--------------------------
 2 files changed, 5 insertions(+), 31 deletions(-)

--- a/scite/gtk/deps.mak
+++ b/scite/gtk/deps.mak
@@ -248,11 +248,7 @@
 	../src/Extender.h \
 	../src/IFaceTable.h \
 	../src/SciTEKeys.h \
-	../src/LuaExtension.h \
-	../lua/src/lua.h \
-	../lua/src/luaconf.h \
-	../lua/src/lualib.h \
-	../lua/src/lauxlib.h
+	../src/LuaExtension.h
 MatchMarker.o: \
 	../src/MatchMarker.cxx \
 	../src/ScintillaTypes.h \
--- a/scite/gtk/makefile
+++ b/scite/gtk/makefile
@@ -32,9 +32,9 @@
 
 PYTHON = $(if $(windir),pyw,python3)
 
-# For the Gnome desktop stuff to work, prefix must point to where Gnome thinks it is.
-CONFIGFLAGS:=$(shell $(PKG_CONFIG) --cflags $(GTK_VERSION))
-CONFIGLIB:=$(shell $(PKG_CONFIG) --libs $(GTK_VERSION) gthread-2.0 gmodule-no-export-2.0)
+# For the Lua and Gnome desktop stuff to work, prefix must point to where Lua and Gnome thinks it is.
+CONFIGFLAGS:=$(shell $(PKG_CONFIG) --cflags $(GTK_VERSION)) $(shell $(PKG_CONFIG) --cflags lua5.3)
+CONFIGLIB:=$(shell $(PKG_CONFIG) --libs $(GTK_VERSION) gthread-2.0 gmodule-no-export-2.0) $(shell $(PKG_CONFIG) --libs lua5.3)
 gnomeprefix:=$(shell $(PKG_CONFIG) --variable=prefix $(GTK_VERSION) 2>/dev/null)
 ifndef prefix
 ifdef gnomeprefix
@@ -70,28 +70,6 @@
 DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
 BASE_FLAGS += $(if $(DEBUG),-g,-Os)
 
-ifndef NO_LUA
-LUA_CORE_OBJS = lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
-		lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o \
-		ltable.o ltm.o lundump.o lvm.o lzio.o
-
-LUA_LIB_OBJS =	lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o ltablib.o \
-		lstrlib.o loadlib.o loslib.o linit.o lutf8lib.o
-
-LUA_OBJS = LuaExtension.o $(LUA_CORE_OBJS) $(LUA_LIB_OBJS)
-
-vpath %.c $(srcdir)/../lua/src
-
-INCLUDES += -I$(srcdir)/../lua/src
-LUA_DEFINES = -DLUA_USE_POSIX -DLUA_USE_DLOPEN
-
-%.o: %.c
-	$(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(WARNINGS) $(LUA_DEFINES) $(BASE_FLAGS) $(CFLAGS) -c $< -o $@
-
-else
-DEFINES += -DNO_LUA
-endif
-
 LIBS += -lm -lstdc++
 
 UNAME:=$(shell uname -s)
@@ -149,7 +127,7 @@
 	StyleWriter.o \
 	Utf8_16.o
 
-$(PROG): SciTEGTK.o GUIGTK.o Widget.o DirectorExtension.o $(SRC_OBJS) $(LUA_OBJS)
+$(PROG): SciTEGTK.o GUIGTK.o Widget.o DirectorExtension.o $(SRC_OBJS) LuaExtension.o
 	$(CXX) $(BASE_FLAGS) $(LDFLAGS) -rdynamic -Wl,--as-needed -Wl,-rpath,'$${ORIGIN}' -Wl,--version-script $(srcdir)/lua.vers -Wl,-rpath,$(libdir) $^ -o $@ $(CONFIGLIB) $(LIBS) -L ../../scintilla/bin -lscintilla $(LDLIBS)
 
 # Automatically generate header dependencies with "make deps"