summaryrefslogtreecommitdiff
path: root/dev-embedded/avr-libc/avr-libc-2.1.0.ebuild
diff options
context:
space:
mode:
authorNils Freydank <holgersson@posteo.de>2022-06-08 22:21:21 +0200
committerUlrich Müller <ulm@gentoo.org>2022-06-08 22:49:17 +0200
commite61d77fa08f6a640921e741017895740857fcd63 (patch)
tree884b28e7eb51139bd7dcf93133fcb69eb598e226 /dev-embedded/avr-libc/avr-libc-2.1.0.ebuild
parentef87bc9e39ed6cb7fd649fd43d23728dbfff81de (diff)
downloadgentoo-e61d77fa08f6a640921e741017895740857fcd63.tar.gz
gentoo-e61d77fa08f6a640921e741017895740857fcd63.tar.bz2
gentoo-e61d77fa08f6a640921e741017895740857fcd63.zip
dev-embedded/avr-libc: Bump to 2.1.0, drop IUSE="doc"
Bump to the new version and EAPI 8. There is an issue with upstream's distfile signature for the HTML documentation, so dropping for now. IMHO we should restore the flag and doc installation as soon as upstream's signature is fixed. Man pages are not affected as they are part of the main distfiles archive. Bug: https://bugs.gentoo.org/837146 Signed-off-by: Nils Freydank <holgersson@posteo.de> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'dev-embedded/avr-libc/avr-libc-2.1.0.ebuild')
-rw-r--r--dev-embedded/avr-libc/avr-libc-2.1.0.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/dev-embedded/avr-libc/avr-libc-2.1.0.ebuild b/dev-embedded/avr-libc/avr-libc-2.1.0.ebuild
new file mode 100644
index 000000000000..af637bbc7ebc
--- /dev/null
+++ b/dev-embedded/avr-libc/avr-libc-2.1.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+CHOST="avr"
+CTARGET="avr"
+
+inherit flag-o-matic
+
+DESCRIPTION="C library for Atmel AVR microcontrollers"
+HOMEPAGE="http://www.nongnu.org/avr-libc/"
+SRC_URI="https://savannah.nongnu.org/download/avr-libc/${P}.tar.bz2
+ https://savannah.nongnu.org/download/avr-libc/${PN}-manpages-${PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+# 'amd64' is a blessed placeholder for crossdev. It could
+# be any other arch. See bug #620316#c5
+# Don't add more arches to KEYWORDS.
+KEYWORDS="amd64"
+IUSE="headers-only"
+
+DEPEND=">=sys-devel/crossdev-0.9.1"
+[[ ${CATEGORY/cross-} != ${CATEGORY} ]] \
+ && RDEPEND="!dev-embedded/avr-libc" \
+ || RDEPEND=""
+
+DOCS="AUTHORS ChangeLog* NEWS README"
+
+pkg_setup() {
+ # check for avr-gcc, bug #134738
+ ebegin "Checking for avr-gcc"
+ if type -p avr-gcc > /dev/null ; then
+ eend 0
+ else
+ eend 1
+
+ eerror
+ eerror "Failed to locate 'avr-gcc' in \$PATH. You can install an AVR toolchain using:"
+ eerror " $ crossdev -t avr"
+ eerror
+ die "AVR toolchain not found"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # work around broken gcc versions PR45261
+ local mcu
+ for mcu in $(sed -r -n '/CHECK_AVR_DEVICE/{s:.*[(](.*)[)]:\1:;p}' configure.ac) ; do
+ if avr-gcc -E - -mmcu=${mcu} <<<"" |& grep -q 'unknown MCU' ; then
+ sed -i "/HAS_${mcu}=yes/s:yes:no:" configure
+ fi
+ done
+
+ strip-flags
+ strip-unsupported-flags
+}
+
+src_install() {
+ default
+
+ # man pages can not go into standard locations
+ # as they would then overwrite libc man pages
+ docinto man/man3
+ dodoc -r "${WORKDIR}"/man/man3/.
+
+ # Make sure diff cross-compilers don't collide #414075
+ mv "${ED}"/usr/share/doc/{${PF},${CTARGET}-${PF}} || die
+}