--- /usr/portage/eclass/gnustep.eclass 2004-06-24 21:12:59.000000000 -0400 +++ gnustep.eclass 2004-06-28 19:50:34.000000000 -0400 @@ -1,45 +1,32 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep.eclass,v 1.8 2004/06/25 00:39:48 vapier Exp $ +# $Header: $ ECLASS=gnustep INHERITED="$INHERITED $ECLASS" -DESCRIPTION="Based on the gnustep eclass." +DESCRIPTION="EClass designed to facilitate building GNUstep Apps, Frameworks, and Bundles on Gentoo." -DEPEND="dev-util/gnustep-make - dev-util/gnustep-base - sys-devel/gcc - virtual/glibc" -RDEPEND="virtual/glibc" - -getsourcedir() { - if [ ! -d "${S}" ] ; then - if [ -d "${WORKDIR}/${PN}" ] ; then - S="${WORKDIR}/${PN}" - elif [ -d "${WORKDIR}/${P}" ] ; then - S="${WORKDIR}/${P}" - else - die "Cannot find source directory!" - fi - fi -} - -need-gnustep-gui() { - if [ "$1" ] ; then - DEPEND="${DEPEND} >=dev-util/gnustep-gui-$1" - RDEPEND="${RDEPEND} >=dev-util/gnustep-back-$1" - else - DEPEND="${DEPEND} dev-util/gnustep-gui" - RDEPEND="${RDEPEND} dev-util/gnustep-back" - fi -} +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="${DEPEND} + gnustep-base/gnustep-env" egnustepmake() { - getsourcedir - - addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck - addpredict /root/GNUstep +# einfo "*^%*%*(&^&^*^&^(*&^(*^" +# einfo "HOME: ${HOME}" +# einfo "whoami: `whoami`" +# einfo "*^%*%*(&^&^*^&^(*&^(*^" +# einfo "where? ${HOME}/GNUstep/Defaults/.GNUstepDefaults.lck" + addwrite ${HOME}/GNUstep + addwrite ${HOME}/GNUstep/Library + addwrite ${HOME}/GNUstep/Defaults/.GNUstepDefaults.lck + addwrite ${HOME}/GNUstep/Library/Services/.GNUstepServices + addwrite ${HOME}/GNUstep/Library/Services/.GNUstepAppList cd ${S} @@ -55,35 +42,18 @@ mkdir -p $TMP/fakehome/GNUstep if [ -x configure ] ; then - if [ -z "$*" ] ; then - ./configure \ - HOME=$TMP/fakehome \ - GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ - || die "configure failed" - else - ./configure \ - HOME=$TMP/fakehome \ - GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ - $* || die "configure failed (options: $*)" - fi + ./configure \ + HOME=$TMP/fakehome \ + GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ + $* || die "configure failed" fi - if [ "${GNUSTEPBACK_XFT}" != "2" ] ; then - if [ "${PN}" = "gnustep-back" ] ; then - if [ ! -f "/usr/X11R6/include/X11/Xft1/Xft.h" ]; then - sed "s,^#define HAVE_XFT.*,#undef HAVE_XFT,g" config.h > config.h.new - sed "s,^#define HAVE_UTF8.*,#undef HAVE_UTF8,g" config.h.new > config.h - sed "s,^WITH_XFT=.*,WITH_XFT=no," config.make > config.make.new - sed "s,-lXft,," config.make.new > config.make - fi - fi - fi - if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then make \ HOME=$TMP/fakehome \ GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ - || die "emake failed" + messages=yes \ + all || die "emake failed" else die "no Makefile found" fi @@ -91,10 +61,16 @@ } egnustepinstall() { - getsourcedir - +# einfo "*^%*%*(&^&^*^&^(*&^(*^" +# einfo "HOME: ${HOME}" +# einfo "whoami: `whoami`" +# einfo "where? ${HOME}/GNUstep/Defaults/.GNUstepDefaults.lck" +# einfo "*^%*%*(&^&^*^&^(*&^(*^" + addwrite /root/GNUstep + addwrite /root/GNUstep/Library addwrite /root/GNUstep/Defaults/.GNUstepDefaults.lck - addpredict /root/GNUstep + addwrite /root/GNUstep/Library/Services/.GNUstepServices + addwrite /root/GNUstep/Library/Services/.GNUstepAppList cd ${S} @@ -106,38 +82,42 @@ 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 - # To be or not to be evil? - # Should all the roots point at GNUSTEP_SYSTEM_ROOT to force - # install? - # GNUSTEP_USER_ROOT must be GNUSTEP_SYSTEM_ROOT, some malformed - # Makefiles install there. - if [ "${PN}" = "gnustep-base" ] || [ "${PN}" = "gnustep-gui" ] || [ "${PN}" = "gnustep-back" ] ; then - # for some reason, they need less tending to... - make \ - GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ - HOME=$TMP/fakehome \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - INSTALL_ROOT_DIR=${D} \ - install || die "einstall failed" - else - make \ - GNUSTEP_USER_ROOT=$TMP/fakehome/GNUstep \ - HOME=$TMP/fakehome \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - INSTALL_ROOT_DIR=${D} \ - GNUSTEP_LOCAL_ROOT=${D}${GNUSTEP_LOCAL_ROOT} \ - GNUSTEP_NETWORK_ROOT=${D}${GNUSTEP_NETWORK_ROOT} \ - GNUSTEP_SYSTEM_ROOT=${D}${GNUSTEP_SYSTEM_ROOT} \ - GNUSTEP_USER_ROOT=${D}${GNUSTEP_SYSTEM_ROOT} \ - install || die "einstall failed" - fi + 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} --no-same-owner" \ + 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/System/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 } @@ -146,4 +126,8 @@ egnustepinstall || die } -EXPORT_FUNCTIONS src_compile src_install +gnustep_pkg_postinst() { + egnusteppostinst || die +} + +EXPORT_FUNCTIONS src_compile src_install pkg_postinst