/[gentoo-x86]/eclass/cmake-utils.eclass
Gentoo

Diff of /eclass/cmake-utils.eclass

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

Revision 1.4 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/cmake-utils.eclass,v 1.4 2007/12/13 16:23:59 betelgeuse Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.7 2008/03/29 21:33:17 philantrop Exp $
4 4
5# @ECLASS: cmake-utils.eclass 5# @ECLASS: cmake-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: common ebuild functions for cmake-based packages 8# @BLURB: common ebuild functions for cmake-based packages
28 debug-print-function $FUNCNAME $* 28 debug-print-function $FUNCNAME $*
29 [[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]" 29 [[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
30 echo "-D$1_${3:-$2}=$(use $2 && echo ON || echo OFF)" 30 echo "-D$1_${3:-$2}=$(use $2 && echo ON || echo OFF)"
31} 31}
32 32
33# @VARIABLE: DOCS
34# @DESCRIPTION:
35# Documents to dodoc
36
33# @FUNCTION: cmake-utils_use_with 37# @FUNCTION: cmake-utils_use_with
34# @USAGE: <USE flag> [flag name] 38# @USAGE: <USE flag> [flag name]
35# @DESCRIPTION: 39# @DESCRIPTION:
36# Based on use_with. See ebuild(5). 40# Based on use_with. See ebuild(5).
37# 41#
86# Function for software that requires configure and building in the source 90# Function for software that requires configure and building in the source
87# directory. 91# directory.
88cmake-utils_src_configurein() { 92cmake-utils_src_configurein() {
89 debug-print-function $FUNCNAME $* 93 debug-print-function $FUNCNAME $*
90 94
91 local cmakeargs="$(_common_configure_code) ${mycmakeargs}" 95 local cmakeargs="$(_common_configure_code) ${mycmakeargs} ${EXTRA_ECONF}"
92 96
93 debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs" 97 debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
94 cmake ${cmakeargs} . || die "Cmake failed" 98 cmake ${cmakeargs} . || die "Cmake failed"
95} 99}
96 100
99# Function for software that requires configure and building outside the source 103# Function for software that requires configure and building outside the source
100# tree - default. 104# tree - default.
101cmake-utils_src_configureout() { 105cmake-utils_src_configureout() {
102 debug-print-function $FUNCNAME $* 106 debug-print-function $FUNCNAME $*
103 107
104 local cmakeargs="$(_common_configure_code) ${mycmakeargs}" 108 local cmakeargs="$(_common_configure_code) ${mycmakeargs} ${EXTRA_ECONF}"
105 mkdir -p "${WORKDIR}"/${PN}_build 109 mkdir -p "${WORKDIR}"/${PN}_build
106 pushd "${WORKDIR}"/${PN}_build > /dev/null 110 pushd "${WORKDIR}"/${PN}_build > /dev/null
107 111
108 debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs" 112 debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
109 cmake ${cmakeargs} "${S}" || die "Cmake failed" 113 cmake ${cmakeargs} "${S}" || die "Cmake failed"
163 fi 167 fi
164 emake install DESTDIR="${D}" || die "Make install failed" 168 emake install DESTDIR="${D}" || die "Make install failed"
165 if [[ -d ${WORKDIR}/${PN}_build ]]; then 169 if [[ -d ${WORKDIR}/${PN}_build ]]; then
166 popd > /dev/null 170 popd > /dev/null
167 fi 171 fi
172
173 # Manual document installation
174 [[ -n "${DOCS}" ]] && dodoc ${DOCS}
168} 175}
169 176
170# @FUNCTION: cmake-utils_src_test 177# @FUNCTION: cmake-utils_src_test
171# @DESCRIPTION: 178# @DESCRIPTION:
172# Function for testing the package. Automatically detects the build type. 179# Function for testing the package. Automatically detects the build type.

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

  ViewVC Help
Powered by ViewVC 1.1.20