public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-misc/mirall/files: mirall-1.2.0_beta2-automagicness.patch
@ 2013-01-22 20:55 Chris Reffett (creffett)
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Reffett (creffett) @ 2013-01-22 20:55 UTC (permalink / raw
  To: gentoo-commits

creffett    13/01/22 20:55:01

  Added:                mirall-1.2.0_beta2-automagicness.patch
  Log:
  Version bump. Add patch to fix some automagicness.
  
  (Portage version: 2.2.0_alpha159/cvs/Linux x86_64, signed Manifest commit with key 42618354)

Revision  Changes    Path
1.1                  net-misc/mirall/files/mirall-1.2.0_beta2-automagicness.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/mirall/files/mirall-1.2.0_beta2-automagicness.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/mirall/files/mirall-1.2.0_beta2-automagicness.patch?rev=1.1&content-type=text/plain

Index: mirall-1.2.0_beta2-automagicness.patch
===================================================================
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,4 +1,5 @@
-if(SPHINX_FOUND)
+macro_optional_find_package(Sphinx)
+if(WITH_SPHINX AND SPHINX_FOUND)
 
     # Sphinx cache with pickled ReST documents
     set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
@@ -63,1 +64,1 @@
-endif(SPHINX_FOUND)
+endif(WITH_SPHINX AND SPHINX_FOUND)
--- a/cmake/modules/MacroOptionalFindPackage.cmake
+++ b/cmake/modules/MacroOptionalFindPackage.cmake
@@ -0,0 +1,47 @@
+# - 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
@@ -3,6 +3,7 @@
 project(mirall)
 set(PACKAGE "mirall")
 set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
+include(MacroOptionalFindPackage)
 
 if ( DEFINED OEM_THEME_DIR AND EXISTS ${OEM_THEME_DIR}/OEM.cmake )
      include ( ${OEM_THEME_DIR}/OEM.cmake )





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

* [gentoo-commits] gentoo-x86 commit in net-misc/mirall/files: mirall-1.2.0_beta2-automagicness.patch
@ 2013-04-15 17:43 Michael Palimaka (kensington)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Palimaka (kensington) @ 2013-04-15 17:43 UTC (permalink / raw
  To: gentoo-commits

kensington    13/04/15 17:43:11

  Removed:              mirall-1.2.0_beta2-automagicness.patch
  Log:
  Version bump wrt bug #464612. Remove old.
  
  (Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 675D0D2C)


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

end of thread, other threads:[~2013-04-15 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15 17:43 [gentoo-commits] gentoo-x86 commit in net-misc/mirall/files: mirall-1.2.0_beta2-automagicness.patch Michael Palimaka (kensington)
  -- strict thread matches above, loose matches on Subject: below --
2013-01-22 20:55 Chris Reffett (creffett)

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