1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/avr-libc/APKBUILD
Marian Buschsieweke adc3e63489 community/avr-libc: update vendor headers + fix
1. Also use update_config_sub to fix compilation issues
2. Replace upstream vendor header files with new versions from microchip
   to allow working with "new" chips like the ATXmega128A1U from 2014.
   See http://avr.2057.n7.nabble.com/bug-48480-missing-definitions-in-iox128a1u-h-iox64a1u-h-td22238.html
   and https://github.com/ahtn/keyplus/issues/56
2021-03-09 17:58:49 +00:00

50 lines
1.6 KiB
Text

# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=avr-libc
pkgver=2.0.0
_ubuntupkgver=2.0.0
_atmelver=3.6.1
pkgrel=4
pkgdesc="The C runtime library for the AVR family of microcontrollers"
url="https://savannah.nongnu.org/projects/avr-libc/"
depends="gcc-avr"
makedepends="autoconf automake"
arch="all"
license="BSD 3-Clause"
subpackages="$pkgname-doc"
source="
https://download.savannah.gnu.org/releases/avr-libc/avr-libc-$pkgver.tar.bz2
http://archive.ubuntu.com/ubuntu/pool/universe/a/avr-libc/avr-libc_$_ubuntupkgver+Atmel$_atmelver.orig.tar.gz
"
prepare() {
default_prepare
# Hack: Allow config.guess and config.sub to be updated
chmod +w config.guess config.sub
update_config_guess
update_config_sub
# Update vendor header files. Downloading those from Microchip requires
# setting up an account and log in. So instead we download them from Ubuntu
# source mirror.
cp ../avr-libc-$_ubuntupkgver+Atmel$_atmelver/avr/*.h include/avr/
}
build() {
./bootstrap
CC=avr-gcc ./configure \
--build="$(/bin/sh config.guess)" \
--host=avr \
--prefix=/usr
make
}
package() {
make install DESTDIR="$pkgdir"
if [ -d "$pkgdir"/usr/lib64 ]; then
mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
rmdir "$pkgdir"/usr/lib64
fi
}
sha512sums="fc8d062043d633350dbe05978935dcb8028257a4f1013f246af9658aef0671def19ac11577d1ee9302df68df1b8cf030b22441d96852e185db212263aacabea6 avr-libc-2.0.0.tar.bz2
ffb0009f99ddd51dadf998e5d67d79ba192740e0aaa32a2c154b16985a07d3a267ffc58cbe70cb201550ea49540617b7985ea9a100bd0330d1602ba190018d1e avr-libc_2.0.0+Atmel3.6.1.orig.tar.gz"