# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ ECLASS=gnustep INHERITED="$INHERITED $ECLASS" DESCRIPTION="EClass designed to facilitate building GNUstep Apps, Frameworks, and Bundles on Gentoo." DEPEND="virtual/glibc >=sys-devel/gcc-3.0.4 gnustep-base/gnustep-make gnustep-base/gnustep-base gnustep-base/gnustep-gui virtual/gnustep-back" RDEPEND="virtual/glibc gnustep-base/gnustep-make gnustep-base/gnustep-base gnustep-base/gnustep-gui virtual/gnustep-back gnustep-base/gnustep-env" egnustepmake() { addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck addwrite /root/GNUstep/Library/Services/.GNUstepServices addwrite /root/GNUstep/Library/Services/.GNUstepAppList cd ${S} unset CFLAGS unset CC if [ -f /usr/GNUstep/System/Makefiles/GNUstep.sh ] ; then . /usr/GNUstep/System/Makefiles/GNUstep.sh else die "gnustep-make not installed!" fi mkdir -p $TMP/fakehome/GNUstep if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then make \ HOME=$TMP/fakehome \ GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ messages=yes \ all || die "emake failed" else die "no Makefile found" fi return 0 } egnustepinstall() { addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck addwrite /root/GNUstep/Library/Services/.GNUstepServices addwrite /root/GNUstep/Library/Services/.GNUstepAppList cd ${S} if [ -f /usr/GNUstep/System/Makefiles/GNUstep.sh ] ; then source /usr/GNUstep/System/Makefiles/GNUstep.sh else die "gnustep-make not installed!" fi mkdir -p $TMP/fakehome/GNUstep # Install packages into GNUSTEP_SYSTEM_ROOT # Why? # According to filesystem.ps, SYSTEM is for specific # system apps and packages installed by the distributor, # i.e. Gentoo. if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then make \ GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ HOME=$TMP/fakehome \ INSTALL_ROOT_DIR=${D} \ GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ GNUSTEP_LOCAL_ROOT=${GNUSTEP_SYSTEM_ROOT} \ GNUSTEP_NETWORK_ROOT=${GNUSTEP_SYSTEM_ROOT} \ GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \ GNUSTEP_MAKEFILES=${GNUSTEP_SYSTEM_ROOT}/Makefiles \ TAR_OPTIONS=${TAR_OPTIONS} \ messages=yes \ install || die "einstall failed: $*" else die "no Makefile found" fi return 0 } egnusteppostinst() { ewarn "Make sure to check handy scripts to ease your GNUstep setup;" ewarn "you can find them in /usr/GNUstep/Systems/Tools/Gentoo" } info_config_file() { ewarn "" ewarn "You will need to (inspect -- cause why not? -- and) execute:" ewarn " /usr/GNUstep/System/Tools/Gentoo/$1" ewarn "as the -user- you will run GNUstep applications as." } gnustep_src_compile() { egnustepmake || die } gnustep_src_install() { egnustepinstall || die } gnustep_pkg_postinst() { egnusteppostinst || die } EXPORT_FUNCTIONS src_compile src_install pkg_postinst