summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 805b54756feaa1da0fef990ec256c352dc52660d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pkgname=psp-newlib
pkgver=1.20.0
pkgrel=1
pkgdesc="Newlib is a C library intended for use on embedded systems (psp)"
arch=(any)
url="https://github.com/pspdev/newlib"
license=('GPL')
groups=('psp')
makedepends=('psp-gcc-base' 'psp-binutils' 'psp-sdk-base')
options=('!buildflags' '!strip' 'staticlibs')
source=("https://github.com/pspdev/newlib/archive/newlib-${pkgver//./_}-PSP.zip")
sha256sums=('SKIP')

build()
{
  cd "$srcdir/newlib-newlib-${pkgver//./_}-PSP"
  mkdir -p build-psp && cd build-psp
  ../configure --prefix=/usr --target=psp --enable-newlib-iconv --enable-newlib-multithread --enable-newlib-mb 
  make 
}

package()
{
  cd "$srcdir/newlib-newlib-${pkgver//./_}-PSP/build-psp"
  make install DESTDIR="$pkgdir"
  rm -r "$pkgdir"/usr/share
  rm "$pkgdir"/usr/psp/lib/crt0.o # provided by psp-sdk
  rm "$pkgdir"/usr/psp/include/pthread.h "$pkgdir"/usr/psp/include/sched.h  # provided by psp-pthreads-emb
}