Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions 3ds/LUA/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Maintainer: PGGKun <slunngdev@gmail.com>
pkgname=3ds-lua
pkgver=5.4.4
pkgrel=1
pkgdesc='Embeddable script language LUA (for Nintendo 3DS homebrew development)'
arch=('any')
url='http://www.lua.org/'
license=('MIT')
options=(!strip libtool staticlibs)
source=("http://www.lua.org/ftp/lua-$pkgver.tar.gz")
sha1sums=('03c27684b9d5d9783fb79a7c836ba1cdc5f309cd')
makedepends=('devkitARM' 'dkp-toolchain-vars')
groups=('3ds-portlibs')

build() {
cd lua-$pkgver/src
patch -p1 -i $srcdir/../lua-5.4.4.patch
}

package() {
cd lua-$pkgver/src
source /opt/devkitpro/3dsvars.sh

make DEPSDIR="$pkgdir" generic

mkdir -p $pkgdir$PORTLIBS_PREFIX/lib
install -Dm644 liblua.a $pkgdir$PORTLIBS_PREFIX/lib/

mkdir -p $pkgdir$PORTLIBS_PREFIX/include/LUA/
install -Dm644 ./*.h $pkgdir$PORTLIBS_PREFIX/include/LUA/
}
49 changes: 49 additions & 0 deletions 3ds/LUA/lua-5.4.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
--- src/Makefile 2022-05-24 15:43:55.149997400 -0300
+++ src/Makefile 2022-05-24 15:44:21.061908400 -0300
@@ -4,15 +4,17 @@
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================

# Your platform. See PLATS for possible values.
-PLAT= guess
+include $(DEVKITARM)/3ds_rules

-CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
-LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
+PLAT= none
+ARCH= -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
+CC= arm-none-eabi-gcc
+CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) $(ARCH)
+LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) $(ARCH)
LIBS= -lm $(SYSLIBS) $(MYLIBS)

-AR= ar rcu
-RANLIB= ranlib
+AR= arm-none-eabi-ar rcu
+RANLIB= arm-none-eabi-ranlib
RM= rm -f
UNAME= uname

@@ -143,15 +145,15 @@
# Targets that do not create files (not all makes understand .PHONY).
.PHONY: all $(PLATS) help test clean default o a depend echo

-# Compiler modules may use special flags.
-llex.o:
- $(CC) $(CFLAGS) $(CMCFLAGS) -c llex.c
+# # Compiler modules may use special flags.
+# llex.o:
+# $(CC) $(CFLAGS) $(CMCFLAGS) -c llex.c

-lparser.o:
- $(CC) $(CFLAGS) $(CMCFLAGS) -c lparser.c
+# lparser.o:
+# $(CC) $(CFLAGS) $(CMCFLAGS) -c lparser.c

-lcode.o:
- $(CC) $(CFLAGS) $(CMCFLAGS) -c lcode.c
+# lcode.o:
+# $(CC) $(CFLAGS) $(CMCFLAGS) -c lcode.c

# DO NOT DELETE