diff --git a/metadata/categories.conf b/metadata/categories.conf index fadbb22..d29f802 100644 --- a/metadata/categories.conf +++ b/metadata/categories.conf @@ -15,3 +15,4 @@ x11-apps app-security media-gfx sys-kernel +cross-avr diff --git a/packages/sys-kernel/dtc/dtc-1.4.6.exheres-0 b/packages/sys-kernel/dtc/dtc-1.4.6.exheres-0 new file mode 100644 index 0000000..c4a4ab6 --- /dev/null +++ b/packages/sys-kernel/dtc/dtc-1.4.6.exheres-0 @@ -0,0 +1,45 @@ +# Copyright 2018 Martin Sekera +# Distributed under the terms of the GNU General Public License v2 + +DOWNLOADS="mirror://kernel/software/utils/${PN}/${PNV}.tar.gz" +HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/" +SUMMARY="Open Firmware device tree compiler" + +LICENCES="GPL-2" +SLOT="0" +PLATFORMS="~amd64 ~armv7 ~armv8 ~x86" +MYOPTIONS="" + +DEPENDENCIES=" + build: + sys-devel/bison + sys-devel/flex +" + +# this is a very broken Makefile +# it fails to build the Python library if we set our own CFLAGS +# it also installs to crazy places + +src_prepare() { + default + + edo sed -i \ + -e '/^CFLAGS =/s:=:+=:' \ + -e '/^CPPFLAGS =/s:=:+=:' \ + -e 's:-g -Os::' \ + -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr/$(exhost --target):" \ + -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(exhost --target)/lib:" \ + Makefile +} + +src_compile() { + emake -j8 NO_PYTHON=1 +} + +src_test() { + emake NO_PYTHON=1 tests +} + +src_install() { + emake NO_PYTHON=1 DESTDIR="${IMAGE}" install +}