--- /dev/null
+# 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 <wking@drexel.edu> 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.
--- /dev/null
+# 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"
+}