mirror of
https://abf.rosa.ru/djam/cmake.git
synced 2025-02-23 23:02:51 +00:00
254 lines
11 KiB
Diff
254 lines
11 KiB
Diff
--- cmake-2.8.4/Modules/CPack.cmake.xz 2011-02-15 18:47:27.000000000 +0100
|
|
+++ cmake-2.8.4/Modules/CPack.cmake 2011-05-06 18:45:14.428275207 +0200
|
|
@@ -848,6 +848,7 @@ if(NOT CPACK_GENERATOR)
|
|
option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON)
|
|
option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON)
|
|
option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" OFF)
|
|
+ option(CPACK_BINARY_TXZ "Enable to build TXZ packages" OFF)
|
|
option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF)
|
|
option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF)
|
|
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF)
|
|
@@ -868,6 +869,7 @@ if(NOT CPACK_GENERATOR)
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_STGZ STGZ)
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ)
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
|
|
+ cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TXZ TXZ)
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
|
|
|
|
@@ -881,6 +883,7 @@ if(NOT CPACK_SOURCE_GENERATOR)
|
|
else(CYGWIN)
|
|
option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON)
|
|
option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON)
|
|
+ option(CPACK_SOURCE_TXZ "Enable to build TXZ source packages" ON)
|
|
option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON)
|
|
option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF)
|
|
endif(CYGWIN)
|
|
@@ -891,6 +894,7 @@ if(NOT CPACK_SOURCE_GENERATOR)
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource)
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ)
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2)
|
|
+ cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TXZ TXZ)
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ)
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP)
|
|
endif(NOT CPACK_SOURCE_GENERATOR)
|
|
@@ -901,7 +905,7 @@ mark_as_advanced(CPACK_BINARY_CYGWIN CPA
|
|
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
|
|
CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
|
|
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
|
|
- CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
|
|
+ CPACK_SOURCE_TXZ CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
|
|
|
|
# Set some other variables
|
|
cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS
|
|
--- cmake-2.8.4/Modules/FindLibLZMA.cmake.xz 2011-05-06 18:45:13.747283721 +0200
|
|
+++ cmake-2.8.4/Modules/FindLibLZMA.cmake 2011-05-06 18:45:14.875269619 +0200
|
|
@@ -0,0 +1,49 @@
|
|
+# - Find LibLZMA
|
|
+# Find LibLZMA headers and library
|
|
+#
|
|
+# LIBLZMA_FOUND - True if liblzma is found.
|
|
+# LIBLZMA_INCLUDE_DIR - Directory where liblzma headers are located.
|
|
+# LIBLZMA_LIBRARIES - Lzma libraries to link against.
|
|
+# LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required).
|
|
+# LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required).
|
|
+# LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required).
|
|
+
|
|
+
|
|
+#=============================================================================
|
|
+# Copyright 2008-2009 Per Øyvind Karlsen <peroyvind@mandriva.org>
|
|
+#
|
|
+# 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 distributed this file outside of CMake, substitute the full
|
|
+# License text for the above reference.)
|
|
+
|
|
+IF (LIBLZMA_INCLUDE_DIRS AND LIBLZMA_LIBRARIES)
|
|
+ SET(LIBLZMA_FIND_QUIETLY TRUE)
|
|
+ENDIF (LIBLZMA_INCLUDE_DIRS AND LIBLZMA_LIBRARIES)
|
|
+
|
|
+IF (NOT WIN32)
|
|
+ INCLUDE(FindPkgConfig)
|
|
+ PKG_SEARCH_MODULE(LIBLZMA liblzma)
|
|
+ ELSE (NOT WIN32)
|
|
+ FIND_PATH(LIBLZMA_INCLUDE_DIRS lzma.h )
|
|
+ FIND_LIBRARY(LIBLZMA_LIBRARIES NAMES lzma )
|
|
+ INCLUDE(FindPackageHandleStandardArgs)
|
|
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBLZMA DEFAULT_MSG LIBLZMA_INCLUDE_DIRS LIBLZMA_LIBRARIES)
|
|
+ENDIF (NOT WIN32)
|
|
+
|
|
+IF (LIBLZMA_FOUND)
|
|
+ INCLUDE(CheckLibraryExists)
|
|
+ CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER)
|
|
+ CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER)
|
|
+ CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET)
|
|
+ IF (NOT LIBLZMA_HAS_AUTO_DECODER AND LIBLZMA_HAS_EASY_ENCODER AND LIBLZMA_HAS_LZMA_PRESET)
|
|
+ SET(LIBLZMA_FOUND FALSE)
|
|
+ ENDIF(NOT LIBLZMA_HAS_AUTO_DECODER AND LIBLZMA_HAS_EASY_ENCODER AND LIBLZMA_HAS_LZMA_PRESET)
|
|
+ENDIF (LIBLZMA_FOUND)
|
|
+
|
|
+MARK_AS_ADVANCED( LIBLZMA_INCLUDE_DIRS LIBLZMA_LIBRARIES )
|
|
--- cmake-2.8.4/Source/CMakeLists.txt.xz 2011-02-15 18:47:27.000000000 +0100
|
|
+++ cmake-2.8.4/Source/CMakeLists.txt 2011-05-06 18:45:13.781283296 +0200
|
|
@@ -429,6 +429,7 @@ SET(CPACK_SRCS
|
|
CPack/cmCPackTGZGenerator.cxx
|
|
CPack/cmCPackTarBZip2Generator.cxx
|
|
CPack/cmCPackTarCompressGenerator.cxx
|
|
+ CPack/cmCPackTarXZGenerator.cxx
|
|
CPack/cmCPackZIPGenerator.cxx
|
|
)
|
|
|
|
--- cmake-2.8.4/Source/CPack/cmCPackGeneratorFactory.cxx.xz 2011-02-15 18:47:32.000000000 +0100
|
|
+++ cmake-2.8.4/Source/CPack/cmCPackGeneratorFactory.cxx 2011-05-06 18:45:13.925281497 +0200
|
|
@@ -16,6 +16,7 @@
|
|
#include "cmCPackTGZGenerator.h"
|
|
#include "cmCPackTarBZip2Generator.h"
|
|
#include "cmCPackTarCompressGenerator.h"
|
|
+#include "cmCPackTarXZGenerator.h"
|
|
#include "cmCPackZIPGenerator.h"
|
|
#include "cmCPackSTGZGenerator.h"
|
|
#include "cmCPackNSISGenerator.h"
|
|
@@ -60,6 +61,8 @@ cmCPackGeneratorFactory::cmCPackGenerato
|
|
cmCPackZIPGenerator::CreateGenerator);
|
|
this->RegisterGenerator("TBZ2", "Tar BZip2 compression",
|
|
cmCPackTarBZip2Generator::CreateGenerator);
|
|
+ this->RegisterGenerator("TXZ", "Tar XZ compression",
|
|
+ cmCPackTarXZGenerator::CreateGenerator);
|
|
this->RegisterGenerator("TZ", "Tar Compress compression",
|
|
cmCPackTarCompressGenerator::CreateGenerator);
|
|
#ifdef __APPLE__
|
|
--- cmake-2.8.4/Source/CPack/cmCPackTarXZGenerator.cxx.xz 2011-05-06 18:45:13.981280797 +0200
|
|
+++ cmake-2.8.4/Source/CPack/cmCPackTarXZGenerator.cxx 2011-05-06 19:06:11.007565805 +0200
|
|
@@ -0,0 +1,31 @@
|
|
+/*=========================================================================
|
|
+
|
|
+ Program: CMake - Cross-Platform Makefile Generator
|
|
+ Module: $RCSfile: cmCPackTarXZGenerator.cxx,v $
|
|
+ Language: C++
|
|
+ Date: $Date: 2011-05-06 19:02:00 $
|
|
+ Version: $Revision: 1.0 $
|
|
+
|
|
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
|
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
|
+
|
|
+ This software is distributed WITHOUT ANY WARRANTY; without even
|
|
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
+ PURPOSE. See the above copyright notices for more information.
|
|
+
|
|
+=========================================================================*/
|
|
+
|
|
+#include "cmCPackTarXZGenerator.h"
|
|
+
|
|
+//----------------------------------------------------------------------
|
|
+cmCPackTarXZGenerator::cmCPackTarXZGenerator()
|
|
+ :cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ,
|
|
+ cmArchiveWrite::TypeTAR)
|
|
+{
|
|
+}
|
|
+
|
|
+//----------------------------------------------------------------------
|
|
+cmCPackTarXZGenerator::~cmCPackTarXZGenerator()
|
|
+{
|
|
+}
|
|
+
|
|
--- cmake-2.8.4/Source/CPack/cmCPackTarXZGenerator.h.xz 2011-05-06 18:45:14.036280109 +0200
|
|
+++ cmake-2.8.4/Source/CPack/cmCPackTarXZGenerator.h 2011-05-06 19:05:46.282874905 +0200
|
|
@@ -0,0 +1,39 @@
|
|
+/*=========================================================================
|
|
+
|
|
+ Program: CMake - Cross-Platform Makefile Generator
|
|
+ Module: $RCSfile: cmCPackTarXZGenerator.h,v $
|
|
+ Language: C++
|
|
+ Date: $Date: 2007-02-02 19:40:26 $
|
|
+ Version: $Revision: 1.2 $
|
|
+
|
|
+ Copyright (c) 2002 Kitware, Inc. All rights reserved.
|
|
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
|
+
|
|
+ This software is distributed WITHOUT ANY WARRANTY; without even
|
|
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
+ PURPOSE. See the above copyright notices for more information.
|
|
+
|
|
+=========================================================================*/
|
|
+
|
|
+#ifndef cmCPackTarXZGenerator_h
|
|
+#define cmCPackTarXZGenerator_h
|
|
+
|
|
+#include "cmCPackArchiveGenerator.h"
|
|
+
|
|
+/** \class cmCPackTarXZGenerator
|
|
+ * \brief A generator for TarXZ files
|
|
+ */
|
|
+class cmCPackTarXZGenerator : public cmCPackArchiveGenerator
|
|
+{
|
|
+public:
|
|
+ cmCPackTypeMacro(cmCPackTarXZGenerator, cmCPackArchiveGenerator);
|
|
+ /**
|
|
+ * Construct generator
|
|
+ */
|
|
+ cmCPackTarXZGenerator();
|
|
+ virtual ~cmCPackTarXZGenerator();
|
|
+protected:
|
|
+ virtual const char* GetOutputExtension() { return ".tar.xz"; }
|
|
+};
|
|
+
|
|
+#endif
|
|
--- cmake-2.8.4/Tests/CMakeTests/ModuleNoticesTest.cmake.in.xz 2011-02-15 18:47:34.000000000 +0100
|
|
+++ cmake-2.8.4/Tests/CMakeTests/ModuleNoticesTest.cmake.in 2011-05-06 18:45:14.170278434 +0200
|
|
@@ -22,6 +22,7 @@ string(REPLACE "\r\r" "\r" notice_regex
|
|
# Modules that do not require our notice.
|
|
set(notice_exceptions
|
|
FindCUDA.cmake # MIT License, distributed here from upstream project
|
|
+ FindLibLZMA.cmake # Mandriva own patch, do not copyright by Kitware
|
|
)
|
|
|
|
# Load the list of modules to check.
|
|
--- cmake-2.8.4/Tests/SimpleInstall/CMakeLists.txt.xz 2011-02-15 18:47:36.000000000 +0100
|
|
+++ cmake-2.8.4/Tests/SimpleInstall/CMakeLists.txt 2011-05-06 18:45:14.047279971 +0200
|
|
@@ -358,6 +358,11 @@ IF(UNIX AND NOT APPLE)
|
|
IF(found_bz2)
|
|
SET(CPACK_GENERATOR "${CPACK_GENERATOR};TBZ2")
|
|
ENDIF(found_bz2)
|
|
+ FIND_PROGRAM(found_xz
|
|
+ NAMES xz)
|
|
+ IF(found_xz)
|
|
+ SET(CPACK_GENERATOR "${CPACK_GENERATOR};TXZ")
|
|
+ ENDIF(found_xz)
|
|
ENDIF(UNIX AND NOT APPLE)
|
|
|
|
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
|
|
--- cmake-2.8.4/Tests/SimpleInstallS2/CMakeLists.txt.xz 2011-02-15 18:47:36.000000000 +0100
|
|
+++ cmake-2.8.4/Tests/SimpleInstallS2/CMakeLists.txt 2011-05-06 18:45:14.103279271 +0200
|
|
@@ -358,6 +358,11 @@ IF(UNIX AND NOT APPLE)
|
|
IF(found_bz2)
|
|
SET(CPACK_GENERATOR "${CPACK_GENERATOR};TBZ2")
|
|
ENDIF(found_bz2)
|
|
+ FIND_PROGRAM(found_xz
|
|
+ NAMES xz)
|
|
+ IF(found_xz)
|
|
+ SET(CPACK_GENERATOR "${CPACK_GENERATOR};TXZ")
|
|
+ ENDIF(found_xz)
|
|
ENDIF(UNIX AND NOT APPLE)
|
|
|
|
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
|
|
--- cmake-2.8.4/Utilities/Release/release_cmake.cmake.xz 2011-02-15 18:47:41.000000000 +0100
|
|
+++ cmake-2.8.4/Utilities/Release/release_cmake.cmake 2011-05-06 18:45:14.114279133 +0200
|
|
@@ -104,6 +104,13 @@ foreach(gen ${generators})
|
|
set(SUFFIXES ${SUFFIXES} "*.tar.bz2")
|
|
set(extra_files setup.hint)
|
|
endif("${gen}" MATCHES "Cygwin")
|
|
+ if("${gen}" STREQUAL "TXZ")
|
|
+ set(SUFFIXES ${SUFFIXES} "*.tar.xz")
|
|
+ endif("${gen}" STREQUAL "TXZ")
|
|
+ if("${gen}" MATCHES "Cygwin")
|
|
+ set(SUFFIXES ${SUFFIXES} "*.tar.xz")
|
|
+ set(extra_files setup.hint)
|
|
+ endif("${gen}" MATCHES "Cygwin")
|
|
if("${gen}" STREQUAL "TZ")
|
|
set(SUFFIXES ${SUFFIXES} "*.tar.Z")
|
|
endif("${gen}" STREQUAL "TZ")
|