ngspice-26.ebuild 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="3"
  4. inherit autotools eutils
  5. DESCRIPTION="The Next Generation Spice (Electronic Circuit Simulator)"
  6. SRC_URI="mirror://sourceforge/ngspice/${P}.tar.gz
  7. mirror://sourceforge/ngspice/${PN}-${PV}-manual.pdf"
  8. HOMEPAGE="http://ngspice.sourceforge.net"
  9. LICENSE="BSD GPL-2"
  10. SLOT="0"
  11. IUSE="X debug readline"
  12. KEYWORDS="~amd64 ~ppc ~sparc ~x86"
  13. DEPEND="sys-libs/ncurses
  14. readline? ( >=sys-libs/readline-5.0 )
  15. X? ( x11-libs/libXaw
  16. x11-libs/libXt
  17. x11-libs/libX11
  18. sci-visualization/xgraph )"
  19. RDEPEND="$DEPEND"
  20. src_prepare() {
  21. sed -e '/CFLAGS=/s: -s::' -i configure.ac || die "sed failed"
  22. sed -e 's/_CFLAGS -O2/_CFLAGS/' -i configure.ac || die "sed failed"
  23. sed -e 's/LDFLAGS =/LDFLAGS +=/' -i src/xspice/icm/makedefs.in || die "sed failed"
  24. sed -e '/AM_INIT_AUTOMAKE/s:-Werror::' -i configure.ac || die "sed failed"
  25. # builds also with ncurses[tinfo] (bug #458128)
  26. sed -e 's/ncurses termcap/ncurses termcap tinfo/g' -i configure.ac || die
  27. eautoreconf
  28. }
  29. src_configure() {
  30. local MYCONF
  31. if use debug ; then
  32. MYCONF="--enable-debug \
  33. --enable-ftedebug \
  34. --enable-cpdebug \
  35. --enable-asdebug \
  36. --enable-stepdebug \
  37. --enable-pzdebug"
  38. else
  39. MYCONF="--disable-debug \
  40. --disable-ftedebug \
  41. --disable-cpdebug \
  42. --disable-asdebug \
  43. --disable-stepdebug \
  44. --disable-pzdebug"
  45. fi
  46. # Those don't compile
  47. MYCONF="${MYCONF} \
  48. --disable-sensdebug \
  49. --disable-blktmsdebug \
  50. --disable-smltmsdebug"
  51. econf \
  52. ${MYCONF} \
  53. --enable-xspice \
  54. --enable-cider \
  55. --enable-ndev \
  56. --disable-xgraph \
  57. --disable-dependency-tracking \
  58. --disable-rpath \
  59. $(use_with X x) \
  60. $(use_with readline)
  61. }
  62. # These will need to be looked at some day:
  63. # --enable-adms
  64. # --enable-nodelimiting
  65. # --enable-predictor
  66. # --enable-newtrunc
  67. # --enable-openmp
  68. src_install () {
  69. local infoFile
  70. for infoFile in doc/ngspice.info*; do
  71. echo 'INFO-DIR-SECTION EDA' >> ${infoFile}
  72. echo 'START-INFO-DIR-ENTRY' >> ${infoFile}
  73. echo '* NGSPICE: (ngspice). Electronic Circuit Simulator.' >> ${infoFile}
  74. echo 'END-INFO-DIR-ENTRY' >> ${infoFile}
  75. done
  76. emake DESTDIR="${D}" install || die "make install failed"
  77. dodoc ANALYSES AUTHORS BUGS ChangeLog DEVICES NEWS \
  78. README Stuarts_Poly_Notes || die "failed to install documentation"
  79. insinto /usr/share/doc/${PF}
  80. doins "${DISTDIR}"/${PN}-${PV}-manual.pdf || die "failed to install manual"
  81. # We don't need ngmakeidx to be installed
  82. rm "${D}"/usr/bin/ngmakeidx
  83. }
  84. src_test () {
  85. # Bug 108405
  86. true
  87. }