diff --git a/debian/changelog b/debian/changelog index 86a657fc3..0def44d5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +cmake (2.6.3~rc11-0r1) UNRELEASED; urgency=low + + * New upstream pre-release. + * Update debian/patches: + - remove find_package_support_prefix_lib_cmake.diff, merged upstream; + - adopt FindQt4.cmake2.6.diff; + - refresh do-not-use-lib64.diff; + - remove relative_path_fixes.diff, merged upstream; + - refresh relative_path_fixes2.diff; + - remove manpage-generation-fixes.diff, merged upstream; + - refresh FindQt4_qt4_lupdate_lrelease.diff; + - remove FindMPEG2_include_FindSDL_fix.diff, merged upstream; + + -- Modestas Vainius Sat, 07 Feb 2009 16:22:50 +0200 + cmake (2.6.2-3) experimental; urgency=low * Fix typo in cmake-qt-gui description. diff --git a/debian/patches/FindMPEG2_include_FindSDL_fix.diff b/debian/patches/FindMPEG2_include_FindSDL_fix.diff deleted file mode 100644 index b78607664..000000000 --- a/debian/patches/FindMPEG2_include_FindSDL_fix.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Modules/FindMPEG2.cmake -+++ b/Modules/FindMPEG2.cmake -@@ -34,7 +34,7 @@ - - #some native mpeg2 installations will depend - #on libSDL, if found, add it in. -- INCLUDE( FindSDL.cmake ) -+ INCLUDE( FindSDL ) - IF(SDL_FOUND) - SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY}) - ENDIF(SDL_FOUND) diff --git a/debian/patches/FindQt4.cmake2.6.diff b/debian/patches/FindQt4.cmake2.6.diff index a7832053d..aaccfa585 100644 --- a/debian/patches/FindQt4.cmake2.6.diff +++ b/debian/patches/FindQt4.cmake2.6.diff @@ -1,6 +1,6 @@ --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake -@@ -1408,198 +1408,6 @@ +@@ -1274,199 +1274,6 @@ QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL") SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL}) @@ -119,8 +119,8 @@ - ENDIF(OPENSSL_LIBRARIES) - ENDIF(QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN) - -- ## qdbus -- IF(QT_QCONFIG MATCHES "qdbus") +- ## dbus +- IF(QT_QCONFIG MATCHES "dbus") - - # if the dbus library isn't found, we'll assume its not required to build - # shared Qt on Linux doesn't require it @@ -146,7 +146,7 @@ - MARK_AS_ADVANCED(QT_DBUS_LIBRARY) - ENDIF(NOT QT_DBUS_LIBRARY) - -- ENDIF(QT_QCONFIG MATCHES "qdbus") +- ENDIF(QT_QCONFIG MATCHES "dbus") - - ## glib - IF(QT_QCONFIG MATCHES "glib") @@ -170,15 +170,16 @@ - - FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} ) - FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} ) -- -- IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) -- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} -- ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY}) -- ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) -- +- - MARK_AS_ADVANCED(QT_GLIB_LIBRARY) - MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY) - ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) +- +- IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) +- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} +- ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY}) +- ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) +- - ENDIF(QT_QCONFIG MATCHES "glib") - - ## clock-monotonic, just see if we need to link with rt @@ -199,7 +200,7 @@ IF(Q_WS_X11) # X11 libraries Qt absolutely depends on QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11") -@@ -1608,9 +1416,9 @@ +@@ -1475,9 +1282,9 @@ STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}") SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY") FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11}) diff --git a/debian/patches/FindQt4_qt4_lupdate_lrelease.diff b/debian/patches/FindQt4_qt4_lupdate_lrelease.diff index 066ccbcd8..0f561bce6 100644 --- a/debian/patches/FindQt4_qt4_lupdate_lrelease.diff +++ b/debian/patches/FindQt4_qt4_lupdate_lrelease.diff @@ -1,6 +1,6 @@ --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake -@@ -972,13 +972,13 @@ +@@ -824,13 +824,13 @@ ) FIND_PROGRAM(QT_LUPDATE_EXECUTABLE diff --git a/debian/patches/do-not-use-lib64.diff b/debian/patches/do-not-use-lib64.diff index 2531b54dd..8298336e1 100644 --- a/debian/patches/do-not-use-lib64.diff +++ b/debian/patches/do-not-use-lib64.diff @@ -1,6 +1,6 @@ --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx -@@ -158,6 +158,7 @@ +@@ -160,6 +160,7 @@ void cmFindLibraryCommand::AddLib64Paths() { @@ -8,7 +8,7 @@ if(!this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> GetLanguageEnabled("C")) { -@@ -205,6 +206,7 @@ +@@ -208,6 +209,7 @@ { this->SearchPaths = path64; } diff --git a/debian/patches/find_package_support_prefix_lib_cmake.diff b/debian/patches/find_package_support_prefix_lib_cmake.diff deleted file mode 100644 index cf53339c5..000000000 --- a/debian/patches/find_package_support_prefix_lib_cmake.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- a/Source/cmFindPackageCommand.cxx -+++ b/Source/cmFindPackageCommand.cxx -@@ -218,6 +218,7 @@ - "UNIX (U), or Apple (A) conventions.\n" - " / (W)\n" - " /(cmake|CMake)/ (W)\n" -+ " /(share|lib)/cmake/*/ (U)\n" - " /(share|lib)/*/ (U)\n" - " /(share|lib)/*/(cmake|CMake)/ (U)\n" - "On systems supporting OS X Frameworks and Application Bundles " -@@ -1710,6 +1711,20 @@ - common.push_back("lib"); - common.push_back("share"); - -+ // PREFIX/(share|lib)/cmake/(Foo|foo|FOO).*/ -+ { -+ cmFindPackageFileList lister(this); -+ lister -+ / cmFileListGeneratorFixed(prefix) -+ / cmFileListGeneratorEnumerate(common) -+ / cmFileListGeneratorFixed("cmake") -+ / cmFileListGeneratorProject(this->Names); -+ if(lister.Search()) -+ { -+ return true; -+ } -+ } -+ - // PREFIX/(share|lib)/(Foo|foo|FOO).*/ - { - cmFindPackageFileList lister(this); diff --git a/debian/patches/manpage-generation-fixes.diff b/debian/patches/manpage-generation-fixes.diff deleted file mode 100644 index f2509d9cc..000000000 --- a/debian/patches/manpage-generation-fixes.diff +++ /dev/null @@ -1,510 +0,0 @@ -date: 2008-10-10 18:23:35 +0300; author: king; state: Exp; lines: +115 -12; commitid: pFogEk9NmHzoT5mt; -ENH: Improve generated documentation formatting - -Applying patch provided in issue #7797. - -Fixes to man-pages: -* Character '-' must be espaced as '\-' -* Surround preformatted text with '.nf' and '.fi' to adjust filling -* Give every page a NAME section for indexing by mandb -* Pass the man page filename without extension to .TH in its header - -Also added a title to the HTML header. - -The patch can be retrieved from upstream CVS with: -$ cvs diff -u -D "2008-10-10 18:23 +0300" -D "2008-10-10 18:24 +0300" - -"File version" hunks were removed for the patch to apply. ---- a/Source/cmDocumentation.cxx -+++ b/Source/cmDocumentation.cxx -@@ -202,6 +202,26 @@ - }; - - //---------------------------------------------------------------------------- -+#define DOCUMENT_INTRO(type, default_name, desc) \ -+ static char const *cmDocumentation##type##Intro[2] = { default_name, desc }; -+#define GET_DOCUMENT_INTRO(type) cmDocumentation##type##Intro -+ -+DOCUMENT_INTRO(Modules, "cmakemodules", -+ "Reference of available CMake modules."); -+DOCUMENT_INTRO(CustomModules, "cmakecustommodules", -+ "Reference of available CMake custom modules."); -+DOCUMENT_INTRO(Policies, "cmakepolicies", -+ "Reference of CMake policies."); -+DOCUMENT_INTRO(Properties, "cmakeprops", -+ "Reference of CMake properties."); -+DOCUMENT_INTRO(Variables, "cmakevars", -+ "Reference of CMake variables."); -+DOCUMENT_INTRO(Commands, "cmakecommands", -+ "Reference of available CMake commands."); -+DOCUMENT_INTRO(CompatCommands, "cmakecompat", -+ "Reference of CMake compatibility commands."); -+ -+//---------------------------------------------------------------------------- - cmDocumentation::cmDocumentation() - :CurrentFormatter(0) - { -@@ -321,7 +341,27 @@ - } - - //---------------------------------------------------------------------------- --bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os) -+void cmDocumentation::AddDocumentIntroToPrint(const char* intro[2]) -+{ -+ const char* docname; -+ if (intro && (docname = this->GetDocName(false))) -+ { -+ cmDocumentationSection* section; -+ std::string desc(""); -+ -+ desc += docname; -+ desc += " - "; -+ desc += intro[1]; -+ -+ section = new cmDocumentationSection("Introduction", "NAME"); -+ section->Append(0, desc.c_str(), 0); -+ this->PrintSections.push_back(section); -+ } -+} -+ -+//---------------------------------------------------------------------------- -+bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os, -+ const char* docname) - { - if ((this->CurrentFormatter->GetForm() != HTMLForm) - && (this->CurrentFormatter->GetForm() != DocbookForm) -@@ -330,6 +370,16 @@ - this->PrintVersion(os); - } - -+ // Handle Document Name. docname==0 disables intro. -+ this->SetDocName(""); -+ if (docname) -+ { -+ if (*docname) -+ this->SetDocName(docname); -+ else // empty string was given. select default if possible -+ this->SetDocName(this->GetDefaultDocName(ht)); -+ } -+ - switch (ht) - { - case cmDocumentation::Usage: -@@ -595,6 +645,7 @@ - // given stream. - std::ofstream* fout = 0; - std::ostream* s = &os; -+ std::string docname(""); - if(i->Filename.length() > 0) - { - fout = new std::ofstream(i->Filename.c_str(), std::ios::out); -@@ -606,10 +657,14 @@ - { - result = false; - } -+ if(i->Filename != "-") -+ { -+ docname = cmSystemTools::GetFilenameWithoutLastExtension(i->Filename); -+ } - } - - // Print this documentation type to the stream. -- if(!this->PrintDocumentation(i->HelpType, *s) || !*s) -+ if(!this->PrintDocumentation(i->HelpType, *s, docname.c_str()) || !*s) - { - result = false; - } -@@ -634,7 +689,7 @@ - cmDocumentation::Form cmDocumentation::GetFormFromFilename( - const std::string& filename) - { -- std::string ext = cmSystemTools::GetFilenameExtension(filename); -+ std::string ext = cmSystemTools::GetFilenameLastExtension(filename); - ext = cmSystemTools::UpperCase(ext); - if ((ext == ".HTM") || (ext == ".HTML")) - { -@@ -870,6 +925,12 @@ - } - - //---------------------------------------------------------------------------- -+void cmDocumentation::SetDocName(const char *docname) -+{ -+ this->DocName = docname?docname:""; -+} -+ -+//---------------------------------------------------------------------------- - void cmDocumentation::SetSection(const char *name, - cmDocumentationSection *section) - { -@@ -1233,7 +1294,7 @@ - bool cmDocumentation::PrintDocumentationFull(std::ostream& os) - { - this->CreateFullDocumentation(); -- this->CurrentFormatter->PrintHeader(GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetNameString(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1244,11 +1305,12 @@ - { - this->ClearSections(); - this->CreateModulesSection(); -+ this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Modules)); - this->AddSectionToPrint("Description"); - this->AddSectionToPrint("Modules"); - this->AddSectionToPrint("Copyright"); - this->AddSectionToPrint("See Also"); -- this->CurrentFormatter->PrintHeader(this->GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1259,13 +1321,14 @@ - { - this->ClearSections(); - this->CreateCustomModulesSection(); -+ this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(CustomModules)); - this->AddSectionToPrint("Description"); - this->AddSectionToPrint("Custom CMake Modules"); - // the custom modules are most probably not under Kitware's copyright, Alex - // this->AddSectionToPrint("Copyright"); - this->AddSectionToPrint("See Also"); - -- this->CurrentFormatter->PrintHeader(this->GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1275,12 +1338,13 @@ - bool cmDocumentation::PrintDocumentationPolicies(std::ostream& os) - { - this->ClearSections(); -+ this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Policies)); - this->AddSectionToPrint("Description"); - this->AddSectionToPrint("Policies"); - this->AddSectionToPrint("Copyright"); - this->AddSectionToPrint("See Also"); - -- this->CurrentFormatter->PrintHeader(this->GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1290,6 +1354,7 @@ - bool cmDocumentation::PrintDocumentationProperties(std::ostream& os) - { - this->ClearSections(); -+ this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Properties)); - this->AddSectionToPrint("Properties Description"); - for (std::vector::iterator i = - this->PropertySections.begin(); -@@ -1299,7 +1364,7 @@ - } - this->AddSectionToPrint("Copyright"); - this->AddSectionToPrint("Standard See Also"); -- this->CurrentFormatter->PrintHeader(this->GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1309,6 +1374,7 @@ - bool cmDocumentation::PrintDocumentationVariables(std::ostream& os) - { - this->ClearSections(); -+ this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Variables)); - for (std::vector::iterator i = - this->VariableSections.begin(); - i != this->VariableSections.end(); ++i) -@@ -1317,7 +1383,7 @@ - } - this->AddSectionToPrint("Copyright"); - this->AddSectionToPrint("Standard See Also"); -- this->CurrentFormatter->PrintHeader(this->GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1327,10 +1393,11 @@ - bool cmDocumentation::PrintDocumentationCurrentCommands(std::ostream& os) - { - this->ClearSections(); -+ this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Commands)); - this->AddSectionToPrint("Commands"); - this->AddSectionToPrint("Copyright"); - this->AddSectionToPrint("Standard See Also"); -- this->CurrentFormatter->PrintHeader(this->GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1340,11 +1407,12 @@ - bool cmDocumentation::PrintDocumentationCompatCommands(std::ostream& os) - { - this->ClearSections(); -+ this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(CompatCommands)); - this->AddSectionToPrint("Compatibility Commands Description"); - this->AddSectionToPrint("Compatibility Commands"); - this->AddSectionToPrint("Copyright"); - this->AddSectionToPrint("Standard See Also"); -- this->CurrentFormatter->PrintHeader(GetNameString(), os); -+ this->CurrentFormatter->PrintHeader(GetDocName(), GetNameString(), os); - this->Print(os); - this->CurrentFormatter->PrintFooter(os); - return true; -@@ -1466,6 +1534,41 @@ - } - - //---------------------------------------------------------------------------- -+const char* cmDocumentation::GetDocName(bool fallbackToNameString) const -+{ -+ if (this->DocName.length() > 0) -+ { -+ return this->DocName.c_str(); -+ } -+ else if (fallbackToNameString) -+ { -+ return this->GetNameString(); -+ } -+ else -+ return 0; -+} -+ -+//---------------------------------------------------------------------------- -+#define CASE_DEFAULT_DOCNAME(doctype) \ -+ case cmDocumentation::doctype : \ -+ return GET_DOCUMENT_INTRO(doctype)[0]; -+const char* cmDocumentation::GetDefaultDocName(Type ht) const -+{ -+ switch (ht) -+ { -+ CASE_DEFAULT_DOCNAME(Modules) -+ CASE_DEFAULT_DOCNAME(CustomModules) -+ CASE_DEFAULT_DOCNAME(Policies) -+ CASE_DEFAULT_DOCNAME(Properties) -+ CASE_DEFAULT_DOCNAME(Variables) -+ CASE_DEFAULT_DOCNAME(Commands) -+ CASE_DEFAULT_DOCNAME(CompatCommands) -+ default: break; -+ } -+ return 0; -+} -+ -+//---------------------------------------------------------------------------- - bool cmDocumentation::IsOption(const char* arg) const - { - return ((arg[0] == '-') || (strcmp(arg, "/V") == 0) || ---- a/Source/cmDocumentation.h -+++ b/Source/cmDocumentation.h -@@ -61,7 +61,7 @@ - bool PrintRequestedDocumentation(std::ostream& os); - - /** Print help of the given type. */ -- bool PrintDocumentation(Type ht, std::ostream& os); -+ bool PrintDocumentation(Type ht, std::ostream& os, const char* docname=0); - - /** Set the program name for standard document generation. */ - void SetName(const char* name); -@@ -124,6 +124,7 @@ - - private: - void SetForm(Form f); -+ void SetDocName(const char* docname); - - bool CreateSingleModule(const char* fname, - const char* moduleName, -@@ -134,6 +135,8 @@ - bool CreateCustomModulesSection(); - void CreateFullDocumentation(); - -+ void AddDocumentIntroToPrint(const char* intro[2]); -+ - bool PrintCopyright(std::ostream& os); - bool PrintVersion(std::ostream& os); - bool PrintDocumentationGeneric(std::ostream& os, const char *section); -@@ -157,9 +160,12 @@ - - - const char* GetNameString() const; -+ const char* GetDocName(bool fallbackToNameString = true) const; -+ const char* GetDefaultDocName(Type ht) const; - bool IsOption(const char* arg) const; - - std::string NameString; -+ std::string DocName; - std::map AllSections; - - std::string SeeAlsoString; ---- a/Source/cmDocumentationFormatter.cxx -+++ b/Source/cmDocumentationFormatter.cxx -@@ -118,7 +118,8 @@ - { - return "module"; - } -- else if(name.find("Name") != name.npos) -+ else if(name.find("Name") != name.npos || -+ name.find("Introduction") != name.npos) - { - return "name"; - } ---- a/Source/cmDocumentationFormatter.h -+++ b/Source/cmDocumentationFormatter.h -@@ -52,7 +52,9 @@ - - virtual cmDocumentationEnums::Form GetForm() const = 0; - -- virtual void PrintHeader(const char* /*name*/, std::ostream& /*os*/) {} -+ virtual void PrintHeader(const char* /*docname*/, -+ const char* /*appname*/, -+ std::ostream& /*os*/) {} - virtual void PrintFooter(std::ostream& /*os*/) {} - virtual void PrintSection(std::ostream& os, - const cmDocumentationSection& section, ---- a/Source/cmDocumentationFormatterDocbook.cxx -+++ b/Source/cmDocumentationFormatterDocbook.cxx -@@ -229,8 +229,9 @@ - } - - //---------------------------------------------------------------------------- --void cmDocumentationFormatterDocbook::PrintHeader(const char* name, -- std::ostream& os) -+void cmDocumentationFormatterDocbook::PrintHeader(const char* docname, -+ const char* appname, -+ std::ostream& os) - { - // this one is used to ensure that we don't create multiple link targets - // with the same name. We can clear it here since we are at the -@@ -244,7 +245,7 @@ - " ]>\n" - "
\n" - "\n" -- "" << name << "\n" -+ "" << docname << " - " << appname << "\n" - "\n"; - } - ---- a/Source/cmDocumentationFormatterDocbook.h -+++ b/Source/cmDocumentationFormatterDocbook.h -@@ -31,7 +31,8 @@ - virtual cmDocumentationEnums::Form GetForm() const - { return cmDocumentationEnums::DocbookForm;} - -- virtual void PrintHeader(const char* name, std::ostream& os); -+ virtual void PrintHeader(const char* docname, const char* appname, -+ std::ostream& os); - virtual void PrintFooter(std::ostream& os); - virtual void PrintSection(std::ostream& os, - const cmDocumentationSection& section, ---- a/Source/cmDocumentationFormatterHTML.cxx -+++ b/Source/cmDocumentationFormatterHTML.cxx -@@ -202,10 +202,13 @@ - } - - //---------------------------------------------------------------------------- --void cmDocumentationFormatterHTML::PrintHeader(const char* /*name*/, -+void cmDocumentationFormatterHTML::PrintHeader(const char* docname, -+ const char* appname, - std::ostream& os) - { -- os << "\n"; -+ os << ""; -+ os << docname << " - " << appname; -+ os << "\n"; - } - - //---------------------------------------------------------------------------- ---- a/Source/cmDocumentationFormatterHTML.h -+++ b/Source/cmDocumentationFormatterHTML.h -@@ -30,7 +30,8 @@ - virtual cmDocumentationEnums::Form GetForm() const - { return cmDocumentationEnums::HTMLForm;} - -- virtual void PrintHeader(const char* name, std::ostream& os); -+ virtual void PrintHeader(const char* docname, const char* appname, -+ std::ostream& os); - virtual void PrintFooter(std::ostream& os); - virtual void PrintSection(std::ostream& os, - const cmDocumentationSection& section, ---- a/Source/cmDocumentationFormatterMan.cxx -+++ b/Source/cmDocumentationFormatterMan.cxx -@@ -57,30 +57,44 @@ - } - } - -+void cmDocumentationFormatterMan::EscapeText(std::string& man_text) -+{ -+ cmSystemTools::ReplaceString(man_text, "\\", "\\\\"); -+ cmSystemTools::ReplaceString(man_text, "-", "\\-"); -+} -+ - void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os, - const char* text) - { - std::string man_text = text; -- cmSystemTools::ReplaceString(man_text, "\\", "\\\\"); -- os << man_text << "\n"; -+ this->EscapeText(man_text); -+ os << ".nf\n" << man_text; -+ if (*text && man_text.at(man_text.length()-1) != '\n') -+ os << "\n"; -+ os << ".fi\n"; - } - - void cmDocumentationFormatterMan::PrintParagraph(std::ostream& os, - const char* text) - { - std::string man_text = text; -- cmSystemTools::ReplaceString(man_text, "\\", "\\\\"); -+ this->EscapeText(man_text); - os << man_text << "\n\n"; - } - - - //---------------------------------------------------------------------------- --void cmDocumentationFormatterMan::PrintHeader(const char* name, -+void cmDocumentationFormatterMan::PrintHeader(const char* docname, -+ const char* appname, - std::ostream& os) - { -- os << ".TH " << name << " 1 \"" -+ std::string s_docname(docname), s_appname(appname); -+ -+ this->EscapeText(s_docname); -+ this->EscapeText(s_appname); -+ os << ".TH " << s_docname << " 1 \"" - << cmSystemTools::GetCurrentDateTime("%B %d, %Y").c_str() -- << "\" \"" << name -+ << "\" \"" << s_appname - << " " << cmVersion::GetCMakeVersion() - << "\"\n"; - } ---- a/Source/cmDocumentationFormatterMan.h -+++ b/Source/cmDocumentationFormatterMan.h -@@ -30,12 +30,16 @@ - virtual cmDocumentationEnums::Form GetForm() const - { return cmDocumentationEnums::ManForm;} - -- virtual void PrintHeader(const char* name, std::ostream& os); -+ virtual void PrintHeader(const char* docname, const char* appname, -+ std::ostream& os); - virtual void PrintSection(std::ostream& os, - const cmDocumentationSection& section, - const char* name); - virtual void PrintPreformatted(std::ostream& os, const char* text); - virtual void PrintParagraph(std::ostream& os, const char* text); -+ -+private: -+ void EscapeText(std::string& man_text); - }; - - #endif ---- a/Source/kwsys/SystemTools.cxx -+++ b/Source/kwsys/SystemTools.cxx -@@ -3382,7 +3382,7 @@ - - /** - * Return file extension of a full filename (dot included). -- * Warning: this is the shortest extension (for example: .tar.gz) -+ * Warning: this is the shortest extension (for example: .gz of .tar.gz) - */ - kwsys_stl::string SystemTools::GetFilenameLastExtension(const kwsys_stl::string& filename) - { diff --git a/debian/patches/relative_path_fixes.diff b/debian/patches/relative_path_fixes.diff deleted file mode 100644 index a59824f1a..000000000 --- a/debian/patches/relative_path_fixes.diff +++ /dev/null @@ -1,510 +0,0 @@ -date: 2008-10-09 22:30:07 +0300; author: king; state: Exp; lines: +29 -30; commitid: jdAfWT6Sw8VXhZlt; -ENH: Fix optional use of relative paths. - -These changes refactor cmLocalGenerator methods Convert and -ConvertToOutputForExisting to support references inside the build tree -using relative paths. After this commit, all tests pass with Makefile -generators when relative paths are enabled by default. See issue #7779. - -The patch can be retrieved from upstream CVS with: -$ cvs diff -u -D "2008-10-09 22:30 +0300" -D "2008-10-09 22:31 +0300" - -"File version" hunks were removed for the patch to apply. Also one hunk -was unfuzzed. ---- a/Source/cmLocalGenerator.cxx -+++ b/Source/cmLocalGenerator.cxx -@@ -1074,22 +1074,54 @@ - s = expandedInput; - } - -- --std::string --cmLocalGenerator::ConvertToOutputForExisting(const char* p) -+//---------------------------------------------------------------------------- -+std::string -+cmLocalGenerator::ConvertToOutputForExistingCommon(const char* remote, -+ std::string const& result) - { -- std::string ret = p; -- if(this->WindowsShell && ret.find(' ') != ret.npos -- && cmSystemTools::FileExists(p)) -+ // If this is a windows shell, the result has a space, and the path -+ // already exists, we can use a short-path to reference it without a -+ // space. -+ if(this->WindowsShell && result.find(' ') != result.npos && -+ cmSystemTools::FileExists(remote)) - { -- if(cmSystemTools::GetShortPath(p, ret)) -+ std::string tmp; -+ if(cmSystemTools::GetShortPath(remote, tmp)) - { -- return this->Convert(ret.c_str(), NONE, SHELL, true); -+ return this->Convert(tmp.c_str(), NONE, SHELL, true); - } - } -- return this->Convert(p, START_OUTPUT, SHELL, true); -+ -+ // Otherwise, leave it unchanged. -+ return result; -+} -+ -+//---------------------------------------------------------------------------- -+std::string -+cmLocalGenerator::ConvertToOutputForExisting(const char* remote, -+ RelativeRoot local) -+{ -+ // Perform standard conversion. -+ std::string result = this->Convert(remote, local, SHELL, true); -+ -+ // Consider short-path. -+ return this->ConvertToOutputForExistingCommon(remote, result); -+} -+ -+//---------------------------------------------------------------------------- -+std::string -+cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote, -+ const char* local) -+{ -+ // Perform standard conversion. -+ std::string result = this->Convert(remote, local, SHELL, true); -+ -+ // Consider short-path. -+ const char* remotePath = this->GetRelativeRootPath(remote); -+ return this->ConvertToOutputForExistingCommon(remotePath, result); - } - -+//---------------------------------------------------------------------------- - const char* cmLocalGenerator::GetIncludeFlags(const char* lang) - { - if(!lang) -@@ -1983,7 +2015,21 @@ - } - - //---------------------------------------------------------------------------- --std::string cmLocalGenerator::Convert(const char* source, -+const char* cmLocalGenerator::GetRelativeRootPath(RelativeRoot relroot) -+{ -+ switch (relroot) -+ { -+ case HOME: return this->Makefile->GetHomeDirectory(); -+ case START: return this->Makefile->GetStartDirectory(); -+ case HOME_OUTPUT: return this->Makefile->GetHomeOutputDirectory(); -+ case START_OUTPUT: return this->Makefile->GetStartOutputDirectory(); -+ default: break; -+ } -+ return 0; -+} -+ -+//---------------------------------------------------------------------------- -+std::string cmLocalGenerator::Convert(const char* source, - RelativeRoot relative, - OutputFormat output, - bool optional) -@@ -2031,7 +2077,15 @@ - break; - } - } -- // Now convert it to an output path. -+ return this->ConvertToOutputFormat(result.c_str(), output); -+} -+ -+//---------------------------------------------------------------------------- -+std::string cmLocalGenerator::ConvertToOutputFormat(const char* source, -+ OutputFormat output) -+{ -+ std::string result = source; -+ // Convert it to an output path. - if (output == MAKEFILE) - { - result = cmSystemTools::ConvertToOutputPath(result.c_str()); -@@ -2064,6 +2118,40 @@ - } - - //---------------------------------------------------------------------------- -+std::string cmLocalGenerator::Convert(RelativeRoot remote, -+ const char* local, -+ OutputFormat output, -+ bool optional) -+{ -+ const char* remotePath = this->GetRelativeRootPath(remote); -+ if(local && (!optional || this->UseRelativePaths)) -+ { -+ std::vector components; -+ std::string result; -+ switch(remote) -+ { -+ case HOME: -+ case HOME_OUTPUT: -+ case START: -+ case START_OUTPUT: -+ cmSystemTools::SplitPath(local, components); -+ result = this->ConvertToRelativePath(components, remotePath); -+ break; -+ case FULL: -+ result = remotePath; -+ break; -+ case NONE: -+ break; -+ } -+ return this->ConvertToOutputFormat(result.c_str(), output); -+ } -+ else -+ { -+ return this->ConvertToOutputFormat(remotePath, output); -+ } -+} -+ -+//---------------------------------------------------------------------------- - std::string cmLocalGenerator::FindRelativePathTopSource() - { - // Relative path conversion within a single tree managed by CMake is ---- a/Source/cmLocalGenerator.h -+++ b/Source/cmLocalGenerator.h -@@ -108,10 +108,18 @@ - */ - enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT }; - enum OutputFormat { UNCHANGED, MAKEFILE, SHELL }; -- std::string Convert(const char* source, -- RelativeRoot relative, -+ std::string ConvertToOutputFormat(const char* source, OutputFormat output); -+ std::string Convert(const char* remote, RelativeRoot local, - OutputFormat output = UNCHANGED, - bool optional = false); -+ std::string Convert(RelativeRoot remote, const char* local, -+ OutputFormat output = UNCHANGED, -+ bool optional = false); -+ -+ /** -+ * Get path for the specified relative root. -+ */ -+ const char* GetRelativeRootPath(RelativeRoot relroot); - - /** - * Convert the given path to an output path that is optionally -@@ -162,7 +170,13 @@ - std::string GetRealLocation(const char* inName, const char* config); - - ///! for existing files convert to output path and short path if spaces -- std::string ConvertToOutputForExisting(const char* p); -+ std::string ConvertToOutputForExisting(const char* remote, -+ RelativeRoot local = START_OUTPUT); -+ -+ /** For existing path identified by RelativeRoot convert to output -+ path and short path if spaces. */ -+ std::string ConvertToOutputForExisting(RelativeRoot remote, -+ const char* local = 0); - - /** Called from command-line hook to clear dependencies. */ - virtual void ClearDependencies(cmMakefile* /* mf */, -@@ -386,6 +400,9 @@ - - unsigned int BackwardsCompatibility; - bool BackwardsCompatibilityFinal; -+private: -+ std::string ConvertToOutputForExistingCommon(const char* remote, -+ std::string const& result); - }; - - #endif ---- a/Source/cmLocalUnixMakefileGenerator3.cxx -+++ b/Source/cmLocalUnixMakefileGenerator3.cxx -@@ -360,7 +360,7 @@ - ); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - } - - // Write the rule to the makefile. -@@ -404,7 +404,7 @@ - (makefile2.c_str(),localName.c_str())); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - this->WriteMakeRule(ruleFileStream, "Convenience name for target.", - localName.c_str(), depends, commands, true); - -@@ -432,7 +432,7 @@ - (makefileName.c_str(), makeTargetName.c_str())); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - this->WriteMakeRule(ruleFileStream, "fast build rule for target.", - localName.c_str(), depends, commands, true); - -@@ -450,7 +450,7 @@ - (makefile2.c_str(), makeTargetName.c_str())); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - this->WriteMakeRule(ruleFileStream, - "Manual pre-install relink rule for target.", - localName.c_str(), depends, commands, true); -@@ -835,7 +835,7 @@ - { - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - } - this->WriteMakeRule(makefileStream, - "Special rule to run CMake to check the build system " -@@ -953,12 +953,13 @@ - void - cmLocalUnixMakefileGenerator3 - ::AppendCustomCommands(std::vector& commands, -- const std::vector& ccs) -+ const std::vector& ccs, -+ cmLocalGenerator::RelativeRoot relative) - { - for(std::vector::const_iterator i = ccs.begin(); - i != ccs.end(); ++i) - { -- this->AppendCustomCommand(commands, *i, true); -+ this->AppendCustomCommand(commands, *i, true, relative); - } - } - -@@ -966,7 +967,8 @@ - void - cmLocalUnixMakefileGenerator3 - ::AppendCustomCommand(std::vector& commands, -- const cmCustomCommand& cc, bool echo_comment) -+ const cmCustomCommand& cc, bool echo_comment, -+ cmLocalGenerator::RelativeRoot relative) - { - // Optionally create a command to display the custom command's - // comment text. This is used for pre-build, pre-link, and -@@ -1072,8 +1074,7 @@ - } - - // Setup the proper working directory for the commands. -- this->CreateCDCommand(commands1, dir, -- this->Makefile->GetHomeOutputDirectory()); -+ this->CreateCDCommand(commands1, dir, relative); - - // push back the custom commands - commands.insert(commands.end(), commands1.begin(), commands1.end()); -@@ -1610,9 +1611,11 @@ - this->AppendCustomDepends(depends, - glIt->second.GetPostBuildCommands()); - this->AppendCustomCommands(commands, -- glIt->second.GetPreBuildCommands()); -+ glIt->second.GetPreBuildCommands(), -+ cmLocalGenerator::START_OUTPUT); - this->AppendCustomCommands(commands, -- glIt->second.GetPostBuildCommands()); -+ glIt->second.GetPostBuildCommands(), -+ cmLocalGenerator::START_OUTPUT); - std::string targetName = glIt->second.GetName(); - this->WriteMakeRule(ruleFileStream, targetString.c_str(), - targetName.c_str(), depends, commands, true); -@@ -1674,7 +1677,7 @@ - recursiveTarget.c_str())); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - { - cmOStringStream progCmd; - progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0 -@@ -1696,7 +1699,7 @@ - recursiveTarget.c_str())); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - this->WriteMakeRule(ruleFileStream, "The main clean target", "clean", - depends, commands, true); - commands.clear(); -@@ -1726,7 +1729,7 @@ - (this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget.c_str())); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.", - "preinstall", depends, commands, true); - depends.clear(); -@@ -1747,7 +1750,7 @@ - commands.push_back(runRule); - this->CreateCDCommand(commands, - this->Makefile->GetHomeOutputDirectory(), -- this->Makefile->GetStartOutputDirectory()); -+ cmLocalGenerator::START_OUTPUT); - this->WriteMakeRule(ruleFileStream, "clear depends", - "depend", - depends, commands, true); -@@ -2126,8 +2129,10 @@ - //---------------------------------------------------------------------------- - void cmLocalUnixMakefileGenerator3 - ::CreateCDCommand(std::vector& commands, const char *tgtDir, -- const char *retDir) -+ cmLocalGenerator::RelativeRoot relRetDir) - { -+ const char* retDir = this->GetRelativeRootPath(relRetDir); -+ - // do we need to cd? - if (!strcmp(tgtDir,retDir)) - { -@@ -2140,18 +2145,12 @@ - // back because the shell keeps the working directory between - // commands. - std::string cmd = "cd "; -- cmd += this->ConvertToOutputForExisting(tgtDir); -+ cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir); - commands.insert(commands.begin(),cmd); -- -- // Change back to the starting directory. Any trailing slash must be -- // removed to avoid problems with Borland Make. -- std::string back = retDir; -- if(back.size() && back[back.size()-1] == '/') -- { -- back = back.substr(0, back.size()-1); -- } -+ -+ // Change back to the starting directory. - cmd = "cd "; -- cmd += this->ConvertToOutputForExisting(back.c_str()); -+ cmd += this->ConvertToOutputForExisting(relRetDir, tgtDir); - commands.push_back(cmd); - } - else -@@ -2163,7 +2162,7 @@ - for (; i != commands.end(); ++i) - { - std::string cmd = "cd "; -- cmd += this->ConvertToOutputForExisting(tgtDir); -+ cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir); - cmd += " && "; - cmd += *i; - *i = cmd; ---- a/Source/cmLocalUnixMakefileGenerator3.h -+++ b/Source/cmLocalUnixMakefileGenerator3.h -@@ -197,7 +197,8 @@ - - // create a command that cds to the start dir then runs the commands - void CreateCDCommand(std::vector& commands, -- const char *targetDir, const char *returnDir); -+ const char *targetDir, -+ cmLocalGenerator::RelativeRoot returnDir); - - static std::string ConvertToQuotedOutputPath(const char* p); - -@@ -321,10 +322,14 @@ - void AppendCustomDepend(std::vector& depends, - const cmCustomCommand& cc); - void AppendCustomCommands(std::vector& commands, -- const std::vector& ccs); -+ const std::vector& ccs, -+ cmLocalGenerator::RelativeRoot relative = -+ cmLocalGenerator::HOME_OUTPUT); - void AppendCustomCommand(std::vector& commands, - const cmCustomCommand& cc, -- bool echo_comment=false); -+ bool echo_comment=false, -+ cmLocalGenerator::RelativeRoot relative = -+ cmLocalGenerator::HOME_OUTPUT); - void AppendCleanCommand(std::vector& commands, - const std::vector& files, - cmTarget& target, const char* filename =0); ---- a/Source/cmMakefileExecutableTargetGenerator.cxx -+++ b/Source/cmMakefileExecutableTargetGenerator.cxx -@@ -435,7 +435,7 @@ - this->LocalGenerator->CreateCDCommand - (commands1, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), commands1.begin(), commands1.end()); - commands1.clear(); - -@@ -449,7 +449,7 @@ - commands1.push_back(symlink); - this->LocalGenerator->CreateCDCommand(commands1, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), commands1.begin(), commands1.end()); - commands1.clear(); - } ---- a/Source/cmMakefileLibraryTargetGenerator.cxx -+++ b/Source/cmMakefileLibraryTargetGenerator.cxx -@@ -591,7 +591,7 @@ - this->LocalGenerator->CreateCDCommand - (commands1, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), commands1.begin(), commands1.end()); - commands1.clear(); - } -@@ -872,7 +872,7 @@ - this->LocalGenerator->CreateCDCommand - (commands1, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), commands1.begin(), commands1.end()); - commands1.clear(); - -@@ -888,7 +888,7 @@ - commands1.push_back(symlink); - this->LocalGenerator->CreateCDCommand(commands1, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), commands1.begin(), commands1.end()); - commands1.clear(); - } ---- a/Source/cmMakefileTargetGenerator.cxx -+++ b/Source/cmMakefileTargetGenerator.cxx -@@ -567,7 +567,7 @@ - if(this->LocalGenerator->UseRelativePaths) - { - sourceFile = this->Convert(sourceFile.c_str(), -- cmLocalGenerator::HOME_OUTPUT); -+ cmLocalGenerator::START_OUTPUT); - } - sourceFile = this->Convert(sourceFile.c_str(), - cmLocalGenerator::NONE, -@@ -614,7 +614,7 @@ - this->LocalGenerator->CreateCDCommand - (compileCommands, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), - compileCommands.begin(), compileCommands.end()); - -@@ -725,7 +725,7 @@ - this->LocalGenerator->CreateCDCommand - (preprocessCommands, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), - preprocessCommands.begin(), - preprocessCommands.end()); -@@ -781,7 +781,7 @@ - this->LocalGenerator->CreateCDCommand - (assemblyCommands, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - commands.insert(commands.end(), - assemblyCommands.begin(), - assemblyCommands.end()); -@@ -895,7 +895,7 @@ - this->LocalGenerator->CreateCDCommand - (commands, - this->Makefile->GetStartOutputDirectory(), -- this->Makefile->GetHomeOutputDirectory()); -+ cmLocalGenerator::HOME_OUTPUT); - - // Write the rule. - this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, diff --git a/debian/patches/relative_path_fixes2.diff b/debian/patches/relative_path_fixes2.diff index 63966cf33..8192f7293 100644 --- a/debian/patches/relative_path_fixes2.diff +++ b/debian/patches/relative_path_fixes2.diff @@ -3,7 +3,7 @@ Improved error handling for cmLocalGenerator::Convert(). Small inconsistency fix for the previous relative_path_fixes.diff patch. --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx -@@ -2124,25 +2124,17 @@ +@@ -2127,25 +2127,17 @@ bool optional) { const char* remotePath = this->GetRelativeRootPath(remote); diff --git a/debian/patches/series b/debian/patches/series index 7493bdc4d..16a033d64 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,12 +1,8 @@ -find_package_support_prefix_lib_cmake.diff FindQt4.cmake2.6.diff do-not-use-lib64.diff findmpeg2-addpath.diff kfreebsd-Platform.diff executables-dont-need-fpic.diff reinstate-arm.diff -relative_path_fixes.diff relative_path_fixes2.diff -manpage-generation-fixes.diff FindQt4_qt4_lupdate_lrelease.diff -FindMPEG2_include_FindSDL_fix.diff