rpms/ctemplate/devel ctemplate-0.91.consts.patch, NONE, 1.1 ctemplate.spec, 1.3, 1.4

Caolan McNamara caolanm at fedoraproject.org
Tue Mar 3 10:22:28 UTC 2009


Author: caolanm

Update of /cvs/pkgs/rpms/ctemplate/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32418

Modified Files:
	ctemplate.spec 
Added Files:
	ctemplate-0.91.consts.patch 
Log Message:
fix up consts to build

ctemplate-0.91.consts.patch:

--- NEW FILE ctemplate-0.91.consts.patch ---
diff -ru ctemplate-0.91.orig/src/template.cc ctemplate-0.91/src/template.cc
--- ctemplate-0.91.orig/src/template.cc	2009-03-03 10:01:11.000000000 +0000
+++ ctemplate-0.91/src/template.cc	2009-03-03 10:02:47.000000000 +0000
@@ -186,7 +186,7 @@
 
   const char* match;
   const char* hayend = haystack + haystack_len - needle_len + 1;
-  while ((match = static_cast<char*>(memchr(haystack, needle[0],
+  while ((match = static_cast<const char*>(memchr(haystack, needle[0],
                                             hayend - haystack)))) {
     if (memcmp(match, needle, needle_len) == 0)
       return match;
@@ -2175,7 +2175,7 @@
 
 bool Template::ParseDelimiters(const char* text, size_t textlen,
                                MarkerDelimiters* delim) {
-  const char* space = reinterpret_cast<char*>(memchr(text, ' ', textlen));
+  const char* space = reinterpret_cast<const char*>(memchr(text, ' ', textlen));
   if (textlen < 3 ||
       text[0] != '=' || text[textlen - 1] != '=' ||       // no = at ends
       memchr(text + 1, '=', textlen - 2) ||               // = in the middle
diff -ru ctemplate-0.91.orig/src/tests/htmlparser_test.cc ctemplate-0.91/src/tests/htmlparser_test.cc
--- ctemplate-0.91.orig/src/tests/htmlparser_test.cc	2009-03-03 10:01:11.000000000 +0000
+++ ctemplate-0.91/src/tests/htmlparser_test.cc	2009-03-03 10:10:48.000000000 +0000
@@ -70,6 +70,7 @@
 #include <errno.h>
 #include <assert.h>
 #include <string.h>
+#include <stdio.h>
 #include <string>
 #include <utility>
 #include <vector>
@@ -113,7 +114,7 @@
 
 static int strcount(const string& str, char c) {
   int count = 0;
-  for (char* p = strchr(str.c_str(), c); p; p = strchr(p+1, c))
+  for (const char* p = strchr(str.c_str(), c); p; p = strchr(p+1, c))
     count++;
   return count;
 }


Index: ctemplate.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ctemplate/devel/ctemplate.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ctemplate.spec	24 Feb 2009 10:11:32 -0000	1.3
+++ ctemplate.spec	3 Mar 2009 10:21:58 -0000	1.4
@@ -1,12 +1,13 @@
 Name:           ctemplate
 Version:        0.91
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        A simple but powerful template language for C++
 
 Group:          Development/Tools
 License:        BSD
 URL:            http://code.google.com/p/google-ctemplate/
 Source0:        http://google-ctemplate.googlecode.com/files/%{name}-%{version}.tar.gz
+Patch0:         ctemplate-0.91.consts.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  chrpath
 
@@ -27,6 +28,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .consts
 
 %build
 %configure --disable-static
@@ -88,6 +90,9 @@
 %{_includedir}/%{name}/*.h
 
 %changelog
+* Tue Mar 03 2009 Caolán McNamara <caolanm at redhat.com> - 0.91-5
+- fix up consts to build
+
 * Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.91-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list