/[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.8 Revision 1.15
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.8 2008/10/03 14:59:42 voyageur Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.15 2010/03/10 13:19:06 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
13# "debug": enable code for debugging 13# "debug": enable code for debugging
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
19 doc? ( virtual/texi2dvi =dev-tex/latex2html-2002* >=app-text/texi2html-1.64 )" 18GNUSTEP_CORE_DEPEND="doc? ( virtual/texi2dvi dev-tex/latex2html app-text/texi2html )"
20 19
21# Where to install GNUstep 20# Where to install GNUstep
22GNUSTEP_PREFIX="/usr/GNUstep" 21GNUSTEP_PREFIX="${EPREFIX}/usr/GNUstep"
23 22
24# GNUstep environment array 23# GNUstep environment array
25typeset -a GS_ENV 24typeset -a GS_ENV
26 25
27# Ebuild function overrides 26# Ebuild function overrides
39 38
40gnustep-base_src_unpack() { 39gnustep-base_src_unpack() {
41 unpack ${A} 40 unpack ${A}
42 cd "${S}" 41 cd "${S}"
43 42
43 gnustep-base_src_prepare
44}
45
46gnustep-base_src_prepare() {
44 if [[ -f ./GNUmakefile ]] ; then 47 if [[ -f ./GNUmakefile ]] ; then
45 # Kill stupid includes that are simply overdone or useless on normal 48 # Kill stupid includes that are simply overdone or useless on normal
46 # Gentoo, but (may) cause major headaches on Prefixed Gentoo. If this 49 # Gentoo, but (may) cause major headaches on Prefixed Gentoo. If this
47 # only removes a part of a path it's good that it bails out, as we want 50 # only removes a part of a path it's good that it bails out, as we want
48 # to know when they use some direct include. 51 # to know when they use some direct include.
119 HOME="${T}" \ 122 HOME="${T}" \
120 GNUSTEP_USER_DIR="${T}" \ 123 GNUSTEP_USER_DIR="${T}" \
121 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \ 124 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \
122 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ 125 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
123 TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ 126 TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \
124 messages=yes \ 127 messages=yes )
125 -j1 ) 128
126 # -j1 is needed as gnustep-make is not parallel-safe 129 # Parallel-make support was added in gnustep-make 2.2.0
130 has_version "<gnustep-base/gnustep-make-2.2.0" \
131 && GS_ENV=( "${GS_ENV[@]}" "-j1" )
127 132
128 use debug \ 133 use debug \
129 && GS_ENV=( "${GS_ENV[@]}" "debug=yes" ) \ 134 && GS_ENV=( "${GS_ENV[@]}" "debug=yes" ) \
130 || GS_ENV=( "${GS_ENV[@]}" "debug=no" ) 135 || GS_ENV=( "${GS_ENV[@]}" "debug=no" )
131 136
134 die "gnustep-make not installed!" 139 die "gnustep-make not installed!"
135} 140}
136 141
137# Make utilizing GNUstep Makefiles 142# Make utilizing GNUstep Makefiles
138egnustep_make() { 143egnustep_make() {
139 if [[ -f ./[mM]akefile || -f ./GNUmakefile ]] ; then 144 if [[ -f ./Makefile || -f ./makefile || -f ./GNUmakefile ]] ; then
140 emake ${*} "${GS_ENV[@]}" all || die "package make failed" 145 emake ${*} "${GS_ENV[@]}" all || die "package make failed"
141 return 0 146 return 0
142 fi 147 fi
143 die "no Makefile found" 148 die "no Makefile found"
144} 149}
214 while read line ; do 219 while read line ; do
215 echo "${line}" >> "${T}"/${cfile} 220 echo "${line}" >> "${T}"/${cfile}
216 done 221 done
217 echo 'echo "done"' >> "${T}"/${cfile} 222 echo 'echo "done"' >> "${T}"/${cfile}
218 223
219 exeinto ${GNUSTEP_SYSTEM_TOOLS}/Gentoo 224 exeinto ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo
220 doexe "${T}"/${cfile} 225 doexe "${T}"/${cfile}
221} 226}
222 227
223case ${EAPI:-0} in 228case ${EAPI:-0} in
224 0|1) EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst ;; 229 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 ;; 230 *) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_postinst ;;
226esac 231esac

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

  ViewVC Help
Powered by ViewVC 1.1.20