Skip to content

Commit

Permalink
3ds: Add objfw
Browse files Browse the repository at this point in the history
  • Loading branch information
Midar committed Oct 11, 2023
1 parent 916fcb9 commit 75ef122
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions 3ds/objfw/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Maintainer: Jonathan Schleifer <[email protected]>
pkgname=3ds-objfw
pkgver=1.0.4
pkgrel=1
pkgdesc="Portable, lightweight framework for the Objective-C language"
arch=('x86_64')
url="https://objfw.nil.im/"
license=('custom:QPL' 'GPL3' 'GPL2')
source=("objfw-$pkgver.tar.gz::https://objfw.nil.im/downloads/objfw-$pkgver.tar.gz")
sha256sums=(c62c61fc3f1b2d5c1d78369c602a6e82b32ade5c8ec0e9c410646d1554bf1e26)
groups=('3ds-portlibs')

build() {
export DEVKITPRO=/opt/devkitpro
export DEVKITARM="$DEVKITPRO/devkitARM"
export PORTLIBS_PREFIX="$DEVKITPRO/portlibs/3ds"
export PATH="$DEVKITARM/bin:$DEVKITPRO/bin:$PATH"

cd "objfw-$pkgver"
./configure --prefix="$PORTLIBS_PREFIX" --host=arm-none-eabi --with-3ds \
--with-tls=none
make
}

package() {
cd "objfw-$pkgver"
make DESTDIR="$pkgdir/" install

for i in LICENSE.QPL LICENSE.GPLv3 LICENSE.GPLv2; do
install -D -m 644 "$i" "$pkgdir$PORTLIBS_PREFIX/licenses/$pkgname/$i"
done

# We don't want the tools - we're not gonna run them on a 3DS.
rm -f "$pkgdir$PORTLIBS_PREFIX/bin/objfw-new"
rm -f "$pkgdir$PORTLIBS_PREFIX/bin/ofarc"
rm -f "$pkgdir$PORTLIBS_PREFIX/bin/ofdns"
rm -f "$pkgdir$PORTLIBS_PREFIX/bin/ofhash"
rm -f "$pkgdir$PORTLIBS_PREFIX/bin/ofhttp"
rm -fr "$pkgdir$PORTLIBS_PREFIX/share"
}

0 comments on commit 75ef122

Please sign in to comment.