diff options
author | 2018-03-13 15:37:00 +0100 | |
---|---|---|
committer | 2018-03-13 15:37:32 +0100 | |
commit | 416638311956d613f20896a3270569f408909c18 (patch) | |
tree | b8ab9356f0953898c20055c7586f0133a6282528 | |
parent | sci-electronics/qucs from gentoo (diff) | |
download | eroen-416638311956d613f20896a3270569f408909c18.tar.gz eroen-416638311956d613f20896a3270569f408909c18.tar.bz2 eroen-416638311956d613f20896a3270569f408909c18.zip |
qucs-9999
-rw-r--r-- | sci-electronics/qucs/Manifest | 1 | ||||
-rw-r--r-- | sci-electronics/qucs/qucs-9999.ebuild | 103 |
2 files changed, 104 insertions, 0 deletions
diff --git a/sci-electronics/qucs/Manifest b/sci-electronics/qucs/Manifest index 8d1d543..46a1971 100644 --- a/sci-electronics/qucs/Manifest +++ b/sci-electronics/qucs/Manifest @@ -1 +1,2 @@ +DIST gtest-1.8.0.tar.gz 1281617 BLAKE2B ac052b4d0eb0d8ded03a8c7dff05177818627b8a51f2dbc2c162b2ee2a5d1323539e7d0d02236d9ebb799995e018f0171c2fdaeb4de3bb339548265e50de79e6 SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d DIST qucs-0.0.18.tar.gz 45270816 BLAKE2B 84c70f23fc91decf4b237cab507c2a5de482126c27978e7c331264fc584323cf16c37509212e98f84aa0fd6c847a0aeb3d568bdb23c5551a357c9a794c96d614 SHA512 b6836837fde44fe04e6a0533905c7bbfdbb6f64412fbc2516cab281de2ec51738cf62bb245763a0be6711e02392f8d73e87b86bff6eb432fe3bbf47636c98313 diff --git a/sci-electronics/qucs/qucs-9999.ebuild b/sci-electronics/qucs/qucs-9999.ebuild new file mode 100644 index 0000000..9775354 --- /dev/null +++ b/sci-electronics/qucs/qucs-9999.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit flag-o-matic toolchain-funcs virtualx autotools python-any-r1 git-r3 + +GTEST_PV=1.8.0 + +DESCRIPTION="Quite Universal Circuit Simulator in Qt4" +HOMEPAGE="http://qucs.sourceforge.net/" +#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +SRC_URI="test? ( https://github.com/google/googletest/archive/release-$GTEST_PV.tar.gz -> gtest-$GTEST_PV.tar.gz )" +EGIT_REPO_URI="https://github.com/Qucs/qucs.git" +EGIT_BRANCH="develop" + +LICENSE="GPL-2" +SLOT="0" +#KEYWORDS="~amd64 ~x86" +IUSE="debug" + +RDEPEND="dev-qt/qtcore:4[qt3support] + dev-qt/qtgui:4[qt3support] + dev-qt/qtscript:4 + dev-qt/qtsvg:4 + dev-qt/qt3support:4 + x11-libs/libX11:0=" +DEPEND="${RDEPEND} + sci-electronics/adms + sci-electronics/ASCO + test? ( ${PYTHON_DEPS} )" + +pkg_setup() { + # avoid python-any-r1_pkg_setup in case tests are disabled and we have no + # compatible python installed + : +} + +src_unpack() { + git-r3_src_unpack + default +} + +src_prepare() { + default + + # oh my, they strip -g out of C*FLAGS + # note: edit .ac first, then generated files, so that the latter + # have newer timestamp and not trigger regen + sed -i \ + -e 's/C.*FLAGS.*sed.*-g.*$/:/' \ + -e 's/C.*FLAGS.*-O0.*$/:/' \ + qucs-core/configure.ac \ + || die "C*FLAGS sanitization sed failed" + + # let's use our own sandbox-friendly temporary space for tests + sed -e "s@/tmp/qucstest/@$T/qucstest/@" \ + -i qucs-test/run_equations.py || die + + AT_NO_RECURSIVE=yes eautoreconf + local d + for d in qucs-core qucs qucs-doc; do + pushd $d>/dev/null || die + AT_NO_RECURSIVE=yes eautoreconf + popd>/dev/null || die + done +} + +src_configure() { + local myconf=( + # enables asserts and debug codepaths + $(use_enable debug) + + # avoid automagic dep + # TODO: add support for it + --disable-mpi + + # TODO: add support for this too + --disable-doc + + # gtest is strange, see + # https://github.com/Qucs/qucs/pull/785 + --with-gtest="$WORKDIR"/googletest-release-$GTEST_PV/googletest + ) + + # automagic default on clang++ + tc-export CXX + + econf "${myconf[@]}" +} + +src_test() { + python_setup + virtx default +} + +pkg_postinst() { + if ! has_version 'sci-electronics/freehdl'; then + elog "If you would like to be able to run digital simulations, please install:" + elog " sci-electronics/freehdl" + fi +} |