SHA256
12
0
forked from pool/luajit2
luajit2/luajit2-name.patch
Илья Индиго ddc9648a96 - Updated to 2.1.20250117 (1737090214).
* Changed file luajit2-name.patch.
  * Added riscv support.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/luajit2?expand=0&rev=13
2025-01-18 09:21:09 +00:00

157 lines
6.5 KiB
Diff

diff -Pdpru luajit2-2.1-20250117.orig/Makefile luajit2-2.1-20250117/Makefile
--- luajit2-2.1-20250117.orig/Makefile 2025-01-17 08:03:34.000000000 +0300
+++ luajit2-2.1-20250117/Makefile 2025-01-18 12:03:03.025681445 +0300
@@ -39,10 +39,10 @@ INSTALL_BIN= $(DPREFIX)/bin
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
INSTALL_SHARE_= $(PREFIX)/share
INSTALL_SHARE= $(DESTDIR)$(INSTALL_SHARE_)
-INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
+INSTALL_DEFINC= $(DPREFIX)/include/luajit2-$(MMVERSION)
INSTALL_INC= $(INSTALL_DEFINC)
-export INSTALL_LJLIBD= $(INSTALL_SHARE_)/luajit-$(MMVERSION)
+export INSTALL_LJLIBD= $(INSTALL_SHARE_)/luajit2-$(MMVERSION)
INSTALL_JITLIB= $(DESTDIR)$(INSTALL_LJLIBD)/jit
INSTALL_LMODD= $(INSTALL_SHARE)/lua
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
@@ -51,23 +51,20 @@ INSTALL_CMOD= $(INSTALL_CMODD)/$(ABIVER)
INSTALL_MAN= $(INSTALL_SHARE)/man/man1
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
-INSTALL_TNAME= luajit-$(VERSION)
-INSTALL_TSYMNAME= luajit
-INSTALL_ANAME= libluajit-$(ABIVER).a
-INSTALL_SOSHORT1= libluajit-$(ABIVER).so
-INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
-INSTALL_SONAME= libluajit-$(ABIVER).so.$(VERSION)
-INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib
-INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib
-INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(VERSION).dylib
-INSTALL_PCNAME= luajit.pc
+INSTALL_TNAME= luajit2
+INSTALL_MANNAME= $(INSTALL_TNAME).1
+INSTALL_SOSHORT1= libluajit2-$(ABIVER).so
+INSTALL_SOSHORT2= libluajit2-$(ABIVER).so.$(MAJVER)
+INSTALL_SONAME= libluajit2-$(ABIVER).so.$(VERSION)
+INSTALL_DYLIBSHORT1= libluajit2-$(ABIVER).dylib
+INSTALL_DYLIBSHORT2= libluajit2-$(ABIVER).$(MAJVER).dylib
+INSTALL_DYLIBNAME= libluajit2-$(ABIVER).$(VERSION).dylib
+INSTALL_PCNAME= luajit2.pc
-INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME)
INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT1)
INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT2)
INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME)
-INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME)
INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \
@@ -79,20 +76,27 @@ RM= rm -f
MKDIR= mkdir -p
RMDIR= rmdir 2>/dev/null
SYMLINK= ln -sf
-INSTALL_X= install -m 0755
-INSTALL_F= install -m 0644
+INSTALL_X= install -pm0755
+INSTALL_F= install -pm0644
UNINSTALL= $(RM)
LDCONFIG= ldconfig -n 2>/dev/null
+SED_MAN= sed -e "s|luajit|luajit2|g" \
+ -e "s|LuaJIT|LuaJIT2|g" \
+ -e "s|luajit2.org|github.com/openresty/luajit2|" \
+ -e "s|Just-In-Time Compiler for the Lua Language|OpenResty's maintained branch of LuaJIT|"
SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
-e "s|^multilib=.*|multilib=$(MULTILIB)|" \
- -e "s|^relver=.*|relver=$(RELVER)|"
+ -e "s|^relver=.*|relver=$(RELVER)|" \
+ -e "s|luajit-|luajit2-|g" \
+ -e "s|LuaJIT|LuaJIT2|g" \
+ -e "s|luajit.org|github.com/openresty/luajit2|" \
+ -e "s|Just-in-time compiler for Lua|OpenResty's maintained branch of LuaJIT|"
ifneq ($(INSTALL_DEFINC),$(INSTALL_INC))
SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|"
endif
-FILE_T= luajit
-FILE_A= libluajit.a
-FILE_SO= libluajit.so
+FILE_T= luajit2
+FILE_SO= libluajit2.so
FILE_MAN= luajit.1
FILE_PC= luajit.pc
FILES_INC= lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h
@@ -131,25 +135,25 @@ install: $(INSTALL_DEP)
@echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ===="
$(MKDIR) $(INSTALL_DIRS)
cd src && $(INSTALL_X) $(FILE_T) $(INSTALL_T)
- cd src && test -f $(FILE_A) && $(INSTALL_F) $(FILE_A) $(INSTALL_STATIC) || :
$(RM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2)
cd src && test -f $(FILE_SO) && \
$(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \
( $(LDCONFIG) $(INSTALL_LIB) || : ) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || :
- cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)
+ cd etc && $(SED_MAN) $(FILE_MAN) > $(FILE_MAN).tmp && \
+ $(INSTALL_F) $(FILE_MAN).tmp $(INSTALL_MAN)/$(INSTALL_MANNAME) && \
+ $(RM) $(FILE_MAN).tmp
cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \
$(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \
$(RM) $(FILE_PC).tmp
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
- $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)
@echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ===="
uninstall:
@echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ===="
- $(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
+ $(UNINSTALL) $(INSTALL_T) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
for file in $(FILES_JITLIB); do \
$(UNINSTALL) $(INSTALL_JITLIB)/$$file; \
done
diff -Pdpru luajit2-2.1-20250117.orig/src/luaconf.h luajit2-2.1-20250117/src/luaconf.h
--- luajit2-2.1-20250117.orig/src/luaconf.h 2025-01-17 08:03:34.000000000 +0300
+++ luajit2-2.1-20250117/src/luaconf.h 2025-01-18 12:04:14.635265329 +0300
@@ -50,7 +50,7 @@
#endif
#ifndef LUA_LJDIR
-#define LUA_LJDIR LUA_JROOT "/share/luajit-2.1"
+#define LUA_LJDIR LUA_JROOT "/share/luajit2-2.1"
#endif
#define LUA_JPATH ";" LUA_LJDIR "/?.lua"
diff -Pdpru luajit2-2.1-20250117.orig/src/Makefile luajit2-2.1-20250117/src/Makefile
--- luajit2-2.1-20250117.orig/src/Makefile 2025-01-17 08:03:34.000000000 +0300
+++ luajit2-2.1-20250117/src/Makefile 2025-01-18 12:09:11.660041483 +0300
@@ -214,11 +214,11 @@ TARGET_AR= $(CROSS)ar rcus
TARGET_STRIP= $(CROSS)strip
TARGET_LIBPATH= $(or $(PREFIX),/usr/local)/$(or $(MULTILIB),lib)
-TARGET_SONAME= libluajit-$(ABIVER).so.$(MAJVER)
-TARGET_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).dylib
+TARGET_SONAME= libluajit2-$(ABIVER).so.$(MAJVER)
+TARGET_DYLIBNAME= libluajit2-$(ABIVER).$(MAJVER).dylib
TARGET_DYLIBPATH= $(TARGET_LIBPATH)/$(TARGET_DYLIBNAME)
TARGET_DLLNAME= lua$(NODOTABIVER).dll
-TARGET_DLLDOTANAME= libluajit-$(ABIVER).dll.a
+TARGET_DLLDOTANAME= libluajit2-$(ABIVER).dll.a
TARGET_XSHLDFLAGS= -shared -fPIC -Wl,-soname,$(TARGET_SONAME)
TARGET_DYNXLDOPTS=
@@ -544,9 +544,9 @@ LIB_VMDEF= jit/vmdef.lua
LIB_VMDEFP= $(LIB_VMDEF)
LUAJIT_O= luajit.o
-LUAJIT_A= libluajit.a
-LUAJIT_SO= libluajit.so
-LUAJIT_T= luajit
+LUAJIT_A= libluajit2.a
+LUAJIT_SO= libluajit2.so
+LUAJIT_T= luajit2
ALL_T= $(LUAJIT_T) $(LUAJIT_A) $(LUAJIT_SO) $(HOST_T)
ALL_HDRGEN= lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h \