/[gentoo-x86]/eclass/gnustep-base.eclass
Gentoo

Diff of /eclass/gnustep-base.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.7
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.3 2007/09/17 10:58:04 grobian Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.7 2008/09/04 08:04:47 opfer Exp $
4 4
5inherit eutils flag-o-matic 5inherit eutils flag-o-matic
6 6
7# Inner gnustep eclass, should only be inherited directly by gnustep-base 7# Inner gnustep eclass, should only be inherited directly by gnustep-base
8# packages 8# packages
14# "doc": build and install documentation, if available 14# "doc": build and install documentation, if available
15IUSE="debug doc" 15IUSE="debug doc"
16 16
17# packages needed to build any base gnustep package 17# packages needed to build any base gnustep package
18GNUSTEP_CORE_DEPEND="virtual/libc 18GNUSTEP_CORE_DEPEND="virtual/libc
19 doc? ( virtual/tetex =dev-tex/latex2html-2002* >=app-text/texi2html-1.64 )" 19 doc? ( virtual/texi2dvi =dev-tex/latex2html-2002* >=app-text/texi2html-1.64 )"
20 20
21# Where to install GNUstep 21# Where to install GNUstep
22GNUSTEP_PREFIX="/usr/GNUstep" 22GNUSTEP_PREFIX="/usr/GNUstep"
23 23
24# GNUstep environment array 24# GNUstep environment array
101 is-ldflagq -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \ 101 is-ldflagq -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \
102 || append-ldflags \ 102 || append-ldflags \
103 -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" 103 -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}"
104 ;; 104 ;;
105 esac 105 esac
106 is-ldflagq -L"${GNUSTEP_SYSTEM_LIBRARIES}" \
107 || append-ldflags \
108 -L"${GNUSTEP_SYSTEM_LIBRARIES}"
109 106
110 # Set up env vars for make operations 107 # Set up env vars for make operations
111 GS_ENV=( AUXILIARY_LDFLAGS="${LDFLAGS}" \ 108 GS_ENV=( AUXILIARY_LDFLAGS="${LDFLAGS}" \
109 ADDITIONAL_NATIVE_LIB_DIRS="${GNUSTEP_SYSTEM_LIBRARIES}" \
112 DESTDIR="${D}" \ 110 DESTDIR="${D}" \
113 HOME="${T}" \ 111 HOME="${T}" \
114 GNUSTEP_USER_DIR="${T}" \ 112 GNUSTEP_USER_DIR="${T}" \
115 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \ 113 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \
116 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ 114 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
164egnustep_install_config() { 162egnustep_install_config() {
165 [[ $(type -t gnustep_config_script) != "function" ]] && return 0 163 [[ $(type -t gnustep_config_script) != "function" ]] && return 0
166 164
167 local cfile=config-${PN}.sh 165 local cfile=config-${PN}.sh
168 166
169 echo '#!/usr/bin/env bash' > "${T}"/${cfile} 167 cat << 'EOF' > "${T}"/${cfile}
168#!/usr/bin/env bash
169gnustep_append_default() {
170 if [[ -z $1 || -z $2 || -z $3 ]]; then
171 echo "warning: invalid script invocation"
172 return
173 fi
174 dom=$1
175 key=$2
176 val=$3
177 cur=$(defaults read ${dom} ${key}) 2> /dev/null
178 if [[ -z $cur ]] ; then
179 echo " * setting ${dom} ${key}"
180 defaults write ${dom} ${key} "( ${val} )"
181 elif [[ ${cur} != *${val}* ]] ; then
182 echo " * adding ${val} to ${dom} ${key}"
183 echo "${cur%)\'}, \"${val}\" )'" | defaults write
184 else
185 echo " * ${val} already present in ${dom} ${key}"
186 fi
187}
188
189gnustep_set_default() {
190 if [[ -z $1 || -z $2 || -z $3 ]]; then
191 echo "warning: invalid script invocation"
192 return
193 fi
194 dom=$1
195 key=$2
196 val=$3
197 echo " * setting ${dom} ${key}"
198 defaults write ${dom} ${key} ${val}
199}
200
201EOF
202
170 echo "echo Applying ${P} default configuration ..." >> "${T}"/${cfile} 203 echo "echo \"Applying ${P} default configuration ...\"" >> "${T}"/${cfile}
204
171 gnustep_config_script | \ 205 gnustep_config_script | \
172 while read line ; do 206 while read line ; do
173 echo "${line}" >> "${T}"/${cfile} 207 echo "${line}" >> "${T}"/${cfile}
174 done 208 done
175 echo 'echo "done"' >> "${T}"/${cfile} 209 echo 'echo "done"' >> "${T}"/${cfile}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20