add sys-kernel/dtc

This commit is contained in:
Martin Sekera 2018-12-16 23:56:51 +01:00
parent 52aa46638e
commit 990b2e61d9
2 changed files with 46 additions and 0 deletions

View file

@ -15,3 +15,4 @@ x11-apps
app-security app-security
media-gfx media-gfx
sys-kernel sys-kernel
cross-avr

View file

@ -0,0 +1,45 @@
# Copyright 2018 Martin Sekera <sekerama@gmail.com>
# 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
}