void-packages/srcpkgs/rdis-git/patches/luajit_version.patch
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

60 lines
1.8 KiB
Diff

fix luajit version checks (for 2.1 support)
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,7 +1,7 @@
OBJS=object.o rdg.o rdg_node.o rdis.o serialize.o settings.o util.o wqueue.o
CCFLAGS=-Wall -O2 -g
-INCLUDE=`pkg-config --cflags cairo` `pkg-config --cflags gtk+-3.0` \
+INCLUDE=`pkg-config --cflags cairo` `pkg-config --cflags gtk+-3.0 luajit` \
-iquotecontainer/ -iquoteloader/ -iquote./ -iquotescript/ -iquotegui/ -iquoteredis/
LIB=`pkg-config --libs gtk+-3.0 cairo` -ludis86 -lm -lfontconfig -lpthread \
-ljansson -lluajit-5.1 -lcrypto
--- a/src/gui/Makefile
+++ b/src/gui/Makefile
@@ -2,7 +2,7 @@ OBJS = hexwindow.o funcwindow.o main.o refwindow.o rdgwindow.o \
rdiswindow.o gui.o
CCFLAGS=-Wall -O2 -g
-INCLUDE=`pkg-config --cflags gtk+-3.0` \
+INCLUDE=`pkg-config --cflags gtk+-3.0 luajit` \
-iquote../ -iquote../container -iquote../loader -iquote../script
all : $(OBJS)
--- a/src/loader/Makefile
+++ b/src/loader/Makefile
@@ -1,7 +1,7 @@
OBJS=elf32.o elf64.o x86.o x8664.o loader.o pe.o lua.o dummy.o
CCFLAGS=-Wall -O2 -g
-INCLUDE=`pkg-config --cflags cairo` \
+INCLUDE=`pkg-config --cflags cairo luajit` \
-iquote../container -iquote../ -iquote../script -iquote./
all : $(OBJS)
--- a/src/script/Makefile
+++ b/src/script/Makefile
@@ -1,7 +1,7 @@
OBJS=rdis_lua.o rl_redis_x86.o
CCFLAGS=-Wall -O2 -g
-INCLUDE=`pkg-config --cflags cairo gtk+-3.0` \
+INCLUDE=`pkg-config --cflags cairo gtk+-3.0 luajit` \
-iquote../ -iquote../container -iquote../loader -iquote./ -iquote../redis -iquote../gui
all : $(OBJS)
--- a/src/script/rdis_lua.h
+++ b/src/script/rdis_lua.h
@@ -1,9 +1,9 @@
#ifndef rdis_lua_HEADER
#define rdis_lua_HEADER
-#include <luajit-2.0/lua.h>
-#include <luajit-2.0/lauxlib.h>
-#include <luajit-2.0/lualib.h>
+#include <lua.h>
+#include <lauxlib.h>
+#include <lualib.h>
#include "instruction.h"
#include "rdg.h"