summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorEmil Renner Berthing2019-10-26 15:22:12 +0200
committerEmil Renner Berthing2019-10-26 15:23:07 +0200
commit37a0a6d5afad79af1d78828dcecf28c94851f9c4 (patch)
treef452ea626e5d8f7c289e12b55e2beb209969a6d3 /PKGBUILD
downloadaur-37a0a6d5afad79af1d78828dcecf28c94851f9c4.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3d2cd828d68
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Emil Renner Berthing <aur@esmil.dk>
+
+_target=riscv64-unknown-elf
+pkgname=$_target-picolibc
+pkgver=1.0.55
+pkgrel=1
+pkgdesc='Fork of newlib with stdio bits from avrlibc'
+arch=('i686' 'x86_64')
+url='https://github.com/keith-packard/picolibc'
+license=('BSD')
+depends=("$_target-gcc")
+makedepends=('git' 'meson')
+source=('git+https://github.com/keith-packard/picolibc.git')
+sha1sums=('SKIP')
+options=(!strip)
+
+pkgver() {
+ cd "$srcdir/picolibc"
+ local ver="$(git describe --tags)"
+ ver="${ver%-*}"
+ ver="${ver#v}"
+ echo "${ver/-/.}"
+}
+
+build() {
+ mkdir build
+ cd build
+
+ meson ../picolibc \
+ -Dincludedir=picolibc/$_target/include \
+ -Dlibdir=picolibc/$_target/lib \
+ --cross-file ../picolibc/cross-${_target}.txt
+
+ ninja
+}
+
+package() {
+ cd build
+
+ DESTDIR="$pkgdir" ninja install
+}
+
+# vim: set ts=2 sw=2 et: