public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2007-11-04 13:17 Wulf Krueger (philantrop)
  0 siblings, 0 replies; 75+ messages in thread
From: Wulf Krueger (philantrop) @ 2007-11-04 13:17 UTC (permalink / raw
  To: gentoo-commits

philantrop    07/11/04 13:17:36

  Added:                cmake-utils.eclass
  Log:
  New cmake-utils.eclass providing functions for the cmake build system with all requested fixes after the review on gentoo-dev.

Revision  Changes    Path
1.1                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.1&content-type=text/plain

Index: cmake-utils.eclass
===================================================================
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.1 2007/11/04 13:17:35 philantrop Exp $

# @ECLASS: cmake-utils.eclass
# @MAINTAINER:
# kde@gentoo.org
# @BLURB: common ebuild functions for cmake-based packages
# @DESCRIPTION:
# The cmake-utils eclass contains functions that make creating ebuilds for
# cmake-based packages much easier.
# Its main features are support of out-of-source builds as well as in-source
# builds and an implementation of the well-known use_enable and use_with
# functions for CMake.

# Original author: Zephyrus (zephyrus@mirach.it)

inherit toolchain-funcs multilib

DESCRIPTION="Based on the ${ECLASS} eclass"

DEPEND="dev-util/cmake"

EXPORT_FUNCTIONS src_compile src_test src_install

# Internal function use by cmake-utils_use_with and cmake-utils_use_enable
_use_me_now() {
	debug-print-function $FUNCNAME $*
	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
	echo "-D$1_${3:-$2}=$(use $2 && echo ON || echo OFF)"
}

# @FUNCTION: cmake-utils_use_with
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_with. See ebuild.sh
cmake-utils_use_with() { _use_me_now WITH "$@" ; }

# @FUNCTION: cmake-utils_use_enable
# @USAGE: <USE flag> [flag name]
# @DESCRIPTION:
# Based on use_enable. See ebuild.sh
cmake-utils_use_enable() { _use_me_now ENABLE "$@" ; }

# @FUNCTION: cmake-utils_src_compile
# @DESCRIPTION:
# General function for compiling with cmake. Default behaviour is to start an
# out-of-source build
cmake-utils_src_compile() {
	debug-print-function $FUNCNAME $*

	cmake-utils_src_configureout
	cmake-utils_src_make
}

# @FUNCTION: cmake-utils_src_configurein
# @DESCRIPTION:
# Function for software that requires configure and building in the source
# directory.
cmake-utils_src_configurein() {
	debug-print-function $FUNCNAME $*

	local cmakeargs="${mycmakeargs} $(_common_configure_code)"

	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
	cmake ${cmakeargs} . || die "Cmake failed"
}

# @FUNCTION: cmake-utils_src_configureout
# @DESCRIPTION:
# Function for software that requires configure and building outside the source
# tree - default.
cmake-utils_src_configureout() {
	debug-print-function $FUNCNAME $*

	local cmakeargs="${mycmakeargs} $(_common_configure_code)"
	mkdir "${WORKDIR}"/${PN}_build
	cd "${WORKDIR}"/${PN}_build

	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
	cmake ${cmakeargs} "${S}" || die "Cmake failed"
}

# Internal use only. Common configuration options for all types of builds.
_common_configure_code() {
	local tmp_libdir=$(get_libdir)
	if has debug ${IUSE} && use debug; then
		echo -DCMAKE_BUILD_TYPE=debug
	fi
	echo -DCMAKE_C_COMPILER=$(type -P $(tc-getCC))
	echo -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX))
	echo -DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}
	echo -DLIB_SUFFIX=${tmp_libdir/lib}
	[[ -n ${CMAKE_NO_COLOR} ]] && echo -DCMAKE_COLOR_MAKEFILE=OFF
}

# @FUNCTION: cmake-utils_src_make
# @DESCRIPTION:
# Function for building the package. Automatically detects the build type.
cmake-utils_src_make() {
	debug-print-function $FUNCNAME $*

	# At this point we can automatically check if it's an out-of-source or an
	# in-source build
	if [[ -d ${WORKDIR}/${PN}_build ]]; then
		cd "${WORKDIR}"/${PN}_build;
	fi
	if ! [[ -z ${CMAKE_COMPILER_VERBOSE} ]]; then
		emake VERBOSE=1 || die "Make failed!";
	else
		emake || die "Make failed!";
	fi
}

# @FUNCTION: cmake-utils_src_install
# @DESCRIPTION:
# Function for installing the package. Automatically detects the build type.
cmake-utils_src_install() {
	debug-print-function $FUNCNAME $*

	# At this point we can automatically check if it's an out-of-source or an
	# in-source build
	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
		cd "${WORKDIR}"/${PN}_build;
	fi
	emake install DESTDIR="${D}" || die "Make install failed"
}

# @FUNCTION: cmake-utils_src_test
# @DESCRIPTION:
# Function for testing the package. Automatically detects the build type.
cmake-utils_src_test() {
	debug-print-function $FUNCNAME $*

	# At this point we can automatically check if it's an out-of-source or an
	# in-source build
	if [[ -d ${WORKDIR}/${PN}_build ]]; then
		cd "${WORKDIR}"/${PN}_build
	fi
	# Standard implementation of src_test
	if emake -j1 check -n &> /dev/null; then
		einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
		if ! emake -j1 check; then
			die "Make check failed. See above for details."
		fi
	elif emake -j1 test -n &> /dev/null; then
		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
		if ! emake -j1 test; then
			die "Make test failed. See above for details."
		fi
	else
		einfo ">>> Test phase [none]: ${CATEGORY}/${PF}"
	fi
}



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2007-11-11 20:02 Wulf Krueger (philantrop)
  0 siblings, 0 replies; 75+ messages in thread
From: Wulf Krueger (philantrop) @ 2007-11-11 20:02 UTC (permalink / raw
  To: gentoo-commits

philantrop    07/11/11 20:02:11

  Modified:             cmake-utils.eclass
  Log:
  Added a patch by Nelchael (use pushd/popd, allow use of CMAKE_IN_SOURCE_BUILD, define LIB_INSTALL_DIR) and cmake-utils_use_want by Ingmar to allow usage of the eclass by applications that need -DWANT_blah.

Revision  Changes    Path
1.2                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.1&r2=1.2

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cmake-utils.eclass	4 Nov 2007 13:17:35 -0000	1.1
+++ cmake-utils.eclass	11 Nov 2007 20:02:11 -0000	1.2
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.1 2007/11/04 13:17:35 philantrop Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.2 2007/11/11 20:02:11 philantrop Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -42,6 +42,12 @@
 # Based on use_enable. See ebuild.sh
 cmake-utils_use_enable() { _use_me_now ENABLE "$@" ; }
 
+# @FUNCTION: cmake-utils_use_want
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild.sh
+cmake-utils_use_want() { _use_me_now WANT "$@" ; }
+
 # @FUNCTION: cmake-utils_src_compile
 # @DESCRIPTION:
 # General function for compiling with cmake. Default behaviour is to start an
@@ -49,7 +55,11 @@
 cmake-utils_src_compile() {
 	debug-print-function $FUNCNAME $*
 
-	cmake-utils_src_configureout
+	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
+		cmake-utils_src_configurein
+	else
+		cmake-utils_src_configureout
+	fi
 	cmake-utils_src_make
 }
 
@@ -74,11 +84,13 @@
 	debug-print-function $FUNCNAME $*
 
 	local cmakeargs="${mycmakeargs} $(_common_configure_code)"
-	mkdir "${WORKDIR}"/${PN}_build
-	cd "${WORKDIR}"/${PN}_build
+	mkdir -p "${WORKDIR}"/${PN}_build
+	pushd "${WORKDIR}"/${PN}_build > /dev/null
 
 	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
 	cmake ${cmakeargs} "${S}" || die "Cmake failed"
+
+	popd > /dev/null
 }
 
 # Internal use only. Common configuration options for all types of builds.
@@ -91,6 +103,7 @@
 	echo -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX))
 	echo -DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}
 	echo -DLIB_SUFFIX=${tmp_libdir/lib}
+	echo -DLIB_INSTALL_DIR=${PREFIX:-/usr}/${tmp_libdir}
 	[[ -n ${CMAKE_NO_COLOR} ]] && echo -DCMAKE_COLOR_MAKEFILE=OFF
 }
 
@@ -103,12 +116,15 @@
 	# At this point we can automatically check if it's an out-of-source or an
 	# in-source build
 	if [[ -d ${WORKDIR}/${PN}_build ]]; then
-		cd "${WORKDIR}"/${PN}_build;
+		pushd "${WORKDIR}"/${PN}_build > /dev/null
 	fi
 	if ! [[ -z ${CMAKE_COMPILER_VERBOSE} ]]; then
-		emake VERBOSE=1 || die "Make failed!";
+		emake VERBOSE=1 || die "Make failed!"
 	else
-		emake || die "Make failed!";
+		emake || die "Make failed!"
+	fi
+	if [[ -d ${WORKDIR}/${PN}_build ]]; then
+		popd > /dev/null
 	fi
 }
 
@@ -121,9 +137,12 @@
 	# At this point we can automatically check if it's an out-of-source or an
 	# in-source build
 	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
-		cd "${WORKDIR}"/${PN}_build;
+		pushd "${WORKDIR}"/${PN}_build > /dev/null
 	fi
 	emake install DESTDIR="${D}" || die "Make install failed"
+	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
+		popd > /dev/null
+	fi
 }
 
 # @FUNCTION: cmake-utils_src_test
@@ -135,7 +154,7 @@
 	# At this point we can automatically check if it's an out-of-source or an
 	# in-source build
 	if [[ -d ${WORKDIR}/${PN}_build ]]; then
-		cd "${WORKDIR}"/${PN}_build
+		pushd "${WORKDIR}"/${PN}_build > /dev/null
 	fi
 	# Standard implementation of src_test
 	if emake -j1 check -n &> /dev/null; then
@@ -151,4 +170,7 @@
 	else
 		einfo ">>> Test phase [none]: ${CATEGORY}/${PF}"
 	fi
+	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
+		popd > /dev/null
+	fi
 }



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2007-12-06 20:40 Wulf Krueger (philantrop)
  0 siblings, 0 replies; 75+ messages in thread
From: Wulf Krueger (philantrop) @ 2007-12-06 20:40 UTC (permalink / raw
  To: gentoo-commits

philantrop    07/12/06 20:40:21

  Modified:             cmake-utils.eclass
  Log:
  Minor enhancements.

Revision  Changes    Path
1.3                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.2&r2=1.3

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cmake-utils.eclass	11 Nov 2007 20:02:11 -0000	1.2
+++ cmake-utils.eclass	6 Dec 2007 20:40:20 -0000	1.3
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.2 2007/11/11 20:02:11 philantrop Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.3 2007/12/06 20:40:20 philantrop Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -33,25 +33,43 @@
 # @FUNCTION: cmake-utils_use_with
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
-# Based on use_with. See ebuild.sh
+# Based on use_with. See ebuild(5).
+# 
+# `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
+# and -DWITH_FOO=OFF if it is disabled.
 cmake-utils_use_with() { _use_me_now WITH "$@" ; }
 
 # @FUNCTION: cmake-utils_use_enable
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
-# Based on use_enable. See ebuild.sh
+# Based on use_enable. See ebuild(5).
+# 
+# `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
+# and -DENABLE_FOO=OFF if it is disabled.
 cmake-utils_use_enable() { _use_me_now ENABLE "$@" ; }
 
 # @FUNCTION: cmake-utils_use_want
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
-# Based on use_enable. See ebuild.sh
+# Based on use_enable. See ebuild(5).
+# 
+# `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
+# and -DWANT_FOO=OFF if it is disabled.
 cmake-utils_use_want() { _use_me_now WANT "$@" ; }
 
+# @FUNCTION: cmake-utils_has
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+# 
+# `cmake-utils_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
+# and -DHAVE_FOO=OFF if it is disabled.
+cmake-utils_has() { _use_me_now HAVE "$@" ; }
+
 # @FUNCTION: cmake-utils_src_compile
 # @DESCRIPTION:
 # General function for compiling with cmake. Default behaviour is to start an
-# out-of-source build
+# out-of-source build. All arguments are passed to cmake-utils_src_make.
 cmake-utils_src_compile() {
 	debug-print-function $FUNCNAME $*
 
@@ -60,7 +78,7 @@
 	else
 		cmake-utils_src_configureout
 	fi
-	cmake-utils_src_make
+	cmake-utils_src_make "$@"
 }
 
 # @FUNCTION: cmake-utils_src_configurein
@@ -70,7 +88,7 @@
 cmake-utils_src_configurein() {
 	debug-print-function $FUNCNAME $*
 
-	local cmakeargs="${mycmakeargs} $(_common_configure_code)"
+	local cmakeargs="$(_common_configure_code) ${mycmakeargs}"
 
 	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
 	cmake ${cmakeargs} . || die "Cmake failed"
@@ -83,7 +101,7 @@
 cmake-utils_src_configureout() {
 	debug-print-function $FUNCNAME $*
 
-	local cmakeargs="${mycmakeargs} $(_common_configure_code)"
+	local cmakeargs="$(_common_configure_code) ${mycmakeargs}"
 	mkdir -p "${WORKDIR}"/${PN}_build
 	pushd "${WORKDIR}"/${PN}_build > /dev/null
 
@@ -96,8 +114,10 @@
 # Internal use only. Common configuration options for all types of builds.
 _common_configure_code() {
 	local tmp_libdir=$(get_libdir)
-	if has debug ${IUSE} && use debug; then
-		echo -DCMAKE_BUILD_TYPE=debug
+	if has debug ${IUSE//+} && use debug; then
+		echo -DCMAKE_BUILD_TYPE=Debug
+	else
+		echo -DCMAKE_BUILD_TYPE=Release
 	fi
 	echo -DCMAKE_C_COMPILER=$(type -P $(tc-getCC))
 	echo -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX))
@@ -110,6 +130,8 @@
 # @FUNCTION: cmake-utils_src_make
 # @DESCRIPTION:
 # Function for building the package. Automatically detects the build type.
+# All arguments are passed to emake:
+# "cmake-utils_src_make -j1" can be used to work around parallel make issues.
 cmake-utils_src_make() {
 	debug-print-function $FUNCNAME $*
 
@@ -119,9 +141,9 @@
 		pushd "${WORKDIR}"/${PN}_build > /dev/null
 	fi
 	if ! [[ -z ${CMAKE_COMPILER_VERBOSE} ]]; then
-		emake VERBOSE=1 || die "Make failed!"
+		emake VERBOSE=1 "$@" || die "Make failed!"
 	else
-		emake || die "Make failed!"
+		emake "$@" || die "Make failed!"
 	fi
 	if [[ -d ${WORKDIR}/${PN}_build ]]; then
 		popd > /dev/null



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2007-12-13 16:23 Petteri Raty (betelgeuse)
  0 siblings, 0 replies; 75+ messages in thread
From: Petteri Raty (betelgeuse) @ 2007-12-13 16:23 UTC (permalink / raw
  To: gentoo-commits

betelgeuse    07/12/13 16:23:59

  Modified:             cmake-utils.eclass
  Log:
  Remove trailing white space.

Revision  Changes    Path
1.4                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.3&r2=1.4

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cmake-utils.eclass	6 Dec 2007 20:40:20 -0000	1.3
+++ cmake-utils.eclass	13 Dec 2007 16:23:59 -0000	1.4
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.3 2007/12/06 20:40:20 philantrop Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.4 2007/12/13 16:23:59 betelgeuse Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -34,7 +34,7 @@
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
 # Based on use_with. See ebuild(5).
-# 
+#
 # `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
 # and -DWITH_FOO=OFF if it is disabled.
 cmake-utils_use_with() { _use_me_now WITH "$@" ; }
@@ -43,7 +43,7 @@
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
 # Based on use_enable. See ebuild(5).
-# 
+#
 # `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
 # and -DENABLE_FOO=OFF if it is disabled.
 cmake-utils_use_enable() { _use_me_now ENABLE "$@" ; }
@@ -52,7 +52,7 @@
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
 # Based on use_enable. See ebuild(5).
-# 
+#
 # `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
 # and -DWANT_FOO=OFF if it is disabled.
 cmake-utils_use_want() { _use_me_now WANT "$@" ; }
@@ -61,7 +61,7 @@
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
 # Based on use_enable. See ebuild(5).
-# 
+#
 # `cmake-utils_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
 # and -DHAVE_FOO=OFF if it is disabled.
 cmake-utils_has() { _use_me_now HAVE "$@" ; }



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-02-20  0:35 Bo Oersted Andresen (zlin)
  0 siblings, 0 replies; 75+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-20  0:35 UTC (permalink / raw
  To: gentoo-commits

zlin        08/02/20 00:35:12

  Modified:             cmake-utils.eclass
  Log:
  Apply DOCS support to cmake-utils.eclass. Patch from Peter Volkov.

Revision  Changes    Path
1.5                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.4&r2=1.5

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cmake-utils.eclass	13 Dec 2007 16:23:59 -0000	1.4
+++ cmake-utils.eclass	20 Feb 2008 00:35:11 -0000	1.5
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.4 2007/12/13 16:23:59 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.5 2008/02/20 00:35:11 zlin Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -30,6 +30,11 @@
 	echo "-D$1_${3:-$2}=$(use $2 && echo ON || echo OFF)"
 }
 
+# @VARIABLE: DOCS
+# @USAGE: DOCS="README ChangeLog"
+# @DESCRIPTION:
+# Documents to dodoc
+
 # @FUNCTION: cmake-utils_use_with
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
@@ -165,6 +170,9 @@
 	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
 		popd > /dev/null
 	fi
+
+	# Manual document installation
+	[[ -n "${DOCS}" ]] && dodoc ${DOCS}
 }
 
 # @FUNCTION: cmake-utils_src_test



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-02-20 14:33 Bo Oersted Andresen (zlin)
  0 siblings, 0 replies; 75+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-20 14:33 UTC (permalink / raw
  To: gentoo-commits

zlin        08/02/20 14:33:20

  Modified:             cmake-utils.eclass
  Log:
  Remove @USAGE as kindly pointed out by David Leverton. It is only valid with functions and break the generated man page.

Revision  Changes    Path
1.6                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.5&r2=1.6

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- cmake-utils.eclass	20 Feb 2008 00:35:11 -0000	1.5
+++ cmake-utils.eclass	20 Feb 2008 14:33:20 -0000	1.6
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.5 2008/02/20 00:35:11 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.6 2008/02/20 14:33:20 zlin Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -31,7 +31,6 @@
 }
 
 # @VARIABLE: DOCS
-# @USAGE: DOCS="README ChangeLog"
 # @DESCRIPTION:
 # Documents to dodoc
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-03-29 21:33 Wulf Krueger (philantrop)
  0 siblings, 0 replies; 75+ messages in thread
From: Wulf Krueger (philantrop) @ 2008-03-29 21:33 UTC (permalink / raw
  To: gentoo-commits

philantrop    08/03/29 21:33:17

  Modified:             cmake-utils.eclass
  Log:
  Added a patch kindly provided by Calchan to enable the use of EXTRA_ECONF with cmake-utils.eclass.

Revision  Changes    Path
1.7                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.6&r2=1.7

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cmake-utils.eclass	20 Feb 2008 14:33:20 -0000	1.6
+++ cmake-utils.eclass	29 Mar 2008 21:33:17 -0000	1.7
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.6 2008/02/20 14:33:20 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.7 2008/03/29 21:33:17 philantrop Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -92,7 +92,7 @@
 cmake-utils_src_configurein() {
 	debug-print-function $FUNCNAME $*
 
-	local cmakeargs="$(_common_configure_code) ${mycmakeargs}"
+	local cmakeargs="$(_common_configure_code) ${mycmakeargs} ${EXTRA_ECONF}"
 
 	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
 	cmake ${cmakeargs} . || die "Cmake failed"
@@ -105,7 +105,7 @@
 cmake-utils_src_configureout() {
 	debug-print-function $FUNCNAME $*
 
-	local cmakeargs="$(_common_configure_code) ${mycmakeargs}"
+	local cmakeargs="$(_common_configure_code) ${mycmakeargs} ${EXTRA_ECONF}"
 	mkdir -p "${WORKDIR}"/${PN}_build
 	pushd "${WORKDIR}"/${PN}_build > /dev/null
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-04-23 11:55 Ingmar Vanhassel (ingmar)
  0 siblings, 0 replies; 75+ messages in thread
From: Ingmar Vanhassel (ingmar) @ 2008-04-23 11:55 UTC (permalink / raw
  To: gentoo-commits

ingmar      08/04/23 11:55:52

  Modified:             cmake-utils.eclass
  Log:
  Require >=dev-util/cmake-2.4.6, which is currently the oldest stable, see bug 214732 and others.

Revision  Changes    Path
1.8                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.7&r2=1.8

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- cmake-utils.eclass	29 Mar 2008 21:33:17 -0000	1.7
+++ cmake-utils.eclass	23 Apr 2008 11:55:51 -0000	1.8
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.7 2008/03/29 21:33:17 philantrop Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.8 2008/04/23 11:55:51 ingmar Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -19,7 +19,7 @@
 
 DESCRIPTION="Based on the ${ECLASS} eclass"
 
-DEPEND="dev-util/cmake"
+DEPEND=">=dev-util/cmake-2.4.6"
 
 EXPORT_FUNCTIONS src_compile src_test src_install
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-09-28 16:19 Jorge Manuel B. S. Vicetto (jmbsvicetto)
  0 siblings, 0 replies; 75+ messages in thread
From: Jorge Manuel B. S. Vicetto (jmbsvicetto) @ 2008-09-28 16:19 UTC (permalink / raw
  To: gentoo-commits

jmbsvicetto    08/09/28 16:19:06

  Modified:             cmake-utils.eclass
  Log:
  Applied fixes to the cmake-utils eclass to support EAPI-2. Thanks to Tomas Chvatal (scarabeus) for the patch.

Revision  Changes    Path
1.9                  eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.8&r2=1.9

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- cmake-utils.eclass	23 Apr 2008 11:55:51 -0000	1.8
+++ cmake-utils.eclass	28 Sep 2008 16:19:06 -0000	1.9
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.8 2008/04/23 11:55:51 ingmar Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.9 2008/09/28 16:19:06 jmbsvicetto Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -21,7 +21,7 @@
 
 DEPEND=">=dev-util/cmake-2.4.6"
 
-EXPORT_FUNCTIONS src_compile src_test src_install
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
 
 # Internal function use by cmake-utils_use_with and cmake-utils_use_enable
 _use_me_now() {
@@ -70,11 +70,11 @@
 # and -DHAVE_FOO=OFF if it is disabled.
 cmake-utils_has() { _use_me_now HAVE "$@" ; }
 
-# @FUNCTION: cmake-utils_src_compile
+# @FUNCTION: cmake-utils_src_configure
 # @DESCRIPTION:
-# General function for compiling with cmake. Default behaviour is to start an
-# out-of-source build. All arguments are passed to cmake-utils_src_make.
-cmake-utils_src_compile() {
+# General function for configuring with cmake. Default behaviour is to start an
+# out-of-source build.
+cmake-utils_src_configure() {
 	debug-print-function $FUNCNAME $*
 
 	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
@@ -82,6 +82,21 @@
 	else
 		cmake-utils_src_configureout
 	fi
+}
+
+# @FUNCTION: cmake-utils_src_compile
+# @DESCRIPTION:
+# General function for compiling with cmake. Default behaviour is to check for
+# eapi and based on it configure or only compile
+cmake-utils_src_compile() {
+	case ${EAPI} in
+		2 | 2_pre3 | 2_pre2 | 2_pre1)
+		;;
+	*)
+		cmake-utils_src_configure
+		;;
+	esac
+
 	cmake-utils_src_make "$@"
 }
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-09-28 18:52 Jorge Manuel B. S. Vicetto (jmbsvicetto)
  0 siblings, 0 replies; 75+ messages in thread
From: Jorge Manuel B. S. Vicetto (jmbsvicetto) @ 2008-09-28 18:52 UTC (permalink / raw
  To: gentoo-commits

jmbsvicetto    08/09/28 18:52:16

  Modified:             cmake-utils.eclass
  Log:
  Don't export src_configure for EAPI!=2.

Revision  Changes    Path
1.10                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.9&r2=1.10

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- cmake-utils.eclass	28 Sep 2008 16:19:06 -0000	1.9
+++ cmake-utils.eclass	28 Sep 2008 18:52:16 -0000	1.10
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.9 2008/09/28 16:19:06 jmbsvicetto Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.10 2008/09/28 18:52:16 jmbsvicetto Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -21,7 +21,15 @@
 
 DEPEND=">=dev-util/cmake-2.4.6"
 
-EXPORT_FUNCTIONS src_configure src_compile src_test src_install
+case ${EAPI} in
+	2)
+		EXPORT_FUNCTIONS src_configure src_compile src_test src_install
+		;;
+	*)
+		EXPORT_FUNCTIONS src_compile src_test src_install
+		;;
+esac
+
 
 # Internal function use by cmake-utils_use_with and cmake-utils_use_enable
 _use_me_now() {
@@ -90,7 +98,7 @@
 # eapi and based on it configure or only compile
 cmake-utils_src_compile() {
 	case ${EAPI} in
-		2 | 2_pre3 | 2_pre2 | 2_pre1)
+		2)
 		;;
 	*)
 		cmake-utils_src_configure






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-10-27  5:36 Mike Frysinger (vapier)
  0 siblings, 0 replies; 75+ messages in thread
From: Mike Frysinger (vapier) @ 2008-10-27  5:36 UTC (permalink / raw
  To: gentoo-commits

vapier      08/10/27 05:36:02

  Modified:             cmake-utils.eclass
  Log:
  erm, previous commit wasnt ready, but should be ok with this fix

Revision  Changes    Path
1.12                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.11&r2=1.12

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- cmake-utils.eclass	27 Oct 2008 05:06:41 -0000	1.11
+++ cmake-utils.eclass	27 Oct 2008 05:36:02 -0000	1.12
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.11 2008/10/27 05:06:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.12 2008/10/27 05:36:02 vapier Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -85,7 +85,7 @@
 cmake-utils_src_configure() {
 	debug-print-function $FUNCNAME $*
 
-	if has debug ${IUSE//+} && use debug ; then
+	if ! has debug ${IUSE//+} || ! use debug ; then
 		append-cppflags -DNDEBUG
 	fi
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-10-27 14:38 Mike Frysinger (vapier)
  0 siblings, 0 replies; 75+ messages in thread
From: Mike Frysinger (vapier) @ 2008-10-27 14:38 UTC (permalink / raw
  To: gentoo-commits

vapier      08/10/27 14:38:38

  Modified:             cmake-utils.eclass
  Log:
  allow build type to be overridden via $CMAKE_BUILD_TYPE

Revision  Changes    Path
1.13                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.12&r2=1.13

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- cmake-utils.eclass	27 Oct 2008 05:36:02 -0000	1.12
+++ cmake-utils.eclass	27 Oct 2008 14:38:38 -0000	1.13
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.12 2008/10/27 05:36:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.13 2008/10/27 14:38:38 vapier Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -146,7 +146,7 @@
 _common_configure_code() {
 	local tmp_libdir=$(get_libdir)
 	# CMAKE_BUILD_TYPE only modifies compiler flags, so set to None
-	echo -DCMAKE_BUILD_TYPE=None
+	echo -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-None}
 	echo -DCMAKE_C_COMPILER=$(type -P $(tc-getCC))
 	echo -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX))
 	echo -DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-10-28 17:39 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2008-10-28 17:39 UTC (permalink / raw
  To: gentoo-commits

scarabeus    08/10/28 17:39:28

  Modified:             cmake-utils.eclass
  Log:
  Add inheritage of flag-o-matic eclass. Fixes bug #244625.

Revision  Changes    Path
1.14                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.13&r2=1.14

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- cmake-utils.eclass	27 Oct 2008 14:38:38 -0000	1.13
+++ cmake-utils.eclass	28 Oct 2008 17:39:28 -0000	1.14
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.13 2008/10/27 14:38:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.14 2008/10/28 17:39:28 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -15,7 +15,7 @@
 
 # Original author: Zephyrus (zephyrus@mirach.it)
 
-inherit toolchain-funcs multilib
+inherit toolchain-funcs multilib flag-o-matic
 
 DESCRIPTION="Based on the ${ECLASS} eclass"
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-11-05 20:59 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2008-11-05 20:59 UTC (permalink / raw
  To: gentoo-commits

scarabeus    08/11/05 20:59:37

  Modified:             cmake-utils.eclass
  Log:
  - Update cmake-utils eclass so it respect user defined CFLAGS and so on.
  - Fixes bug 221049.
  - Thanks to matthew.m.mccormick@gmail.com whom made this patch.

Revision  Changes    Path
1.15                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.14&r2=1.15

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- cmake-utils.eclass	28 Oct 2008 17:39:28 -0000	1.14
+++ cmake-utils.eclass	5 Nov 2008 20:59:37 -0000	1.15
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.14 2008/10/28 17:39:28 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.15 2008/11/05 20:59:37 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -85,10 +85,6 @@
 cmake-utils_src_configure() {
 	debug-print-function $FUNCNAME $*
 
-	if ! has debug ${IUSE//+} || ! use debug ; then
-		append-cppflags -DNDEBUG
-	fi
-
 	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
 		cmake-utils_src_configurein
 	else
@@ -119,10 +115,11 @@
 cmake-utils_src_configurein() {
 	debug-print-function $FUNCNAME $*
 
-	local cmakeargs="$(_common_configure_code) ${mycmakeargs} ${EXTRA_ECONF}"
+	_common_configure_code
+	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF}"
 
 	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
-	cmake ${cmakeargs} . || die "Cmake failed"
+	cmake -C "${TMPDIR}/gentoo_common_config.cmake" ${cmakeargs} . || die "Cmake failed"
 }
 
 # @FUNCTION: cmake-utils_src_configureout
@@ -132,12 +129,13 @@
 cmake-utils_src_configureout() {
 	debug-print-function $FUNCNAME $*
 
-	local cmakeargs="$(_common_configure_code) ${mycmakeargs} ${EXTRA_ECONF}"
+	_common_configure_code
+	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF}"
 	mkdir -p "${WORKDIR}"/${PN}_build
 	pushd "${WORKDIR}"/${PN}_build > /dev/null
 
 	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
-	cmake ${cmakeargs} "${S}" || die "Cmake failed"
+	cmake -C "${TMPDIR}/gentoo_common_config.cmake" ${cmakeargs} "${S}" || die "Cmake failed"
 
 	popd > /dev/null
 }
@@ -145,14 +143,38 @@
 # Internal use only. Common configuration options for all types of builds.
 _common_configure_code() {
 	local tmp_libdir=$(get_libdir)
-	# CMAKE_BUILD_TYPE only modifies compiler flags, so set to None
-	echo -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-None}
-	echo -DCMAKE_C_COMPILER=$(type -P $(tc-getCC))
-	echo -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX))
-	echo -DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}
-	echo -DLIB_SUFFIX=${tmp_libdir/lib}
-	echo -DLIB_INSTALL_DIR=${PREFIX:-/usr}/${tmp_libdir}
-	[[ -n ${CMAKE_NO_COLOR} ]] && echo -DCMAKE_COLOR_MAKEFILE=OFF
+	# here we set the compiler explicitly, set install directories prefixes, and
+	# make sure that the gentoo user compiler flags trump those set in the
+	# program
+	local modules_dir=/usr/share/cmake/Modules
+	local cxx_create_shared_library=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<TARGET_SONAME>/<TARGET_SONAME> ${CXXFLAGS}/" -e '/SET(CMAKE_CXX_CREATE_SHARED_LIBRARY/,/)/p' "${modules_dir}/CMakeCXXInformation.cmake")
+	local c_create_shared_library=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<TARGET_SONAME>/<TARGET_SONAME> ${CFLAGS}/" -e '/SET(CMAKE_C_CREATE_SHARED_LIBRARY/,/)/p' "${modules_dir}/CMakeCInformation.cmake")
+	local c_compile_object=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CFLAGS}/" -e '/SET(CMAKE_C_COMPILE_OBJECT/,/)/p' "${modules_dir}/CMakeCInformation.cmake")
+	local cxx_compile_object=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CXXFLAGS}/" -e '/SET(CMAKE_CXX_COMPILE_OBJECT/,/)/p' "${modules_dir}/CMakeCXXInformation.cmake")
+	local c_link_executable=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CFLAGS}/" -e "s/<LINK_FLAGS>/<LINK_FLAGS> ${LDFLAGS}/" -e '/SET(CMAKE_C_LINK_EXECUTABLE/,/)/p' "${modules_dir}/CMakeCInformation.cmake")
+	local cxx_link_executable=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CXXFLAGS}/" -e "s/<LINK_FLAGS>/<LINK_FLAGS> ${LDFLAGS}/" -e '/SET(CMAKE_CXX_LINK_EXECUTABLE/,/)/p' "${modules_dir}/CMakeCXXInformation.cmake")
+	cat > "${TMPDIR}/gentoo_common_config.cmake" <<_EOF_
+SET(CMAKE_C_COMPILER $(type -P $(tc-getCC)) CACHE STRING "package building C compiler")
+SET(CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE STRING "package building C++ compiler")
+${c_create_shared_library}
+${cxx_create_shared_library}
+${c_compile_object}
+${cxx_compile_object}
+${c_link_executable}
+${cxx_link_executable}
+SET(CMAKE_INSTALL_PREFIX ${PREFIX:-/usr} CACHE FILEPATH "install path prefix")
+SET(LIB_SUFFIX ${tmp_libdir/lib} CACHE FILEPATH "library path suffix")
+SET(LIB_INSTALL_DIR ${PREFIX:-/usr}/${tmp_libdir} CACHE FILEPATH "library install directory")
+
+_EOF_
+
+	[[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET(CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make")' >> "${TMPDIR}/gentoo_common_config.cmake"
+
+	if has debug ${IUSE//+} && use debug ; then
+		echo 'SET(CMAKE_BUILD_TYPE Debug CACHE STRING "determines build settings")' >> "${TMPDIR}/gentoo_common_config.cmake"
+	else
+		echo 'SET(CMAKE_BUILD_TYPE Release CACHE STRING "determines build settings")' >> "${TMPDIR}/gentoo_common_config.cmake"
+	fi
 }
 
 # @FUNCTION: cmake-utils_src_make






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2008-12-24 15:41 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2008-12-24 15:41 UTC (permalink / raw
  To: gentoo-commits

scarabeus    08/12/24 15:41:06

  Modified:             cmake-utils.eclass
  Log:
  Disable stripping in cmake fashion, we do it on portage side later and we dont need it done by cmake itself. Fixes bug #251304.

Revision  Changes    Path
1.16                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.15&r2=1.16

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- cmake-utils.eclass	5 Nov 2008 20:59:37 -0000	1.15
+++ cmake-utils.eclass	24 Dec 2008 15:41:06 -0000	1.16
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.15 2008/11/05 20:59:37 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.16 2008/12/24 15:41:06 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -116,7 +116,7 @@
 	debug-print-function $FUNCNAME $*
 
 	_common_configure_code
-	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF}"
+	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF} -DCMAKE_INSTALL_DO_STRIP=OFF"
 
 	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
 	cmake -C "${TMPDIR}/gentoo_common_config.cmake" ${cmakeargs} . || die "Cmake failed"
@@ -130,7 +130,7 @@
 	debug-print-function $FUNCNAME $*
 
 	_common_configure_code
-	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF}"
+	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF} -DCMAKE_INSTALL_DO_STRIP=OFF"
 	mkdir -p "${WORKDIR}"/${PN}_build
 	pushd "${WORKDIR}"/${PN}_build > /dev/null
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-03-10 23:22 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-03-10 23:22 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/03/10 23:22:39

  Modified:             cmake-utils.eclass
  Log:
  Update cmake-utils.eclass new targest, etc. see mail to dev for moar.

Revision  Changes    Path
1.17                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.16&r2=1.17

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- cmake-utils.eclass	24 Dec 2008 15:41:06 -0000	1.16
+++ cmake-utils.eclass	10 Mar 2009 23:22:39 -0000	1.17
@@ -1,10 +1,15 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.16 2008/12/24 15:41:06 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.17 2009/03/10 23:22:39 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
 # kde@gentoo.org
+# @AUTHORS:
+# Tomáš Chvátal <scarabeus@gentoo.org>
+# Maciej Mrozowski <reavertm@poczta.fm>
+# (undisclosed contributors)
+# Original author: Zephyrus (zephyrus@mirach.it)
 # @BLURB: common ebuild functions for cmake-based packages
 # @DESCRIPTION:
 # The cmake-utils eclass contains functions that make creating ebuilds for
@@ -13,35 +18,80 @@
 # builds and an implementation of the well-known use_enable and use_with
 # functions for CMake.
 
-# Original author: Zephyrus (zephyrus@mirach.it)
-
-inherit toolchain-funcs multilib flag-o-matic
+inherit toolchain-funcs multilib flag-o-matic base
 
-DESCRIPTION="Based on the ${ECLASS} eclass"
-
-DEPEND=">=dev-util/cmake-2.4.6"
-
-case ${EAPI} in
-	2)
-		EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-		;;
-	*)
-		EXPORT_FUNCTIONS src_compile src_test src_install
+EXPF="src_compile src_test src_install"
+case ${EAPI:-0} in
+	2) EXPF="${EXPF} src_configure"
 		;;
+	1|0) ;;
+	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
+EXPORT_FUNCTIONS ${EXPF}
 
+: ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
 
-# Internal function use by cmake-utils_use_with and cmake-utils_use_enable
+DEPEND=">=dev-util/cmake-2.4.6-r1"
+
+# Internal functions used by cmake-utils_use_*
 _use_me_now() {
-	debug-print-function $FUNCNAME $*
+	debug-print-function ${FUNCNAME} "$@"
 	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
 	echo "-D$1_${3:-$2}=$(use $2 && echo ON || echo OFF)"
 }
+_use_me_now_inverted() {
+	debug-print-function ${FUNCNAME} "$@"
+	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
+	echo "-D$1_${3:-$2}=$(use $2 && echo OFF || echo ON)"
+}
+
+# @ECLASS-VARIABLE: DOCS
+# @DESCRIPTION:
+# Documents passed to dodoc command.
 
-# @VARIABLE: DOCS
+# @ECLASS-VARIABLE: HTML_DOCS
 # @DESCRIPTION:
-# Documents to dodoc
+# Documents passed to dohtml command.
 
+# @ECLASS-VARIABLE: PREFIX
+# @DESCRIPTION
+# Eclass respects PREFIX variable, though it's not recommended way to set
+# install/lib/bin prefixes.
+# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
+
+# @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD
+# @DESCRIPTION:
+# Set to enable in-source build.
+
+# @ECLASS-VARIABLE: CMAKE_NO_COLOR
+# @DESCRIPTION:
+# Set to disable cmake output coloring.
+
+# @ECLASS-VARIABLE: CMAKE_VERBOSE
+# @DESCRIPTION:
+# Set to enable verbose messages during compilation.
+
+# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
+# @DESCRIPTION:
+# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
+# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
+# If about to be set - needs to be set before invoking cmake-utils_src_configure.
+# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
+# specific compiler flags overriding make.conf.
+: ${CMAKE_BUILD_TYPE:=Gentoo}
+
+# @FUNCTION: _check_build_dir
+# @DESCRIPTION:
+# Determine using IN or OUT source build
+_check_build_dir() {
+	# in/out source build
+	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
+		CMAKE_BUILD_DIR="${S}"
+	else
+		CMAKE_BUILD_DIR="${WORKDIR}/${PN}_build"
+	fi
+	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
+}
 # @FUNCTION: cmake-utils_use_with
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
@@ -60,6 +110,24 @@
 # and -DENABLE_FOO=OFF if it is disabled.
 cmake-utils_use_enable() { _use_me_now ENABLE "$@" ; }
 
+# @FUNCTION: cmake-utils_use_disable
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on inversion of use_enable. See ebuild(5).
+#
+# `cmake-utils_use_enable foo FOO` echoes -DDISABLE_FOO=OFF if foo is enabled
+# and -DDISABLE_FOO=ON if it is disabled.
+cmake-utils_use_disable() { _use_me_now_inverted DISABLE "$@" ; }
+
+# @FUNCTION: cmake-utils_use_no
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_disable. See ebuild(5).
+#
+# `cmake-utils_use_no foo FOO` echoes -DNO_FOO=OFF if foo is enabled
+# and -DNO_FOO=ON if it is disabled.
+cmake-utils_use_no() { _use_me_now_inverted NO "$@" ; }
+
 # @FUNCTION: cmake-utils_use_want
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
@@ -69,168 +137,182 @@
 # and -DWANT_FOO=OFF if it is disabled.
 cmake-utils_use_want() { _use_me_now WANT "$@" ; }
 
-# @FUNCTION: cmake-utils_has
+# @FUNCTION: cmake-utils_use_build
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_build foo FOO` echoes -DBUILD_FOO=ON if foo is enabled
+# and -DBUILD_FOO=OFF if it is disabled.
+cmake-utils_use_build() { _use_me_now BUILD "$@" ; }
+
+# @FUNCTION: cmake-utils_use_has
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:
 # Based on use_enable. See ebuild(5).
 #
-# `cmake-utils_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
+# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
 # and -DHAVE_FOO=OFF if it is disabled.
-cmake-utils_has() { _use_me_now HAVE "$@" ; }
+cmake-utils_use_has() { _use_me_now HAVE "$@" ; }
+
+# @FUNCTION: cmake-utils_has
+# @DESCRIPTION:
+# Deprecated, use cmake-utils_use_has, kept now for backcompat.
+cmake-utils_has() { ewarn "QA: ebuild is using deprecated call. Inform maintainer." ; _use_me_now HAVE "$@" ; }
+
+# @FUNCTION: cmake-utils_use
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use foo FOO` echoes -DFOO=ON if foo is enabled
+# and -DFOO=OFF if it is disabled.
+cmake-utils_use() { _use_me_now "" "$@" ; }
+
+# Internal function for modifying hardcoded definitions.
+# Removes dangerous definitionts that override Gentoo settings.
+_modify-cmakelists() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# Comment out all set (<some_should_be_user_defined_variable> value)
+	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
+	find "${S}" -name CMakeLists.txt \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \
+		|| die "${LINENO}: failed to disable hardcoded settings"
+
+	# NOTE Append some useful summary here
+	echo '
+MESSAGE(STATUS "<<< Gentoo configuration >>>
+Build type: ${CMAKE_BUILD_TYPE}
+Install path: ${CMAKE_INSTALL_PREFIX}\n")' >> CMakeLists.txt
+}
 
 # @FUNCTION: cmake-utils_src_configure
 # @DESCRIPTION:
 # General function for configuring with cmake. Default behaviour is to start an
 # out-of-source build.
 cmake-utils_src_configure() {
-	debug-print-function $FUNCNAME $*
+	debug-print-function ${FUNCNAME} "$@"
 
-	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
-		cmake-utils_src_configurein
-	else
-		cmake-utils_src_configureout
+	# Remove dangerous things.
+	_modify-cmakelists
+
+	# @SEE CMAKE_BUILD_TYPE
+	if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
+		# Handle release builds
+		if ! has debug ${IUSE//+} || ! use debug; then
+			append-cppflags -DNDEBUG
+		fi
 	fi
+
+	# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS)
+	local build_rules="${TMPDIR}"/gentoo_rules.cmake
+cat > ${build_rules} << _EOF_
+SET (CMAKE_C_COMPILER $(type -P $(tc-getCC)) CACHE FILEPATH "C compiler" FORCE)
+SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
+SET (CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE FILEPATH "C++ compiler" FORCE)
+SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
+_EOF_
+
+	# Common configure parameters (overridable)
+	# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
+	# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
+	local cmakeargs="
+		-DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}
+		${mycmakeargs}
+		-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+		-DCMAKE_INSTALL_DO_STRIP=OFF
+		-DCMAKE_USER_MAKE_RULES_OVERRIDE=${build_rules}"
+
+	# Common configure parameters (invariants)
+	local common_config="${TMPDIR}"/gentoo_common_config.cmake
+	local libdir=$(get_libdir)
+cat > ${common_config} << _EOF_
+SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
+_EOF_
+	[[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> ${common_config}
+	cmakeargs="-C ${common_config} ${cmakeargs}"
+
+	_check_build_dir
+	mkdir -p "${CMAKE_BUILD_DIR}"
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is $cmakeargs"
+	cmake ${cmakeargs} "${S}" || die "cmake failed"
+
+	popd > /dev/null
 }
 
 # @FUNCTION: cmake-utils_src_compile
 # @DESCRIPTION:
 # General function for compiling with cmake. Default behaviour is to check for
-# eapi and based on it configure or only compile
+# EAPI and respectively to configure as well or just compile.
 cmake-utils_src_compile() {
-	case ${EAPI} in
-		2)
-		;;
-	*)
-		cmake-utils_src_configure
-		;;
-	esac
+	debug-print-function ${FUNCNAME} "$@"
 
+	has src_configure ${EXPF} || cmake-utils_src_configure
 	cmake-utils_src_make "$@"
 }
 
 # @FUNCTION: cmake-utils_src_configurein
 # @DESCRIPTION:
-# Function for software that requires configure and building in the source
-# directory.
+# Deprecated
 cmake-utils_src_configurein() {
-	debug-print-function $FUNCNAME $*
-
-	_common_configure_code
-	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF} -DCMAKE_INSTALL_DO_STRIP=OFF"
-
-	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
-	cmake -C "${TMPDIR}/gentoo_common_config.cmake" ${cmakeargs} . || die "Cmake failed"
+	ewarn "QA: This ebuild is using deprecated function call: ${FUNCNAME}"
+	ewarn "QA: Inform ebuild maintainer."
+	cmake-utils_src_configure
 }
 
 # @FUNCTION: cmake-utils_src_configureout
 # @DESCRIPTION:
-# Function for software that requires configure and building outside the source
-# tree - default.
+# Deprecated
 cmake-utils_src_configureout() {
-	debug-print-function $FUNCNAME $*
-
-	_common_configure_code
-	local cmakeargs="${mycmakeargs} ${EXTRA_ECONF} -DCMAKE_INSTALL_DO_STRIP=OFF"
-	mkdir -p "${WORKDIR}"/${PN}_build
-	pushd "${WORKDIR}"/${PN}_build > /dev/null
-
-	debug-print "$LINENO $ECLASS $FUNCNAME: mycmakeargs is $cmakeargs"
-	cmake -C "${TMPDIR}/gentoo_common_config.cmake" ${cmakeargs} "${S}" || die "Cmake failed"
-
-	popd > /dev/null
-}
-
-# Internal use only. Common configuration options for all types of builds.
-_common_configure_code() {
-	local tmp_libdir=$(get_libdir)
-	# here we set the compiler explicitly, set install directories prefixes, and
-	# make sure that the gentoo user compiler flags trump those set in the
-	# program
-	local modules_dir=/usr/share/cmake/Modules
-	local cxx_create_shared_library=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<TARGET_SONAME>/<TARGET_SONAME> ${CXXFLAGS}/" -e '/SET(CMAKE_CXX_CREATE_SHARED_LIBRARY/,/)/p' "${modules_dir}/CMakeCXXInformation.cmake")
-	local c_create_shared_library=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<TARGET_SONAME>/<TARGET_SONAME> ${CFLAGS}/" -e '/SET(CMAKE_C_CREATE_SHARED_LIBRARY/,/)/p' "${modules_dir}/CMakeCInformation.cmake")
-	local c_compile_object=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CFLAGS}/" -e '/SET(CMAKE_C_COMPILE_OBJECT/,/)/p' "${modules_dir}/CMakeCInformation.cmake")
-	local cxx_compile_object=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CXXFLAGS}/" -e '/SET(CMAKE_CXX_COMPILE_OBJECT/,/)/p' "${modules_dir}/CMakeCXXInformation.cmake")
-	local c_link_executable=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CFLAGS}/" -e "s/<LINK_FLAGS>/<LINK_FLAGS> ${LDFLAGS}/" -e '/SET(CMAKE_C_LINK_EXECUTABLE/,/)/p' "${modules_dir}/CMakeCInformation.cmake")
-	local cxx_link_executable=$(sed -n -e 's/)/ CACHE STRING "")/' -e "s/<FLAGS>/<FLAGS> ${CXXFLAGS}/" -e "s/<LINK_FLAGS>/<LINK_FLAGS> ${LDFLAGS}/" -e '/SET(CMAKE_CXX_LINK_EXECUTABLE/,/)/p' "${modules_dir}/CMakeCXXInformation.cmake")
-	cat > "${TMPDIR}/gentoo_common_config.cmake" <<_EOF_
-SET(CMAKE_C_COMPILER $(type -P $(tc-getCC)) CACHE STRING "package building C compiler")
-SET(CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE STRING "package building C++ compiler")
-${c_create_shared_library}
-${cxx_create_shared_library}
-${c_compile_object}
-${cxx_compile_object}
-${c_link_executable}
-${cxx_link_executable}
-SET(CMAKE_INSTALL_PREFIX ${PREFIX:-/usr} CACHE FILEPATH "install path prefix")
-SET(LIB_SUFFIX ${tmp_libdir/lib} CACHE FILEPATH "library path suffix")
-SET(LIB_INSTALL_DIR ${PREFIX:-/usr}/${tmp_libdir} CACHE FILEPATH "library install directory")
-
-_EOF_
-
-	[[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET(CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make")' >> "${TMPDIR}/gentoo_common_config.cmake"
-
-	if has debug ${IUSE//+} && use debug ; then
-		echo 'SET(CMAKE_BUILD_TYPE Debug CACHE STRING "determines build settings")' >> "${TMPDIR}/gentoo_common_config.cmake"
-	else
-		echo 'SET(CMAKE_BUILD_TYPE Release CACHE STRING "determines build settings")' >> "${TMPDIR}/gentoo_common_config.cmake"
-	fi
+	ewarn "QA: This ebuild is using deprecated function call: ${FUNCNAME}"
+	ewarn "QA: Inform ebuild maintainer."
+	cmake-utils_src_configure
 }
 
 # @FUNCTION: cmake-utils_src_make
 # @DESCRIPTION:
 # Function for building the package. Automatically detects the build type.
 # All arguments are passed to emake:
-# "cmake-utils_src_make -j1" can be used to work around parallel make issues.
 cmake-utils_src_make() {
-	debug-print-function $FUNCNAME $*
+	debug-print-function ${FUNCNAME} "$@"
 
-	# At this point we can automatically check if it's an out-of-source or an
-	# in-source build
-	if [[ -d ${WORKDIR}/${PN}_build ]]; then
-		pushd "${WORKDIR}"/${PN}_build > /dev/null
-	fi
-	if ! [[ -z ${CMAKE_COMPILER_VERBOSE} ]]; then
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	if [[ -n ${CMAKE_VERBOSE} ]]; then
 		emake VERBOSE=1 "$@" || die "Make failed!"
 	else
 		emake "$@" || die "Make failed!"
 	fi
-	if [[ -d ${WORKDIR}/${PN}_build ]]; then
-		popd > /dev/null
-	fi
+	popd > /dev/null
 }
 
 # @FUNCTION: cmake-utils_src_install
 # @DESCRIPTION:
 # Function for installing the package. Automatically detects the build type.
 cmake-utils_src_install() {
-	debug-print-function $FUNCNAME $*
+	debug-print-function ${FUNCNAME} "$@"
 
-	# At this point we can automatically check if it's an out-of-source or an
-	# in-source build
-	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
-		pushd "${WORKDIR}"/${PN}_build > /dev/null
-	fi
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	emake install DESTDIR="${D}" || die "Make install failed"
-	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
-		popd > /dev/null
-	fi
+	popd > /dev/null
 
 	# Manual document installation
-	[[ -n "${DOCS}" ]] && dodoc ${DOCS}
+	[[ -n "${DOCS}" ]] && { dodoc ${DOCS} || die "dodoc failed" ; }
+	[[ -n "${HTML_DOCS}" ]] && { dohtml -r ${HTML_DOCS} || die "dohtml failed" ; }
 }
 
 # @FUNCTION: cmake-utils_src_test
 # @DESCRIPTION:
 # Function for testing the package. Automatically detects the build type.
 cmake-utils_src_test() {
-	debug-print-function $FUNCNAME $*
+	debug-print-function ${FUNCNAME} "$@"
 
-	# At this point we can automatically check if it's an out-of-source or an
-	# in-source build
-	if [[ -d ${WORKDIR}/${PN}_build ]]; then
-		pushd "${WORKDIR}"/${PN}_build > /dev/null
-	fi
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	# Standard implementation of src_test
 	if emake -j1 check -n &> /dev/null; then
 		einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
@@ -245,7 +327,5 @@
 	else
 		einfo ">>> Test phase [none]: ${CATEGORY}/${PF}"
 	fi
-	if [[ -d  ${WORKDIR}/${PN}_build ]]; then
-		popd > /dev/null
-	fi
+	popd > /dev/null
 }






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-03-11 16:22 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-03-11 16:22 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/03/11 16:22:51

  Modified:             cmake-utils.eclass
  Log:
  Update comments in warnings. Thx reavertm for updating the current ones.

Revision  Changes    Path
1.18                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.17&r2=1.18

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- cmake-utils.eclass	10 Mar 2009 23:22:39 -0000	1.17
+++ cmake-utils.eclass	11 Mar 2009 16:22:51 -0000	1.18
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.17 2009/03/10 23:22:39 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.18 2009/03/11 16:22:51 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -158,7 +158,7 @@
 # @FUNCTION: cmake-utils_has
 # @DESCRIPTION:
 # Deprecated, use cmake-utils_use_has, kept now for backcompat.
-cmake-utils_has() { ewarn "QA: ebuild is using deprecated call. Inform maintainer." ; _use_me_now HAVE "$@" ; }
+cmake-utils_has() { ewarn "QA notice: using deprecated ${FUNCNAME} call, use cmake-utils_use_has instead." ; _use_me_now HAVE "$@" ; }
 
 # @FUNCTION: cmake-utils_use
 # @USAGE: <USE flag> [flag name]
@@ -258,8 +258,7 @@
 # @DESCRIPTION:
 # Deprecated
 cmake-utils_src_configurein() {
-	ewarn "QA: This ebuild is using deprecated function call: ${FUNCNAME}"
-	ewarn "QA: Inform ebuild maintainer."
+	ewarn "QA notice: using deprecated ${FUNCNAME} call, set CMAKE_IN_SOURCE_BUILD=1 instead."
 	cmake-utils_src_configure
 }
 
@@ -267,8 +266,7 @@
 # @DESCRIPTION:
 # Deprecated
 cmake-utils_src_configureout() {
-	ewarn "QA: This ebuild is using deprecated function call: ${FUNCNAME}"
-	ewarn "QA: Inform ebuild maintainer."
+	ewarn "QA notice: using deprecated ${FUNCNAME} call, out of source build is enabled by default."
 	cmake-utils_src_configure
 }
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-03-12  8:45 Christian Faulhammer (fauli)
  0 siblings, 0 replies; 75+ messages in thread
From: Christian Faulhammer (fauli) @ 2009-03-12  8:45 UTC (permalink / raw
  To: gentoo-commits

fauli       09/03/12 08:45:52

  Modified:             cmake-utils.eclass
  Log:
  Update copyright year

Revision  Changes    Path
1.19                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.18&r2=1.19

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- cmake-utils.eclass	11 Mar 2009 16:22:51 -0000	1.18
+++ cmake-utils.eclass	12 Mar 2009 08:45:52 -0000	1.19
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.18 2009/03/11 16:22:51 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.19 2009/03/12 08:45:52 fauli Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-03-14 11:14 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-03-14 11:14 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/03/14 11:14:37

  Modified:             cmake-utils.eclass
  Log:
  Fix issues with cmake-utils_use.

Revision  Changes    Path
1.20                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.19&r2=1.20

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- cmake-utils.eclass	12 Mar 2009 08:45:52 -0000	1.19
+++ cmake-utils.eclass	14 Mar 2009 11:14:37 -0000	1.20
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.19 2009/03/12 08:45:52 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.20 2009/03/14 11:14:37 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -37,12 +37,12 @@
 _use_me_now() {
 	debug-print-function ${FUNCNAME} "$@"
 	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	echo "-D$1_${3:-$2}=$(use $2 && echo ON || echo OFF)"
+	echo "-D$1${3:-$2}=$(use $2 && echo ON || echo OFF)"
 }
 _use_me_now_inverted() {
 	debug-print-function ${FUNCNAME} "$@"
 	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	echo "-D$1_${3:-$2}=$(use $2 && echo OFF || echo ON)"
+	echo "-D$1${3:-$2}=$(use $2 && echo OFF || echo ON)"
 }
 
 # @ECLASS-VARIABLE: DOCS
@@ -99,7 +99,7 @@
 #
 # `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
 # and -DWITH_FOO=OFF if it is disabled.
-cmake-utils_use_with() { _use_me_now WITH "$@" ; }
+cmake-utils_use_with() { _use_me_now WITH_ "$@" ; }
 
 # @FUNCTION: cmake-utils_use_enable
 # @USAGE: <USE flag> [flag name]
@@ -108,7 +108,7 @@
 #
 # `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
 # and -DENABLE_FOO=OFF if it is disabled.
-cmake-utils_use_enable() { _use_me_now ENABLE "$@" ; }
+cmake-utils_use_enable() { _use_me_now ENABLE_ "$@" ; }
 
 # @FUNCTION: cmake-utils_use_disable
 # @USAGE: <USE flag> [flag name]
@@ -117,7 +117,7 @@
 #
 # `cmake-utils_use_enable foo FOO` echoes -DDISABLE_FOO=OFF if foo is enabled
 # and -DDISABLE_FOO=ON if it is disabled.
-cmake-utils_use_disable() { _use_me_now_inverted DISABLE "$@" ; }
+cmake-utils_use_disable() { _use_me_now_inverted DISABLE_ "$@" ; }
 
 # @FUNCTION: cmake-utils_use_no
 # @USAGE: <USE flag> [flag name]
@@ -126,7 +126,7 @@
 #
 # `cmake-utils_use_no foo FOO` echoes -DNO_FOO=OFF if foo is enabled
 # and -DNO_FOO=ON if it is disabled.
-cmake-utils_use_no() { _use_me_now_inverted NO "$@" ; }
+cmake-utils_use_no() { _use_me_now_inverted NO_ "$@" ; }
 
 # @FUNCTION: cmake-utils_use_want
 # @USAGE: <USE flag> [flag name]
@@ -135,7 +135,7 @@
 #
 # `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
 # and -DWANT_FOO=OFF if it is disabled.
-cmake-utils_use_want() { _use_me_now WANT "$@" ; }
+cmake-utils_use_want() { _use_me_now WANT_ "$@" ; }
 
 # @FUNCTION: cmake-utils_use_build
 # @USAGE: <USE flag> [flag name]
@@ -144,7 +144,7 @@
 #
 # `cmake-utils_use_build foo FOO` echoes -DBUILD_FOO=ON if foo is enabled
 # and -DBUILD_FOO=OFF if it is disabled.
-cmake-utils_use_build() { _use_me_now BUILD "$@" ; }
+cmake-utils_use_build() { _use_me_now BUILD_ "$@" ; }
 
 # @FUNCTION: cmake-utils_use_has
 # @USAGE: <USE flag> [flag name]
@@ -153,12 +153,12 @@
 #
 # `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
 # and -DHAVE_FOO=OFF if it is disabled.
-cmake-utils_use_has() { _use_me_now HAVE "$@" ; }
+cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; }
 
 # @FUNCTION: cmake-utils_has
 # @DESCRIPTION:
 # Deprecated, use cmake-utils_use_has, kept now for backcompat.
-cmake-utils_has() { ewarn "QA notice: using deprecated ${FUNCNAME} call, use cmake-utils_use_has instead." ; _use_me_now HAVE "$@" ; }
+cmake-utils_has() { ewarn "QA notice: using deprecated ${FUNCNAME} call, use cmake-utils_use_has instead." ; _use_me_now HAVE_ "$@" ; }
 
 # @FUNCTION: cmake-utils_use
 # @USAGE: <USE flag> [flag name]






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-03-15 16:54 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-03-15 16:54 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/03/15 16:54:32

  Modified:             cmake-utils.eclass
  Log:
  Update deps for cmake stuff (current stable cmake, removing the old cmakes in next commit).

Revision  Changes    Path
1.21                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.20&r2=1.21

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- cmake-utils.eclass	14 Mar 2009 11:14:37 -0000	1.20
+++ cmake-utils.eclass	15 Mar 2009 16:54:32 -0000	1.21
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.20 2009/03/14 11:14:37 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.21 2009/03/15 16:54:32 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -31,7 +31,7 @@
 
 : ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
 
-DEPEND=">=dev-util/cmake-2.4.6-r1"
+DEPEND=">=dev-util/cmake-2.6.2-r1"
 
 # Internal functions used by cmake-utils_use_*
 _use_me_now() {






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-03-19  9:12 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-03-19  9:12 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/03/19 09:12:41

  Modified:             cmake-utils.eclass
  Log:
  Depend on correct findutils. Per bug #262965. Thanks Loki_val for correct approach.

Revision  Changes    Path
1.22                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.22&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.22&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.21&r2=1.22

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- cmake-utils.eclass	15 Mar 2009 16:54:32 -0000	1.21
+++ cmake-utils.eclass	19 Mar 2009 09:12:41 -0000	1.22
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.21 2009/03/15 16:54:32 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.22 2009/03/19 09:12:41 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -31,7 +31,10 @@
 
 : ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
 
-DEPEND=">=dev-util/cmake-2.6.2-r1"
+DEPEND="
+	>=dev-util/cmake-2.6.2-r1
+	userland_GNU? ( >=sys-apps/findutils-4.4.0 )
+"
 
 # Internal functions used by cmake-utils_use_*
 _use_me_now() {






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-04-04 12:28 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-04 12:28 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/04 12:28:10

  Modified:             cmake-utils.eclass
  Log:
  Update eclassdoc so it work again. Per bug #264791.
  Introduce feature that if dev calls $(cmake-use_bla use) it runs all various permutations:
  -DBLA_use=ON -DBLA_Use=ON -DBLA_USE=ON
  Really reduces duplication in some ebuilds. Old behavior preserved tho via third parameter:
  $(cmake-use_bla use VALUE) results only into -DBLA_VALUE=ON

Revision  Changes    Path
1.23                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.22&r2=1.23

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- cmake-utils.eclass	19 Mar 2009 09:12:41 -0000	1.22
+++ cmake-utils.eclass	4 Apr 2009 12:28:10 -0000	1.23
@@ -1,15 +1,17 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.22 2009/03/19 09:12:41 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.23 2009/04/04 12:28:10 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
 # kde@gentoo.org
-# @AUTHORS:
+#
+# @CODE
 # Tomáš Chvátal <scarabeus@gentoo.org>
 # Maciej Mrozowski <reavertm@poczta.fm>
 # (undisclosed contributors)
 # Original author: Zephyrus (zephyrus@mirach.it)
+# @CODE
 # @BLURB: common ebuild functions for cmake-based packages
 # @DESCRIPTION:
 # The cmake-utils eclass contains functions that make creating ebuilds for
@@ -31,21 +33,48 @@
 
 : ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
 
-DEPEND="
-	>=dev-util/cmake-2.6.2-r1
+if [[ ${PN} != cmake ]]; then
+	CMAKEDEPEND=">=dev-util/cmake-2.6.2-r1"
+fi
+
+DEPEND="${CMAKEDEPEND}
 	userland_GNU? ( >=sys-apps/findutils-4.4.0 )
 "
 
 # Internal functions used by cmake-utils_use_*
 _use_me_now() {
 	debug-print-function ${FUNCNAME} "$@"
+
+	local uper capitalised x
 	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	echo "-D$1${3:-$2}=$(use $2 && echo ON || echo OFF)"
+	if [[ ! -z $3 ]]; then
+		# user specified the use name so use it
+		echo "-D$1$3=$(use $2 && echo ON || echo OFF)"
+	else
+		# use all various most used combinations
+		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
+		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
+		for x in $2 $uper $capitalised; do
+			echo "-D$1$x=$(use $2 && echo ON || echo OFF) "
+		done
+	fi
 }
 _use_me_now_inverted() {
 	debug-print-function ${FUNCNAME} "$@"
+
+	local uper capitalised x
 	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	echo "-D$1${3:-$2}=$(use $2 && echo OFF || echo ON)"
+	if [[ ! -z $3 ]]; then
+		# user specified the use name so use it
+		echo "-D$1$3=$(use $2 && echo OFF || echo ON)"
+	else
+		# use all various most used combinations
+		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
+		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
+		for x in $2 $uper $capitalised; do
+			echo "-D$1$x=$(use $2 && echo OFF || echo ON) "
+		done
+	fi
 }
 
 # @ECLASS-VARIABLE: DOCS
@@ -57,7 +86,7 @@
 # Documents passed to dohtml command.
 
 # @ECLASS-VARIABLE: PREFIX
-# @DESCRIPTION
+# @DESCRIPTION:
 # Eclass respects PREFIX variable, though it's not recommended way to set
 # install/lib/bin prefixes.
 # Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-04-10 20:24 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-10 20:24 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/10 20:24:56

  Modified:             cmake-utils.eclass
  Log:
  Die when there is no CMakeLists.txt

Revision  Changes    Path
1.24                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.23&r2=1.24

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- cmake-utils.eclass	4 Apr 2009 12:28:10 -0000	1.23
+++ cmake-utils.eclass	10 Apr 2009 20:24:56 -0000	1.24
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.23 2009/04/04 12:28:10 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.24 2009/04/10 20:24:56 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -227,6 +227,14 @@
 cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	# check if CMakeLists.txt exist and if no then die
+	if [[ ! -e "${S}"/CMakeLists.txt ]] ; then
+		eerror "I was unable to locate CMakeLists.txt under:"
+		eerror "\"${S}/CMakeLists.txt\""
+		eerror "You should consider not inheriting the cmake eclass."
+		die "FATAL: Unable to find CMakeLists.txt"
+	fi
+
 	# Remove dangerous things.
 	_modify-cmakelists
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-04-11 19:44 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-11 19:44 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/04/11 19:44:43

  Modified:             cmake-utils.eclass
  Log:
  Exit with error when runing src_compile and no Makefile is around.

Revision  Changes    Path
1.25                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.24&r2=1.25

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- cmake-utils.eclass	10 Apr 2009 20:24:56 -0000	1.24
+++ cmake-utils.eclass	11 Apr 2009 19:44:43 -0000	1.25
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.24 2009/04/10 20:24:56 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.25 2009/04/11 19:44:43 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -319,6 +319,8 @@
 
 	_check_build_dir
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	# first check if Makefile exist otherwise die
+	[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
 	if [[ -n ${CMAKE_VERBOSE} ]]; then
 		emake VERBOSE=1 "$@" || die "Make failed!"
 	else






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-05-08 10:54 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-05-08 10:54 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/05/08 10:54:02

  Modified:             cmake-utils.eclass
  Log:
  Introduce updated cmake-utils eclass
  Now it can be run out of the S variable by defining CMAKE_USE_DIR
  I searched tree and found no issue but if your package fail you are probably using this:
  ${WORKDIR}/${PN}_build/ this code should be replaced with "${CMAKE_BUILD_DIR}"

Revision  Changes    Path
1.26                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.25&r2=1.26

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- cmake-utils.eclass	11 Apr 2009 19:44:43 -0000	1.25
+++ cmake-utils.eclass	8 May 2009 10:54:02 -0000	1.26
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.25 2009/04/11 19:44:43 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.26 2009/05/08 10:54:02 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -24,8 +24,7 @@
 
 EXPF="src_compile src_test src_install"
 case ${EAPI:-0} in
-	2) EXPF="${EXPF} src_configure"
-		;;
+	2) EXPF="${EXPF} src_configure" ;;
 	1|0) ;;
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
@@ -116,11 +115,19 @@
 # @DESCRIPTION:
 # Determine using IN or OUT source build
 _check_build_dir() {
+	# @ECLASS-VARIABLE: CMAKE_USE_DIR
+	# @DESCRIPTION:
+	# Sets the directory where we are working with cmake.
+	# For example when application uses autotools and only one
+	# plugin needs to be done by cmake.
+	# By default it uses ${S}.
+	: ${CMAKE_USE_DIR:=${S}}
+
 	# in/out source build
 	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
-		CMAKE_BUILD_DIR="${S}"
+		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
 	else
-		CMAKE_BUILD_DIR="${WORKDIR}/${PN}_build"
+		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}_build"
 	fi
 	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
 }
@@ -208,7 +215,7 @@
 
 	# Comment out all set (<some_should_be_user_defined_variable> value)
 	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
-	find "${S}" -name CMakeLists.txt \
+	find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
 		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \
 		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \
 		|| die "${LINENO}: failed to disable hardcoded settings"
@@ -227,10 +234,12 @@
 cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	_check_build_dir
+
 	# check if CMakeLists.txt exist and if no then die
-	if [[ ! -e "${S}"/CMakeLists.txt ]] ; then
+	if [[ ! -e "${CMAKE_USE_DIR}"/CMakeLists.txt ]] ; then
 		eerror "I was unable to locate CMakeLists.txt under:"
-		eerror "\"${S}/CMakeLists.txt\""
+		eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
 		eerror "You should consider not inheriting the cmake eclass."
 		die "FATAL: Unable to find CMakeLists.txt"
 	fi
@@ -274,11 +283,10 @@
 	[[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> ${common_config}
 	cmakeargs="-C ${common_config} ${cmakeargs}"
 
-	_check_build_dir
 	mkdir -p "${CMAKE_BUILD_DIR}"
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is $cmakeargs"
-	cmake ${cmakeargs} "${S}" || die "cmake failed"
+	cmake ${cmakeargs} "${CMAKE_USE_DIR}" || die "cmake failed"
 
 	popd > /dev/null
 }






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-05-27 14:34 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-05-27 14:34 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/05/27 14:34:34

  Modified:             cmake-utils.eclass
  Log:
  Add comment to CMAKE_BUILD_DIR variable. Describing what for it is.

Revision  Changes    Path
1.27                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.26&r2=1.27

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- cmake-utils.eclass	8 May 2009 10:54:02 -0000	1.26
+++ cmake-utils.eclass	27 May 2009 14:34:33 -0000	1.27
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.26 2009/05/08 10:54:02 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.27 2009/05/27 14:34:33 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -123,7 +123,12 @@
 	# By default it uses ${S}.
 	: ${CMAKE_USE_DIR:=${S}}
 
-	# in/out source build
+	# @ECLASS-VARIABLE: CMAKE_BUILD_DIR
+	# @DESCRIPTION:
+	# Specify the build directory where all cmake processed
+	# files should be located.
+	#
+	# For installing binary doins "${CMAKE_BUILD_DIR}/${PN}"
 	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
 		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
 	else






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-05-29  8:06 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-05-29  8:06 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/05/29 08:06:46

  Modified:             cmake-utils.eclass
  Log:
  Remove not needed warning about non-existent push. Fix CMAKE_BUILD_DIR variable if insource build specified as local variable in some src_ function only.

Revision  Changes    Path
1.28                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.27&r2=1.28

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- cmake-utils.eclass	27 May 2009 14:34:33 -0000	1.27
+++ cmake-utils.eclass	29 May 2009 08:06:46 -0000	1.28
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.27 2009/05/27 14:34:33 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.28 2009/05/29 08:06:46 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -132,7 +132,9 @@
 	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
 		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
 	else
-		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}_build"
+		[[ ${1} = init || -d ${CMAKE_USE_DIR}_build ]] && SUF="_build" || SUF=""
+		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}${SUF}"
+
 	fi
 	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
 }
@@ -239,7 +241,7 @@
 cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	_check_build_dir
+	_check_build_dir init
 
 	# check if CMakeLists.txt exist and if no then die
 	if [[ ! -e "${CMAKE_USE_DIR}"/CMakeLists.txt ]] ; then
@@ -331,7 +333,7 @@
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	pushd "${CMAKE_BUILD_DIR}" &> /dev/null
 	# first check if Makefile exist otherwise die
 	[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
 	if [[ -n ${CMAKE_VERBOSE} ]]; then
@@ -339,7 +341,7 @@
 	else
 		emake "$@" || die "Make failed!"
 	fi
-	popd > /dev/null
+	popd &> /dev/null
 }
 
 # @FUNCTION: cmake-utils_src_install
@@ -349,9 +351,9 @@
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	pushd "${CMAKE_BUILD_DIR}" &> /dev/null
 	emake install DESTDIR="${D}" || die "Make install failed"
-	popd > /dev/null
+	popd &> /dev/null
 
 	# Manual document installation
 	[[ -n "${DOCS}" ]] && { dodoc ${DOCS} || die "dodoc failed" ; }
@@ -365,7 +367,7 @@
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	pushd "${CMAKE_BUILD_DIR}" &> /dev/null
 	# Standard implementation of src_test
 	if emake -j1 check -n &> /dev/null; then
 		einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
@@ -380,5 +382,5 @@
 	else
 		einfo ">>> Test phase [none]: ${CATEGORY}/${PF}"
 	fi
-	popd > /dev/null
+	popd &> /dev/null
 }






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-06-17 22:39 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-06-17 22:39 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/06/17 22:39:01

  Modified:             cmake-utils.eclass
  Log:
  Adjust cmake-utils to awoid not deleting some stuff after merge. We place all stuff to workdir and above. See bug #273949 for details.

Revision  Changes    Path
1.29                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.28&r2=1.29

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- cmake-utils.eclass	29 May 2009 08:06:46 -0000	1.28
+++ cmake-utils.eclass	17 Jun 2009 22:39:01 -0000	1.29
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.28 2009/05/29 08:06:46 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.29 2009/06/17 22:39:01 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -130,8 +130,13 @@
 	#
 	# For installing binary doins "${CMAKE_BUILD_DIR}/${PN}"
 	if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
+		# we build in source dir
 		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
+	elif [[ ${CMAKE_USE_DIR} = ${WORKDIR} ]]; then
+		# out of tree build, but with $S=$WORKDIR, see bug #273949 for reason.
+		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}/build"
 	else
+		# regular out of tree build
 		[[ ${1} = init || -d ${CMAKE_USE_DIR}_build ]] && SUF="_build" || SUF=""
 		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}${SUF}"
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-08-08 20:08 Arfrever Frehtes Taifersar Arahesis (arfrever)
  0 siblings, 0 replies; 75+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-08-08 20:08 UTC (permalink / raw
  To: gentoo-commits

arfrever    09/08/08 20:08:02

  Modified:             cmake-utils.eclass
  Log:
  Print the 'cmake' command for consistency with econf().

Revision  Changes    Path
1.30                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.29&r2=1.30

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- cmake-utils.eclass	17 Jun 2009 22:39:01 -0000	1.29
+++ cmake-utils.eclass	8 Aug 2009 20:08:02 -0000	1.30
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.29 2009/06/17 22:39:01 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.30 2009/08/08 20:08:02 arfrever Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -298,6 +298,7 @@
 	mkdir -p "${CMAKE_BUILD_DIR}"
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is $cmakeargs"
+	echo cmake ${cmakeargs} "${CMAKE_USE_DIR}"
 	cmake ${cmakeargs} "${CMAKE_USE_DIR}" || die "cmake failed"
 
 	popd > /dev/null






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-10-16 12:24 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 75+ messages in thread
From: Samuli Suominen (ssuominen) @ 2009-10-16 12:24 UTC (permalink / raw
  To: gentoo-commits

ssuominen    09/10/16 12:24:09

  Modified:             cmake-utils.eclass
  Log:
  export XDG_CONFIG_HOME to temp. directory for sandbox

Revision  Changes    Path
1.31                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.30&r2=1.31

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- cmake-utils.eclass	8 Aug 2009 20:08:02 -0000	1.30
+++ cmake-utils.eclass	16 Oct 2009 12:24:09 -0000	1.31
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.30 2009/08/08 20:08:02 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.31 2009/10/16 12:24:09 ssuominen Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -244,6 +244,8 @@
 # General function for configuring with cmake. Default behaviour is to start an
 # out-of-source build.
 cmake-utils_src_configure() {
+	export XDG_CONFIG_HOME="${T}"
+
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir init






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-10-27 14:30 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-10-27 14:30 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/10/27 14:30:35

  Modified:             cmake-utils.eclass
  Log:
  Fix wrong function call name. Last minute renames--

Revision  Changes    Path
1.33                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.32&r2=1.33

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- cmake-utils.eclass	27 Oct 2009 14:16:49 -0000	1.32
+++ cmake-utils.eclass	27 Oct 2009 14:30:35 -0000	1.33
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.32 2009/10/27 14:16:49 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.33 2009/10/27 14:30:35 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -398,7 +398,7 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_configure() {
-	_inherit_optionaly "src_configure"
+	_execute_optionaly "src_configure"
 }
 
 # @FUNCTION: cmake-utils_src_compile
@@ -406,7 +406,7 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_compile() {
-	_inherit_optionaly "src_compile"
+	_execute_optionaly "src_compile"
 }
 
 # @FUNCTION: cmake-utils_src_install
@@ -414,7 +414,7 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_install() {
-	_inherit_optionaly "src_install"
+	_execute_optionaly "src_install"
 }
 
 # @FUNCTION: cmake-utils_src_test
@@ -422,7 +422,7 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_test() {
-	_inherit_optionaly "src_test"
+	_execute_optionaly "src_test"
 }
 
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-10-27 21:20 Michael Sterrett (mr_bones_)
  0 siblings, 0 replies; 75+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2009-10-27 21:20 UTC (permalink / raw
  To: gentoo-commits

mr_bones_    09/10/27 21:20:41

  Modified:             cmake-utils.eclass
  Log:
  add missing space

Revision  Changes    Path
1.34                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.33&r2=1.34

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- cmake-utils.eclass	27 Oct 2009 14:30:35 -0000	1.33
+++ cmake-utils.eclass	27 Oct 2009 21:20:40 -0000	1.34
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.33 2009/10/27 14:30:35 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.34 2009/10/27 21:20:40 mr_bones_ Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -52,7 +52,7 @@
 	CMAKEDEPEND+=">=dev-util/cmake-2.6.2-r1"
 fi
 
-CMAKEDEPEND+="userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
+CMAKEDEPEND+=" userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
 
 [[ ${WANT_CMAKE} = always ]] || CMAKEDEPEND+=" )"
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-12-10 19:58 Jonathan Callen (abcd)
  0 siblings, 0 replies; 75+ messages in thread
From: Jonathan Callen (abcd) @ 2009-12-10 19:58 UTC (permalink / raw
  To: gentoo-commits

abcd        09/12/10 19:58:42

  Modified:             cmake-utils.eclass
  Log:
  Silence an unneeded warning

Revision  Changes    Path
1.36                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.35&r2=1.36

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- cmake-utils.eclass	10 Dec 2009 17:35:52 -0000	1.35
+++ cmake-utils.eclass	10 Dec 2009 19:58:42 -0000	1.36
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.35 2009/12/10 17:35:52 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.36 2009/12/10 19:58:42 abcd Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -248,6 +248,7 @@
 
 	# NOTE Append some useful summary here
 	cat >> CMakeLists.txt <<- _EOF_
+
 		MESSAGE(STATUS "<<< Gentoo configuration >>>
 		Build type: ${CMAKE_BUILD_TYPE}
 		Install path: ${CMAKE_INSTALL_PREFIX}\n")
@@ -315,7 +316,7 @@
 	[[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
 
 	# Convert mycmakeargs to an array, for backwards compatibility
-	if [[ $(declare -p mycmakeargs) != "declare -a mycmakeargs="* ]]; then
+	if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
 		mycmakeargs=(${mycmakeargs})
 	fi
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-12-18 10:49 Zac Medico (zmedico)
  0 siblings, 0 replies; 75+ messages in thread
From: Zac Medico (zmedico) @ 2009-12-18 10:49 UTC (permalink / raw
  To: gentoo-commits

zmedico     09/12/18 10:49:56

  Modified:             cmake-utils.eclass
  Log:
  Bug #297255 - When converting $mycmakeargs to an array inside
  enable_cmake-utils_src_configure(), use a local variable since
  <=portage-2.1.6.x does not support global arrays.

Revision  Changes    Path
1.38                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.37&r2=1.38

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- cmake-utils.eclass	14 Dec 2009 19:44:15 -0000	1.37
+++ cmake-utils.eclass	18 Dec 2009 10:49:55 -0000	1.38
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.37 2009/12/14 19:44:15 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.38 2009/12/18 10:49:55 zmedico Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -317,8 +317,12 @@
 	[[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
 
 	# Convert mycmakeargs to an array, for backwards compatibility
+	# Make the array a local variable since <=portage-2.1.6.x does not
+	# support global arrays (see bug #297255).
 	if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
-		mycmakeargs=(${mycmakeargs})
+		local mycmakeargs_local=(${mycmakeargs})
+	else
+		local mycmakeargs_local=("${mycmakeargs[@]}")
 	fi
 
 	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
@@ -329,7 +333,7 @@
 	local cmakeargs=(
 		-C "${common_config}"
 		-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX:-/usr}"
-		"${mycmakeargs[@]}"
+		"${mycmakeargs_local[@]}"
 		-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
 		-DCMAKE_INSTALL_DO_STRIP=OFF
 		-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
@@ -337,7 +341,7 @@
 
 	mkdir -p "${CMAKE_BUILD_DIR}"
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${cmakeargs[*]}"
+	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
 	echo cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
 	cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-12-22 22:52 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-12-22 22:52 UTC (permalink / raw
  To: gentoo-commits

scarabeus    09/12/22 22:52:53

  Modified:             cmake-utils.eclass
  Log:
  Sync from kde-testing. Use NOCOLOR variable instead of some local one.

Revision  Changes    Path
1.39                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.38&r2=1.39

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- cmake-utils.eclass	18 Dec 2009 10:49:55 -0000	1.38
+++ cmake-utils.eclass	22 Dec 2009 22:52:52 -0000	1.39
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.38 2009/12/18 10:49:55 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.39 2009/12/22 22:52:52 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -113,10 +113,6 @@
 # @DESCRIPTION:
 # Set to enable in-source build.
 
-# @ECLASS-VARIABLE: CMAKE_NO_COLOR
-# @DESCRIPTION:
-# Set to disable cmake output coloring.
-
 # @ECLASS-VARIABLE: CMAKE_VERBOSE
 # @DESCRIPTION:
 # Set to enable verbose messages during compilation.
@@ -314,7 +310,7 @@
 	cat > "${common_config}" <<- _EOF_
 		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
 	_EOF_
-	[[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
+	[[ -n ${NOCOLOR} ]] || echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
 
 	# Convert mycmakeargs to an array, for backwards compatibility
 	# Make the array a local variable since <=portage-2.1.6.x does not






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2009-12-23  0:32 Jonathan Callen (abcd)
  0 siblings, 0 replies; 75+ messages in thread
From: Jonathan Callen (abcd) @ 2009-12-23  0:32 UTC (permalink / raw
  To: gentoo-commits

abcd        09/12/23 00:32:02

  Modified:             cmake-utils.eclass
  Log:
  Fixes from kde overlay

Revision  Changes    Path
1.40                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.40&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.40&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.39&r2=1.40

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- cmake-utils.eclass	22 Dec 2009 22:52:52 -0000	1.39
+++ cmake-utils.eclass	23 Dec 2009 00:32:02 -0000	1.40
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.39 2009/12/22 22:52:52 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.40 2009/12/23 00:32:02 abcd Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -231,7 +231,7 @@
 cmake-utils_use() { _use_me_now "" "$@" ; }
 
 # Internal function for modifying hardcoded definitions.
-# Removes dangerous definitionts that override Gentoo settings.
+# Removes dangerous definitions that override Gentoo settings.
 _modify-cmakelists() {
 	debug-print-function ${FUNCNAME} "$@"
 
@@ -246,8 +246,8 @@
 	cat >> CMakeLists.txt <<- _EOF_
 
 		MESSAGE(STATUS "<<< Gentoo configuration >>>
-		Build type: ${CMAKE_BUILD_TYPE}
-		Install path: ${CMAKE_INSTALL_PREFIX}\n")
+		Build type: \${CMAKE_BUILD_TYPE}
+		Install path: \${CMAKE_INSTALL_PREFIX}\n")
 	_EOF_
 }
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-01-10 22:17 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-10 22:17 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/10 22:17:03

  Modified:             cmake-utils.eclass
  Log:
  Fix not passing arguments. Per bug #300420. Thanks to Dennis Schridde (devurandom) for the patch.

Revision  Changes    Path
1.42                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.42&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.42&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.41&r2=1.42

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- cmake-utils.eclass	10 Jan 2010 18:36:13 -0000	1.41
+++ cmake-utils.eclass	10 Jan 2010 22:17:02 -0000	1.42
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.41 2010/01/10 18:36:13 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.42 2010/01/10 22:17:02 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -421,7 +421,7 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_configure() {
-	_execute_optionaly "src_configure"
+	_execute_optionaly "src_configure" "$@"
 }
 
 # @FUNCTION: cmake-utils_src_compile
@@ -429,7 +429,7 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_compile() {
-	_execute_optionaly "src_compile"
+	_execute_optionaly "src_compile" "$@"
 }
 
 # @FUNCTION: cmake-utils_src_install
@@ -437,7 +437,7 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_install() {
-	_execute_optionaly "src_install"
+	_execute_optionaly "src_install" "$@"
 }
 
 # @FUNCTION: cmake-utils_src_test
@@ -445,15 +445,15 @@
 # Wrapper for detection if we want to run enable_ prefixed function with same name
 # unconditionaly or only when some useflag is enabled.
 cmake-utils_src_test() {
-	_execute_optionaly "src_test"
+	_execute_optionaly "src_test" "$@"
 }
 
 
 _execute_optionaly() {
-	local phase="$1"
+	local phase="$1" ; shift
 	if [[ ${WANT_CMAKE} = always ]]; then
-		enable_cmake-utils_${phase}
+		enable_cmake-utils_${phase} "$@"
 	else
-		use ${WANT_CMAKE} && enable_cmake-utils_${phase}
+		use ${WANT_CMAKE} && enable_cmake-utils_${phase} "$@"
 	fi
 }






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-01-11 17:02 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-01-11 17:02 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/01/11 17:02:50

  Modified:             cmake-utils.eclass
  Log:
  Fix whitespace.

Revision  Changes    Path
1.43                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.42&r2=1.43

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- cmake-utils.eclass	10 Jan 2010 22:17:02 -0000	1.42
+++ cmake-utils.eclass	11 Jan 2010 17:02:49 -0000	1.43
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.42 2010/01/10 22:17:02 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.43 2010/01/11 17:02:49 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -29,7 +29,7 @@
 WANT_CMAKE="${WANT_CMAKE:-always}"
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
-	    always)
+		always)
 			;;
 		*)
 			IUSE+=" ${WANT_CMAKE}"






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-01-20  2:54 Jonathan Callen (abcd)
  0 siblings, 0 replies; 75+ messages in thread
From: Jonathan Callen (abcd) @ 2010-01-20  2:54 UTC (permalink / raw
  To: gentoo-commits

abcd        10/01/20 02:54:56

  Modified:             cmake-utils.eclass
  Log:
  Drop workaround for bug in prefix's binutils-config

Revision  Changes    Path
1.44                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.44&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.44&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.43&r2=1.44

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- cmake-utils.eclass	11 Jan 2010 17:02:49 -0000	1.43
+++ cmake-utils.eclass	20 Jan 2010 02:54:56 -0000	1.44
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.43 2010/01/11 17:02:49 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.44 2010/01/20 02:54:56 abcd Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -299,7 +299,6 @@
 			SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
 			SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
 			CACHE STRING "" FORCE)
-			SET (CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "" FORCE)
 			ENDIF (NOT APPLE)
 		_EOF_
 	fi






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-01-20  2:55 Jonathan Callen (abcd)
  0 siblings, 0 replies; 75+ messages in thread
From: Jonathan Callen (abcd) @ 2010-01-20  2:55 UTC (permalink / raw
  To: gentoo-commits

abcd        10/01/20 02:55:32

  Modified:             cmake-utils.eclass
  Log:
  I forgot to update the copyright date...

Revision  Changes    Path
1.45                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.45&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.45&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.44&r2=1.45

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- cmake-utils.eclass	20 Jan 2010 02:54:56 -0000	1.44
+++ cmake-utils.eclass	20 Jan 2010 02:55:31 -0000	1.45
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.44 2010/01/20 02:54:56 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.45 2010/01/20 02:55:31 abcd Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-02-11 17:41 Denis Dupeyron (calchan)
  0 siblings, 0 replies; 75+ messages in thread
From: Denis Dupeyron (calchan) @ 2010-02-11 17:41 UTC (permalink / raw
  To: gentoo-commits

calchan     10/02/11 17:41:19

  Modified:             cmake-utils.eclass
  Log:
  Let cmake-utils.eclass honor the EXTRA_ECONF variable.

Revision  Changes    Path
1.46                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.45&r2=1.46

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- cmake-utils.eclass	20 Jan 2010 02:55:31 -0000	1.45
+++ cmake-utils.eclass	11 Feb 2010 17:41:18 -0000	1.46
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.45 2010/01/20 02:55:31 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.46 2010/02/11 17:41:18 calchan Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -332,6 +332,7 @@
 		-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
 		-DCMAKE_INSTALL_DO_STRIP=OFF
 		-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
+		"${EXTRA_ECONF}"
 	)
 
 	mkdir -p "${CMAKE_BUILD_DIR}"






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-02-11 18:00 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 75+ messages in thread
From: Samuli Suominen (ssuominen) @ 2010-02-11 18:00 UTC (permalink / raw
  To: gentoo-commits

ssuominen    10/02/11 18:00:06

  Modified:             cmake-utils.eclass
  Log:
  Rename EXTRA_ECONF to MYCMAKEARGS because EXTRA_ECONF is only for econf, and econf is only for autotools based ./configure script.

Revision  Changes    Path
1.47                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.47&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.47&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.46&r2=1.47

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- cmake-utils.eclass	11 Feb 2010 17:41:18 -0000	1.46
+++ cmake-utils.eclass	11 Feb 2010 18:00:05 -0000	1.47
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.46 2010/02/11 17:41:18 calchan Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.47 2010/02/11 18:00:05 ssuominen Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -332,7 +332,7 @@
 		-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
 		-DCMAKE_INSTALL_DO_STRIP=OFF
 		-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
-		"${EXTRA_ECONF}"
+		"${MYCMAKEARGS}"
 	)
 
 	mkdir -p "${CMAKE_BUILD_DIR}"






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-03-24 21:09 Robin H. Johnson (robbat2)
  0 siblings, 0 replies; 75+ messages in thread
From: Robin H. Johnson (robbat2) @ 2010-03-24 21:09 UTC (permalink / raw
  To: gentoo-commits

robbat2     10/03/24 21:09:28

  Modified:             cmake-utils.eclass
  Log:
  Support other ways of doing libdir fixes for cmake, as suggested by http://www.lcfg.org/doc/buildtools/cmake_recipes.html.

Revision  Changes    Path
1.48                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.48&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.48&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.47&r2=1.48

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.47
retrieving revision 1.48
diff -p -w -b -B -u -u -r1.47 -r1.48
--- cmake-utils.eclass	11 Feb 2010 18:00:05 -0000	1.47
+++ cmake-utils.eclass	24 Mar 2010 21:09:28 -0000	1.48
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.47 2010/02/11 18:00:05 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.48 2010/03/24 21:09:28 robbat2 Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -308,6 +308,7 @@ enable_cmake-utils_src_configure() {
 	local libdir=$(get_libdir)
 	cat > "${common_config}" <<- _EOF_
 		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
+		SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
 	_EOF_
 	[[ -n ${NOCOLOR} ]] || echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-04-10  2:20 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-04-10  2:20 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/04/10 02:20:59

  Modified:             cmake-utils.eclass
  Log:
  Display compiler and linker flags - a lousy compromise between excessive verbosity and hiding relevant information

Revision  Changes    Path
1.49                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.49&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.49&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.48&r2=1.49

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- cmake-utils.eclass	24 Mar 2010 21:09:28 -0000	1.48
+++ cmake-utils.eclass	10 Apr 2010 02:20:59 -0000	1.49
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.48 2010/03/24 21:09:28 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.49 2010/04/10 02:20:59 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -29,12 +29,12 @@
 WANT_CMAKE="${WANT_CMAKE:-always}"
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
-		always)
-			;;
-		*)
-			IUSE+=" ${WANT_CMAKE}"
-			CMAKEDEPEND+="${WANT_CMAKE}? ( "
-			;;
+	always)
+		;;
+	*)
+		IUSE+=" ${WANT_CMAKE}"
+		CMAKEDEPEND+="${WANT_CMAKE}? ( "
+		;;
 esac
 inherit toolchain-funcs multilib flag-o-matic base
 
@@ -154,7 +154,6 @@
 		# regular out of tree build
 		[[ ${1} = init || -d ${CMAKE_USE_DIR}_build ]] && SUF="_build" || SUF=""
 		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}${SUF}"
-
 	fi
 	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
 }
@@ -246,8 +245,15 @@
 	cat >> CMakeLists.txt <<- _EOF_
 
 		MESSAGE(STATUS "<<< Gentoo configuration >>>
-		Build type: \${CMAKE_BUILD_TYPE}
-		Install path: \${CMAKE_INSTALL_PREFIX}\n")
+		Build type      \${CMAKE_BUILD_TYPE}
+		Install path    \${CMAKE_INSTALL_PREFIX}
+		Compiler flags:
+		C               \${CMAKE_C_FLAGS}
+		C++             \${CMAKE_CXX_FLAGS}
+		Linker flags:
+		Executable      \${CMAKE_EXE_LINKER_FLAGS}
+		Module          \${CMAKE_MODULE_LINKER_FLAGS}
+		Shared          \${CMAKE_SHARED_LINKER_FLAGS}\n")
 	_EOF_
 }
 
@@ -262,9 +268,9 @@
 
 	# check if CMakeLists.txt exist and if no then die
 	if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then
-		eerror "I was unable to locate CMakeLists.txt under:"
+		eerror "Unable to locate CMakeLists.txt under:"
 		eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
-		eerror "You should consider not inheriting the cmake eclass."
+		eerror "Consider not inheriting the cmake eclass."
 		die "FATAL: Unable to find CMakeLists.txt"
 	fi
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-04-30 23:41 Jonathan Callen (abcd)
  0 siblings, 0 replies; 75+ messages in thread
From: Jonathan Callen (abcd) @ 2010-04-30 23:41 UTC (permalink / raw
  To: gentoo-commits

abcd        10/04/30 23:41:11

  Modified:             cmake-utils.eclass
  Log:
  Allow changing the minimum required cmake version

Revision  Changes    Path
1.50                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.49&r2=1.50

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- cmake-utils.eclass	10 Apr 2010 02:20:59 -0000	1.49
+++ cmake-utils.eclass	30 Apr 2010 23:41:11 -0000	1.50
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.49 2010/04/10 02:20:59 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.50 2010/04/30 23:41:11 abcd Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -27,6 +27,12 @@
 # Valid values are: always [default], optional (where the value is the useflag
 # used for optionality)
 WANT_CMAKE="${WANT_CMAKE:-always}"
+
+# @ECLASS-VARIABLE: CMAKE_MIN_VER
+# @DESCRIPTION:
+# Specify the minimum allowable version of cmake.  Defaults to 2.6.2-r1
+CMAKE_MIN_VER="${CMAKE_MIN_VER:-2.6.2-r1}"
+
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
 	always)
@@ -49,7 +55,7 @@
 : ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
 
 if [[ ${PN} != cmake ]]; then
-	CMAKEDEPEND+=">=dev-util/cmake-2.6.2-r1"
+	CMAKEDEPEND+=">=dev-util/cmake-${CMAKE_MIN_VER}"
 fi
 
 CMAKEDEPEND+=" userland_GNU? ( >=sys-apps/findutils-4.4.0 )"






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-04-30 23:58 Jonathan Callen (abcd)
  0 siblings, 0 replies; 75+ messages in thread
From: Jonathan Callen (abcd) @ 2010-04-30 23:58 UTC (permalink / raw
  To: gentoo-commits

abcd        10/04/30 23:58:47

  Modified:             cmake-utils.eclass
  Log:
  Change variable name (not yet used): CMAKE_MIN_VER -> CMAKE_MIN_VERSION

Revision  Changes    Path
1.51                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cmake-utils.eclass?r1=1.50&r2=1.51

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- cmake-utils.eclass	30 Apr 2010 23:41:11 -0000	1.50
+++ cmake-utils.eclass	30 Apr 2010 23:58:47 -0000	1.51
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.50 2010/04/30 23:41:11 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.51 2010/04/30 23:58:47 abcd Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -28,10 +28,10 @@
 # used for optionality)
 WANT_CMAKE="${WANT_CMAKE:-always}"
 
-# @ECLASS-VARIABLE: CMAKE_MIN_VER
+# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
 # @DESCRIPTION:
 # Specify the minimum allowable version of cmake.  Defaults to 2.6.2-r1
-CMAKE_MIN_VER="${CMAKE_MIN_VER:-2.6.2-r1}"
+CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}"
 
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
@@ -55,7 +55,7 @@
 : ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
 
 if [[ ${PN} != cmake ]]; then
-	CMAKEDEPEND+=">=dev-util/cmake-${CMAKE_MIN_VER}"
+	CMAKEDEPEND+=">=dev-util/cmake-${CMAKE_MIN_VERSION}"
 fi
 
 CMAKEDEPEND+=" userland_GNU? ( >=sys-apps/findutils-4.4.0 )"






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-05-27  2:44 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-05-27  2:44 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/05/27 02:44:14

  Modified:             cmake-utils.eclass
  Log:
  - use DOCS and HTML_DOCS support from base.eclass (arrays), provide backward compatibility code
  - remove documentation of internal functions so that only relevant and public API is in manual

Revision  Changes    Path
1.52                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.51&r2=1.52

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- cmake-utils.eclass	30 Apr 2010 23:58:47 -0000	1.51
+++ cmake-utils.eclass	27 May 2010 02:44:14 -0000	1.52
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.51 2010/04/30 23:58:47 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.52 2010/05/27 02:44:14 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -8,17 +8,17 @@
 #
 # @CODE
 # Tomáš Chvátal <scarabeus@gentoo.org>
-# Maciej Mrozowski <reavertm@gmail.com>
+# Maciej Mrozowski <reavertm@gentoo.org>
 # (undisclosed contributors)
 # Original author: Zephyrus (zephyrus@mirach.it)
 # @CODE
 # @BLURB: common ebuild functions for cmake-based packages
 # @DESCRIPTION:
-# The cmake-utils eclass contains functions that make creating ebuilds for
+# The cmake-utils eclass is base.eclass(5) wrapper that makes creating ebuilds for
 # cmake-based packages much easier.
-# Its main features are support of out-of-source builds as well as in-source
-# builds and an implementation of the well-known use_enable and use_with
-# functions for CMake.
+# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
+# builds (default), in-source builds and an implementation of the well-known use_enable
+# and use_with functions for CMake.
 
 # @ECLASS-VARIABLE: WANT_CMAKE
 # @DESCRIPTION:
@@ -101,14 +101,6 @@
 	fi
 }
 
-# @ECLASS-VARIABLE: DOCS
-# @DESCRIPTION:
-# Documents passed to dodoc command.
-
-# @ECLASS-VARIABLE: HTML_DOCS
-# @DESCRIPTION:
-# Documents passed to dohtml command.
-
 # @ECLASS-VARIABLE: PREFIX
 # @DESCRIPTION:
 # Eclass respects PREFIX variable, though it's not recommended way to set
@@ -132,8 +124,6 @@
 # specific compiler flags overriding make.conf.
 : ${CMAKE_BUILD_TYPE:=Gentoo}
 
-# @FUNCTION: _check_build_dir
-# @DESCRIPTION:
 # Determine using IN or OUT source build
 _check_build_dir() {
 	# @ECLASS-VARIABLE: CMAKE_USE_DIR
@@ -263,10 +253,6 @@
 	_EOF_
 }
 
-# @FUNCTION: enable_cmake-utils_src_configure
-# @DESCRIPTION:
-# General function for configuring with cmake. Default behaviour is to start an
-# out-of-source build.
 enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
@@ -357,10 +343,6 @@
 	popd > /dev/null
 }
 
-# @FUNCTION: enable_cmake-utils_src_compile
-# @DESCRIPTION:
-# General function for compiling with cmake. Default behaviour is to check for
-# EAPI and respectively to configure as well or just compile.
 enable_cmake-utils_src_compile() {
 	debug-print-function ${FUNCNAME} "$@"
 
@@ -387,25 +369,23 @@
 	popd &> /dev/null
 }
 
-# @FUNCTION: enable_cmake-utils_src_install
-# @DESCRIPTION:
-# Function for installing the package. Automatically detects the build type.
 enable_cmake-utils_src_install() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
 	pushd "${CMAKE_BUILD_DIR}" &> /dev/null
-	emake install DESTDIR="${D}" || die "Make install failed"
+	base_src_install
 	popd &> /dev/null
 
-	# Manual document installation
-	[[ -n "${DOCS}" ]] && { dodoc ${DOCS} || die "dodoc failed" ; }
-	[[ -n "${HTML_DOCS}" ]] && { dohtml -r ${HTML_DOCS} || die "dohtml failed" ; }
+	# Backward compatibility, for non-array variables
+	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
+		dodoc ${DOCS} || die "dodoc failed"
+	fi
+	if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
+		dohtml -r ${HTML_DOCS} || die "dohtml failed"
+	fi
 }
 
-# @FUNCTION: enable_cmake-utils_src_test
-# @DESCRIPTION:
-# Function for testing the package. Automatically detects the build type.
 enable_cmake-utils_src_test() {
 	debug-print-function ${FUNCNAME} "$@"
 
@@ -428,40 +408,38 @@
 	popd &> /dev/null
 }
 
-## Wrappers for calls bellow this line
 # @FUNCTION: cmake-utils_src_configure
 # @DESCRIPTION:
-# Wrapper for detection if we want to run enable_ prefixed function with same name
-# unconditionaly or only when some useflag is enabled.
+# General function for configuring with cmake. Default behaviour is to start an
+# out-of-source build.
 cmake-utils_src_configure() {
 	_execute_optionaly "src_configure" "$@"
 }
 
 # @FUNCTION: cmake-utils_src_compile
 # @DESCRIPTION:
-# Wrapper for detection if we want to run enable_ prefixed function with same name
-# unconditionaly or only when some useflag is enabled.
+# General function for compiling with cmake. Default behaviour is to check for
+# EAPI and respectively to configure as well or just compile.
+# Automatically detects the build type. All arguments are passed to emake.
 cmake-utils_src_compile() {
 	_execute_optionaly "src_compile" "$@"
 }
 
 # @FUNCTION: cmake-utils_src_install
 # @DESCRIPTION:
-# Wrapper for detection if we want to run enable_ prefixed function with same name
-# unconditionaly or only when some useflag is enabled.
+# Function for installing the package. Automatically detects the build type.
 cmake-utils_src_install() {
 	_execute_optionaly "src_install" "$@"
 }
 
 # @FUNCTION: cmake-utils_src_test
 # @DESCRIPTION:
-# Wrapper for detection if we want to run enable_ prefixed function with same name
-# unconditionaly or only when some useflag is enabled.
+# Function for testing the package. Automatically detects the build type.
 cmake-utils_src_test() {
 	_execute_optionaly "src_test" "$@"
 }
 
-
+# Optionally executes phases based on WANT_CMAKE variable/USE flag.
 _execute_optionaly() {
 	local phase="$1" ; shift
 	if [[ ${WANT_CMAKE} = always ]]; then






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-06-21 16:39 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-06-21 16:39 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/06/21 16:39:49

  Modified:             cmake-utils.eclass
  Log:
  Fix NOCOLOR logic, bug 324603

Revision  Changes    Path
1.53                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.53&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.53&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.52&r2=1.53

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- cmake-utils.eclass	27 May 2010 02:44:14 -0000	1.52
+++ cmake-utils.eclass	21 Jun 2010 16:39:49 -0000	1.53
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.52 2010/05/27 02:44:14 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.53 2010/06/21 16:39:49 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -308,7 +308,7 @@
 		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
 		SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
 	_EOF_
-	[[ -n ${NOCOLOR} ]] || echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
+	[[ -n ${NOCOLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
 
 	# Convert mycmakeargs to an array, for backwards compatibility
 	# Make the array a local variable since <=portage-2.1.6.x does not






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-06-26 17:55 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-06-26 17:55 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/06/26 17:55:59

  Modified:             cmake-utils.eclass
  Log:
  Properly handle NOCOLOR variable

Revision  Changes    Path
1.54                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.54&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.54&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.53&r2=1.54

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- cmake-utils.eclass	21 Jun 2010 16:39:49 -0000	1.53
+++ cmake-utils.eclass	26 Jun 2010 17:55:59 -0000	1.54
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.53 2010/06/21 16:39:49 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.54 2010/06/26 17:55:59 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -308,7 +308,7 @@
 		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
 		SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
 	_EOF_
-	[[ -n ${NOCOLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
+	[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
 
 	# Convert mycmakeargs to an array, for backwards compatibility
 	# Make the array a local variable since <=portage-2.1.6.x does not






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-07-09 16:31 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-07-09 16:31 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/07/09 16:31:27

  Modified:             cmake-utils.eclass
  Log:
  Sync following changes from kde overlay:
  - sort variables so that they appear in manual alphabetically
  - run ctest instead of make check in src_test and make it aware of TEST_VERBOSE variable
  - sed-out two more hardcoded values from CMakeLists.txt: CMAKE_VERBOSE_MAKEFILE and CMAKE_COLOR_MAKEFILE

Revision  Changes    Path
1.55                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.55&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.55&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.54&r2=1.55

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- cmake-utils.eclass	26 Jun 2010 17:55:59 -0000	1.54
+++ cmake-utils.eclass	9 Jul 2010 16:31:27 -0000	1.55
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.54 2010/06/26 17:55:59 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.55 2010/07/09 16:31:27 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -101,45 +101,46 @@
 	fi
 }
 
-# @ECLASS-VARIABLE: PREFIX
+# @ECLASS-VARIABLE: CMAKE_BUILD_DIR
 # @DESCRIPTION:
-# Eclass respects PREFIX variable, though it's not recommended way to set
-# install/lib/bin prefixes.
-# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
+# Build directory where all cmake processed files should be generated.
+# For in-source build it's fixed to ${CMAKE_USE_DIR}.
+# For out-of-source build it can be overriden, by default it uses
+# ${WORKDIR}/${P}_build.
+
+# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
+# @DESCRIPTION:
+# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
+# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
+# If about to be set - needs to be set before invoking cmake-utils_src_configure.
+# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
+# specific compiler flags overriding make.conf.
+: ${CMAKE_BUILD_TYPE:=Gentoo}
 
 # @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD
 # @DESCRIPTION:
 # Set to enable in-source build.
 
+# @ECLASS-VARIABLE: CMAKE_USE_DIR
+# @DESCRIPTION:
+# Sets the directory where we are working with cmake.
+# For example when application uses autotools and only one
+# plugin needs to be done by cmake.
+# By default it uses ${S}.
+
 # @ECLASS-VARIABLE: CMAKE_VERBOSE
 # @DESCRIPTION:
 # Set to enable verbose messages during compilation.
 
-# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
+# @ECLASS-VARIABLE: PREFIX
 # @DESCRIPTION:
-# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
-# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
-# If about to be set - needs to be set before invoking cmake-utils_src_configure.
-# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
-# specific compiler flags overriding make.conf.
-: ${CMAKE_BUILD_TYPE:=Gentoo}
+# Eclass respects PREFIX variable, though it's not recommended way to set
+# install/lib/bin prefixes.
+# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
 
 # Determine using IN or OUT source build
 _check_build_dir() {
-	# @ECLASS-VARIABLE: CMAKE_USE_DIR
-	# @DESCRIPTION:
-	# Sets the directory where we are working with cmake.
-	# For example when application uses autotools and only one
-	# plugin needs to be done by cmake.
-	# By default it uses ${S}.
 	: ${CMAKE_USE_DIR:=${S}}
-
-	# @ECLASS-VARIABLE: CMAKE_BUILD_DIR
-	# @DESCRIPTION:
-	# Specify the build directory where all cmake processed
-	# files should be located.
-	#
-	# For installing binary doins "${CMAKE_BUILD_DIR}/${PN}"
 	if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
 		# we build in source dir
 		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
@@ -234,7 +235,9 @@
 	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
 	find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
 		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
 		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
 		|| die "${LINENO}: failed to disable hardcoded settings"
 
 	# NOTE Append some useful summary here
@@ -339,7 +342,6 @@
 	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
 	echo cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
 	cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
-
 	popd > /dev/null
 }
 
@@ -353,12 +355,12 @@
 # @FUNCTION: cmake-utils_src_make
 # @DESCRIPTION:
 # Function for building the package. Automatically detects the build type.
-# All arguments are passed to emake
+# All arguments are passed to emake.
 cmake-utils_src_make() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" &> /dev/null
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	# first check if Makefile exist otherwise die
 	[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
 	if [[ -n ${CMAKE_VERBOSE} ]]; then
@@ -366,16 +368,16 @@
 	else
 		emake "$@" || die "Make failed!"
 	fi
-	popd &> /dev/null
+	popd > /dev/null
 }
 
 enable_cmake-utils_src_install() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" &> /dev/null
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	base_src_install
-	popd &> /dev/null
+	popd > /dev/null
 
 	# Backward compatibility, for non-array variables
 	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
@@ -390,22 +392,11 @@
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" &> /dev/null
-	# Standard implementation of src_test
-	if emake -j1 check -n &> /dev/null; then
-		einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
-		if ! emake -j1 check; then
-			die "Make check failed. See above for details."
-		fi
-	elif emake -j1 test -n &> /dev/null; then
-		einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		if ! emake -j1 test; then
-			die "Make test failed. See above for details."
-		fi
-	else
-		einfo ">>> Test phase [none]: ${CATEGORY}/${PF}"
-	fi
-	popd &> /dev/null
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	local ctestargs
+	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
+	ctest ${ctestargs} || die "Tests failed."
+	popd > /dev/null
 }
 
 # @FUNCTION: cmake-utils_src_configure






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-07-14 15:48 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-07-14 15:48 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/07/14 15:48:43

  Modified:             cmake-utils.eclass
  Log:
  Introduce $(cmake_utils_use_use foo FOO) possiblity.

Revision  Changes    Path
1.56                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.56&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.56&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.55&r2=1.56

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- cmake-utils.eclass	9 Jul 2010 16:31:27 -0000	1.55
+++ cmake-utils.eclass	14 Jul 2010 15:48:43 -0000	1.56
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.55 2010/07/09 16:31:27 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.56 2010/07/14 15:48:43 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -217,6 +217,15 @@
 # and -DHAVE_FOO=OFF if it is disabled.
 cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; }
 
+# @FUNCTION: cmake-utils_use_use
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_use foo FOO` echoes -DUSE_FOO=ON if foo is enabled
+# and -DUSE_FOO=OFF if it is disabled.
+cmake-utils_use_use() { _use_me_now USE_ "$@" ; }
+
 # @FUNCTION: cmake-utils_use
 # @USAGE: <USE flag> [flag name]
 # @DESCRIPTION:






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-08-12 19:27 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-08-12 19:27 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/08/12 19:27:42

  Modified:             cmake-utils.eclass
  Log:
  use debug && append-cppflags -DDEBUG.
  Also prevent QDebug from flooding when ! use debug (Qt is common toolkit among cmake-controlled packages, we can add respective preprocessor definitions for other known common libs as well)

Revision  Changes    Path
1.57                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.57&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.57&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.56&r2=1.57

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- cmake-utils.eclass	14 Jul 2010 15:48:43 -0000	1.56
+++ cmake-utils.eclass	12 Aug 2010 19:27:42 -0000	1.57
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.56 2010/07/14 15:48:43 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.57 2010/08/12 19:27:42 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -30,7 +30,7 @@
 
 # @ECLASS-VARIABLE: CMAKE_MIN_VERSION
 # @DESCRIPTION:
-# Specify the minimum allowable version of cmake.  Defaults to 2.6.2-r1
+# Specify the minimum required CMake version.  Default is 2.6.2-r1
 CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}"
 
 CMAKEDEPEND=""
@@ -286,9 +286,11 @@
 
 	# @SEE CMAKE_BUILD_TYPE
 	if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
-		# Handle release builds
-		if ! has debug ${IUSE//+} || ! use debug; then
-			append-cppflags -DNDEBUG
+		# Handle debug and release codepaths
+		if has debug ${IUSE//+} && use debug; then
+			append-cppflags -DDEBUG
+		else
+			append-cppflags -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM
 		fi
 	fi
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-08-13  5:02 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-08-13  5:02 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/08/13 05:02:49

  Modified:             cmake-utils.eclass
  Log:
  Revert - breaks a lot of kde packages (sighs)

Revision  Changes    Path
1.58                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.58&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.58&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.57&r2=1.58

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- cmake-utils.eclass	12 Aug 2010 19:27:42 -0000	1.57
+++ cmake-utils.eclass	13 Aug 2010 05:02:49 -0000	1.58
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.57 2010/08/12 19:27:42 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.58 2010/08/13 05:02:49 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -30,7 +30,7 @@
 
 # @ECLASS-VARIABLE: CMAKE_MIN_VERSION
 # @DESCRIPTION:
-# Specify the minimum required CMake version.  Default is 2.6.2-r1
+# Specify the minimum allowable version of cmake.  Defaults to 2.6.2-r1
 CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}"
 
 CMAKEDEPEND=""
@@ -286,11 +286,9 @@
 
 	# @SEE CMAKE_BUILD_TYPE
 	if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
-		# Handle debug and release codepaths
-		if has debug ${IUSE//+} && use debug; then
-			append-cppflags -DDEBUG
-		else
-			append-cppflags -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM
+		# Handle release builds
+		if ! has debug ${IUSE//+} || ! use debug; then
+			append-cppflags -DNDEBUG
 		fi
 	fi
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-09-16 16:04 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2010-09-16 16:04 UTC (permalink / raw
  To: gentoo-commits

reavertm    10/09/16 16:04:11

  Modified:             cmake-utils.eclass
  Log:
  Allow setting CMAKE_BUILD_DIR (can be utilized in some exotic circumstances)

Revision  Changes    Path
1.59                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.59&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.59&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.58&r2=1.59

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- cmake-utils.eclass	13 Aug 2010 05:02:49 -0000	1.58
+++ cmake-utils.eclass	16 Sep 2010 16:04:11 -0000	1.59
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.58 2010/08/13 05:02:49 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.59 2010/09/16 16:04:11 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -30,7 +30,7 @@
 
 # @ECLASS-VARIABLE: CMAKE_MIN_VERSION
 # @DESCRIPTION:
-# Specify the minimum allowable version of cmake.  Defaults to 2.6.2-r1
+# Specify the minimum required CMake version.  Default is 2.6.2-r1
 CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}"
 
 CMAKEDEPEND=""
@@ -144,13 +144,8 @@
 	if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
 		# we build in source dir
 		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
-	elif [[ ${CMAKE_USE_DIR} = ${WORKDIR} ]]; then
-		# out of tree build, but with $S=$WORKDIR, see bug #273949 for reason.
-		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}/build"
 	else
-		# regular out of tree build
-		[[ ${1} = init || -d ${CMAKE_USE_DIR}_build ]] && SUF="_build" || SUF=""
-		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}${SUF}"
+		: ${CMAKE_BUILD_DIR:=${WORKDIR}/${P}_build}
 	fi
 	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
 }






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-10-13 16:40 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-10-13 16:40 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/10/13 16:40:34

  Modified:             cmake-utils.eclass
  Log:
  Pass the arguments to the src_install to base_src_install.

Revision  Changes    Path
1.60                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.60&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.60&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.59&r2=1.60

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- cmake-utils.eclass	16 Sep 2010 16:04:11 -0000	1.59
+++ cmake-utils.eclass	13 Oct 2010 16:40:34 -0000	1.60
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.59 2010/09/16 16:04:11 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.60 2010/10/13 16:40:34 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -380,7 +380,7 @@
 
 	_check_build_dir
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	base_src_install
+	base_src_install "$@"
 	popd > /dev/null
 
 	# Backward compatibility, for non-array variables






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-12-16 14:36 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-12-16 14:36 UTC (permalink / raw
  To: gentoo-commits

scarabeus    10/12/16 14:36:55

  Modified:             cmake-utils.eclass
  Log:
  Allow overriding of cmake binary.

Revision  Changes    Path
1.61                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.61&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.61&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.60&r2=1.61

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- cmake-utils.eclass	13 Oct 2010 16:40:34 -0000	1.60
+++ cmake-utils.eclass	16 Dec 2010 14:36:55 -0000	1.61
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.60 2010/10/13 16:40:34 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.61 2010/12/16 14:36:55 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -138,6 +138,11 @@
 # install/lib/bin prefixes.
 # Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
 
+# @ECLASS-VARIABLE: CMAKE_BINARY
+# @DESCRIPTION:
+# Eclass can use different cmake binary than the one provided in by system.
+: ${CMAKE_BINARY:=cmake}
+
 # Determine using IN or OUT source build
 _check_build_dir() {
 	: ${CMAKE_USE_DIR:=${S}}
@@ -344,8 +349,8 @@
 	mkdir -p "${CMAKE_BUILD_DIR}"
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
-	echo cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
-	cmake "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
+	echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
+	"${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
 	popd > /dev/null
 }
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2010-12-30 14:23 Theo Chatzimichos (tampakrap)
  0 siblings, 0 replies; 75+ messages in thread
From: Theo Chatzimichos (tampakrap) @ 2010-12-30 14:23 UTC (permalink / raw
  To: gentoo-commits

tampakrap    10/12/30 14:23:01

  Modified:             cmake-utils.eclass
  Log:
  Add patch for OS X, written by Mike Lewis, bug 298121

Revision  Changes    Path
1.62                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.62&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.62&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.61&r2=1.62

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- cmake-utils.eclass	16 Dec 2010 14:36:55 -0000	1.61
+++ cmake-utils.eclass	30 Dec 2010 14:23:01 -0000	1.62
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.61 2010/12/16 14:36:55 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.62 2010/12/30 14:23:01 tampakrap Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -309,6 +309,17 @@
 			SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
 			SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
 			CACHE STRING "" FORCE)
+
+			ELSE ()
+
+			SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX:-/usr}" CACHE STRING ""FORCE)
+			SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
+			SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
+			SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "" FORCE) 
+			SET(CMAKE_INSTALL_RPATH ${EPREFIX}${PREFIX:-/usr}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"CACHE STRING "" FORCE)
+			SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
+			SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX:-/usr}/lib" CACHE STRING "" FORCE)
+
 			ENDIF (NOT APPLE)
 		_EOF_
 	fi






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-01-13 19:17 Fabian Groffen (grobian)
  0 siblings, 0 replies; 75+ messages in thread
From: Fabian Groffen (grobian) @ 2011-01-13 19:17 UTC (permalink / raw
  To: gentoo-commits

grobian     11/01/13 19:17:00

  Modified:             cmake-utils.eclass
  Log:
  add missing quote, bug #298121

Revision  Changes    Path
1.63                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.63&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.63&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.62&r2=1.63

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- cmake-utils.eclass	30 Dec 2010 14:23:01 -0000	1.62
+++ cmake-utils.eclass	13 Jan 2011 19:17:00 -0000	1.63
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.62 2010/12/30 14:23:01 tampakrap Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.63 2011/01/13 19:17:00 grobian Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -316,7 +316,7 @@
 			SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
 			SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
 			SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "" FORCE) 
-			SET(CMAKE_INSTALL_RPATH ${EPREFIX}${PREFIX:-/usr}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"CACHE STRING "" FORCE)
+			SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX:-/usr}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE)
 			SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
 			SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX:-/usr}/lib" CACHE STRING "" FORCE)
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-01-19 12:44 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-01-19 12:44 UTC (permalink / raw
  To: gentoo-commits

scarabeus    11/01/19 12:44:55

  Modified:             cmake-utils.eclass
  Log:
  Update minimal required version and drop useless argument passing.

Revision  Changes    Path
1.64                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.64&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.64&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.63&r2=1.64

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- cmake-utils.eclass	13 Jan 2011 19:17:00 -0000	1.63
+++ cmake-utils.eclass	19 Jan 2011 12:44:55 -0000	1.64
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.63 2011/01/13 19:17:00 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.64 2011/01/19 12:44:55 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -30,8 +30,8 @@
 
 # @ECLASS-VARIABLE: CMAKE_MIN_VERSION
 # @DESCRIPTION:
-# Specify the minimum required CMake version.  Default is 2.6.2-r1
-CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}"
+# Specify the minimum required CMake version.  Default is 2.8.1
+CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
 
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
@@ -268,7 +268,7 @@
 enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	_check_build_dir init
+	_check_build_dir
 
 	# check if CMakeLists.txt exist and if no then die
 	if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-01-20  0:48 Maciej Mrozowski (reavertm)
  0 siblings, 0 replies; 75+ messages in thread
From: Maciej Mrozowski (reavertm) @ 2011-01-20  0:48 UTC (permalink / raw
  To: gentoo-commits

reavertm    11/01/20 00:48:51

  Modified:             cmake-utils.eclass
  Log:
  Pass cmake-utils_src_test arguments to ctest.

Revision  Changes    Path
1.65                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.65&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.65&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.64&r2=1.65

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- cmake-utils.eclass	19 Jan 2011 12:44:55 -0000	1.64
+++ cmake-utils.eclass	20 Jan 2011 00:48:51 -0000	1.65
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.64 2011/01/19 12:44:55 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.65 2011/01/20 00:48:51 reavertm Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -415,7 +415,7 @@
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
 	local ctestargs
 	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
-	ctest ${ctestargs} || die "Tests failed."
+	ctest ${ctestargs} "$@" || die "Tests failed."
 	popd > /dev/null
 }
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-01-26 20:51 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-01-26 20:51 UTC (permalink / raw
  To: gentoo-commits

scarabeus    11/01/26 20:51:42

  Modified:             cmake-utils.eclass
  Log:
  Support eapi4

Revision  Changes    Path
1.66                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.66&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.66&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.65&r2=1.66

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- cmake-utils.eclass	20 Jan 2011 00:48:51 -0000	1.65
+++ cmake-utils.eclass	26 Jan 2011 20:51:42 -0000	1.66
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.65 2011/01/20 00:48:51 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.66 2011/01/26 20:51:42 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -46,7 +46,7 @@
 
 CMAKE_EXPF="src_compile src_test src_install"
 case ${EAPI:-0} in
-	3|2) CMAKE_EXPF+=" src_configure" ;;
+	4|3|2) CMAKE_EXPF+=" src_configure" ;;
 	1|0) ;;
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-03-18 19:45 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-03-18 19:45 UTC (permalink / raw
  To: gentoo-commits

scarabeus    11/03/18 19:45:49

  Modified:             cmake-utils.eclass
  Log:
  Silence undefined warnings, since our eclass operate this way with all enablers (and we trust that maintainers know what the heck are they doing).

Revision  Changes    Path
1.67                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.67&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.67&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.66&r2=1.67

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- cmake-utils.eclass	26 Jan 2011 20:51:42 -0000	1.66
+++ cmake-utils.eclass	18 Mar 2011 19:45:49 -0000	1.67
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.66 2011/01/26 20:51:42 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.67 2011/03/18 19:45:49 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -348,6 +348,7 @@
 	# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
 	# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
 	local cmakeargs=(
+		--no-warn-unused-cli
 		-C "${common_config}"
 		-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX:-/usr}"
 		"${mycmakeargs_local[@]}"






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-04-27 16:54 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; 75+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-04-27 16:54 UTC (permalink / raw
  To: gentoo-commits

scarabeus    11/04/27 16:54:44

  Modified:             cmake-utils.eclass
  Log:
  Rather inform that we have no tests instead of printing help for ctest.

Revision  Changes    Path
1.68                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.68&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.68&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.67&r2=1.68

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- cmake-utils.eclass	18 Mar 2011 19:45:49 -0000	1.67
+++ cmake-utils.eclass	27 Apr 2011 16:54:44 -0000	1.68
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.67 2011/03/18 19:45:49 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.68 2011/04/27 16:54:44 scarabeus Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -411,10 +411,12 @@
 
 enable_cmake-utils_src_test() {
 	debug-print-function ${FUNCNAME} "$@"
+	local ctestargs
 
 	_check_build_dir
 	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	local ctestargs
+	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
+
 	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
 	ctest ${ctestargs} "$@" || die "Tests failed."
 	popd > /dev/null






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-06-27 21:11 Jonathan Callen (abcd)
  0 siblings, 0 replies; 75+ messages in thread
From: Jonathan Callen (abcd) @ 2011-06-27 21:11 UTC (permalink / raw
  To: gentoo-commits

abcd        11/06/27 21:11:57

  Modified:             cmake-utils.eclass
  Log:
  Only touch CMakeLists.txt once

Revision  Changes    Path
1.69                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.69&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.69&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.68&r2=1.69

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- cmake-utils.eclass	27 Apr 2011 16:54:44 -0000	1.68
+++ cmake-utils.eclass	27 Jun 2011 21:11:57 -0000	1.69
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.68 2011/04/27 16:54:44 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.69 2011/06/27 21:11:57 abcd Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -240,6 +240,9 @@
 _modify-cmakelists() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	# Only edit the files once
+	grep -qs "<<< Gentoo configuration >>>" CMakeLists.txt && return 0
+
 	# Comment out all set (<some_should_be_user_defined_variable> value)
 	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
 	find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
@@ -250,7 +253,7 @@
 		|| die "${LINENO}: failed to disable hardcoded settings"
 
 	# NOTE Append some useful summary here
-	cat >> CMakeLists.txt <<- _EOF_
+	cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_
 
 		MESSAGE(STATUS "<<< Gentoo configuration >>>
 		Build type      \${CMAKE_BUILD_TYPE}






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-07-18  9:08 Andreas HAttel (dilfridge)
  0 siblings, 0 replies; 75+ messages in thread
From: Andreas HAttel (dilfridge) @ 2011-07-18  9:08 UTC (permalink / raw
  To: gentoo-commits

dilfridge    11/07/18 09:08:21

  Modified:             cmake-utils.eclass
  Log:
  Add CMAKE_REMOVE_MODULES feature to force use of patched system cmake modules where packages bring their own

Revision  Changes    Path
1.70                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.70&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.70&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.69&r2=1.70

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- cmake-utils.eclass	27 Jun 2011 21:11:57 -0000	1.69
+++ cmake-utils.eclass	18 Jul 2011 09:08:21 -0000	1.70
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.69 2011/06/27 21:11:57 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.70 2011/07/18 09:08:21 dilfridge Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -33,6 +33,17 @@
 # Specify the minimum required CMake version.  Default is 2.8.1
 CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
 
+# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
+# @DESCRIPTION:
+# Space-separated list of CMake modules that will be removed in $S during src_prepare, 
+# in order to force packages to use the system version.
+CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST:-FindBLAS FindLAPACK}"
+
+# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
+# @DESCRIPTION:
+# Do we want to remove anything? yes or whatever else for no
+CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
+
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
 	always)
@@ -271,6 +282,13 @@
 enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	[[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && {
+		local name
+		for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
+			find "${S}" -name ${name}.cmake -exec rm -v {} +
+		done
+	}
+
 	_check_build_dir
 
 	# check if CMakeLists.txt exist and if no then die






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-08-20 21:43 Andreas HAttel (dilfridge)
  0 siblings, 0 replies; 75+ messages in thread
From: Andreas HAttel (dilfridge) @ 2011-08-20 21:43 UTC (permalink / raw
  To: gentoo-commits

dilfridge    11/08/20 21:43:25

  Modified:             cmake-utils.eclass
  Log:
  When cmake tests fail, request that the full test log be attached to the bug

Revision  Changes    Path
1.71                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.71&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.71&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.70&r2=1.71

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- cmake-utils.eclass	18 Jul 2011 09:08:21 -0000	1.70
+++ cmake-utils.eclass	20 Aug 2011 21:43:25 -0000	1.71
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.70 2011/07/18 09:08:21 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.71 2011/08/20 21:43:25 dilfridge Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -439,7 +439,7 @@
 	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
 
 	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
-	ctest ${ctestargs} "$@" || die "Tests failed."
+	ctest ${ctestargs} "$@" || die "Tests failed. When you file a bug, please attach the following file: \n\t${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
 	popd > /dev/null
 }
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-08-21 21:19 Andreas HAttel (dilfridge)
  0 siblings, 0 replies; 75+ messages in thread
From: Andreas HAttel (dilfridge) @ 2011-08-21 21:19 UTC (permalink / raw
  To: gentoo-commits

dilfridge    11/08/21 21:19:08

  Modified:             cmake-utils.eclass
  Log:
  Add undocumented variable such that in case of test failures the test log is
  inserted into the build log. On request from Diego.

Revision  Changes    Path
1.72                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.72&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.72&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.71&r2=1.72

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- cmake-utils.eclass	20 Aug 2011 21:43:25 -0000	1.71
+++ cmake-utils.eclass	21 Aug 2011 21:19:08 -0000	1.72
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.71 2011/08/20 21:43:25 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.72 2011/08/21 21:19:08 dilfridge Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -439,7 +439,21 @@
 	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
 
 	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
-	ctest ${ctestargs} "$@" || die "Tests failed. When you file a bug, please attach the following file: \n\t${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
+
+	if ctest ${ctestargs} "$@" ; then
+		einfo "Tests succeeded."
+	else
+		if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then
+			# on request from Diego
+			eerror "Tests failed. Test log ${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log follows:"
+			eerror "--START TEST LOG--------------------------------------------------------------"
+			cat "${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
+			eerror "--END TEST LOG----------------------------------------------------------------"
+			die "Tests failed."
+		else
+			die "Tests failed. When you file a bug, please attach the following file: \n\t${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
+		fi
+	fi
 	popd > /dev/null
 }
 






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-08-27 20:30 Andreas HAttel (dilfridge)
  0 siblings, 0 replies; 75+ messages in thread
From: Andreas HAttel (dilfridge) @ 2011-08-27 20:30 UTC (permalink / raw
  To: gentoo-commits

dilfridge    11/08/27 20:30:39

  Modified:             cmake-utils.eclass
  Log:
  Raise required cmake version to current stable (and tree minimum), see also bug 379347

Revision  Changes    Path
1.74                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.74&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.74&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.73&r2=1.74

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- cmake-utils.eclass	22 Aug 2011 04:46:31 -0000	1.73
+++ cmake-utils.eclass	27 Aug 2011 20:30:39 -0000	1.74
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.73 2011/08/22 04:46:31 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.74 2011/08/27 20:30:39 dilfridge Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -28,8 +28,8 @@
 
 # @ECLASS-VARIABLE: CMAKE_MIN_VERSION
 # @DESCRIPTION:
-# Specify the minimum required CMake version.  Default is 2.8.1
-CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
+# Specify the minimum required CMake version.  Default is 2.8.4
+CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.4}"
 
 # @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
 # @DESCRIPTION:






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2011-10-06 13:33 Michael Haubenwallner (haubi)
  0 siblings, 0 replies; 75+ messages in thread
From: Michael Haubenwallner (haubi) @ 2011-10-06 13:33 UTC (permalink / raw
  To: gentoo-commits

haubi       11/10/06 13:33:51

  Modified:             cmake-utils.eclass
  Log:
  do not add extra runpath when EPREFIX is empty (bug#385839)

Revision  Changes    Path
1.76                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.76&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.76&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.75&r2=1.76

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- cmake-utils.eclass	29 Aug 2011 01:28:10 -0000	1.75
+++ cmake-utils.eclass	6 Oct 2011 13:33:51 -0000	1.76
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.75 2011/08/29 01:28:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.76 2011/10/06 13:33:51 haubi Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -320,7 +320,9 @@
 		SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
 	_EOF_
 
-	if use prefix; then
+	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+
+	if [[ ${EPREFIX} ]]; then
 		cat >> "${build_rules}" <<- _EOF_
 			# in Prefix we need rpath and must ensure cmake gets our default linker path
 			# right ... except for Darwin hosts
@@ -361,8 +363,6 @@
 		local mycmakeargs_local=("${mycmakeargs[@]}")
 	fi
 
-	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
-
 	# Common configure parameters (overridable)
 	# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
 	# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.






^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2012-12-03 10:33 Michal Gorny (mgorny)
  0 siblings, 0 replies; 75+ messages in thread
From: Michal Gorny (mgorny) @ 2012-12-03 10:33 UTC (permalink / raw
  To: gentoo-commits

mgorny      12/12/03 10:33:50

  Modified:             cmake-utils.eclass
  Log:
  Oops, forgot the sed.

Revision  Changes    Path
1.88                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.88&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.88&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.87&r2=1.88

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- cmake-utils.eclass	3 Dec 2012 09:29:09 -0000	1.87
+++ cmake-utils.eclass	3 Dec 2012 10:33:50 -0000	1.88
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.87 2012/12/03 09:29:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.88 2012/12/03 10:33:50 mgorny Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -170,16 +170,16 @@
 	else
 		# Respect both the old variable and the new one, depending
 		# on which one was set by the ebuild.
-		if [[ ! ${BUILD_DIR} && ${AUTOTOOLS_BUILD_DIR} ]]; then
-			eqawarn "The AUTOTOOLS_BUILD_DIR variable has been renamed to BUILD_DIR."
+		if [[ ! ${BUILD_DIR} && ${CMAKE_BUILD_DIR} ]]; then
+			eqawarn "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR."
 			eqawarn "Please migrate the ebuild to use the new one."
 
 			# In the next call, both variables will be set already
 			# and we'd have to know which one takes precedence.
-			_RESPECT_AUTOTOOLS_BUILD_DIR=1
+			_RESPECT_CMAKE_BUILD_DIR=1
 		fi
-		if [[ ${_RESPECT_AUTOTOOLS_BUILD_DIR} ]]; then
-			BUILD_DIR=${AUTOTOOLS_BUILD_DIR}
+		if [[ ${_RESPECT_CMAKE_BUILD_DIR} ]]; then
+			BUILD_DIR=${CMAKE_BUILD_DIR}
 		fi
 
 		: ${BUILD_DIR:=${WORKDIR}/${P}_build}





^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2013-01-17 20:18 Chris Reffett (creffett)
  0 siblings, 0 replies; 75+ messages in thread
From: Chris Reffett (creffett) @ 2013-01-17 20:18 UTC (permalink / raw
  To: gentoo-commits

creffett    13/01/17 20:18:28

  Modified:             cmake-utils.eclass
  Log:
  Bump CMAKE_MIN_VERSION to 2.8.8, required minimum for new KDE packages and nothing <2.8.9 in the tree anyway

Revision  Changes    Path
1.91                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.91&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.91&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.90&r2=1.91

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- cmake-utils.eclass	8 Dec 2012 15:58:47 -0000	1.90
+++ cmake-utils.eclass	17 Jan 2013 20:18:28 -0000	1.91
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.90 2012/12/08 15:58:47 kensington Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.91 2013/01/17 20:18:28 creffett Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -29,7 +29,7 @@
 # @ECLASS-VARIABLE: CMAKE_MIN_VERSION
 # @DESCRIPTION:
 # Specify the minimum required CMake version.  Default is 2.8.4
-CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.4}"
+CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.8}"
 
 # @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
 # @DESCRIPTION:





^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2013-06-13 21:16 Chris Reffett (creffett)
  0 siblings, 0 replies; 75+ messages in thread
From: Chris Reffett (creffett) @ 2013-06-13 21:16 UTC (permalink / raw
  To: gentoo-commits

creffett    13/06/13 21:16:53

  Modified:             cmake-utils.eclass
  Log:
  Add EAPI 0/1 deprecation warning to cmake-utils.eclass. Document mycmakeargs wrt bug 472618.

Revision  Changes    Path
1.95                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.95&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.95&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.94&r2=1.95

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- cmake-utils.eclass	7 Apr 2013 17:21:11 -0000	1.94
+++ cmake-utils.eclass	13 Jun 2013 21:16:53 -0000	1.95
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.94 2013/04/07 17:21:11 kensington Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.95 2013/06/13 21:16:53 creffett Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -65,7 +65,12 @@
 CMAKE_EXPF="src_compile src_test src_install"
 case ${EAPI:-0} in
 	2|3|4|5) CMAKE_EXPF+=" src_prepare src_configure" ;;
-	1|0) ;;
+	1|0) ewarn "EAPI 0 and 1 support is now deprecated."
+		ewarn "If you are the package maintainer, please"
+		ewarn "update this package to a newer EAPI."
+		ewarn "Support for EAPI 0-1 will be dropped at the beginning of July."
+    ;;
+	
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
 EXPORT_FUNCTIONS ${CMAKE_EXPF}
@@ -359,6 +364,20 @@
 	base_src_prepare
 }
 
+# @VARIABLE: mycmakeargs
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Optional cmake defines as a bash array. Should be defined before calling
+# src_configure.
+# @CODE
+# src_configure() {
+# 	local mycmakeargs=(
+# 		$(cmake-utils_use_with openconnect)
+# 	)
+# 	cmake-utils_src_configure
+# }
+
+
 enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 





^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2013-06-14 21:13 Chris Reffett (creffett)
  0 siblings, 0 replies; 75+ messages in thread
From: Chris Reffett (creffett) @ 2013-06-14 21:13 UTC (permalink / raw
  To: gentoo-commits

creffett    13/06/14 21:13:43

  Modified:             cmake-utils.eclass
  Log:
  Print out CATEGORY/PN and eclass name in cmake-utils deprecation warning, change from ewarn to eqawarn.

Revision  Changes    Path
1.96                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.96&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.96&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.95&r2=1.96

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- cmake-utils.eclass	13 Jun 2013 21:16:53 -0000	1.95
+++ cmake-utils.eclass	14 Jun 2013 21:13:43 -0000	1.96
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.95 2013/06/13 21:16:53 creffett Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.96 2013/06/14 21:13:43 creffett Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -65,10 +65,11 @@
 CMAKE_EXPF="src_compile src_test src_install"
 case ${EAPI:-0} in
 	2|3|4|5) CMAKE_EXPF+=" src_prepare src_configure" ;;
-	1|0) ewarn "EAPI 0 and 1 support is now deprecated."
-		ewarn "If you are the package maintainer, please"
-		ewarn "update this package to a newer EAPI."
-		ewarn "Support for EAPI 0-1 will be dropped at the beginning of July."
+	1|0) eqawarn "${CATEGORY}/${PF}: EAPI 0 and 1 support is now deprecated."
+		eqawarn "If you are the package maintainer, please"
+		eqawarn "update this package to a newer EAPI."
+		eqawarn "Support for EAPI 0-1 for 'cmake-utils.eclass'"
+		eqawarn "will be dropped at the beginning of July."
     ;;
 	
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;





^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2013-07-01 23:30 Chris Reffett (creffett)
  0 siblings, 0 replies; 75+ messages in thread
From: Chris Reffett (creffett) @ 2013-07-01 23:30 UTC (permalink / raw
  To: gentoo-commits

creffett    13/07/01 23:30:26

  Modified:             cmake-utils.eclass
  Log:
  Remove support from cmake-utils.eclass for EAPI 0/1, inline base.eclass functions.

Revision  Changes    Path
1.97                 eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.97&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.97&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.96&r2=1.97

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- cmake-utils.eclass	14 Jun 2013 21:13:43 -0000	1.96
+++ cmake-utils.eclass	1 Jul 2013 23:30:26 -0000	1.97
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.96 2013/06/14 21:13:43 creffett Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.97 2013/07/01 23:30:26 creffett Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -12,8 +12,7 @@
 # Original author: Zephyrus (zephyrus@mirach.it)
 # @BLURB: common ebuild functions for cmake-based packages
 # @DESCRIPTION:
-# The cmake-utils eclass is base.eclass(5) wrapper that makes creating ebuilds for
-# cmake-based packages much easier.
+# The cmake-utils eclass makes creating ebuilds for cmake-based packages much easier.
 # It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
 # builds (default), in-source builds and an implementation of the well-known use_enable
 # and use_with functions for CMake.
@@ -60,19 +59,14 @@
 		CMAKEDEPEND+="${WANT_CMAKE}? ( "
 		;;
 esac
-inherit toolchain-funcs multilib flag-o-matic base
+inherit toolchain-funcs multilib flag-o-matic eutils
 
 CMAKE_EXPF="src_compile src_test src_install"
 case ${EAPI:-0} in
 	2|3|4|5) CMAKE_EXPF+=" src_prepare src_configure" ;;
-	1|0) eqawarn "${CATEGORY}/${PF}: EAPI 0 and 1 support is now deprecated."
-		eqawarn "If you are the package maintainer, please"
-		eqawarn "update this package to a newer EAPI."
-		eqawarn "Support for EAPI 0-1 for 'cmake-utils.eclass'"
-		eqawarn "will be dropped at the beginning of July."
-    ;;
-	
-	*) die "Unknown EAPI, Bug eclass maintainers." ;;
+	1|0) eerror "cmake-utils no longer supports EAPI 0-1." && die
+	;;
+	*) die "Unknown EAPI, bug eclass maintainers." ;;
 esac
 EXPORT_FUNCTIONS ${CMAKE_EXPF}
 
@@ -258,8 +252,8 @@
 # @DESCRIPTION:
 # Based on use_enable. See ebuild(5).
 #
-# `cmake-utils_use_find_package foo FOO` echoes -DCMAKE_DISABLE_FIND_PACKAGE=OFF
-# if foo is enabled and -DCMAKE_DISABLE_FIND_PACKAGE=ON if it is disabled.
+# `cmake-utils_use_find_package foo LibFoo` echoes -DCMAKE_DISABLE_FIND_PACKAGE_LibFoo=OFF
+# if foo is enabled and -DCMAKE_DISABLE_FIND_PACKAGE_LibFoo=ON if it is disabled.
 # This can be used to make find_package optional (since cmake-2.8.6).
 cmake-utils_use_find_package() { _use_me_now_inverted CMAKE_DISABLE_FIND_PACKAGE_ "$@" ; }
 
@@ -362,7 +356,16 @@
 enable_cmake-utils_src_prepare() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	base_src_prepare
+    debug-print "$FUNCNAME: PATCHES=$PATCHES"
+
+    pushd "${S}" > /dev/null
+    [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
+		
+	debug-print "$FUNCNAME: applying user patches"
+    epatch_user
+
+    popd > /dev/null
+
 }
 
 # @VARIABLE: mycmakeargs
@@ -552,12 +555,26 @@
 
 	_check_build_dir
 	pushd "${BUILD_DIR}" > /dev/null
-
 	DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" || die "died running ${CMAKE_MAKEFILE_GENERATOR} install"
-	base_src_install_docs
-
 	popd > /dev/null
 
+	pushd "${S}" > /dev/null
+    #Install docs, copied from base_src_install_docs
+	local x
+
+    if [[ "$(declare -p DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
+        for x in "${DOCS[@]}"; do
+            debug-print "$FUNCNAME: docs: creating document from ${x}"
+            dodoc "${x}" || die "dodoc failed"
+        done
+    fi
+    if [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
+        for x in "${HTML_DOCS[@]}"; do
+            debug-print "$FUNCNAME: docs: creating html document from ${x}"
+            dohtml -r "${x}" || die "dohtml failed"
+        done
+    fi
+
 	# Backward compatibility, for non-array variables
 	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
 		dodoc ${DOCS} || die "dodoc failed"
@@ -565,6 +582,8 @@
 	if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
 		dohtml -r ${HTML_DOCS} || die "dohtml failed"
 	fi
+
+	popd > /dev/null
 }
 
 enable_cmake-utils_src_test() {





^ permalink raw reply	[flat|nested] 75+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass
@ 2014-02-08  1:42 Mike Frysinger (vapier)
  0 siblings, 0 replies; 75+ messages in thread
From: Mike Frysinger (vapier) @ 2014-02-08  1:42 UTC (permalink / raw
  To: gentoo-commits

vapier      14/02/08 01:42:44

  Modified:             cmake-utils.eclass
  Log:
  fix broken whitespace -- no functional changes

Revision  Changes    Path
1.103                eclass/cmake-utils.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.103&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?rev=1.103&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cmake-utils.eclass?r1=1.102&r2=1.103

Index: cmake-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- cmake-utils.eclass	25 Jan 2014 04:07:04 -0000	1.102
+++ cmake-utils.eclass	8 Feb 2014 01:42:44 -0000	1.103
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.102 2014/01/25 04:07:04 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.103 2014/02/08 01:42:44 vapier Exp $
 
 # @ECLASS: cmake-utils.eclass
 # @MAINTAINER:
@@ -372,16 +372,15 @@
 enable_cmake-utils_src_prepare() {
 	debug-print-function ${FUNCNAME} "$@"
 
-    debug-print "$FUNCNAME: PATCHES=$PATCHES"
+	debug-print "$FUNCNAME: PATCHES=$PATCHES"
 
-    pushd "${S}" > /dev/null
-    [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
-		
-	debug-print "$FUNCNAME: applying user patches"
-    epatch_user
+	pushd "${S}" >/dev/null
+	[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
 
-    popd > /dev/null
+	debug-print "$FUNCNAME: applying user patches"
+	epatch_user
 
+	popd >/dev/null
 }
 
 # @VARIABLE: mycmakeargs
@@ -509,11 +508,11 @@
 		"${MYCMAKEARGS}"
 	)
 
-	pushd "${BUILD_DIR}" > /dev/null
+	pushd "${BUILD_DIR}" >/dev/null
 	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
 	echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
 	"${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
-	popd > /dev/null
+	popd >/dev/null
 }
 
 enable_cmake-utils_src_compile() {
@@ -591,37 +590,37 @@
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${BUILD_DIR}" > /dev/null
+	pushd "${BUILD_DIR}" >/dev/null
 
 	${CMAKE_MAKEFILE_GENERATOR}_src_make $@
 
-	popd > /dev/null
+	popd >/dev/null
 }
 
 enable_cmake-utils_src_install() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${BUILD_DIR}" > /dev/null
+	pushd "${BUILD_DIR}" >/dev/null
 	DESTDIR="${D}" ${CMAKE_MAKEFILE_GENERATOR} install "$@" || die "died running ${CMAKE_MAKEFILE_GENERATOR} install"
-	popd > /dev/null
+	popd >/dev/null
 
-	pushd "${S}" > /dev/null
-    #Install docs, copied from base_src_install_docs
+	pushd "${S}" >/dev/null
+	# Install docs, copied from base_src_install_docs
 	local x
 
-    if [[ "$(declare -p DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
-        for x in "${DOCS[@]}"; do
-            debug-print "$FUNCNAME: docs: creating document from ${x}"
-            dodoc "${x}" || die "dodoc failed"
-        done
-    fi
-    if [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
-        for x in "${HTML_DOCS[@]}"; do
-            debug-print "$FUNCNAME: docs: creating html document from ${x}"
-            dohtml -r "${x}" || die "dohtml failed"
-        done
-    fi
+	if [[ "$(declare -p DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
+		for x in "${DOCS[@]}"; do
+			debug-print "$FUNCNAME: docs: creating document from ${x}"
+			dodoc "${x}" || die "dodoc failed"
+		done
+	fi
+	if [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" == "declare -a"* ]]; then
+		for x in "${HTML_DOCS[@]}"; do
+			debug-print "$FUNCNAME: docs: creating html document from ${x}"
+			dohtml -r "${x}" || die "dohtml failed"
+		done
+	fi
 
 	# Backward compatibility, for non-array variables
 	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
@@ -631,21 +630,21 @@
 		dohtml -r ${HTML_DOCS} || die "dohtml failed"
 	fi
 
-	popd > /dev/null
+	popd >/dev/null
 }
 
 enable_cmake-utils_src_test() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
-	pushd "${BUILD_DIR}" > /dev/null
+	pushd "${BUILD_DIR}" >/dev/null
 	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
 
 	[[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure )
 
 	if ctest "${myctestargs[@]}" "$@" ; then
 		einfo "Tests succeeded."
-		popd > /dev/null
+		popd >/dev/null
 		return 0
 	else
 		if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then
@@ -660,7 +659,7 @@
 		fi
 
 		# die might not die due to nonfatal
-		popd > /dev/null
+		popd >/dev/null
 		return 1
 	fi
 }





^ permalink raw reply	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2014-02-08  1:42 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18 10:49 [gentoo-commits] gentoo-x86 commit in eclass: cmake-utils.eclass Zac Medico (zmedico)
  -- strict thread matches above, loose matches on Subject: below --
2014-02-08  1:42 Mike Frysinger (vapier)
2013-07-01 23:30 Chris Reffett (creffett)
2013-06-14 21:13 Chris Reffett (creffett)
2013-06-13 21:16 Chris Reffett (creffett)
2013-01-17 20:18 Chris Reffett (creffett)
2012-12-03 10:33 Michal Gorny (mgorny)
2011-10-06 13:33 Michael Haubenwallner (haubi)
2011-08-27 20:30 Andreas HAttel (dilfridge)
2011-08-21 21:19 Andreas HAttel (dilfridge)
2011-08-20 21:43 Andreas HAttel (dilfridge)
2011-07-18  9:08 Andreas HAttel (dilfridge)
2011-06-27 21:11 Jonathan Callen (abcd)
2011-04-27 16:54 Tomas Chvatal (scarabeus)
2011-03-18 19:45 Tomas Chvatal (scarabeus)
2011-01-26 20:51 Tomas Chvatal (scarabeus)
2011-01-20  0:48 Maciej Mrozowski (reavertm)
2011-01-19 12:44 Tomas Chvatal (scarabeus)
2011-01-13 19:17 Fabian Groffen (grobian)
2010-12-30 14:23 Theo Chatzimichos (tampakrap)
2010-12-16 14:36 Tomas Chvatal (scarabeus)
2010-10-13 16:40 Tomas Chvatal (scarabeus)
2010-09-16 16:04 Maciej Mrozowski (reavertm)
2010-08-13  5:02 Maciej Mrozowski (reavertm)
2010-08-12 19:27 Maciej Mrozowski (reavertm)
2010-07-14 15:48 Tomas Chvatal (scarabeus)
2010-07-09 16:31 Maciej Mrozowski (reavertm)
2010-06-26 17:55 Maciej Mrozowski (reavertm)
2010-06-21 16:39 Maciej Mrozowski (reavertm)
2010-05-27  2:44 Maciej Mrozowski (reavertm)
2010-04-30 23:58 Jonathan Callen (abcd)
2010-04-30 23:41 Jonathan Callen (abcd)
2010-04-10  2:20 Maciej Mrozowski (reavertm)
2010-03-24 21:09 Robin H. Johnson (robbat2)
2010-02-11 18:00 Samuli Suominen (ssuominen)
2010-02-11 17:41 Denis Dupeyron (calchan)
2010-01-20  2:55 Jonathan Callen (abcd)
2010-01-20  2:54 Jonathan Callen (abcd)
2010-01-11 17:02 Tomas Chvatal (scarabeus)
2010-01-10 22:17 Tomas Chvatal (scarabeus)
2009-12-23  0:32 Jonathan Callen (abcd)
2009-12-22 22:52 Tomas Chvatal (scarabeus)
2009-12-10 19:58 Jonathan Callen (abcd)
2009-10-27 21:20 Michael Sterrett (mr_bones_)
2009-10-27 14:30 Tomas Chvatal (scarabeus)
2009-10-16 12:24 Samuli Suominen (ssuominen)
2009-08-08 20:08 Arfrever Frehtes Taifersar Arahesis (arfrever)
2009-06-17 22:39 Tomas Chvatal (scarabeus)
2009-05-29  8:06 Tomas Chvatal (scarabeus)
2009-05-27 14:34 Tomas Chvatal (scarabeus)
2009-05-08 10:54 Tomas Chvatal (scarabeus)
2009-04-11 19:44 Tomas Chvatal (scarabeus)
2009-04-10 20:24 Tomas Chvatal (scarabeus)
2009-04-04 12:28 Tomas Chvatal (scarabeus)
2009-03-19  9:12 Tomas Chvatal (scarabeus)
2009-03-15 16:54 Tomas Chvatal (scarabeus)
2009-03-14 11:14 Tomas Chvatal (scarabeus)
2009-03-12  8:45 Christian Faulhammer (fauli)
2009-03-11 16:22 Tomas Chvatal (scarabeus)
2009-03-10 23:22 Tomas Chvatal (scarabeus)
2008-12-24 15:41 Tomas Chvatal (scarabeus)
2008-11-05 20:59 Tomas Chvatal (scarabeus)
2008-10-28 17:39 Tomas Chvatal (scarabeus)
2008-10-27 14:38 Mike Frysinger (vapier)
2008-10-27  5:36 Mike Frysinger (vapier)
2008-09-28 18:52 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2008-09-28 16:19 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2008-04-23 11:55 Ingmar Vanhassel (ingmar)
2008-03-29 21:33 Wulf Krueger (philantrop)
2008-02-20 14:33 Bo Oersted Andresen (zlin)
2008-02-20  0:35 Bo Oersted Andresen (zlin)
2007-12-13 16:23 Petteri Raty (betelgeuse)
2007-12-06 20:40 Wulf Krueger (philantrop)
2007-11-11 20:02 Wulf Krueger (philantrop)
2007-11-04 13:17 Wulf Krueger (philantrop)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox