# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: inherit libtool DESCRIPTION="An OSF/Motif(R) clone" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" HOMEPAGE="http://www.lesstif.org/" LICENSE="LGPL-2" #KEYWORDS="~x86 ~ppc ~sparc" KEYWORDS="-*" SLOT="0" PROVIDE="virtual/motif" DEPEND="virtual/glibc virtual/x11" RDEPEND="${DEPEND} !x11-libs/openmotif" src_unpack() { unpack ${A} cd ${S}/scripts/autoconf sed -e "/^aclocaldir =/ a DESTDIR = ${D}" \ Makefile.in > Makefile.in.hacked mv Makefile.in.hacked Makefile.in || die } src_compile() { elibtoolize econf \ --prefix=/usr/X11R6 \ --mandir=/usr/X11R6/man \ --enable-static \ --enable-build-21 \ --enable-production \ --with-x || die "./configure failed" emake CFLAGS="${CFLAGS}" || die } src_install() { make DESTDIR=${D} install || die "make install" # move things to the destination end of directory symlinks dodir "/etc/X11" || die "mkdir ${D}etc/X11" mv "${D}usr/X11R6/lib/X11/app-defaults"\ "${D}etc/X11" || die "mv app-defaults" mv "${D}usr/X11R6/lib/X11/mwm"\ "${D}etc/X11" || die "mv mwm-confdir" dosym "../../../../etc/X11/mwm" \ "/usr/X11R6/lib/X11/mwm" || die "ln mwm-confdir" # This comes from x11-base/xfree! rm -f "${D}/usr/X11R6/lib/X11/config/host.def" dodir /usr/share/doc/${P} mv ${D}/usr/X11R6/LessTif/* ${D}/usr/share/doc/${P}/ # The LessTif directory should be empty now. rmdir ${D}/usr/X11R6/LessTif || die prepman "/usr/X11R6" } pkg_postrm() { # Handle if updating removed host.def if [ ! -f ${ROOT}/usr/lib/X11/config/host.def \ -a -d ${ROOT}/usr/lib/X11/config ] then touch ${ROOT}/usr/lib/X11/config/host.def fi }