From 00b4c4632897deca990f3a63371f270b906183c8 Mon Sep 17 00:00:00 2001 From: TSnake41 Date: Mon, 13 Apr 2020 16:47:51 +0200 Subject: [PATCH] 3ds: add duktape --- 3ds/duktape/PKGBUILD | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 3ds/duktape/PKGBUILD diff --git a/3ds/duktape/PKGBUILD b/3ds/duktape/PKGBUILD new file mode 100644 index 00000000..a5238a95 --- /dev/null +++ b/3ds/duktape/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: +# Contributor: Teddy Astie + +pkgname=3ds-duktape +pkgver=2.5.0 +pkgrel=1 +pkgdesc='Embeddable Javascript engine (for Nintendo 3DS homebrew development)' +arch=('any') +url='https://duktape.org/index.html' +license=('MIT') +options=(!strip) +makedepends=('devkitpro-pkgbuild-helpers') +source=("https://duktape.org/duktape-$pkgver.tar.xz") +sha256sums=('83d411560a1cd36ea132bd81d8d9885efe9285c6bc6685c4b71e69a0c4329616') +groups=('3ds-portlibs') + +build() { + cd duktape-$pkgver + source /opt/devkitpro/3dsvars.sh + + ${TOOL_PREFIX}gcc -c -o duktape.o src/duktape.c ${CFLAGS} + ${TOOL_PREFIX}ar rcu libduktape.a duktape.o +} + +package() { + cd duktape-$pkgver + source /opt/devkitpro/3dsvars.sh + + mkdir -p ${pkgdir}${PORTLIBS_PREFIX}/lib/ ${pkgdir}${PORTLIBS_PREFIX}/include/ + cp libduktape.a ${pkgdir}${PORTLIBS_PREFIX}/lib/ + cp src/duktape.h src/duk_config.h ${pkgdir}${PORTLIBS_PREFIX}/include/ +}