Add dev-embedded/simulavr.
authorW. Trevor King <wking@tremily.us>
Mon, 13 Aug 2012 19:47:46 +0000 (15:47 -0400)
committerW. Trevor King <wking@tremily.us>
Mon, 13 Aug 2012 19:47:46 +0000 (15:47 -0400)
dev-embedded/simulavr/ChangeLog [new file with mode: 0644]
dev-embedded/simulavr/Manifest [new file with mode: 0644]
dev-embedded/simulavr/metadata.xml [new file with mode: 0644]
dev-embedded/simulavr/simulavr-9999.ebuild [new file with mode: 0644]

diff --git a/dev-embedded/simulavr/ChangeLog b/dev-embedded/simulavr/ChangeLog
new file mode 100644 (file)
index 0000000..fa058f0
--- /dev/null
@@ -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 <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.
diff --git a/dev-embedded/simulavr/Manifest b/dev-embedded/simulavr/Manifest
new file mode 100644 (file)
index 0000000..5f70d97
--- /dev/null
@@ -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/dev-embedded/simulavr/metadata.xml b/dev-embedded/simulavr/metadata.xml
new file mode 100644 (file)
index 0000000..7b35910
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd></herd>
+       <maintainer>
+               <email>wking@tremily.us</email>
+               <name>W. Trevor King</name>
+       </maintainer>
+</pkgmetadata>
diff --git a/dev-embedded/simulavr/simulavr-9999.ebuild b/dev-embedded/simulavr/simulavr-9999.ebuild
new file mode 100644 (file)
index 0000000..996a94a
--- /dev/null
@@ -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"
+}