From: W. Trevor King Date: Mon, 13 Aug 2012 19:47:46 +0000 (-0400) Subject: Add dev-embedded/simulavr. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25b876ff06288d5636d313db2ed93a1492715137;p=wtk-overlay.git Add dev-embedded/simulavr. --- 25b876ff06288d5636d313db2ed93a1492715137 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..fa058f0 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for dev-embedded/simulavr +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*simulavr-9999 (13 Aug 2012) + 13 Aug 2012; W. Trevor King simulavr-9999.ebuild: + - Added initial ChangeLog which should be updated whenever the + package is updated in any way. This changelog is targetted to + users. This means that the comments should well explained and + written in clean English. The details about writing correct + changelogs are explained in the skel.ChangeLog file which you can + find in the root directory of the portage repository. diff --git a/Manifest b/Manifest new file mode 100644 index 0000000..5f70d97 --- /dev/null +++ b/Manifest @@ -0,0 +1,3 @@ +EBUILD simulavr-9999.ebuild 1911 RMD160 558fd37893161faa98b0d6661915e378a4c740bc SHA1 7a42947d226d8759398f8b79d79abc30ec7e2ff1 SHA256 04606c84c8821648df379984f02f305307eee4b657c13c0fc68c0f3fe6e273b1 +MISC ChangeLog 601 RMD160 56171751910f8d3564700e61b478729aca7fbd84 SHA1 14323d44d908388575f06ffc0690ea4d92d88f2c SHA256 b41cd1718171fed8744d6fc386c7277b760222e49a517cdcb2479ae06aa9a837 +MISC metadata.xml 247 RMD160 f6a3debfa8f70e039ec74fe92be0de687c8cec20 SHA1 30c46f34b3a777a6ff4f46dd4590b94677594948 SHA256 30b3270d8e655f6c190d3148f49b9364795beb41991502630e6631886ef107ea diff --git a/metadata.xml b/metadata.xml new file mode 100644 index 0000000..7b35910 --- /dev/null +++ b/metadata.xml @@ -0,0 +1,9 @@ + + + + + + wking@tremily.us + W. Trevor King + + diff --git a/simulavr-9999.ebuild b/simulavr-9999.ebuild new file mode 100644 index 0000000..996a94a --- /dev/null +++ b/simulavr-9999.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="4" + +inherit autotools eutils + +if [[ "${PV}" == "9999" ]]; then + inherit git-2 + EGIT_BRANCH="master" + EGIT_REPO_URI="git://git.savannah.nongnu.org/${PN}.git" + SRC_URI="" +else + SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz" +fi + +DESCRIPTION="A simulator for the Atmel AVR family of microcontrollers" +HOMEPAGE="http://www.nongnu.org/${PN}/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc python static-libs tcl verilog" + +RDEPEND="sys-libs/ncurses" +DEPEND="${RDEPEND} + >=dev-lang/swig-2.0.0 + doc? ( app-doc/doxygen[dot] ) + python? ( >=dev-lang/python-2.4 ) + tcl? ( dev-lang/tcl dev-tcltk/itcl ) + verilog? ( sci-electronics/iverilog )" + +pkg_setup() { + if ! has_version cross-avr/gcc; then + eerror + eerror "${PN} requires avr-gcc >= 4.3.4 to be installed." + eerror "You can install it by running:" + eerror " # crossdev -t avr" + eerror + die "Missing avr-gcc" + fi + if ! has_version cross-avr/binutils; then + eerror + eerror "${PN} requires avr binutils >= 2.20 to be installed." + eerror "You can install it by running:" + eerror " # crossdev -t avr" + eerror + die "Missing avr binutils" + fi +} + +src_prepare() { + if [[ "${PV}" == "9999" ]]; then + ./bootstrap + fi +} + +src_configure() { + local my_conf="--enable-dependency-tracking" + local BINUTILS=$(binutils-config --get-current-profile avr) + local BINUTILS_CONFIG="/etc/env.d/binutils/${BINUTILS}" + local BINUTILS_PATH=$(sed -n 's/^LIBPATH="\(.*\)"$/\1/p' "${BINUTILS_CONFIG}") + my_conf="${my_conf} --with-bfd=${BINUTILS_PATH}" + myconf="${my_conf} $(use_enable python)" + myconf="${my_conf} $(use_enable static-libs static)" + myconf="${my_conf} $(use_enable tcl)" + myconf="${my_conf} $(use_enable verilog)" + myconf="${my_conf} $(use_enable doc doxygen-doc )" + econf ${my_conf} || die "econf failed" +}