blob: 7abc5551cedb0ea1c135fedf60b29246936a5c78 (
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
31
32
33
34
35
36
37
|
# Maintainer: angelodalzotto <angelodalzotto97 at gmail dot com>
_target=riscv64-elf
_pkgname=picolibc
pkgname=$_target-$_pkgname
pkgver=1.8.8
pkgrel=1
pkgdesc='C library designed for embedded 32- and 64- bit systems'
arch=(x86_64)
url='https://github.com/picolibc/picolibc'
license=('BSD')
makedepends=("$_target-gcc" 'meson')
source=("$_pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('b7acd0094b3c2c265e0f41bfa9d29ab85a47e1a02d65cf4929b1886158e8c261')
options=(!strip !buildflags)
prepare() {
cp "$_pkgname-$pkgver/scripts/cross-riscv64-unknown-elf.txt" "cross-$_target.txt"
sed -i 's/unknown-//g' "cross-$_target.txt"
}
build() {
meson setup \
--prefix="/usr/$_target" \
--cross-file "cross-${_target}.txt" \
-Dincludedir=lib/$_pkgname/include \
-Dlibdir=lib/$_pkgname/lib \
-Dspecsdir=lib/ \
"$_pkgname-$pkgver" build
meson compile -C build
}
package() {
meson install -C build --destdir "$pkgdir"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" "$srcdir/$_pkgname-$pkgver/COPYING."{GPL2,NEWLIB,picolibc}
}
|