Hello community,

here is the log from the commit of package soprano for openSUSE:Factory checked 
in at 2011-11-14 13:45:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/soprano (Old)
 and      /work/SRC/openSUSE:Factory/.soprano.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "soprano", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/soprano/soprano-backend-sesame.changes   
2011-10-27 12:13:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.soprano.new/soprano-backend-sesame.changes      
2011-11-14 13:46:00.000000000 +0100
@@ -1,0 +2,9 @@
+Sat Nov  5 17:54:54 UTC 2011 - [email protected]
+
+- Update to 2.7.3:
+  * Added new signal in the Virtuoso backend which signals when the server goes
+    down.
+  * Soprano can be built with cmake 2.6.4 again.
+- Removed 2_7_BRANCH.diff patch (included in the package).
+
+-------------------------------------------------------------------
soprano-backend-virtuoso.changes: same change
soprano.changes: same change

Old:
----
  2_7_BRANCH.diff
  soprano-2.7.2.tar.bz2

New:
----
  soprano-2.7.3.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ soprano-backend-sesame.spec ++++++
--- /var/tmp/diff_new_pack.FOUMmt/_old  2011-11-14 13:46:02.000000000 +0100
+++ /var/tmp/diff_new_pack.FOUMmt/_new  2011-11-14 13:46:02.000000000 +0100
@@ -22,13 +22,12 @@
 License:        LGPL-2.1+
 # COMMON1-BEGIN
 # COMMON1-BEGIN
-Version:        2.7.2
+Version:        2.7.3
 Release:        1
 Url:            http://soprano.sourceforge.net/
 Group:          System/Libraries
 Source0:        
http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2
 Source100:      baselibs.conf
-Patch0:         2_7_BRANCH.diff
 BuildRequires:  clucene-core-devel
 BuildRequires:  cmake
 BuildRequires:  doxygen
@@ -57,7 +56,6 @@
 # COMMON2-BEGIN
 # COMMON2-BEGIN
 %setup -q -n soprano-%{version}
-%patch0 -p1
 # COMMON2-END
 # COMMON2-END
 

++++++ soprano-backend-virtuoso.spec ++++++
--- /var/tmp/diff_new_pack.FOUMmt/_old  2011-11-14 13:46:02.000000000 +0100
+++ /var/tmp/diff_new_pack.FOUMmt/_new  2011-11-14 13:46:02.000000000 +0100
@@ -22,13 +22,12 @@
 License:        GPL-2.0+
 # COMMON1-BEGIN
 # COMMON1-BEGIN
-Version:        2.7.2
+Version:        2.7.3
 Release:        1
 Url:            http://soprano.sourceforge.net/
 Group:          System/Libraries
 Source0:        
http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2
 Source100:      baselibs.conf
-Patch0:         2_7_BRANCH.diff
 BuildRequires:  clucene-core-devel
 BuildRequires:  cmake
 BuildRequires:  doxygen
@@ -57,7 +56,6 @@
 # COMMON2-BEGIN
 # COMMON2-BEGIN
 %setup -q -n soprano-%{version}
-%patch0 -p1
 # COMMON2-END
 # COMMON2-END
 

++++++ soprano.spec ++++++
--- /var/tmp/diff_new_pack.FOUMmt/_old  2011-11-14 13:46:02.000000000 +0100
+++ /var/tmp/diff_new_pack.FOUMmt/_new  2011-11-14 13:46:02.000000000 +0100
@@ -21,13 +21,12 @@
 Summary:        C++/Qt based interface library for RDF
 License:        LGPL-2.1+ and GPL-2.0+
 # COMMON1-BEGIN
-Version:        2.7.2
+Version:        2.7.3
 Release:        1
 Url:            http://soprano.sourceforge.net/
 Group:          System/Libraries
 Source0:        
http://downloads.sourceforge.net/soprano/soprano-%{version}.tar.bz2
 Source100:      baselibs.conf
-Patch0:         2_7_BRANCH.diff
 BuildRequires:  clucene-core-devel
 BuildRequires:  cmake
 BuildRequires:  doxygen
@@ -56,7 +55,6 @@
 %prep
 # COMMON2-BEGIN
 %setup -q -n soprano-%{version}
-%patch0 -p1
 # COMMON2-END
 
 %package backend-redland

++++++ soprano-2.7.2.tar.bz2 -> soprano-2.7.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/soprano-2.7.2/CMakeLists.txt 
new/soprano-2.7.3/CMakeLists.txt
--- old/soprano-2.7.2/CMakeLists.txt    2011-10-21 10:22:44.000000000 +0200
+++ new/soprano-2.7.3/CMakeLists.txt    2011-10-31 11:04:01.000000000 +0100
@@ -1,13 +1,13 @@
 project(soprano)
 
-cmake_minimum_required(VERSION 2.6.2)
+cmake_minimum_required(VERSION 2.6.4)
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 
 ##################  Soprano version  ################################
 set(CMAKE_SOPRANO_VERSION_MAJOR 2)
 set(CMAKE_SOPRANO_VERSION_MINOR 7)
-set(CMAKE_SOPRANO_VERSION_RELEASE 1)
+set(CMAKE_SOPRANO_VERSION_RELEASE 3)
 set(CMAKE_SOPRANO_VERSION_STRING 
"${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}")
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/soprano-2.7.2/ChangeLog new/soprano-2.7.3/ChangeLog
--- old/soprano-2.7.2/ChangeLog 2011-10-21 10:22:44.000000000 +0200
+++ new/soprano-2.7.3/ChangeLog 2011-10-31 11:04:01.000000000 +0100
@@ -1,3 +1,7 @@
+2.7.3
+       * Added new signal in the Virtuoso backend which signals when the 
server goes down.
+       * Soprano can be built with cmake 2.6.4 again.
+
 2.7.2
        * Reverted a change which was introduced in 2.7.1 to use a separate 
QDBusConnection for the 
           DBusExportModel. It made things worse.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/soprano-2.7.2/backends/virtuoso/Virtuoso.dox 
new/soprano-2.7.3/backends/virtuoso/Virtuoso.dox
--- old/soprano-2.7.2/backends/virtuoso/Virtuoso.dox    2011-10-21 
10:22:44.000000000 +0200
+++ new/soprano-2.7.3/backends/virtuoso/Virtuoso.dox    2011-10-31 
11:04:01.000000000 +0100
@@ -60,6 +60,19 @@
  * \li Soprano::BackendOptionPassword - Set the password to connect to the 
Virtuoso server.
  *
  *
+ * \section soprano_backend_vituoso_additions Additional Features
+ *
+ * Models created by the Virtuoso backend emit a non-standard signal which 
informs the client that the Virtuoso server went down.
+ * This signal is only emitted for Virtuoso instances that were started by the 
backend and has the following signature:
+ *
+ * \code
+ * void virtuosoStopped(bool normalExit);
+ * \endcode
+ *
+ * The parameter \p normalExit is \p true if the instance went down as 
scheduled (deletion of the model) and \p false if the
+ * Virtuoso instance crashed or was killed by a third party. Typically a 
client would connect to the signal to properly re-create the model.
+ *
+ *
  * \section soprano_backend_vituoso_specialities Virtuoso Specialities
  *
  * Since Virtuoso is an SQL server and, thus, does store all RDF data in SQL 
tables it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/soprano-2.7.2/backends/virtuoso/virtuosobackend.cpp 
new/soprano-2.7.3/backends/virtuoso/virtuosobackend.cpp
--- old/soprano-2.7.2/backends/virtuoso/virtuosobackend.cpp     2011-10-21 
10:22:44.000000000 +0200
+++ new/soprano-2.7.3/backends/virtuoso/virtuosobackend.cpp     2011-10-31 
11:04:01.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  * This file is part of Soprano Project
  *
- * Copyright (C) 2008-2010 Sebastian Trueg <[email protected]>
+ * Copyright (C) 2008-2011 Sebastian Trueg <[email protected]>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -115,8 +115,10 @@
     VirtuosoModel* model = new VirtuosoModel( connectionPool, this );
     // mem mangement the ugly way
     // FIXME: improve
-    if ( controller )
+    if ( controller ) {
         controller->setParent( model );
+        connect(controller, 
SIGNAL(stopped(Soprano::VirtuosoController::ExitStatus)), model, 
SLOT(slotVirtuosoStopped(Soprano::VirtuosoController::ExitStatus)));
+    }
     return model;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/soprano-2.7.2/backends/virtuoso/virtuosocontroller.h 
new/soprano-2.7.3/backends/virtuoso/virtuosocontroller.h
--- old/soprano-2.7.2/backends/virtuoso/virtuosocontroller.h    2011-10-21 
10:22:44.000000000 +0200
+++ new/soprano-2.7.3/backends/virtuoso/virtuosocontroller.h    2011-10-31 
11:04:01.000000000 +0100
@@ -74,7 +74,7 @@
 
     Q_SIGNALS:
         void started();
-        void stopped( ExitStatus status );
+        void stopped( Soprano::VirtuosoController::ExitStatus status );
 
     private Q_SLOTS:
         void slotProcessFinished( int exitCode, QProcess::ExitStatus 
exitStatus );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/soprano-2.7.2/backends/virtuoso/virtuosomodel.cpp 
new/soprano-2.7.3/backends/virtuoso/virtuosomodel.cpp
--- old/soprano-2.7.2/backends/virtuoso/virtuosomodel.cpp       2011-10-21 
10:22:44.000000000 +0200
+++ new/soprano-2.7.3/backends/virtuoso/virtuosomodel.cpp       2011-10-31 
11:04:01.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  * This file is part of Soprano Project
  *
- * Copyright (C) 2008-2010 Sebastian Trueg <[email protected]>
+ * Copyright (C) 2008-2011 Sebastian Trueg <[email protected]>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -449,4 +449,17 @@
     return d->sparqlQuery( d->replaceFakeTypesInQuery( query ) );
 }
 
+
+void 
Soprano::VirtuosoModel::slotVirtuosoStopped(VirtuosoController::ExitStatus 
status)
+{
+    // inform clients about a non-scheduled exit of the server so they can act 
accordingly
+    // typically this would mean to re-create the model from the backend
+    // We do this async in case clients react by directly deleting us
+    QMetaObject::invokeMethod(this,
+                              "virtuosoStopped",
+                              Qt::QueuedConnection,
+                              Q_ARG(bool, (!(status == 
VirtuosoController::CrashExit ||
+                                             status == 
VirtuosoController::ThirdPartyExit))));
+}
+
 #include "virtuosomodel.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/soprano-2.7.2/backends/virtuoso/virtuosomodel.h 
new/soprano-2.7.3/backends/virtuoso/virtuosomodel.h
--- old/soprano-2.7.2/backends/virtuoso/virtuosomodel.h 2011-10-21 
10:22:44.000000000 +0200
+++ new/soprano-2.7.3/backends/virtuoso/virtuosomodel.h 2011-10-31 
11:04:01.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  * This file is part of Soprano Project
  *
- * Copyright (C) 2008-2010 Sebastian Trueg <[email protected]>
+ * Copyright (C) 2008-2011 Sebastian Trueg <[email protected]>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -19,10 +19,11 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef _SOPRANO_IODBC_MODEL_H_
-#define _SOPRANO_IODBC_MODEL_H_
+#ifndef _SOPRANO_VIRTUOSO_MODEL_H_
+#define _SOPRANO_VIRTUOSO_MODEL_H_
 
 #include "storagemodel.h"
+#include "virtuosocontroller.h"
 
 namespace Soprano {
     namespace ODBC {
@@ -55,6 +56,14 @@
                                                    Query::QueryLanguage 
language = Query::QueryLanguageSparql,
                                                    const QString& 
userQueryLanguage = QString() ) const;
 
+    public Q_SLOTS:
+        /// a public slot since it is connected from the backend on creation 
time
+        void slotVirtuosoStopped(Soprano::VirtuosoController::ExitStatus 
status);
+
+    Q_SIGNALS:
+        /// \param normalExit \p true if the shutdown of Virtuoso was 
initialized by deleting the model
+        void virtuosoStopped(bool normalExit);
+
     private:
         VirtuosoModelPrivate* const d;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/soprano-2.7.2/cmake/modules/CMakeParseArguments.cmake 
new/soprano-2.7.3/cmake/modules/CMakeParseArguments.cmake
--- old/soprano-2.7.2/cmake/modules/CMakeParseArguments.cmake   1970-01-01 
01:00:00.000000000 +0100
+++ new/soprano-2.7.3/cmake/modules/CMakeParseArguments.cmake   2011-10-31 
11:04:01.000000000 +0100
@@ -0,0 +1,132 @@
+# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> 
<multi_value_keywords> args...)
+#
+# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
+# parsing the arguments given to that macro or function.
+# It processes the arguments and defines a set of variables which hold the
+# values of the respective options.
+#
+# The <options> argument contains all options for the respective macro,
+# i.e. keywords which can be used when calling the macro without any value
+# following, like e.g. the OPTIONAL keyword of the install() command.
+#
+# The <one_value_keywords> argument contains all keywords for this macro
+# which are followed by one value, like e.g. DESTINATION keyword of the
+# install() command.
+#
+# The <multi_value_keywords> argument contains all keywords for this macro
+# which can be followed by more than one value, like e.g. the TARGETS or
+# FILES keywords of the install() command.
+#
+# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
+# keywords listed in <options>, <one_value_keywords> and
+# <multi_value_keywords> a variable composed of the given <prefix>
+# followed by "_" and the name of the respective keyword.
+# These variables will then hold the respective value from the argument list.
+# For the <options> keywords this will be TRUE or FALSE.
+#
+# All remaining arguments are collected in a variable
+# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
+# your macro was called with unrecognized parameters.
+#
+# As an example here a my_install() macro, which takes similar arguments as the
+# real install() command:
+#
+#   function(MY_INSTALL)
+#     set(options OPTIONAL FAST)
+#     set(oneValueArgs DESTINATION RENAME)
+#     set(multiValueArgs TARGETS CONFIGURATIONS)
+#     cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" 
"${multiValueArgs}" ${ARGN} )
+#     ...
+#
+# Assume my_install() has been called like this:
+#   my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
+#
+# After the cmake_parse_arguments() call the macro will have set the following
+# variables:
+#   MY_INSTALL_OPTIONAL = TRUE
+#   MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
+#   MY_INSTALL_DESTINATION = "bin"
+#   MY_INSTALL_RENAME = "" (was not used)
+#   MY_INSTALL_TARGETS = "foo;bar"
+#   MY_INSTALL_CONFIGURATIONS = "" (was not used)
+#   MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
+#
+# You can the continue and process these variables.
+#
+# Keywords terminate lists of values, e.g. if directly after a 
one_value_keyword
+# another recognized keyword follows, this is interpreted as the beginning of
+# the new option.
+# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
+# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
+# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
+
+#=============================================================================
+# Copyright 2010 Alexander Neundorf <[email protected]>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+
+function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames 
_multiArgNames)
+  # first set all result variables to empty/FALSE
+  foreach(arg_name ${_singleArgNames} ${_multiArgNames})
+    set(${prefix}_${arg_name})
+  endforeach(arg_name)
+
+  foreach(option ${_optionNames})
+    set(${prefix}_${option} FALSE)
+  endforeach(option)
+
+  set(${prefix}_UNPARSED_ARGUMENTS)
+
+  set(insideValues FALSE)
+  set(currentArgName)
+
+  # now iterate over all arguments and fill the result variables
+  foreach(currentArg ${ARGN})
+    list(FIND _optionNames "${currentArg}" optionIndex)  # ... then this marks 
the end of the arguments belonging to this keyword
+    list(FIND _singleArgNames "${currentArg}" singleArgIndex)  # ... then this 
marks the end of the arguments belonging to this keyword
+    list(FIND _multiArgNames "${currentArg}" multiArgIndex)  # ... then this 
marks the end of the arguments belonging to this keyword
+
+    if(${optionIndex} EQUAL -1  AND  ${singleArgIndex} EQUAL -1  AND  
${multiArgIndex} EQUAL -1)
+      if(insideValues)
+        if("${insideValues}" STREQUAL "SINGLE")
+          set(${prefix}_${currentArgName} ${currentArg})
+          set(insideValues FALSE)
+        elseif("${insideValues}" STREQUAL "MULTI")
+          list(APPEND ${prefix}_${currentArgName} ${currentArg})
+        endif()
+      else(insideValues)
+        list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
+      endif(insideValues)
+    else()
+      if(NOT ${optionIndex} EQUAL -1)
+        set(${prefix}_${currentArg} TRUE)
+        set(insideValues FALSE)
+      elseif(NOT ${singleArgIndex} EQUAL -1)
+        set(currentArgName ${currentArg})
+        set(${prefix}_${currentArgName})
+        set(insideValues "SINGLE")
+      elseif(NOT ${multiArgIndex} EQUAL -1)
+        set(currentArgName ${currentArg})
+        set(${prefix}_${currentArgName})
+        set(insideValues "MULTI")
+      endif()
+    endif()
+
+  endforeach(currentArg)
+
+  # propagate the result variables to the caller:
+  foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
+    set(${prefix}_${arg_name}  ${${prefix}_${arg_name}} PARENT_SCOPE)
+  endforeach(arg_name)
+  set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} 
PARENT_SCOPE)
+
+endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/soprano-2.7.2/cmake/modules/FindPackageHandleStandardArgs.cmake 
new/soprano-2.7.3/cmake/modules/FindPackageHandleStandardArgs.cmake
--- old/soprano-2.7.2/cmake/modules/FindPackageHandleStandardArgs.cmake 
1970-01-01 01:00:00.000000000 +0100
+++ new/soprano-2.7.3/cmake/modules/FindPackageHandleStandardArgs.cmake 
2011-10-31 11:04:01.000000000 +0100
@@ -0,0 +1,210 @@
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
+#
+# This function is intended to be used in FindXXX.cmake modules files.
+# It handles the REQUIRED, QUIET and version-related arguments to 
FIND_PACKAGE().
+# It also sets the <UPPERCASED_NAME>_FOUND variable.
+# The package is considered found if all variables <var1>... listed contain
+# valid results, e.g. valid filepaths.
+#
+# There are two modes of this function. The first argument in both modes is
+# the name of the Find-module where it is called (in original casing).
+#
+# The first simple mode looks like this:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure 
message") <var1>...<varN> )
+# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# If DEFAULT_MSG is given as second argument, then the function will generate
+# itself useful success and error messages. You can also supply a custom error 
message
+# for the failure case. This is not recommended.
+#
+# The second mode is more powerful and also supports version checking:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
+#                                           [VERSION_VAR   <versionvar>
+#                                           [FAIL_MESSAGE "Custom failure 
message"] )
+#
+# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
+# used, the default message will be displayed.
+# Following VERSION_VAR the name of the variable can be specified which holds
+# the version of the package which has been found. If this is done, this 
version
+# will be checked against the (potentially) specified required version used
+# in the find_package() call. The EXACT keyword is also handled. The default
+# messages include information about the required version and the version
+# which has been actually found, both if the version is ok or not.
+#
+# Example for mode 1:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY 
LIBXML2_INCLUDE_DIR)
+#
+# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
+# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
+# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
+# independent whether QUIET was used or not.
+# If it is found, success will be reported, including the content of <var1>.
+# On repeated Cmake runs, the same message won't be printed again.
+#
+# Example for mode 2:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
+#                                             VERSION_VAR BISON_VERSION)
+# In this case, BISON is considered to be found if the variable(s) listed
+# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
+# Also the version of BISON will be checked by using the version contained
+# in BISON_VERSION.
+# Since no FAIL_MESSAGE is given, the default messages will be printed.
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+INCLUDE(FindPackageMessage)
+INCLUDE(CMakeParseArguments)
+
+
+FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1)
+
+# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
+# new extended or in the "old" mode:
+  SET(options) # none
+  SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+  SET(multiValueArgs REQUIRED_VARS)
+  SET(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} 
${multiValueArgs} )
+  LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
+
+  IF(${INDEX} EQUAL -1)
+    SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
+    SET(FPHSA_REQUIRED_VARS ${_VAR1} ${ARGN})
+    SET(FPHSA_VERSION_VAR)
+  ELSE(${INDEX} EQUAL -1)
+
+    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" 
"${multiValueArgs}"  ${_FIRST_ARG} ${_VAR1} ${ARGN})
+
+    IF(FPHSA_UNPARSED_ARGUMENTS)
+      MESSAGE(FATAL_ERROR "Unknown keywords given to 
FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
+    ENDIF(FPHSA_UNPARSED_ARGUMENTS)
+
+    IF(NOT FPHSA_FAIL_MESSAGE)
+      SET(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
+    ENDIF(NOT FPHSA_FAIL_MESSAGE)
+  ENDIF(${INDEX} EQUAL -1)
+
+# now that we collected all arguments, process them
+
+  IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+    SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
+  ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+
+  IF(NOT FPHSA_REQUIRED_VARS)
+    MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for 
FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
+  ENDIF(NOT FPHSA_REQUIRED_VARS)
+
+  LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
+
+  STRING(TOUPPER ${_NAME} _NAME_UPPER)
+
+  # collect all variables which were not found, so they can be printed, so the
+  # user knows better what went wrong (#6375)
+  SET(MISSING_VARS "")
+  SET(DETAILS "")
+  SET(${_NAME_UPPER}_FOUND TRUE)
+  # check if all passed variables are valid
+  FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
+    IF(NOT ${_CURRENT_VAR})
+      SET(${_NAME_UPPER}_FOUND FALSE)
+      SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
+    ELSE(NOT ${_CURRENT_VAR})
+      SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
+    ENDIF(NOT ${_CURRENT_VAR})
+  ENDFOREACH(_CURRENT_VAR)
+
+
+  # version handling:
+  SET(VERSION_MSG "")
+  SET(VERSION_OK TRUE)
+  IF (${_NAME}_FIND_VERSION)
+
+    # if the package was found, check for the version using <NAME>_FIND_VERSION
+    IF (${_NAME_UPPER}_FOUND)
+      SET(VERSION ${${FPHSA_VERSION_VAR}} )
+
+      IF(VERSION)
+
+        IF(${_NAME}_FIND_VERSION_EXACT)       # exact version required
+          IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+            SET(VERSION_MSG " Found version \"${VERSION}\", but required is 
exact version \"${${_NAME}_FIND_VERSION}\"")
+            SET(VERSION_OK FALSE)
+          ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+            SET(VERSION_MSG " (found exact version \"${VERSION}\")")
+          ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+
+        ELSE(${_NAME}_FIND_VERSION_EXACT)     # minimum version specified:
+          IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+            SET(VERSION_MSG " Found version \"${VERSION}\", but required is at 
least \"${${_NAME}_FIND_VERSION}\"")
+            SET(VERSION_OK FALSE)
+          ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+            SET(VERSION_MSG " (found version \"${VERSION}\", required is 
\"${${_NAME}_FIND_VERSION}\")")
+          ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+        ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+# Uncomment the following two lines to see to which Find-modules the 
VERSION_VAR keywords still need to be added:
+#      ELSE(VERSION)
+#        SET(VERSION_MSG " (WARNING: Required version is 
\"${${_NAME}_FIND_VERSION}\", but version of ${_NAME} is unknown)")
+      ENDIF(VERSION)
+
+    # if the package was not found, but a version was given, add that to the 
output:
+    ELSE (${_NAME_UPPER}_FOUND)
+      IF(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG " (Required is exact version 
\"${${_NAME}_FIND_VERSION}\")")
+      ELSE(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG " (Required is at least version 
\"${${_NAME}_FIND_VERSION}\")")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+    ENDIF (${_NAME_UPPER}_FOUND)
+  ENDIF (${_NAME}_FIND_VERSION)
+
+  IF(VERSION_OK)
+    SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
+  ELSE(VERSION_OK)
+    SET(${_NAME_UPPER}_FOUND FALSE)
+  ENDIF(VERSION_OK)
+
+
+  # print the result:
+  IF (${_NAME_UPPER}_FOUND)
+    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} 
${VERSION_MSG}" "${DETAILS}")
+  ELSE (${_NAME_UPPER}_FOUND)
+    IF(NOT VERSION_OK)
+
+      IF (${_NAME}_FIND_REQUIRED)
+          MESSAGE(FATAL_ERROR "${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found 
${${_FIRST_REQUIRED_VAR}})")
+      ELSE (${_NAME}_FIND_REQUIRED)
+        IF (NOT ${_NAME}_FIND_QUIETLY)
+          MESSAGE(STATUS "${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found 
${${_FIRST_REQUIRED_VAR}})")
+        ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+      ENDIF (${_NAME}_FIND_REQUIRED)
+
+    ELSE(NOT VERSION_OK)
+
+      IF (${_NAME}_FIND_REQUIRED)
+          MESSAGE(FATAL_ERROR "${FPHSA_FAIL_MESSAGE} (missing: 
${MISSING_VARS}) ${VERSION_MSG}")
+      ELSE (${_NAME}_FIND_REQUIRED)
+        IF (NOT ${_NAME}_FIND_QUIETLY)
+          MESSAGE(STATUS "${FPHSA_FAIL_MESSAGE}  (missing: ${MISSING_VARS}) 
${VERSION_MSG}")
+        ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+      ENDIF (${_NAME}_FIND_REQUIRED)
+    ENDIF(NOT VERSION_OK)
+
+  ENDIF (${_NAME_UPPER}_FOUND)
+
+  SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+
+ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to