--- /dev/null
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-funcs.eclass,v 1.1 2004/11/12 03:46:33 fafhrd Exp $
+
+ECLASS=gnustep-funcs
+INHERITED="$INHERITED $ECLASS"
+
+DESCRIPTION="EClass that centralizes access to GNUstep environment information."
+
+###########################################################################
+# Functions
+# ---------
+
+# Prints out the dirname of GNUSTEP_SYSTEM_ROOT, i.e., "System" is installed
+# in egnustep_prefix
+egnustep_prefix() {
+ # Generally, only gnustep-make should be the one setting this value
+ #if [ "$1" ] && [ ! -f /etc/conf.d/net ]; then
+ if [ "$1" ]; then
+ __GS_PREFIX="$(dirname $1/prune)"
+ return 0
+ fi
+
+ if [ -f /etc/conf.d/gnustep.env ]; then
+ . /etc/conf.d/gnustep.env
+ if [ -z "${GNUSTEP_SYSTEM_ROOT}" ] || [ "/" != "${GNUSTEP_SYSTEM_ROOT:0:1}" ]; then
+ die "Please check /etc/conf.d/gnustep.env for consistency or remove it."
+ fi
+ __GS_PREFIX=$(dirname ${GNUSTEP_SYSTEM_ROOT})
+ elif [ -z "${__GS_PREFIX}" ]; then
+ __GS_PREFIX="/usr/GNUstep"
+ __GS_SYSTEM_ROOT="/usr/GNUstep/System"
+ fi
+
+ echo "${__GS_PREFIX}"
+}
+
+# Prints/sets the GNUstep install domain; Generally, this will only be
+# "System" or "Local"
+egnustep_install_domain() {
+ if [ -z "$1" ]; then
+ if [ -z "$__GS_INSTALL_DOMAIN" ]; then
+ # backwards comapatbility for older ebuilds
+ __GS_INSTALL_DOMAIN="GNUSTEP_SYSTEM_ROOT"
+ fi
+ echo ${!__GS_INSTALL_DOMAIN}
+ return 0
+ else
+ if [ "$1" == "System" ]; then
+ __GS_INSTALL_DOMAIN="GNUSTEP_SYSTEM_ROOT"
+ elif [ "$1" == "Local" ]; then
+ __GS_INSTALL_DOMAIN="GNUSTEP_LOCAL_ROOT"
+# elif [ "$1" == "Network" ]; then
+# __GS_INSTALL_DOMAIN="GNUSTEP_NETWORK_ROOT"
+ else
+ die "An invalid parameter has been passed to ${FUNCNAME}"
+ fi
+ fi
+}
+
+# Clean/reset an ebuild to the installed GNUstep evironment; generally,
+# this is called once an ebuild (at least), and packages that will
+# inherit from gnustep.eclass already do this
+egnustep_env() {
+ GNUSTEP_SYSTEM_ROOT="$(egnustep_prefix)/System"
+ if [ -f ${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles/GNUstep.sh ] ; then
+ . ${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles/GNUstep-reset.sh
+ if [ -f /etc/conf.d/gnustep.env ]; then
+ . /etc/conf.d/gnustep.env
+ else
+ GNUSTEP_SYSTEM_ROOT="/usr/GNUstep/System"
+ fi
+ . ${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles/GNUstep.sh
+
+ __GS_SYSTEM_ROOT=${GNUSTEP_SYSTEM_ROOT}
+ __GS_LOCAL_ROOT=${GNUSTEP_LOCAL_ROOT}
+ __GS_NETWORK_ROOT=${GNUSTEP_NETWORK_ROOT}
+ __GS_USER_ROOT=${GNUSTEP_USER_ROOT}
+ __GS_USER_ROOT_SUFFIX=$(dirname ${GNUSTEP_USER_ROOT#*$USER}/prune)/
+
+ # "gs_prefix" is the prefix that GNUstep is installed into, e.g.
+ # gs_prefix=/usr/GNUstep => GNUSTEP_SYSTEM_ROOT=${gs_prefix}/System
+ local gs_prefix=`egnustep_prefix`
+ echo ${gs_prefix//\//XXX_SED_FSLASH} > ${TMP}/sed.gs_prefix
+
+ # "gs_user_root_suffix" what is left over from the difference of
+ # GNUSTEP_USER_ROOT and HOME, e.g.:
+ # "/home/something/whatever/.config/GNUstep" => ".config/GNUstep"
+ echo ${__GS_USER_ROOT_SUFFIX//\//XXX_SED_FSLASH} > ${TMP}/sed.gs_user_root_suffix
+
+ # Set up common env vars for make operations
+ __GS_MAKE_EVAL="HOME=\${TMP} \
+ GNUSTEP_USER_ROOT=\${TMP} \
+ GNUSTEP_DEFAULTS_ROOT=\${TMP}/\${__GS_USER_ROOT_SUFFIX} \
+ INSTALL_ROOT_DIR=\${D} \
+ GNUSTEP_INSTALLATION_DIR=\${D}/\$(egnustep_install_domain)
+ 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\" \
+ -j1"
+ else
+ die "gnustep-make not installed!"
+ fi
+}
+
+# Get/Set the GNUstep system root
+egnustep_system_root() {
+ if [ "$1" ]; then
+ __GS_SYSTEM_ROOT="$(dirname $1/prune)"
+ else
+ echo ${__GS_SYSTEM_ROOT}
+ fi
+}
+
+# Get/Set the GNUstep local root
+egnustep_local_root() {
+ if [ "$1" ]; then
+ __GS_LOCAL_ROOT="$(dirname $1/prune)"
+ else
+ echo ${__GS_LOCAL_ROOT}
+ fi
+}
+
+# Get/Set the GNUstep network root
+egnustep_network_root() {
+ if [ "$1" ]; then
+ __GS_NETWORK_ROOT="$(dirname $1/prune)"
+ else
+ echo ${__GS_NETWORK_ROOT}
+ fi
+}
+
+# Get/Set the GNUstep user root
+# Note: watch out for this one -- ~ and such must be enclosed in single-quotes when passed in
+egnustep_user_root() {
+ if [ "$1" ]; then
+ __GS_USER_ROOT="$(dirname $1/prune)"
+ else
+ echo ${__GS_USER_ROOT}
+ fi
+}
+
+# Print the "suffix" of the user_root, or simply
+# e.g ~/GNUstep => GNUstep
+egnustep_user_root_suffix() {
+ echo ${!__GS_USER_ROOT_SUFFIX}
+}
+
+# Make utilizing GNUstep Makefiles
+egnustep_make() {
+ if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
+ local gs_make_opts="${1}"
+ if use debug ; then
+ gs_make_opts="${gs_make_opts} debug=yes"
+ fi
+ if use profile; then
+ gs_make_opts="${gs_make_opts} profile=yes"
+ fi
+ eval emake ${__GS_MAKE_EVAL} ${gs_make_opts} all || die "package make failed"
+ else
+ die "no Makefile found"
+ fi
+ return 0
+}
+
+# Copies "convenience scripts"
+egnustep_package_config() {
+ if [ -f ${FILESDIR}/config-${PN}.sh ]; then
+ dodir `egnustep_install_domain`/Tools/Gentoo
+ exeinto `egnustep_install_domain`/Tools/Gentoo
+ doexe ${FILESDIR}/config-${PN}.sh
+ fi
+}
+
+# Informs user about existence of "convenience script"
+egnustep_package_config_info() {
+ if [ -f ${FILESDIR}/config-${PN}.sh ]; then
+ einfo "Make sure to set happy defaults for this package by executing:"
+ einfo " `egnustep_install_domain`/Tools/Gentoo/config-${PN}.sh"
+ einfo "as the user you will run the package as."
+ fi
+}
+
+# Make-install utilizing GNUstep Makefiles
+egnustep_install() {
+ if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
+ local gs_make_opts="${1}"
+ if use debug ; then
+ gs_make_opts="${gs_make_opts} debug=yes"
+ fi
+ if use profile; then
+ gs_make_opts="${gs_make_opts} profile=yes"
+ fi
+ eval emake ${__GS_MAKE_EVAL} ${gs_make_opts} install || die "package install failed"
+ else
+ die "no Makefile found"
+ fi
+ return 0
+}
+
+# Make and install docs utilzing GNUstep Makefiles
+# Note: docs installed with this from a GNUMakefile,
+# not just some files in a Documentation directory
+egnustep_doc() {
+ if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
+ local gs_make_opts="${1}"
+ if use debug ; then
+ gs_make_opts="${gs_make_opts} debug=yes"
+ fi
+ if use profile; then
+ gs_make_opts="${gs_make_opts} profile=yes"
+ fi
+ eval emake ${__GS_MAKE_EVAL} ${gs_make_opts} all || die "doc make failed"
+ eval emake ${__GS_MAKE_EVAL} ${gs_make_opts} install || die "doc install failed"
+ else
+ die "no Makefile found"
+ fi
+ return 0
+}
+###########################################################################
+
# 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}"
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
fi
}
-gnustep_src_unpack() {
- unpack ${A}
- cd ${S}
-}
-
gnustep_src_compile() {
egnustep_env
egnustep_make || die
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
# Copyright 1999-2004 Gentoo Foundation.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/use.desc,v 1.199 2004/11/11 23:32:00 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/use.desc,v 1.200 2004/11/12 03:46:33 fafhrd Exp $
# keep them sorted (excluding the special arch flags near the end).
postgres - Adds support for the postgresql database
ppds - Adds support for automatically generated ppd (printing driver) files
prelude - Adds support/bindings for the Prelude Intrusion Detection System
+profile - Adds profile support to builds of packages (will likely vary from ebuild to ebuild in support)
python - Adds support/bindings for the Python language
qdbm - Adds support for the qdbm library
qt - Adds support for the Qt library.
# Copyright 1999-2004 Gentoo Foundation.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/use.local.desc,v 1.732 2004/11/11 23:32:00 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/use.local.desc,v 1.733 2004/11/12 03:46:33 fafhrd Exp $
# This file contains descriptions of local USE flags, and the ebuilds which
# contain them.
gnome-extra/libgda:mdb - Enable Microsoft Access DB support for GnomeDB.
gnome-extra/nautilus-cd-burner:hal - Enable Hardware Abstraction Layer (HAL) support
gnustep-apps/gnumail:emoticon - Enable extra Emoticon Bundle to see smiley's in e-mail messages.
-gnustep-apps/gworkspace:imagekits - Enable support for ImageKits Bundle (mainly for PDF previewing)
+gnustep-apps/gworkspace:imagekits - Enable support for ImageKits Bundle (mainly for PDF previewing) (soon obsolecsed by 'pdfkit')
gnustep-apps/gworkspace:pdfkit - Enable support for PDFKit Bundle
+gnustep-base/gnustep-make:non-flattened - do not flatten launch and library paths for GNUstep packages allowing executable within a .app to be launched based on processor type
+gnustep-base/gnustep-make:layout-osx-like - Layout GNUstep FHS like OSX's (violates Linux FHS, but arguably more NeXT-like); User, Local, Network, and System are set to (in order): "~", "/", "/Network", "/System"
+gnustep-base/gnustep-make:layout-from-conf-file - Layout GNUstep according to /etc/conf.d/gnustep.env; GNUSTEP_SYSTEM_ROOT, GNUSTEP_LOCAL_ROOT, GNUSTEP_NETWORK_ROOT, and GNUSTEP_USER_ROOT (use '~' or '~/whatever' -- SURROUNDED BY SINGLE QUOTES -- for the user root); the only required entry is GNUSTEP_SYSTEM_ROOT; GNUSTEP_SYSTEM_ROOT must end with "System".
gnustep-base/gnustep-back-art:xim - Enable X11 XiM input method
gnustep-base/gnustep-back-xlib:xim - Enable X11 XiM input method
-gnustep-base/gnustep-gui:camaelon - Enable GNUstep Camaelon theme engine support
gnustep-base/gnustep-gui:gsnd - Enable GNUstep sound server
kde-base/arts:artswrappersuid - Set artswrapper suid for realtime playing, which is a security hazard
kde-base/kdeadmin:foreign-package - Enable building of kpackage, which manages rpm and deb stuff