/[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.7 Revision 1.13
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.7 2008/09/04 08:04:47 opfer Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnustep-base.eclass,v 1.13 2009/11/25 10:11:40 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="/usr/GNUstep"
23 22
24# GNUstep environment array 23# GNUstep environment array
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.
55 GNUmakefile 58 GNUmakefile
56 eend $? 59 eend $?
57 fi 60 fi
58} 61}
59 62
60gnustep-base_src_compile() { 63gnustep-base_src_configure() {
61 egnustep_env 64 egnustep_env
62 if [[ -x ./configure ]] ; then 65 if [[ -x ./configure ]] ; then
63 econf || die "configure failed" 66 econf || die "configure failed"
64 fi 67 fi
68}
69
70gnustep-base_src_compile() {
71 egnustep_env
72 case ${EAPI:-0} in
73 0|1) gnustep-base_src_configure ;;
74 esac
75
65 egnustep_make 76 egnustep_make
66} 77}
67 78
68gnustep-base_src_install() { 79gnustep-base_src_install() {
69 egnustep_env 80 egnustep_env
111 HOME="${T}" \ 122 HOME="${T}" \
112 GNUSTEP_USER_DIR="${T}" \ 123 GNUSTEP_USER_DIR="${T}" \
113 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \ 124 GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \
114 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ 125 GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
115 TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ 126 TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \
116 messages=yes \ 127 messages=yes )
117 -j1 ) 128
118 # -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" )
119 132
120 use debug \ 133 use debug \
121 && GS_ENV=( "${GS_ENV[@]}" "debug=yes" ) \ 134 && GS_ENV=( "${GS_ENV[@]}" "debug=yes" ) \
122 || GS_ENV=( "${GS_ENV[@]}" "debug=no" ) 135 || GS_ENV=( "${GS_ENV[@]}" "debug=no" )
123 136
126 die "gnustep-make not installed!" 139 die "gnustep-make not installed!"
127} 140}
128 141
129# Make utilizing GNUstep Makefiles 142# Make utilizing GNUstep Makefiles
130egnustep_make() { 143egnustep_make() {
131 if [[ -f ./[mM]akefile || -f ./GNUmakefile ]] ; then 144 if [[ -f ./Makefile || -f ./makefile || -f ./GNUmakefile ]] ; then
132 emake ${*} "${GS_ENV[@]}" all || die "package make failed" 145 emake ${*} "${GS_ENV[@]}" all || die "package make failed"
133 return 0 146 return 0
134 fi 147 fi
135 die "no Makefile found" 148 die "no Makefile found"
136} 149}
210 223
211 exeinto ${GNUSTEP_SYSTEM_TOOLS}/Gentoo 224 exeinto ${GNUSTEP_SYSTEM_TOOLS}/Gentoo
212 doexe "${T}"/${cfile} 225 doexe "${T}"/${cfile}
213} 226}
214 227
228case ${EAPI:-0} in
215EXPORT_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 ;;
230 2) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_postinst ;;
231esac

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

  ViewVC Help
Powered by ViewVC 1.1.20