yggdrasil/ports/lua/patches/0001-add-yggdrasil-support.patch

102 lines
3.2 KiB
Diff

diff -x '*.o' -crB lua-5.4.7-orig/Makefile lua-5.4.7/Makefile
*** lua-5.4.7-orig/Makefile 2024-05-09 00:47:12.000000000 +0300
--- lua-5.4.7/Makefile 2025-03-08 02:33:23.044385955 +0200
***************
*** 36,42 ****
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
# Convenience platforms targets.
! PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
# What to install.
TO_BIN= lua luac
--- 36,42 ----
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
# Convenience platforms targets.
! PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris yggdrasil
# What to install.
TO_BIN= lua luac
Only in lua-5.4.7/src: liblua.a
Only in lua-5.4.7/src: lua
Only in lua-5.4.7/src: luac
diff -x '*.o' -crB lua-5.4.7-orig/src/Makefile lua-5.4.7/src/Makefile
*** lua-5.4.7-orig/src/Makefile 2023-02-03 12:43:14.000000000 +0200
--- lua-5.4.7/src/Makefile 2025-03-08 02:33:30.698796912 +0200
***************
*** 4,18 ****
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
# Your platform. See PLATS for possible values.
! PLAT= guess
! CC= gcc -std=gnu99
! CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
! LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
! AR= ar rcu
! RANLIB= ranlib
RM= rm -f
UNAME= uname
--- 4,23 ----
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
# Your platform. See PLATS for possible values.
! PLAT= yggdrasil
! CC=clang
! CFLAGS= -fPIC \
! -target $(Y_TRIPLE) \
! --sysroot $(Y_SYSROOT) \
! -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
! LDFLAGS= -target $(Y_TRIPLE) \
! --sysroot $(Y_SYSROOT) \
! $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
! AR= llvm-ar rcu
! RANLIB= llvm-ranlib
RM= rm -f
UNAME= uname
***************
*** 26,36 ****
MYOBJS=
# Special flags for compiler modules; -Os reduces code size.
! CMCFLAGS=
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
! PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
LUA_A= liblua.a
CORE_O= 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
--- 31,41 ----
MYOBJS=
# Special flags for compiler modules; -Os reduces code size.
! CMCFLAGS=
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
! PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris yggdrasil
LUA_A= liblua.a
CORE_O= 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
***************
*** 120,125 ****
--- 125,133 ----
ios:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS"
+ yggdrasil:
+ $(MAKE) $(ALL) SYSCFLAGS="-fPIC -target $(Y_TRIPLE) --sysroot $(Y_SYSROOT)" SYSLDFLAGS="-target $(Y_TRIPLE) --sysroot $(Y_SYSROOT)"
+
Linux linux: linux-noreadline
linux-noreadline: