0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 00:10:52 +00:00
termux-packages/packages/libluajit/src-Makefile.patch
Fredrik Fornwall ada803a291 fix(main/libluajit): Fix mismatch between version and what is built
Background: luajit uses rolling releases - see
https://luajit.org/download.html

The recommended approach is to make frequent snapshots, which the termux
package is currently taking from the 2.1 branch.

The version scheme follows what arch linux is doing:
https://archlinux.org/packages/extra/x86_64/luajit/

That means that the version number "2.1.1716656478" refers to the "2.1"
branch, with "1716656478" being the timestamp of the commit built (as
displayed by `git show -s --format=%ct`).

The problem is that the termux package was hardcoded to build a specific
commit from 2021-03-10:
787736990a

We now instead look up the commit from the timestamp in the version string,
so that what is built is correct, and auto updates will start working as expected.
2024-06-02 10:17:18 +02:00

55 lines
1.5 KiB
Diff

diff -u -r ../LuaJIT/src/Makefile ./src/Makefile
--- ../LuaJIT/src/Makefile 2024-06-01 20:36:31.761902429 +0000
+++ ./src/Makefile 2024-06-01 20:38:32.396582115 +0000
@@ -26,7 +26,7 @@
DEFAULT_CC = gcc
#
# LuaJIT builds as a native 32 or 64 bit binary by default.
-CC= $(DEFAULT_CC)
+CC?= $(DEFAULT_CC)
#
# Use this if you want to force a 32 bit build on a 64 bit multilib OS.
#CC= $(DEFAULT_CC) -m32
@@ -191,7 +191,7 @@
CCOPTIONS= $(CCDEBUG) $(ASOPTIONS)
LDOPTIONS= $(CCDEBUG) $(LDFLAGS)
-HOST_CC= $(CC)
+HOST_CC?= $(CC)
HOST_RM?= rm -f
# If left blank, minilua is built and used. You can supply an installed
# copy of (plain) Lua 5.1 or 5.2, plus Lua BitOp. E.g. with: HOST_LUA=lua
@@ -204,17 +204,17 @@
HOST_ALDFLAGS= $(LDOPTIONS) $(HOST_XLDFLAGS) $(HOST_LDFLAGS)
HOST_ALIBS= $(HOST_XLIBS) $(LIBS) $(HOST_LIBS)
-STATIC_CC = $(CROSS)$(CC)
-DYNAMIC_CC = $(CROSS)$(CC) -fPIC
+STATIC_CC = $(CC)
+DYNAMIC_CC = $(CC) -fPIC
TARGET_CC= $(STATIC_CC)
TARGET_STCC= $(STATIC_CC)
TARGET_DYNCC= $(DYNAMIC_CC)
-TARGET_LD= $(CROSS)$(CC)
-TARGET_AR= $(CROSS)ar rcus
-TARGET_STRIP= $(CROSS)strip
+TARGET_LD= $(CC)
+TARGET_AR= $(AR) rcus 2>/dev/null
+TARGET_STRIP= $(STRIP)
TARGET_LIBPATH= $(or $(PREFIX),/usr/local)/$(or $(MULTILIB),lib)
-TARGET_SONAME= libluajit-$(ABIVER).so.$(MAJVER)
+TARGET_SONAME= libluajit-$(ABIVER).so
TARGET_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).dylib
TARGET_DYLIBPATH= $(TARGET_LIBPATH)/$(TARGET_DYLIBNAME)
TARGET_DLLNAME= lua$(NODOTABIVER).dll
@@ -608,7 +608,7 @@
endif
endif
-Q= @
+Q=
E= @echo
#Q=
#E= @: