# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="The makefile package is a simple, powerful and extensible way to write makefiles for a GNUstep-based project." HOMEPAGE="http://www.gnustep.org" SRC_URI="ftp://ftp.gnustep.org/pub/gnustep/core/${P}.tar.gz" KEYWORDS="~x86" SLOT="0" LICENSE="GPL-2" IUSE="doc" # yeah, both tetex and texi2html are needed to install docs # - for some reason, the GNUmakefile's require a CLI option only # found in the texi2html package DEPEND="virtual/glibc >=sys-devel/gcc-3.0.4 >=sys-devel/make-3.75 doc? ( app-text/tetex dev-tex/latex2html app-text/texi2html )" RDEPEND="virtual/glibc >=sys-devel/gcc-3.0.4 >=sys-devel/make-3.75 doc? ( sys-apps/man sys-apps/texinfo )" pkg_setup() { # okay, I couldn't figure out how to check if a dependency was # compiled with a specific use flag, so we do it ./configure # check-for-lib style ... gcc ${FILESDIR}/helloworld.m -o $TMP/helloworld -lobjc || die \ "gcc must be compiled with Objective-C support! See the objc USE flag." } src_compile() { cd ${S} mkdir -p $TMP/fakehome mkdir -p $TMP/fakehome/GNUstep myconf="--prefix=/usr/GNUstep" myconf="$myconf --with-network-root=/usr/GNUstep/Network" myconf="$myconf --with-tar=/bin/tar" econf $myconf || die "configure failed" make \ HOME=$TMP/fakehome \ GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ messages=yes all || die "make died" } src_install() { addwrite /root/GNUstep addwrite /root/GNUstep/Library addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck make \ HOME=$TMP/fakehome \ GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ GNUSTEP_INSTALLATION_DIR=${D}usr/GNUstep/System \ INSTALL_ROOT_DIR=${D} \ GNUSTEP_SYSTEM_ROOT=${D}usr/GNUstep/System \ GNUSTEP_LOCAL_ROOT=${D}usr/GNUstep/Local \ GNUSTEP_NETWORK_ROOT=${D}usr/GNUstep/Network \ messages=yes install DESTDIR=${D} if [ `use doc` ]; then . ${D}usr/GNUstep/System/Makefiles/GNUstep.sh cd ${S}/Documentation make all make \ GNUSTEP_INSTALLATION_DIR=${D}usr/GNUstep/System \ install DESTDIR=${D} fi }