void-packages/srcpkgs/LuaJIT/patches/get-rid-of-luajit-version-sym.patch
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: convert patches to -Np1
```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

52 lines
1.6 KiB
Diff

From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@sury.org>
Date: Thu, 19 Nov 2015 16:29:02 +0200
Subject: Get rid of LUAJIT_VERSION_SYM that changes ABI on every patch release
---
src/lj_dispatch.c | 5 -----
src/luajit.c | 2 --
src/luajit.h | 3 ---
3 files changed, 10 deletions(-)
diff --git src/lj_dispatch.c src/lj_dispatch.c
index 5d6795f..e865a78 100644
--- a/src/lj_dispatch.c
+++ b/src/lj_dispatch.c
@@ -319,11 +319,6 @@ int luaJIT_setmode(lua_State *L, int idx, int mode)
return 1; /* OK. */
}
-/* Enforce (dynamic) linker error for version mismatches. See luajit.c. */
-LUA_API void LUAJIT_VERSION_SYM(void)
-{
-}
-
/* -- Hooks --------------------------------------------------------------- */
/* This function can be called asynchronously (e.g. during a signal). */
diff --git src/luajit.c src/luajit.c
index 1ca2430..ccf425e 100644
--- a/src/luajit.c
+++ b/src/luajit.c
@@ -516,8 +516,6 @@ static int pmain(lua_State *L)
globalL = L;
if (argv[0] && argv[0][0]) progname = argv[0];
- LUAJIT_VERSION_SYM(); /* Linker-enforced version check. */
-
argn = collectargs(argv, &flags);
if (argn < 0) { /* Invalid args? */
print_usage();
diff --git src/luajit.h src/luajit.h
index 708a5a1..35ae02c 100644
--- a/src/luajit.h
+++ b/src/luajit.h
@@ -73,7 +73,4 @@ LUA_API void luaJIT_profile_stop(lua_State *L);
LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt,
int depth, size_t *len);
-/* Enforce (dynamic) linker error for version mismatches. Call from main. */
-LUA_API void LUAJIT_VERSION_SYM(void);
-
#endif