Gentoo Archives: gentoo-commits

From: Chris Reffett <geekboy72@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: dev-util/cmocka/files/, dev-util/cmocka/
Date: Fri, 30 Nov 2012 04:49:42
Message-Id: 1354250766.d7c0aff761c022b2e146b3fee7702d800e2069b0.creffett@gentoo
1 commit: d7c0aff761c022b2e146b3fee7702d800e2069b0
2 Author: Chris Reffett <creffett <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 30 04:46:06 2012 +0000
4 Commit: Chris Reffett <geekboy72 <AT> gmail <DOT> com>
5 CommitDate: Fri Nov 30 04:46:06 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d7c0aff7
7
8 [dev-util/cmocka] New package (live and snapshot), needed for csync tests
9
10 Package-Manager: portage-2.2.0_alpha142
11
12 ---
13 dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild | 31 +++++++++
14 dev-util/cmocka/cmocka-9999.ebuild | 31 +++++++++
15 dev-util/cmocka/files/cmocka-automagicness.patch | 74 ++++++++++++++++++++++
16 dev-util/cmocka/metadata.xml | 9 +++
17 4 files changed, 145 insertions(+), 0 deletions(-)
18
19 diff --git a/dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild b/dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild
20 new file mode 100644
21 index 0000000..ef5f527
22 --- /dev/null
23 +++ b/dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild
24 @@ -0,0 +1,31 @@
25 +# Copyright 1999-2012 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +# $Header: $
28 +
29 +EAPI=4
30 +
31 +inherit cmake-utils
32 +DESCRIPTION="The lightweight C unit testing library"
33 +HOMEPAGE="https://open.cryptomilk.org/projects/cmocka"
34 +SRC_URI="http://dev.gentoo.org/~creffett/distfiles/${P}.tar.xz"
35 +
36 +LICENSE="Apache-2.0"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~x86"
39 +IUSE="doc static-libs"
40 +
41 +DEPEND="
42 + doc? ( app-doc/doxygen[latex] )
43 +"
44 +RDEPEND=""
45 +
46 +PATCHES=( "${FILESDIR}/${PN}-automagicness.patch" )
47 +
48 +src_configure() {
49 + local mycmakeargs=(
50 + $(cmake-utils_use_with static-libs STATIC_LIB)
51 + $(cmake-utils_use test UNIT_TESTING)
52 + $(cmake-utils_use_with doc APIDOC)
53 + )
54 + cmake-utils_src_configure
55 +}
56
57 diff --git a/dev-util/cmocka/cmocka-9999.ebuild b/dev-util/cmocka/cmocka-9999.ebuild
58 new file mode 100644
59 index 0000000..0abf3ef
60 --- /dev/null
61 +++ b/dev-util/cmocka/cmocka-9999.ebuild
62 @@ -0,0 +1,31 @@
63 +# Copyright 1999-2012 Gentoo Foundation
64 +# Distributed under the terms of the GNU General Public License v2
65 +# $Header: $
66 +
67 +EAPI=4
68 +
69 +inherit cmake-utils git-2
70 +DESCRIPTION="The lightweight C unit testing library"
71 +HOMEPAGE="https://open.cryptomilk.org/projects/cmocka"
72 +EGIT_REPO_URI="git://git.cryptomilk.org/projects/cmocka.git"
73 +
74 +LICENSE="Apache-2.0"
75 +SLOT="0"
76 +KEYWORDS=""
77 +IUSE="doc static-libs"
78 +
79 +DEPEND="
80 + doc? ( app-doc/doxygen[latex] )
81 +"
82 +RDEPEND=""
83 +
84 +PATCHES=( "${FILESDIR}/${PN}-automagicness.patch" )
85 +
86 +src_configure() {
87 + local mycmakeargs=(
88 + $(cmake-utils_use_with static-libs STATIC_LIB)
89 + $(cmake-utils_use test UNIT_TESTING)
90 + $(cmake-utils_use_with doc APIDOC)
91 + )
92 + cmake-utils_src_configure
93 +}
94
95 diff --git a/dev-util/cmocka/files/cmocka-automagicness.patch b/dev-util/cmocka/files/cmocka-automagicness.patch
96 new file mode 100644
97 index 0000000..29ece45
98 --- /dev/null
99 +++ b/dev-util/cmocka/files/cmocka-automagicness.patch
100 @@ -0,0 +1,74 @@
101 +--- a/cmake/Modules/MacroOptionalFindPackage.cmake
102 ++++ b/cmake/Modules/MacroOptionalFindPackage.cmake
103 +@@ -0,0 +1,48 @@
104 ++# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
105 ++# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
106 ++# This macro is a combination of OPTION() and FIND_PACKAGE(), it
107 ++# works like FIND_PACKAGE(), but additionally it automatically creates
108 ++# an option name WITH_<name>, which can be disabled via the cmake GUI.
109 ++# or via -DWITH_<name>=OFF
110 ++# The standard <name>_FOUND variables can be used in the same way
111 ++# as when using the normal FIND_PACKAGE()
112 ++
113 ++# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@×××.org>
114 ++#
115 ++# Redistribution and use is allowed according to the terms of the BSD license.
116 ++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
117 ++
118 ++# This is just a helper macro to set a bunch of variables empty.
119 ++# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
120 ++macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
121 ++ if(DEFINED ${_name}_${_var})
122 ++ set(${_name}_${_var} "")
123 ++ endif(DEFINED ${_name}_${_var})
124 ++
125 ++ string(TOUPPER ${_name} _nameUpper)
126 ++ if(DEFINED ${_nameUpper}_${_var})
127 ++ set(${_nameUpper}_${_var} "")
128 ++ endif(DEFINED ${_nameUpper}_${_var})
129 ++endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
130 ++
131 ++
132 ++macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
133 ++ option(WITH_${_name} "Search for ${_name} package" ON)
134 ++ if (WITH_${_name})
135 ++ find_package(${_name} ${ARGN})
136 ++ else (WITH_${_name})
137 ++ string(TOUPPER ${_name} _nameUpper)
138 ++ set(${_name}_FOUND FALSE)
139 ++ set(${_nameUpper}_FOUND FALSE)
140 ++
141 ++ _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
142 ++ _mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
143 ++ _mofp_set_empty_if_defined(${_name} INCLUDES)
144 ++ _mofp_set_empty_if_defined(${_name} LIBRARY)
145 ++ _mofp_set_empty_if_defined(${_name} LIBRARIES)
146 ++ _mofp_set_empty_if_defined(${_name} LIBS)
147 ++ _mofp_set_empty_if_defined(${_name} FLAGS)
148 ++ _mofp_set_empty_if_defined(${_name} DEFINITIONS)
149 ++ endif (WITH_${_name})
150 ++endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
151 ++
152 +--- a/CMakeLists.txt
153 ++++ b/CMakeLists.txt
154 +@@ -34,7 +34,7 @@
155 + include(DefineInstallationPaths)
156 + include(DefineOptions.cmake)
157 + include(CPackConfig.cmake)
158 +-
159 ++include(MacroOptionalFindPackage)
160 + if (UNIT_TESTING)
161 + include(AddCMockaTest)
162 + endif (UNIT_TESTING)
163 +--- a/doc/CMakeLists.txt
164 ++++ b/doc/CMakeLists.txt
165 +@@ -1,5 +1,7 @@
166 + #
167 + # Build the documentation
168 + #
169 +-include(UseDoxygen OPTIONAL)
170 +-
171 ++option(WITH_APIDOC "Use doxygen to generate documentation" ON)
172 ++if (WITH_APIDOC)
173 ++ include(UseDoxygen OPTIONAL)
174 ++endif (WITH_APIDOC)
175
176 diff --git a/dev-util/cmocka/metadata.xml b/dev-util/cmocka/metadata.xml
177 new file mode 100644
178 index 0000000..f017c11
179 --- /dev/null
180 +++ b/dev-util/cmocka/metadata.xml
181 @@ -0,0 +1,9 @@
182 +<?xml version="1.0" encoding="UTF-8"?>
183 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
184 +<pkgmetadata>
185 +<herd>kde</herd>
186 +<maintainer>
187 + <email>creffett@g.o</email>
188 + <name>Chris Reffett</name>
189 +</maintainer>
190 +</pkgmetadata>