From: Jan Rękorajski Date: Wed, 24 Dec 2014 23:07:04 +0000 (+0000) Subject: - extend lib64 patch with minor fix for zlib X-Git-Tag: auto/th/cmake-3.1.1-1~3 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=90b41c6c67667e881d80c473b0bcac9b286d9ef9;p=packages%2Fcmake.git - extend lib64 patch with minor fix for zlib - add libx32 patch to support x32 arch and libx32 dirs - added doc bcond to build without sphing-pdg --- diff --git a/cmake-lib64.patch b/cmake-lib64.patch index 808dd95..8a69ea1 100644 --- a/cmake-lib64.patch +++ b/cmake-lib64.patch @@ -9,3 +9,14 @@ install_files(${KDE3_LIBTOOL_DIR} FILES ${_laname}) endmacro() +--- cmake-3.1.0/Modules/FindZLIB.cmake~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Modules/FindZLIB.cmake 2014-12-24 21:00:27.139263296 +0000 +@@ -79,7 +79,7 @@ + # Try each search configuration. + foreach(search ${_ZLIB_SEARCHES}) + find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include) +- find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) ++ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib64) + endforeach() + + mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) diff --git a/cmake-libx32.patch b/cmake-libx32.patch new file mode 100644 index 0000000..06ea4e4 --- /dev/null +++ b/cmake-libx32.patch @@ -0,0 +1,117 @@ +--- cmake-2.4.10/Modules/KDE3Macros.cmake.orig 2012-11-03 08:29:52.205394821 +0100 ++++ cmake-2.4.10/Modules/KDE3Macros.cmake 2012-11-03 08:31:27.108749182 +0100 +@@ -336,7 +336,7 @@ + file(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\nshouldnotlink=yes\n") + file(APPEND ${_laname} "# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n") + file(APPEND ${_laname} "# Directory that this library needs to be installed in:\n") +- file(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n") ++ file(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/libx32/kde3'\n") + + install_files(${KDE3_LIBTOOL_DIR} FILES ${_laname}) + endmacro() +--- cmake-3.1.0/Modules/FindZLIB.cmake~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Modules/FindZLIB.cmake 2014-12-24 21:00:27.139263296 +0000 +@@ -79,7 +79,7 @@ + # Try each search configuration. + foreach(search ${_ZLIB_SEARCHES}) + find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include) +- find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib) ++ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES libx32) + endforeach() + + mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) +--- cmake-3.1.0/Source/cmFindLibraryCommand.cxx~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Source/cmFindLibraryCommand.cxx 2014-12-24 21:33:33.561835255 +0000 +@@ -65,6 +65,16 @@ + } + } + ++ if(this->Makefile->GetCMakeInstance() ++ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS")) ++ { ++ // add special 64 bit paths if this is a 64 bit compile. ++ if(this->Makefile->PlatformIsx32Bit()) ++ { ++ this->AddArchitecturePaths("x32"); ++ } ++ } ++ + std::string library = this->FindLibrary(); + if(library != "") + { +--- cmake-3.1.0/Source/cmFindPackageCommand.cxx.orig 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Source/cmFindPackageCommand.cxx 2014-12-24 21:35:01.094694382 +0000 +@@ -90,6 +90,14 @@ + this->UseLib64Paths = true; + } + ++ // Lookup whether libx32 paths should be used. ++ if(this->Makefile->PlatformIsx32Bit() && ++ this->Makefile->GetCMakeInstance() ++ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS")) ++ { ++ this->UseLibx32Paths = true; ++ } ++ + // Check if User Package Registry should be disabled + if(this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY")) + { +--- cmake-3.1.0/Source/cmMakefile.cxx~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Source/cmMakefile.cxx 2014-12-24 21:50:15.543073723 +0000 +@@ -2370,6 +2370,15 @@ + return false; + } + ++bool cmMakefile::PlatformIsx32Bit() const ++{ ++#ifdef __ILP32__ ++ return true; ++#else ++ return false; ++#endif ++} ++ + const char* cmMakefile::GetSONameFlag(const std::string& language) const + { + std::string name = "CMAKE_SHARED_LIBRARY_SONAME"; +--- cmake-3.1.0/Source/cmMakefile.h~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Source/cmMakefile.h 2014-12-24 21:51:51.335888102 +0000 +@@ -648,6 +648,8 @@ + + /** Return whether the target platform is 64-bit. */ + bool PlatformIs64Bit() const; ++ /** Return whether the target platform is x32-bit. */ ++ bool PlatformIsx32Bit() const; + + /** Retrieve soname flag for the specified language if supported */ + const char* GetSONameFlag(const std::string& language) const; +--- cmake-3.1.0/Source/cmFindPackageCommand.h~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Source/cmFindPackageCommand.h 2014-12-24 22:05:38.051409399 +0000 +@@ -124,6 +124,7 @@ + bool NoBuilds; + bool DebugMode; + bool UseLib64Paths; ++ bool UseLibx32Paths; + bool PolicyScope; + std::string LibraryArchitecture; + std::vector Names; +--- cmake-3.1.0/Modules/Platform/UnixPaths.cmake~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Modules/Platform/UnixPaths.cmake 2014-12-24 22:14:56.025053263 +0000 +@@ -95,3 +95,4 @@ + + # Enable use of lib64 search path variants by default. + set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) ++set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS TRUE) +--- cmake-3.1.0/Modules/FindPkgConfig.cmake~ 2014-12-15 20:07:43.000000000 +0000 ++++ cmake-3.1.0/Modules/FindPkgConfig.cmake 2014-12-24 22:17:04.721022724 +0000 +@@ -241,6 +241,10 @@ + list(APPEND _lib_dirs "lib64/pkgconfig") + endif() + endif() ++ get_property(uselibx32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS) ++ if(uselibx32) ++ list(APPEND _lib_dirs "libx32/pkgconfig") ++ endif() + endif() + list(APPEND _lib_dirs "lib/pkgconfig") + diff --git a/cmake.spec b/cmake.spec index 4f67080..61c68d0 100644 --- a/cmake.spec +++ b/cmake.spec @@ -8,6 +8,7 @@ %bcond_with bootstrap # use internal versions of some libraries %bcond_without gui # don't build gui package %bcond_without tests # do not perform "make test" +%bcond_without doc # don't build documentation Summary: Cross-platform, open-source make system Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach @@ -25,6 +26,7 @@ Patch3: %{name}-tests.patch Patch4: %{name}-bug-0015258.patch Patch5: %{name}-findruby2.patch Patch6: %{name}-findpython.patch +Patch7: %{name}-libx32.patch URL: http://www.cmake.org/ %{?with_gui:BuildRequires: QtGui-devel} BuildRequires: libarchive-devel @@ -33,7 +35,7 @@ BuildRequires: ncurses-devel > 5.9-3 %{?with_gui:BuildRequires: qt4-build} %{?with_gui:BuildRequires: qt4-qmake} BuildRequires: rpmbuild(macros) >= 1.167 -BuildRequires: sphinx-pdg +%{?with_doc:BuildRequires: sphinx-pdg} %{!?with_bootstrap:BuildRequires: xmlrpc-c-devel >= 1.4.12-2} Requires: filesystem >= 3.0-52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -118,6 +120,9 @@ Bashowe dopełnianie parametrów dla cmake'a. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%if "%{_lib}" == "libx32" +%patch7 -p1 +%endif cat > "init.cmake" <