+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-multilib
-
-DESCRIPTION="A unit testing framework for C"
-HOMEPAGE="http://cmocka.org/"
-SRC_URI="https://open.cryptomilk.org/attachments/download/19/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="doc static-libs test"
-
-DEPEND="
- doc? ( app-doc/doxygen[latex] )
-"
-RDEPEND=""
-
-PATCHES=( "${FILESDIR}/${PN}-automagicness.patch" )
-
-multilib_src_configure() {
- local mycmakeargs=(
- $(cmake-utils_use_with static-libs STATIC_LIB)
- $(cmake-utils_use test UNIT_TESTING)
- $(multilib_is_native_abi && cmake-utils_use_with doc APIDOC \
- || echo -DWITH_APIDOC=OFF)
- )
- cmake-utils_src_configure
-}
-
-multilib_src_install() {
- if multilib_is_native_abi && use doc; then
- pushd doc || die
- doxygen doxy.config || die
- rm -f html/*.md5 latex/*.md5 latex/Manifest man/man3/_* || die
- dohtml html/*
- dodoc latex/*
- doman man/man3/*.3
- popd || die
- fi
- cmake-utils_src_install
-}
+++ /dev/null
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils
-DESCRIPTION="A unit testing framework for C"
-HOMEPAGE="http://cmocka.org/"
-SRC_URI="https://open.cryptomilk.org/attachments/download/19/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~hppa ppc ppc64 ~s390 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="doc static-libs test"
-
-DEPEND="
- doc? ( app-doc/doxygen[latex] )
-"
-RDEPEND=""
-
-PATCHES=( "${FILESDIR}/${PN}-automagicness.patch" )
-
-src_configure() {
- local mycmakeargs=(
- $(cmake-utils_use_with static-libs STATIC_LIB)
- $(cmake-utils_use test UNIT_TESTING)
- $(cmake-utils_use_with doc APIDOC)
- )
- cmake-utils_src_configure
-}
-
-src_install() {
- if use doc; then
- pushd "${BUILD_DIR}/doc/"
- doxygen doxy.config
- rm html/*.md5 latex/*.md5 latex/Manifest man/man3/_*
- dohtml html/*
- dodoc latex/*
- doman man/man3/*.3
- popd
- fi
- cmake-utils_src_install
-}
+++ /dev/null
---- a/cmake/Modules/MacroOptionalFindPackage.cmake
-+++ b/cmake/Modules/MacroOptionalFindPackage.cmake
-@@ -0,0 +1,48 @@
-+# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
-+# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
-+# This macro is a combination of OPTION() and FIND_PACKAGE(), it
-+# works like FIND_PACKAGE(), but additionally it automatically creates
-+# an option name WITH_<name>, which can be disabled via the cmake GUI.
-+# or via -DWITH_<name>=OFF
-+# The standard <name>_FOUND variables can be used in the same way
-+# as when using the normal FIND_PACKAGE()
-+
-+# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-+
-+# This is just a helper macro to set a bunch of variables empty.
-+# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
-+macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
-+ if(DEFINED ${_name}_${_var})
-+ set(${_name}_${_var} "")
-+ endif(DEFINED ${_name}_${_var})
-+
-+ string(TOUPPER ${_name} _nameUpper)
-+ if(DEFINED ${_nameUpper}_${_var})
-+ set(${_nameUpper}_${_var} "")
-+ endif(DEFINED ${_nameUpper}_${_var})
-+endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
-+
-+
-+macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
-+ option(WITH_${_name} "Search for ${_name} package" ON)
-+ if (WITH_${_name})
-+ find_package(${_name} ${ARGN})
-+ else (WITH_${_name})
-+ string(TOUPPER ${_name} _nameUpper)
-+ set(${_name}_FOUND FALSE)
-+ set(${_nameUpper}_FOUND FALSE)
-+
-+ _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
-+ _mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
-+ _mofp_set_empty_if_defined(${_name} INCLUDES)
-+ _mofp_set_empty_if_defined(${_name} LIBRARY)
-+ _mofp_set_empty_if_defined(${_name} LIBRARIES)
-+ _mofp_set_empty_if_defined(${_name} LIBS)
-+ _mofp_set_empty_if_defined(${_name} FLAGS)
-+ _mofp_set_empty_if_defined(${_name} DEFINITIONS)
-+ endif (WITH_${_name})
-+endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
-+
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -34,7 +34,7 @@
- include(DefineInstallationPaths)
- include(DefineOptions.cmake)
- include(CPackConfig.cmake)
--
-+include(MacroOptionalFindPackage)
- if (UNIT_TESTING)
- include(AddCMockaTest)
- endif (UNIT_TESTING)
---- a/doc/CMakeLists.txt
-+++ b/doc/CMakeLists.txt
-@@ -1,5 +1,7 @@
- #
- # Build the documentation
- #
--include(UseDoxygen OPTIONAL)
--
-+option(WITH_APIDOC "Use doxygen to generate documentation" ON)
-+if (WITH_APIDOC)
-+ include(UseDoxygen OPTIONAL)
-+endif (WITH_APIDOC)