# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Ham radio backend rig control libraries" HOMEPAGE="http://sourceforge.net/projects/hamlib/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="gd gnuradio perl static tcltk X" DEPEND="virtual/glibc virtual/x11 >=app-doc/doxygen-1.3.5-r1 >=dev-util/pkgconfig-0.12.0 gd? ( media-libs/libgd ) perl? ( dev-lang/perl ) tcltk? ( dev-lang/tcl ) gnuradio? ( app-ham/gnuradio )" RDEPEND="${DEPEND}" PROVIDE="app-ham/hamlib" src_compile() { use static && append-ldflags -static local myconf myconf="" use gd && myconf="${myconf} --with-rigmatrix" || \ myconf="${myconf} --without-rigmatrix" use perl && myconf="${myconf} --with-perl-binding" || \ myconf="${myconf} --without-perl-binding" use tcltk && myconf="${myconf} --with-tcl-binding" || \ myconf="${myconf} --without-tcl-binding" econf \ --with-microtune \ --without-rpc-backends \ $(use_with gnuradio) \ ${myconf} || die "configure failed" emake || die "emake failed" cd doc && make doc || die "make doc failed" } src_install() { einstall || die dodoc AUTHORS PLAN README README.betatester README.developer dodoc LICENSE NEWS TODO dohtml doc/html/* doman doc/man/man3/* } pkg_postinst() { if [ ! -n "$(use gd)" ] ; then echo ewarn "Your USE flags did not contain \"gd\"." ewarn "Therefore, hamlib has been built without" ewarn "rigmatrix support. If this is not what you" ewarn "want, emerge \"libgd\" and add \"gd\" to" ewarn "your /etc/make.conf USE flags." echo fi echo einfo "hamlib is now installed. Add \"hamlib\" to" einfo "your /etc/make.conf USE flags to enable ham" einfo "radio applications to use hamlib libraries." echo }