* [gentoo-commits] gentoo-x86 commit in net-misc/csync/files: csync-automagicness.patch
@ 2012-08-28 12:25 99% Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 1+ results
From: Tomas Chvatal (scarabeus) @ 2012-08-28 12:25 UTC (permalink / raw
To: gentoo-commits
scarabeus 12/08/28 12:25:19
Added: csync-automagicness.patch
Log:
Add csync package required for miral owncloud service.
(Portage version: 2.2.0_alpha123/cvs/Linux x86_64)
Revision Changes Path
1.1 net-misc/csync/files/csync-automagicness.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/csync/files/csync-automagicness.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/csync/files/csync-automagicness.patch?rev=1.1&content-type=text/plain
Index: csync-automagicness.patch
===================================================================
diff -urN csync-0.50.8.old/cmake/Modules/MacroOptionalFindPackage.cmake csync-0.50.8/cmake/Modules/MacroOptionalFindPackage.cmake
--- csync-0.50.8.old/cmake/Modules/MacroOptionalFindPackage.cmake 1970-01-01 01:00:00.000000000 +0100
+++ csync-0.50.8/cmake/Modules/MacroOptionalFindPackage.cmake 2012-08-28 13:35:55.312298632 +0200
@@ -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)
+
diff -urN csync-0.50.8.old/CMakeLists.txt csync-0.50.8/CMakeLists.txt
--- csync-0.50.8.old/CMakeLists.txt 2012-08-28 13:35:05.005298638 +0200
+++ csync-0.50.8/CMakeLists.txt 2012-08-28 13:42:05.150298588 +0200
@@ -38,9 +38,10 @@
# add macros
include(MacroAddPlugin)
include(MacroCopyFile)
+include(MacroOptionalFindPackage)
-find_package(Log4C)
-if(NOT LOG4C_FOUND)
+macro_optional_find_package(Log4C)
+if(NOT WITH_Log4C)
set(WITH_LOG4C FALSE)
endif()
@@ -64,11 +65,11 @@
add_subdirectory(config)
add_subdirectory(doc)
-find_package(Check)
-if (CHECK_FOUND)
- include(MacroAddCheckTest)
-endif (CHECK_FOUND)
if (UNIT_TESTING)
+ find_package(Check)
+ if (CHECK_FOUND)
+ include(MacroAddCheckTest)
+ endif (CHECK_FOUND)
add_subdirectory(tests)
-endif(UNIT_TESTING)
+endif (UNIT_TESTING)
diff -urN csync-0.50.8.old/DefineOptions.cmake csync-0.50.8/DefineOptions.cmake
--- csync-0.50.8.old/DefineOptions.cmake 2012-08-28 13:35:05.004298638 +0200
+++ csync-0.50.8/DefineOptions.cmake 2012-08-28 13:41:44.838298591 +0200
@@ -1,4 +1,3 @@
-option(WITH_LOG4C "Build csync without log4c" ON)
option(UNIT_TESTING "Build with unit tests" OFF)
option(MEM_NULL_TESTS "Enable NULL memory testing" OFF)
option(LOG_TO_CALLBACK "Enable extended logging through a callback" OFF)
diff -urN csync-0.50.8.old/doc/CMakeLists.txt csync-0.50.8/doc/CMakeLists.txt
--- csync-0.50.8.old/doc/CMakeLists.txt 2012-08-28 13:35:05.004298638 +0200
+++ csync-0.50.8/doc/CMakeLists.txt 2012-08-28 13:38:05.055298617 +0200
@@ -2,7 +2,10 @@
# Build the documentation
#
-include(UseDoxygen OPTIONAL)
+option(WITH_APIDOC "Use doxygen to generate documentation" ON)
+if (WITH_APIDOC)
+ include(UseDoxygen OPTIONAL)
+endif (WITH_APIDOC)
file(GLOB _manpages *.[0-9].txt)
add_custom_target(man
diff -urN csync-0.50.8.old/modules/CMakeLists.txt csync-0.50.8/modules/CMakeLists.txt
--- csync-0.50.8.old/modules/CMakeLists.txt 2012-08-28 13:35:05.003298638 +0200
+++ csync-0.50.8/modules/CMakeLists.txt 2012-08-28 13:40:25.254298600 +0200
@@ -1,8 +1,8 @@
project(modules C)
-find_package(Libsmbclient)
-find_package(LibSSH 0.4.0)
-find_package(Neon)
+macro_optional_find_package(Libsmbclient)
+macro_optional_find_package(LibSSH 0.4.0)
+macro_optional_find_package(Neon)
set(PLUGIN_VERSION_INSTALL_DIR "${PLUGIN_INSTALL_DIR}-${LIBRARY_SOVERSION}")
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-08-28 12:25 99% [gentoo-commits] gentoo-x86 commit in net-misc/csync/files: csync-automagicness.patch Tomas Chvatal (scarabeus)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox