# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="XGKS is an X11 window system based version of the ANSI Graphical Kernel System" HOMEPAGE="http://xgks.sourceforge.net" SRC_URI="mirror://sourceforge/xgks/${P}.tar.Z" LICENSE="IBM" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="doc" DEPEND="doc? ( sys-apps/groff )" src_unpack() { unpack "${A}" cd "${S}"/src cp "${FILESDIR}"/linux.m4 "${S}"/src/port/fortc/linux.m4 epatch "${FILESDIR}"/patch-2.6.diff } src_compile() { cd "${S}"/src FC=`which g77` FC_IFC=`which ifc` FC=${FC:-${FC_IFC}} LD_X11="-L/usr/X11R6/lib -lX11" # Not quite sure why, but this is the only way that the # configure program noticed the FC and LD_X11 variables. FC="${FC}" LD_X11="${LD_X11}" econf --prefix="${D}"/usr || die # Had to make the make linear, otherwise the libxgks.a # wasn't ready. MAKEOPTS="" emake || die } src_install() { cd "${S}"/src make DESTDIR="{$D}" install || die "installation of library failed" dodoc COPYRIGHT HISTORY README # man pages cd "${S}"/src/doc make DESTDIR="{$D}" install || die "man page install failed" cd "${S}"/src # extended documentation if use doc; then TMPME="doc/userdoc/userdoc.me" TMPDR="doc/userdoc" /usr/bin/groff -t -me "${TMPME}" > "${TMPDR}"/userdoc.ps /usr/bin/groff -t -me -T html "${TMPME}" > "${TMPDR}"/userdoc.html dohtml "${TMPDR}"/userdoc.html dodoc "${TMPDR}"/userdoc.ps fi }