Add dev-embedded/simulavr-1.1.0
[shuber-gentoo-overlay.git] / dev-embedded / simulavr / simulavr-1.1.0.ebuild
diff --git a/dev-embedded/simulavr/simulavr-1.1.0.ebuild b/dev-embedded/simulavr/simulavr-1.1.0.ebuild
new file mode 100644 (file)
index 0000000..4b66d74
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake-utils git-r3
+
+EGIT_REPO_URI="https://git.savannah.gnu.org/git/simulavr.git"
+EGIT_COMMIT="release-${PV}"
+
+DESCRIPTION="A simulator for the Atmel AVR family of microcontrollers"
+HOMEPAGE="https://www.nongnu.org/simulavr/"
+MYPNV="${PN}-${EGIT_COMMIT}"
+SRC_URI="https://git.savannah.nongnu.org/cgit/${PN}.git/snapshot/${MYPNV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+IUSE="verilog"
+RDEPEND=""
+DEPEND="sys-apps/sed
+               cross-avr/gcc
+               >=dev-lang/swig-2.0.0
+               sys-apps/texinfo
+               >=dev-lang/python-3.5
+               sys-libs/ncurses
+               verilog? ( dev-tcltk/itcl sci-electronics/iverilog )"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+PATCHES="${FILESDIR}/fix-git-version.patch
+               ${FILESDIR}/fix-installpath.patch"
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_INSTALL_INCLUDEDIR=include/${PN}-${PV}
+               -DPACKAGE_VERSION=${PV}
+               -DBUILD_VERILOG=$(usex verilog)
+       )
+
+       cmake-utils_src_configure ${mycmakeargs}
+}
+
+src_compile() {
+       cmake-utils_src_compile
+       cmake-utils_src_make doc
+}