MiddleArch/config/pkgbuilds/openlibm-casio.j2

32 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-08-31 00:11:27 +02:00
pkgname={{ name }}
2021-06-08 23:08:11 +02:00
pkgver={{ tag }}
2022-01-12 01:07:56 +01:00
pkgrel={{ rel }}
2021-06-08 23:08:11 +02:00
pkgdesc='Fork of the OpenLibm math library with support for fx-9860G and fx-CG 50'
arch=('i686' 'x86_64')
url="https://gitea.planet-casio.com/Lephenixnoir/OpenLibm"
licence=('custom')
makedepends=('sh-elf-gcc-casio')
options=('!buildflags' '!strip')
source=("$pkgname-$pkgver.tar.gz::https://gitea.planet-casio.com/Lephenixnoir/OpenLibm/archive/${pkgver}-sh3eb.tar.gz")
sha256sums=('{{ hash }}')
prepare() {
cd "${srcdir}/openlibm"
make clean
}
build() {
cd "$srcdir/openlibm"
_prefix=$(sh-elf-gcc --print-search-dirs | grep install | sed 's/install: //')
make USEGCC=1 TOOLPREFIX=sh-elf- CC=sh-elf-gcc AR=sh-elf-ar ARCH=sh3eb libdir="${_prefix}" includedir="${_prefix}/include" libopenlibm.a
}
package() {
cd "$srcdir/openlibm"
_prefix=$(sh-elf-gcc --print-search-dirs | grep install | sed 's/install: //')
make USEGCC=1 TOOLPREFIX=sh-elf- CC=sh-elf-gcc AR=sh-elf-ar ARCH=sh3eb libdir="${_prefix}" includedir="${_prefix}/include" DESTDIR="$pkgdir" install-static install-headers
# Install licence
install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}