public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Chris Reffett" <geekboy72@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: dev-util/cmocka/files/, dev-util/cmocka/
Date: Fri, 30 Nov 2012 04:49:30 +0000 (UTC)	[thread overview]
Message-ID: <1354250766.d7c0aff761c022b2e146b3fee7702d800e2069b0.creffett@gentoo> (raw)

commit:     d7c0aff761c022b2e146b3fee7702d800e2069b0
Author:     Chris Reffett <creffett <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 30 04:46:06 2012 +0000
Commit:     Chris Reffett <geekboy72 <AT> gmail <DOT> com>
CommitDate: Fri Nov 30 04:46:06 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d7c0aff7

[dev-util/cmocka] New package (live and snapshot), needed for csync tests

Package-Manager: portage-2.2.0_alpha142

---
 dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild    |   31 +++++++++
 dev-util/cmocka/cmocka-9999.ebuild               |   31 +++++++++
 dev-util/cmocka/files/cmocka-automagicness.patch |   74 ++++++++++++++++++++++
 dev-util/cmocka/metadata.xml                     |    9 +++
 4 files changed, 145 insertions(+), 0 deletions(-)

diff --git a/dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild b/dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild
new file mode 100644
index 0000000..ef5f527
--- /dev/null
+++ b/dev-util/cmocka/cmocka-0.2.0_p20121129.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit cmake-utils
+DESCRIPTION="The lightweight C unit testing library"
+HOMEPAGE="https://open.cryptomilk.org/projects/cmocka"
+SRC_URI="http://dev.gentoo.org/~creffett/distfiles/${P}.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc static-libs"
+
+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
+}

diff --git a/dev-util/cmocka/cmocka-9999.ebuild b/dev-util/cmocka/cmocka-9999.ebuild
new file mode 100644
index 0000000..0abf3ef
--- /dev/null
+++ b/dev-util/cmocka/cmocka-9999.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit cmake-utils git-2
+DESCRIPTION="The lightweight C unit testing library"
+HOMEPAGE="https://open.cryptomilk.org/projects/cmocka"
+EGIT_REPO_URI="git://git.cryptomilk.org/projects/cmocka.git"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc static-libs"
+
+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
+}

diff --git a/dev-util/cmocka/files/cmocka-automagicness.patch b/dev-util/cmocka/files/cmocka-automagicness.patch
new file mode 100644
index 0000000..29ece45
--- /dev/null
+++ b/dev-util/cmocka/files/cmocka-automagicness.patch
@@ -0,0 +1,74 @@
+--- 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)

diff --git a/dev-util/cmocka/metadata.xml b/dev-util/cmocka/metadata.xml
new file mode 100644
index 0000000..f017c11
--- /dev/null
+++ b/dev-util/cmocka/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+<maintainer>
+        <email>creffett@gentoo.org</email>
+        <name>Chris Reffett</name>
+</maintainer>
+</pkgmetadata>


             reply	other threads:[~2012-11-30  4:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  4:49 Chris Reffett [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-14 17:23 [gentoo-commits] proj/kde:master commit in: dev-util/cmocka/files/, dev-util/cmocka/ Chris Reffett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354250766.d7c0aff761c022b2e146b3fee7702d800e2069b0.creffett@gentoo \
    --to=geekboy72@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox