/[gentoo-x86]/eclass/qt4-build.eclass
Gentoo

Diff of /eclass/qt4-build.eclass

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

Revision 1.4 Revision 1.5
1# Copyright 2005 Gentoo Foundation 1# Copyright 2005 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/qt4-build.eclass,v 1.4 2007/12/22 16:28:59 caleb Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.5 2007/12/22 17:32:55 caleb Exp $
4 4
5# @ECLASS: qt4-build.eclass 5# @ECLASS: qt4-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Caleb Tennis <caleb@gentoo.org> 7# Caleb Tennis <caleb@gentoo.org>
8# @BLURB: 8# @BLURB:
15IUSE="${IUSE} debug" 15IUSE="${IUSE} debug"
16 16
17qt4-build_pkg_setup() { 17qt4-build_pkg_setup() {
18 # Set up installation directories 18 # Set up installation directories
19 19
20 QTBASEDIR=/usr/$(get_libdir)/qt4 20 QTBASEDIR=/usr/$(get_libdir)/qt4
21 QTPREFIXDIR=/usr 21 QTPREFIXDIR=/usr
22 QTBINDIR=/usr/bin 22 QTBINDIR=/usr/bin
23 QTLIBDIR=/usr/$(get_libdir)/qt4 23 QTLIBDIR=/usr/$(get_libdir)/qt4
24 QTPCDIR=/usr/$(get_libdir)/pkgconfig 24 QTPCDIR=/usr/$(get_libdir)/pkgconfig
25 QTDATADIR=/usr/share/qt4 25 QTDATADIR=/usr/share/qt4
26 QTDOCDIR=/usr/share/doc/${PF} 26 QTDOCDIR=/usr/share/doc/${PF}
27 QTHEADERDIR=/usr/include/qt4 27 QTHEADERDIR=/usr/include/qt4
28 QTPLUGINDIR=${QTLIBDIR}/plugins 28 QTPLUGINDIR=${QTLIBDIR}/plugins
29 QTSYSCONFDIR=/etc/qt4 29 QTSYSCONFDIR=/etc/qt4
30 QTTRANSDIR=${QTDATADIR}/translations 30 QTTRANSDIR=${QTDATADIR}/translations
31 QTEXAMPLESDIR=${QTDATADIR}/examples 31 QTEXAMPLESDIR=${QTDATADIR}/examples
32 QTDEMOSDIR=${QTDATADIR}/demos 32 QTDEMOSDIR=${QTDATADIR}/demos
33 33
34 PLATFORM=$(qt_mkspecs_dir) 34 PLATFORM=$(qt_mkspecs_dir)
35 35
36 PATH="${S}/bin:${PATH}" 36 PATH="${S}/bin:${PATH}"
37 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" 37 LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}"
38} 38}
39 39
141 dodir ${QTPCDIR} 141 dodir ${QTPCDIR}
142 mv "${D}"/${QTLIBDIR}/pkgconfig/*.pc "${D}"/${QTPCDIR} 142 mv "${D}"/${QTLIBDIR}/pkgconfig/*.pc "${D}"/${QTPCDIR}
143} 143}
144 144
145qt_use() { 145qt_use() {
146 local flag="$1" 146 local flag="$1"
147 local feature="$1" 147 local feature="$1"
148 local enableval= 148 local enableval=
149 149
150 [[ -n $2 ]] && feature=$2 150 [[ -n $2 ]] && feature=$2
151 [[ -n $3 ]] && enableval="-$3" 151 [[ -n $3 ]] && enableval="-$3"
152 152
153 useq $flag && echo "${enableval}-${feature}" || echo "-no-${feature}" 153 useq $flag && echo "${enableval}-${feature}" || echo "-no-${feature}"
154 return 0 154 return 0
155} 155}
156 156
157qt_mkspecs_dir() { 157qt_mkspecs_dir() {
158 # Allows us to define which mkspecs dir we want to use. 158 # Allows us to define which mkspecs dir we want to use.
159 local spec 159 local spec
160 160
161 case ${CHOST} in 161 case ${CHOST} in
162 *-freebsd*|*-dragonfly*) 162 *-freebsd*|*-dragonfly*)
163 spec="freebsd" ;; 163 spec="freebsd" ;;
164 *-openbsd*) 164 *-openbsd*)
165 spec="openbsd" ;; 165 spec="openbsd" ;;
166 *-netbsd*) 166 *-netbsd*)
167 spec="netbsd" ;; 167 spec="netbsd" ;;
168 *-darwin*) 168 *-darwin*)
169 spec="darwin" ;; 169 spec="darwin" ;;
170 *-linux-*|*-linux) 170 *-linux-*|*-linux)
171 spec="linux" ;; 171 spec="linux" ;;
172 *) 172 *)
173 die "Unknown CHOST, no platform choosed." 173 die "Unknown CHOST, no platform choosed."
174 esac 174 esac
175 175
176 CXX=$(tc-getCXX) 176 CXX=$(tc-getCXX)
177 if [[ ${CXX/g++/} != ${CXX} ]]; then 177 if [[ ${CXX/g++/} != ${CXX} ]]; then
178 spec="${spec}-g++" 178 spec="${spec}-g++"
179 elif [[ ${CXX/icpc/} != ${CXX} ]]; then 179 elif [[ ${CXX/icpc/} != ${CXX} ]]; then
180 spec="${spec}-icc" 180 spec="${spec}-icc"
181 else 181 else
182 die "Unknown compiler ${CXX}." 182 die "Unknown compiler ${CXX}."
183 fi 183 fi
184 184
185 echo "${spec}" 185 echo "${spec}"
186} 186}
187 187
188EXPORT_FUNCTIONS pkg_setup src_unpack src_install 188EXPORT_FUNCTIONS pkg_setup src_unpack src_install

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

  ViewVC Help
Powered by ViewVC 1.1.20