# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

DESCRIPTION="Wcalc is a tool for the analysis and synthesis of transmission line structures and related components."
HOMEPAGE="http://wcalc.sourceforge.net"
SRC_URI="mirror://sourceforge/wcalc/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~mips ~sparc ~x86 ~amd64"
IUSE="gtk2 gtk1 htdocs stdio matlab octave scilab cgi cgistatic"

RDEPEND="
  gtk2? ( >=x11-libs/gtk+-2.0 )
  gtk1? ( <x11-libs/gtk+-2.0 )
  matlab? ( sci-mathematics/matlab )
  octave? ( sci-mathematics/octave )
  scilab? ( sci-mathematics/scilab )
"

src_configure() {
    econf \
          $(use_enable gtk2) \
          $(use_enable gtk1) \
          $(use_enable htdocs) \
          $(use_enable stdio) \
          $(use_with matlab) \
          $(use_with octave) \
          $(use_with scilab) \
          $(use_enable cgi) \
          $(use_enable cgistatic)
}

src_install() {
    emake DESTDIR="${D}" install

    dodoc ABOUT-NLS NEWS TODO AUTHORS COPYING README README.newmodel
}