Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3ds: add duktape #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
32 changes: 32 additions & 0 deletions 3ds/duktape/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Maintainer:
# Contributor: Teddy Astie <[email protected]>

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/
}