diff options
Diffstat (limited to 'eclass/gnustep.eclass')
-rw-r--r-- | eclass/gnustep.eclass | 175 |
1 files changed, 47 insertions, 128 deletions
diff --git a/eclass/gnustep.eclass b/eclass/gnustep.eclass index f711a97a2dc5..2411ced7bff9 100644 --- a/eclass/gnustep.eclass +++ b/eclass/gnustep.eclass @@ -1,18 +1,51 @@ # 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.20 2004/10/22 03:24:24 fafhrd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep.eclass,v 1.21 2004/11/12 03:46:33 fafhrd Exp $ -inherit eutils flag-o-matic +inherit gnustep-funcs eutils flag-o-matic ECLASS=gnustep INHERITED="$INHERITED $ECLASS" DESCRIPTION="EClass designed to facilitate building GNUstep Apps, Frameworks, and Bundles on Gentoo." -IUSE="debug" +IUSE="debug profile" + +########################################################################### +# Internal variables +#__GS_INSTALL_DOMAIN="GNUSTEP_SYSTEM_ROOT" +#__GS_USER_ROOT_SUFFIX="/" +#__GS_MAKE_EVAL="" +#__GS_PREFIX="/usr/GNUstep" +#__GS_SYSTEM_ROOT="/usr/GNUstep/System" +#__GS_LOCAL_ROOT="/usr/GNUstep/Local" +#__GS_NETWORK_ROOT="/usr/GNUstep/Network" +#__GS_USER_ROOT="~/GNUstep" +########################################################################### + +########################################################################### +# Variables +# --------- +# ~ legend +# (a) - append more data if needed +# (n) - do not override without a good reason +# (y) - override as appropriate per ebuild +# Build general GNUstep ebuild depends here +# - most .app should be set up this way: +# + (a) DEPEND="${GS_DEPEND} other/depend ..." +# + (a) RDEPEND="${GS_RDEPEND} other/rdepend ..." +# - core libraries and other packages that need to +# specialize more can use: +# + (n) DOC_DEPEND - packages needed to build docs +# + (n) GNUSTEP_CORE_DEPEND - packages needed to build any gnustep package +# + (n) GNUSTEP_BASE_DEPEND - packages needed to build gnustep CLI only apps +# + (n) GNUSTEP_GUI_DEPEND - packages needed to build gnustep GUI apps +# + (n) DEBUG_DEPEND - packages needed to utilize .debug apps +# + (n) DOC_RDEPEND - packages needed to view docs +########################################################################### DOC_DEPEND="doc? ( virtual/tetex - =dev-tex/latex2html-2002* - =app-text/texi2html-1.6* )" + =dev-tex/latex2html-2002* + =app-text/texi2html-1.6* )" GNUSTEP_CORE_DEPEND="virtual/libc >=sys-devel/gcc-3.0.4 ${DOC_DEPEND}" @@ -22,130 +55,19 @@ GNUSTEP_BASE_DEPEND="${GNUSTEP_CORE_DEPEND} GNUSTEP_GUI_DEPEND="${GNUSTEP_BASE_DEPEND} gnustep-base/gnustep-gui" GS_DEPEND="${GNUSTEP_GUI_DEPEND}" -DEBUG_DEPEND="debug? >=sys-devel/gdb-6.0" +DEBUG_DEPEND="debug? ( >=sys-devel/gdb-6.0 )" DOC_RDEPEND="doc? ( sys-apps/man - =sys-apps/texinfo-4.6* )" + >=sys-apps/texinfo-4.6* )" GS_RDEPEND="${GS_DEPEND} ${DEBUG_DEPEND} ${DOC_RDEPEND} virtual/gnustep-back gnustep-base/gnustep-env" +########################################################################### -GENTOO_GNUSTEP_ROOT="/usr/GNUstep" - -egnustep_env() { - if [ -f ${GENTOO_GNUSTEP_ROOT}/System/Makefiles/GNUstep.sh ] ; then - . ${GENTOO_GNUSTEP_ROOT}/System/Makefiles/GNUstep.sh - else - die "gnustep-make not installed!" - fi -} - -egnustep_make() { - if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then - if use debug ; then - emake -j1 HOME=${TMP} \ - GNUSTEP_USER_ROOT=${TMP}/GNUstep \ - GNUSTEP_DEFAULTS_ROOT=${TMP}/GNUstep \ - INSTALL_ROOT_DIR=${D} \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - GNUSTEP_MAKEFILES=${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles \ - GNUSTEP_NETWORK_ROOT=${GNUSTEP_NETWORK_ROOT} \ - GNUSTEP_LOCAL_ROOT=${GNUSTEP_LOCAL_ROOT} \ - GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \ - TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ - debug=yes all || die "package make failed" - else - emake -j1 HOME=${TMP} \ - GNUSTEP_USER_ROOT=${TMP}/GNUstep \ - GNUSTEP_DEFAULTS_ROOT=${TMP}/GNUstep \ - INSTALL_ROOT_DIR=${D} \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - GNUSTEP_MAKEFILES=${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles \ - GNUSTEP_NETWORK_ROOT=${GNUSTEP_NETWORK_ROOT} \ - GNUSTEP_LOCAL_ROOT=${GNUSTEP_LOCAL_ROOT} \ - GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \ - TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ - all || die "package make failed" - fi - else - die "no Makefile found" - fi - return 0 -} - -egnustep_package_config() { - if [ -f ${FILESDIR}/config-${PN}.sh ]; then - dodir ${GENTOO_GNUSTEP_ROOT}/System/Tools/Gentoo - exeinto ${GENTOO_GNUSTEP_ROOT}/System/Tools/Gentoo - doexe ${FILESDIR}/config-${PN}.sh - fi -} - -egnustep_package_config_info() { - if [ -f ${FILESDIR}/config-${PN}.sh ]; then - einfo "Make sure to set happy defaults for this package by executing:" - einfo " ${GENTOO_GNUSTEP_ROOT}/System/Tools/Gentoo/config-${PN}.sh" - einfo "as the user you will run the package as." - fi -} - -egnustep_install() { - if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then - if use debug ; then - emake -j1 HOME=${TMP} \ - GNUSTEP_USER_ROOT=${TMP}/GNUstep \ - GNUSTEP_DEFAULTS_ROOT=${TMP}/GNUstep \ - INSTALL_ROOT_DIR=${D} \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - GNUSTEP_MAKEFILES=${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles \ - GNUSTEP_NETWORK_ROOT=${GNUSTEP_NETWORK_ROOT} \ - GNUSTEP_LOCAL_ROOT=${GNUSTEP_LOCAL_ROOT} \ - GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \ - TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ - debug=yes install || die "package install failed" - else - emake -j1 HOME=${TMP} \ - GNUSTEP_USER_ROOT=${TMP}/GNUstep \ - GNUSTEP_DEFAULTS_ROOT=${TMP}/GNUstep \ - INSTALL_ROOT_DIR=${D} \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - GNUSTEP_MAKEFILES=${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles \ - GNUSTEP_NETWORK_ROOT=${GNUSTEP_NETWORK_ROOT} \ - GNUSTEP_LOCAL_ROOT=${GNUSTEP_LOCAL_ROOT} \ - GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \ - TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ - install || die "package install failed" - fi - else - die "no Makefile found" - fi - return 0 -} - -egnustep_doc() { - if [ -f ./Documentation/GNUmakefile -o -f ./Documentation/[mM]akefile ] - then - cd Documentation - make HOME=${TMP} \ - GNUSTEP_USER_ROOT=${TMP}/GNUstep \ - INSTALL_ROOT_DIR=${D} \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \ - all || die "doc make failed" - make HOME=${TMP} \ - GNUSTEP_USER_ROOT=${TMP}/GNUstep \ - GNUSTEP_DEFAULTS_ROOT=${TMP}/GNUstep \ - INSTALL_ROOT_DIR=${D} \ - GNUSTEP_INSTALLATION_DIR=${D}${GNUSTEP_SYSTEM_ROOT} \ - GNUSTEP_MAKEFILES=${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles \ - GNUSTEP_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT} \ - TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ - install || die "doc install failed" - cd .. - fi -} - +########################################################################### +# Ebuild function overrides +# ------------------------- gnustep_pkg_setup() { if test_version_info 3.3 then @@ -165,11 +87,6 @@ gnustep_pkg_setup() { fi } -gnustep_src_unpack() { - unpack ${A} - cd ${S} -} - gnustep_src_compile() { egnustep_env egnustep_make || die @@ -188,5 +105,7 @@ gnustep_src_install() { gnustep_pkg_postinst() { egnustep_package_config_info } +########################################################################### + +EXPORT_FUNCTIONS pkg_setup src_compile src_install pkg_postinst -EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst |