From: Kacper Kornet Date: Fri, 28 Jan 2011 18:53:33 +0000 (+0000) Subject: - fix for: -D option can't use value with equals sign X-Git-Tag: auto/th/cmake-2_8_4-1~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcmake.git;a=commitdiff_plain;h=6d0542bfa036d9b575bc4e9185fc52df3f8ef606 - fix for: -D option can't use value with equals sign - rel. 2 Changed files: cmake-parse.patch -> 1.1 cmake.spec -> 1.55 --- diff --git a/cmake-parse.patch b/cmake-parse.patch new file mode 100644 index 0000000..12c7e4a --- /dev/null +++ b/cmake-parse.patch @@ -0,0 +1,31 @@ +commit 6fe8624b7ff39f8511f4f4d7ebcbc5681932a6a5 +Author: Ben Boeckel +Date: Mon Nov 22 14:56:55 2010 -0500 + + Fix parsing of cache variables without a type + + These mainly come from the command line or manual entries in the + CMakeCache.txt file. We want to stop at the first '=' because this is + what is most likely to have been meant. The variable can be quoted if + the '=' is intended. + + Caveat: What if one wants both '"' and '=' in a variable name? + +diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx +index 2aa6236..fe6467a 100644 +--- a/Source/cmCacheManager.cxx ++++ b/Source/cmCacheManager.cxx +@@ -97,10 +97,10 @@ bool cmCacheManager::ParseEntry(const char* entry, + std::string& var, + std::string& value) + { +- // input line is: key:type=value ++ // input line is: key=value + static cmsys::RegularExpression reg( +- "^([^:]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); +- // input line is: "key":type=value ++ "^([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); ++ // input line is: "key"=value + static cmsys::RegularExpression regQuoted( + "^\"([^\"]*)\"=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); + bool flag = false; diff --git a/cmake.spec b/cmake.spec index bf597a6..39ab314 100644 --- a/cmake.spec +++ b/cmake.spec @@ -12,13 +12,14 @@ Summary: Cross-platform, open-source make system Summary(pl.UTF-8): Wieloplatformowy system make o otwartych źródłach Name: cmake Version: 2.8.3 -Release: 1 +Release: 2 License: BSD Group: Development/Building Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz # Source0-md5: a76a44b93acf5e3badda9de111385921 Patch0: %{name}-lib64.patch Patch1: %{name}-tinfo.patch +Patch2: %{name}-parse.patch URL: http://www.cmake.org/ %{?with_gui:BuildRequires: QtGui-devel} BuildRequires: libarchive-devel @@ -67,6 +68,7 @@ CMake. %patch0 -p1 %endif %patch1 -p0 +%patch2 -p1 cat > "init.cmake" <