Merge branch 'master' into f17

Update to 2.8.9
This commit is contained in:
Orion Poplawski 2012-10-02 09:12:13 -06:00
commit 319919b16e
5 changed files with 194 additions and 61 deletions

4
.gitignore vendored
View File

@ -21,3 +21,7 @@ cmake-2.8.2.tar.gz
/cmake-2.8.8-rc1.tar.gz
/cmake-2.8.8-rc2.tar.gz
/cmake-2.8.8.tar.gz
/cmake-2.8.9-rc1.tar.gz
/cmake-2.8.9-rc2.tar.gz
/cmake-2.8.9-rc3.tar.gz
/cmake-2.8.9.tar.gz

163
cmake-FindPostgreSQL.patch Normal file
View File

@ -0,0 +1,163 @@
--- cmake-2.8.8/Modules/FindPostgreSQL.cmake 2012-04-18 20:10:54.000000000 +0200
+++ cmake-2.8.8/Modules/FindPostgreSQL.cmake 2012-07-04 23:05:30.532090522 +0200
@@ -97,76 +97,101 @@ set( PostgreSQL_ROOT_DIRECTORIES
#
# Look for an installation.
#
-find_path(PostgreSQL_INCLUDE_DIR
- NAMES libpq-fe.h
+find_path(PostgreSQL_CONFIG_DIR
+ NAMES pg_config
PATHS
# Look in other places.
${PostgreSQL_ROOT_DIRECTORIES}
PATH_SUFFIXES
- pgsql
- postgresql
- include
+ ""
+ bin
# Help the user find it if we cannot.
- DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
+ DOC "The ${PostgreSQL_ROOT_DIR_MESSAGE}"
)
-find_path(PostgreSQL_TYPE_INCLUDE_DIR
- NAMES catalog/pg_type.h
- PATHS
- # Look in other places.
- ${PostgreSQL_ROOT_DIRECTORIES}
- PATH_SUFFIXES
- pgsql/server
- postgresql/server
- include/server
- # Help the user find it if we cannot.
- DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
-)
+macro (fail_if)
+ if (${ARGV})
+ message (WARNING "Couldn't determine PostgreSQL configuration.")
+ unset (PostgreSQL_CONFIG_DIR)
+ break ()
+ endif ()
+endmacro ()
+
+macro (run_pg_config arg var)
+ execute_process(COMMAND ${PostgreSQL_CONFIG_DIR}/pg_config ${arg}
+ RESULT_VARIABLE pgsql_config_result
+ OUTPUT_VARIABLE ${var}
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ fail_if (NOT ${pgsql_config_result} EQUAL 0 OR NOT ${var})
+endmacro ()
+
+foreach (once only)
+ fail_if (NOT PostgreSQL_CONFIG_DIR)
+
+ run_pg_config (--version PostgreSQL_VERSION_STRING)
+ string (REGEX REPLACE "^PostgreSQL (.*)$" "\\1"
+ PostgreSQL_VERSION_STRING "${PostgreSQL_VERSION_STRING}")
+ fail_if (NOT PostgreSQL_VERSION_STRING)
+
+ run_pg_config (--includedir PostgreSQL_INCLUDE_DIR)
+ fail_if (NOT EXISTS "${PostgreSQL_INCLUDE_DIR}/libpq-fe.h")
+
+ find_path(PostgreSQL_TYPE_INCLUDE_DIR
+ NAMES catalog/pg_type.h
+ PATHS ${PostgreSQL_INCLUDE_DIR}
+ PATH_SUFFIXES
+ pgsql/server
+ postgresql/server
+ include/server
+ # Help the user find it if we cannot.
+ DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
+ )
+ fail_if (NOT PostgreSQL_TYPE_INCLUDE_DIR)
+
+ set (PostgreSQL_INCLUDE_DIRS
+ ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR})
+
+ run_pg_config (--libdir PostgreSQL_LIBRARY_DIRS)
+
+ # The PostgreSQL library.
+ set (PostgreSQL_LIBRARY_TO_FIND pq)
+ # Setting some more prefixes for the library
+ set (PostgreSQL_LIB_PREFIX "")
+ if (WIN32)
+ set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib")
+ set (PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
+ endif()
+
+ find_library (PostgreSQL_LIBRARY_FOUND
+ NAMES ${PostgreSQL_LIBRARY_TO_FIND}
+ PATHS ${PostgreSQL_LIBRARY_DIRS}
+ PATH_SUFFIXES lib
+ )
+ fail_if (NOT PostgreSQL_LIBRARY_FOUND)
+ set (PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
-# The PostgreSQL library.
-set (PostgreSQL_LIBRARY_TO_FIND pq)
-# Setting some more prefixes for the library
-set (PostgreSQL_LIB_PREFIX "")
-if ( WIN32 )
- set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib")
- set ( PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND})
-endif()
-
-find_library( PostgreSQL_LIBRARY
- NAMES ${PostgreSQL_LIBRARY_TO_FIND}
- PATHS
- ${PostgreSQL_ROOT_DIRECTORIES}
- PATH_SUFFIXES
- lib
-)
-get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
-
-if (PostgreSQL_INCLUDE_DIR AND EXISTS "${PostgreSQL_INCLUDE_DIR}/pg_config.h")
- file(STRINGS "${PostgreSQL_INCLUDE_DIR}/pg_config.h" pgsql_version_str
- REGEX "^#define[\t ]+PG_VERSION[\t ]+\".*\"")
-
- string(REGEX REPLACE "^#define[\t ]+PG_VERSION[\t ]+\"([^\"]*)\".*" "\\1"
- PostgreSQL_VERSION_STRING "${pgsql_version_str}")
- unset(pgsql_version_str)
-endif()
+endforeach ()
# Did we find anything?
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PostgreSQL
- REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR
- VERSION_VAR PostgreSQL_VERSION_STRING)
-set( PostgreSQL_FOUND ${POSTGRESQL_FOUND})
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (PostgreSQL
+ REQUIRED_VARS
+ PostgreSQL_LIBRARY_DIRS
+ PostgreSQL_CONFIG_DIR
+ PostgreSQL_INCLUDE_DIRS
+ PostgreSQL_LIBRARIES
+ VERSION_VAR
+ PostgreSQL_VERSION_STRING
+)
+set (PostgreSQL_FOUND ${POSTGRESQL_FOUND})
# Now try to get the include and library path.
-if(PostgreSQL_FOUND)
-
- set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} )
- set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
- set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
-
- #message("Final PostgreSQL include dir: ${PostgreSQL_INCLUDE_DIRS}")
- #message("Final PostgreSQL library dir: ${PostgreSQL_LIBRARY_DIRS}")
- #message("Final PostgreSQL libraries: ${PostgreSQL_LIBRARIES}")
+if (PostgreSQL_FOUND)
+ message (STATUS "PostgreSQL include dirs: ${PostgreSQL_INCLUDE_DIRS}")
+ message (STATUS "PostgreSQL library dirs: ${PostgreSQL_LIBRARY_DIRS}")
+ message (STATUS "PostgreSQL libraries: ${PostgreSQL_LIBRARIES}")
endif(PostgreSQL_FOUND)
-mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY )
+mark_as_advanced (PostgreSQL_CONFIG_DIR PostgreSQL_LIB_DIR
+ PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR)

View File

@ -1,55 +0,0 @@
commit 8bd38d7070b1cec6ed27b71d0359f1b2ccd1e1c8
Author: Rolf Eike Beer <eike@sf-mail.de>
Date: Fri Apr 13 08:50:49 2012 +0200
FindPkgConfig.cmake: fix documented output variable no longer set (#13125)
The real fix is from Yury G. Kudryashov while I added the surrounding cleanups.
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 5d93ab1..30aab45 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -13,11 +13,10 @@
# When the 'QUIET' argument is set, no status messages will be printed.
#
# It sets the following variables:
-# PKG_CONFIG_FOUND ... true if pkg-config works on the system
+# PKG_CONFIG_FOUND ... if pkg-config executable was found
# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program
# PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found
# (since CMake 2.8.8)
-# PKG_CONFIG_FOUND ... if pkg-config executable was found
#
# For the following variables two sets of values exist; first one is the
# common one and has the given PREFIX. The second set contains flags
@@ -104,6 +103,11 @@ find_package_handle_standard_args(PkgConfig
REQUIRED_VARS PKG_CONFIG_EXECUTABLE
VERSION_VAR PKG_CONFIG_VERSION_STRING)
+# This is needed because the module name is "PkgConfig" but the name of
+# this variable has always been PKG_CONFIG_FOUND so this isn't automatically
+# handled by FPHSA.
+set(PKG_CONFIG_FOUND "${PKGCONFIG_FOUND}")
+
# Unsets the given variables
macro(_pkgconfig_unset var)
set(${var} "" CACHE INTERNAL "")
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
index 6604208..fc65e58 100644
--- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -71,7 +71,7 @@ endmacro(check_version_string)
# reported.
foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HSPELL
- JASPER LIBXML2 LIBXSLT PERL PostgreSQL TIFF ZLIB)
+ JASPER LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
check_version_string(${VTEST} ${VTEST}_VERSION_STRING)
endforeach(VTEST)
@@ -82,4 +82,3 @@ endforeach(VTEST)
check_version_string(PYTHONINTERP PYTHON_VERSION_STRING)
check_version_string(SUBVERSION Subversion_VERSION_SVN)
-check_version_string(PKGCONFIG PKG_CONFIG_VERSION_STRING)

View File

@ -7,8 +7,8 @@
%define rcver %{nil}
Name: cmake
Version: 2.8.8
Release: 4%{?dist}
Version: 2.8.9
Release: 1%{?dist}
Summary: Cross-platform make system
Group: Development/Tools
@ -22,12 +22,14 @@ Source0: http://www.cmake.org/files/v2.8/cmake-%{version}%{?rcver}.tar.gz
Source2: macros.cmake
# Patch to find DCMTK in Fedora (bug #720140)
Patch0: cmake-dcmtk.patch
# (modified) Upstream patch to fix setting PKG_CONFIG_FOUND (bug #812188)
Patch1: cmake-pkgconfig.patch
# Patch to fix RindRuby vendor settings
# http://public.kitware.com/Bug/view.php?id=12965
# https://bugzilla.redhat.com/show_bug.cgi?id=822796
Patch2: cmake-findruby.patch
# Patch to fix FindPostgreSQL
# https://bugzilla.redhat.com/show_bug.cgi?id=828467
# http://public.kitware.com/Bug/view.php?id=13378
Patch3: cmake-FindPostgreSQL.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran
@ -77,8 +79,8 @@ The %{name}-gui package contains the Qt based GUI for CMake.
%prep
%setup -q -n %{name}-%{version}%{?rcver}
%patch0 -p1 -b .dcmtk
%patch1 -p1 -b .pkgconfig
%patch2 -p1 -b .findruby
%patch3 -p1 -b .findpostgresql
%build
@ -175,6 +177,25 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%changelog
* Thu Aug 9 2012 Orion Poplawski <orion@cora.nwra.com> - 2.8.9-1
- Update to 2.8.9 final
* Fri Jul 27 2012 Orion Poplawski <orion@cora.nwra.com> - 2.8.9-0.4.rc3
- Update to 2.8.9 RC 3
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.9-0.3.rc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon Jul 16 2012 Orion Poplawski <orion@cora.nwra.com> - 2.8.9-0.2.rc2
- Update to 2.8.9 RC 2
* Tue Jul 10 2012 Orion Poplawski <orion@cora.nwra.com> - 2.8.9-0.1.rc1
- Update to 2.8.9 RC 1
- Drop pkgconfig patch
* Thu Jul 5 2012 Orion Poplawski <orion@cora.nwra.com> 2.8.8-5
- Add patch to fix FindPostgreSQL (bug 828467)
* Mon May 21 2012 Orion Poplawski <orion@cora.nwra.com> 2.8.8-4
- Add patch to fix FindRuby (bug 822796)

View File

@ -1 +1 @@
ba74b22c788a0c8547976b880cd02b17 cmake-2.8.8.tar.gz
801f4c87f8b604f727df5bf1f05a59e7 cmake-2.8.9.tar.gz