/[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.4 Revision 1.8
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.4 2007/10/05 10:51:20 voyageur Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.8 2008/10/03 14:59:42 voyageur 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
55 GNUmakefile 55 GNUmakefile
56 eend $? 56 eend $?
57 fi 57 fi
58} 58}
59 59
60gnustep-base_src_compile() { 60gnustep-base_src_configure() {
61 egnustep_env 61 egnustep_env
62 if [[ -x ./configure ]] ; then 62 if [[ -x ./configure ]] ; then
63 econf || die "configure failed" 63 econf || die "configure failed"
64 fi 64 fi
65}
66
67gnustep-base_src_compile() {
68 egnustep_env
69 case ${EAPI:-0} in
70 0|1) gnustep-base_src_configure ;;
71 esac
72
65 egnustep_make 73 egnustep_make
66} 74}
67 75
68gnustep-base_src_install() { 76gnustep-base_src_install() {
69 egnustep_env 77 egnustep_env
101 is-ldflagq -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \ 109 is-ldflagq -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \
102 || append-ldflags \ 110 || append-ldflags \
103 -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" 111 -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}"
104 ;; 112 ;;
105 esac 113 esac
106 is-ldflagq -L"${GNUSTEP_SYSTEM_LIBRARIES}" \
107 || append-ldflags \
108 -L"${GNUSTEP_SYSTEM_LIBRARIES}"
109 114
110 # Set up env vars for make operations 115 # Set up env vars for make operations
111 GS_ENV=( AUXILIARY_LDFLAGS="${LDFLAGS}" \ 116 GS_ENV=( AUXILIARY_LDFLAGS="${LDFLAGS}" \
117 ADDITIONAL_NATIVE_LIB_DIRS="${GNUSTEP_SYSTEM_LIBRARIES}" \
112 DESTDIR="${D}" \ 118 DESTDIR="${D}" \
113 HOME="${T}" \ 119 HOME="${T}" \
114 GNUSTEP_USER_DIR="${T}" \ 120 GNUSTEP_USER_DIR="${T}" \
115 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \ 121 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \
116 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ 122 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
164egnustep_install_config() { 170egnustep_install_config() {
165 [[ $(type -t gnustep_config_script) != "function" ]] && return 0 171 [[ $(type -t gnustep_config_script) != "function" ]] && return 0
166 172
167 local cfile=config-${PN}.sh 173 local cfile=config-${PN}.sh
168 174
169 cat << EOF > "${T}"/${cfile} 175 cat << 'EOF' > "${T}"/${cfile}
170#!/usr/bin/env bash 176#!/usr/bin/env bash
171gnustep_append_default() { 177gnustep_append_default() {
172 if [[ -z \$1 || -z \$2 || -z \$3 ]]; then 178 if [[ -z $1 || -z $2 || -z $3 ]]; then
173 echo "warning: invalid script invocation" 179 echo "warning: invalid script invocation"
174 return 180 return
175 fi 181 fi
176 dom=\$1 182 dom=$1
177 key=\$2 183 key=$2
178 val=\$3 184 val=$3
179 cur=\$(defaults read \${dom} \${key}) 2> /dev/null 185 cur=$(defaults read ${dom} ${key}) 2> /dev/null
180 if [[ -z \$cur ]] ; then 186 if [[ -z $cur ]] ; then
181 echo " * setting \${dom} \${key}" 187 echo " * setting ${dom} ${key}"
182 defaults write \${dom} \${key} "( \${val} )" 188 defaults write ${dom} ${key} "( ${val} )"
183 elif [[ \${cur} != *\${val}* ]] ; then 189 elif [[ ${cur} != *${val}* ]] ; then
184 echo " * adding \${val} to \${dom} \${key}" 190 echo " * adding ${val} to ${dom} ${key}"
185 echo "\${cur%)\'}, \"\${val}\" )'" | defaults write 191 echo "${cur%)\'}, \"${val}\" )'" | defaults write
186 else 192 else
187 echo " * \${val} already present in \${dom} \${key}" 193 echo " * ${val} already present in ${dom} ${key}"
188 fi 194 fi
189} 195}
190 196
191gnustep_set_default() { 197gnustep_set_default() {
192 if [[ -z \$1 || -z \$2 || -z \$3 ]]; then 198 if [[ -z $1 || -z $2 || -z $3 ]]; then
193 echo "warning: invalid script invocation" 199 echo "warning: invalid script invocation"
194 return 200 return
195 fi 201 fi
196 dom=\$1 202 dom=$1
197 key=\$2 203 key=$2
198 val=\$3 204 val=$3
199 echo " * setting \${dom} \${key}" 205 echo " * setting ${dom} ${key}"
200 defaults write \${dom} \${key} \${val} 206 defaults write ${dom} ${key} ${val}
201} 207}
202 208
203echo "Applying ${P} default configuration ..."
204EOF 209EOF
210
211 echo "echo \"Applying ${P} default configuration ...\"" >> "${T}"/${cfile}
205 212
206 gnustep_config_script | \ 213 gnustep_config_script | \
207 while read line ; do 214 while read line ; do
208 echo "${line}" >> "${T}"/${cfile} 215 echo "${line}" >> "${T}"/${cfile}
209 done 216 done
211 218
212 exeinto ${GNUSTEP_SYSTEM_TOOLS}/Gentoo 219 exeinto ${GNUSTEP_SYSTEM_TOOLS}/Gentoo
213 doexe "${T}"/${cfile} 220 doexe "${T}"/${cfile}
214} 221}
215 222
223case ${EAPI:-0} in
216EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst 224 0|1) EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst ;;
225 2) EXPORT_FUNCTIONS pkg_setup src_unpack src_configure src_compile src_install pkg_postinst ;;
226esac

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20