diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 000000000..82d044ceb --- /dev/null +++ b/debian/README.source @@ -0,0 +1,3 @@ +This package uses quilt for upstream source code patch management. Please read +/usr/share/doc/quilt/README.source for more information how to apply, unapply, +add, modify or remove patches. diff --git a/debian/changelog b/debian/changelog index b88fd349c..207e95cbd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,35 @@ +cmake (2.6.2-0r4) UNRELEASED; urgency=low + + * New upstream release. + * New co-maintainer: + - add myself to Uploaders. + - add DM-Upload-Allowed: yes to debian/control. + * Refresh patches: + - FindQt4.cmake2.6.diff + - do-not-use-lib64.diff + * Add patches from upstream CVS: + - relative_path_fixes.diff - fixes a couple of major bugs in Makefile + generation when CMAKE_USE_RELATIVE_PATHS is ON. This brings + CMAKE_USE_RELATIVE_PATHS=ON to a very usable state. + - manpage-generation-fixes.diff - fixes a few manual page generation + issues. This resolves all lintian warnings and info tags related + to the cmake manual pages. + * Bump Standards-Version to 3.8.0: + - add README.source which directs the reader to quilt README.source. + - tighten quilt build depends to (>= 0.46-4.1) as it is the first version + README.source is in. + * Use dh_lintian: + - rename cmake.lintian to cmake.lintian-overrides; + - bump debhelper compat level to 6; + - build depend on debhelper (>= 6.0.7~). + * Fix path in the lintian override so it is effective again. + * Make cmake.menu conform to the current Debian Menu System stardard. + * Drop unused old manual pages from debian/. They are provided by upstream + now. + * Add debian/watch. + + -- Modestas Vainius Fri, 10 Oct 2008 20:43:56 +0300 + cmake (2.6.0-5) unstable; urgency=medium * Fix build-deps: libncursesw5-dev doesn't work, just use the non wide one. diff --git a/debian/cmake.lintian-overrides b/debian/cmake.lintian-overrides index f653e92db..597d44850 100644 --- a/debian/cmake.lintian-overrides +++ b/debian/cmake.lintian-overrides @@ -1,2 +1,2 @@ # this file is a template, not a real license -cmake: extra-license-file usr/share/cmake-2.4/Templates/CPack.GenericLicense.txt +cmake: extra-license-file usr/share/cmake-2.6/Templates/CPack.GenericLicense.txt diff --git a/debian/cmake.menu b/debian/cmake.menu index 396049b01..9b8de5cf2 100644 --- a/debian/cmake.menu +++ b/debian/cmake.menu @@ -1,3 +1,4 @@ -?package(cmake):needs="text" section="Apps/Programming"\ +?package(cmake):needs="text" \ + section="Applications/Programming"\ title="ccmake" command="/usr/bin/ccmake"\ icon="/usr/share/pixmaps/cmake.xpm" diff --git a/debian/compat b/debian/compat index 7ed6ff82d..1e8b31496 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +6 diff --git a/debian/control b/debian/control index 133c17d09..6213b299f 100644 --- a/debian/control +++ b/debian/control @@ -2,9 +2,10 @@ Source: cmake Section: devel Priority: optional Maintainer: A. Maitland Bottoms -Uploaders: Pierre Habouzit -Build-Depends: debhelper (>> 5.0.0), libncurses5-dev, tcl8.4, quilt, libcurl4-gnutls-dev -Standards-Version: 3.7.3 +Uploaders: Pierre Habouzit , Modestas Vainius +DM-Upload-Allowed: yes +Build-Depends: debhelper (>= 6.0.7~), libncurses5-dev, tcl8.4, quilt (>= 0.46-4.1), libcurl4-gnutls-dev +Standards-Version: 3.8.0 Package: cmake Architecture: any diff --git a/debian/dirs b/debian/dirs index 84a6aa693..3e37cb1d9 100644 --- a/debian/dirs +++ b/debian/dirs @@ -3,4 +3,3 @@ usr/share/doc/cmake usr/share/man/man1 usr/share/pixmaps usr/share/emacs/site-lisp -usr/share/lintian/overrides diff --git a/debian/patches/FindQt4.cmake2.6.diff b/debian/patches/FindQt4.cmake2.6.diff index 4d7987f3b..a7832053d 100644 --- a/debian/patches/FindQt4.cmake2.6.diff +++ b/debian/patches/FindQt4.cmake2.6.diff @@ -1,14 +1,16 @@ ---- cmake-2.6.0~rc8/Modules/FindQt4.cmake -+++ cmake-2.6.0~rc8/Modules/FindQt4.cmake -@@ -1354,171 +1354,6 @@ +--- a/Modules/FindQt4.cmake ++++ b/Modules/FindQt4.cmake +@@ -1408,198 +1408,6 @@ QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL") SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL}) - ## system png - IF(QT_QCONFIG MATCHES "system-png") - FIND_LIBRARY(QT_PNG_LIBRARY NAMES png) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY}) - MARK_AS_ADVANCED(QT_PNG_LIBRARY) +- IF(QT_PNG_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY}) +- ENDIF(QT_PNG_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "system-png") - - # for X11, get X11 library directory @@ -21,78 +23,100 @@ - # ask qmake where the x11 libs are - FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11}) - FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY}) - MARK_AS_ADVANCED(QT_X11_SM_LIBRARY) - MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY) +- IF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY}) +- ENDIF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "x11sm") - - ## Xi - IF(QT_QCONFIG MATCHES "tablet") - FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY}) - MARK_AS_ADVANCED(QT_XI_LIBRARY) +- IF(QT_XI_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY}) +- ENDIF(QT_XI_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "tablet") - - ## Xrender - IF(QT_QCONFIG MATCHES "xrender") - FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY}) - MARK_AS_ADVANCED(QT_XRENDER_LIBRARY) +- IF(QT_XRENDER_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY}) +- ENDIF(QT_XRENDER_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "xrender") - - ## Xrandr - IF(QT_QCONFIG MATCHES "xrandr") - FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY}) - MARK_AS_ADVANCED(QT_XRANDR_LIBRARY) +- IF(QT_XRANDR_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY}) +- ENDIF(QT_XRANDR_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "xrandr") - - ## Xcursor - IF(QT_QCONFIG MATCHES "xcursor") - FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY}) - MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY) +- IF(QT_XCURSOR_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY}) +- ENDIF(QT_XCURSOR_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "xcursor") - - ## Xinerama - IF(QT_QCONFIG MATCHES "xinerama") - FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY}) - MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY) +- IF(QT_XINERAMA_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY}) +- ENDIF(QT_XINERAMA_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "xinerama") - - ## Xfixes - IF(QT_QCONFIG MATCHES "xfixes") - FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY}) - MARK_AS_ADVANCED(QT_XFIXES_LIBRARY) +- IF(QT_XFIXES_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY}) +- ENDIF(QT_XFIXES_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "xfixes") - - ## system-freetype - IF(QT_QCONFIG MATCHES "system-freetype") - FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES freetype) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FREETYPE_LIBRARY}) - MARK_AS_ADVANCED(QT_FREETYPE_LIBRARY) +- IF(QT_FREETYPE_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FREETYPE_LIBRARY}) +- ENDIF(QT_FREETYPE_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "system-freetype") - - ## fontconfig - IF(QT_QCONFIG MATCHES "fontconfig") - FIND_LIBRARY(QT_FONTCONFIG_LIBRARY NAMES fontconfig) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY}) - MARK_AS_ADVANCED(QT_FONTCONFIG_LIBRARY) +- IF(QT_FONTCONFIG_LIBRARY) +- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY}) +- ENDIF(QT_FONTCONFIG_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "fontconfig") - - ## system-zlib - IF(QT_QCONFIG MATCHES "system-zlib") - FIND_LIBRARY(QT_ZLIB_LIBRARY NAMES z) -- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY}) - MARK_AS_ADVANCED(QT_ZLIB_LIBRARY) +- IF(QT_ZLIB_LIBRARY) +- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY}) +- ENDIF(QT_ZLIB_LIBRARY) - ENDIF(QT_QCONFIG MATCHES "system-zlib") - - ## openssl - IF(QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN) - FIND_PACKAGE(OpenSSL) -- SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES}) +- IF(OPENSSL_LIBRARIES) +- SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES}) +- ENDIF(OPENSSL_LIBRARIES) - ENDIF(QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN) - - ## qdbus @@ -165,24 +189,24 @@ - SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) - IF(QT_POSIX_TIMERS) - FIND_LIBRARY(QT_RT_LIBRARY NAMES rt) -- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY}) - MARK_AS_ADVANCED(QT_RT_LIBRARY) +- IF(QT_RT_LIBRARY) +- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY}) +- ENDIF(QT_RT_LIBRARY) - ENDIF(QT_POSIX_TIMERS) - ENDIF(QT_QCONFIG MATCHES "clock-monotonic") - +- IF(Q_WS_X11) # X11 libraries Qt absolutely depends on -@@ -1528,8 +1363,10 @@ + QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11") +@@ -1608,9 +1416,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}) -- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}}) - MARK_AS_ADVANCED(${QT_TMP_STR}) -+ IF (${QT_TMP_STR}) -+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}}) + IF(${QT_TMP_STR}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}}) + MARK_AS_ADVANCED(${QT_TMP_STR}) -+ ENDIF (${QT_TMP_STR}) + ENDIF(${QT_TMP_STR}) ENDFOREACH(QT_X11_LIB) - QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD") - X11 libraries Qt absolutely depends on diff --git a/debian/patches/do-not-use-lib64.diff b/debian/patches/do-not-use-lib64.diff index 0b991457d..2531b54dd 100644 --- a/debian/patches/do-not-use-lib64.diff +++ b/debian/patches/do-not-use-lib64.diff @@ -1,6 +1,6 @@ ---- cmake-2.6.0-RC-8.orig/Source/cmFindLibraryCommand.cxx -+++ cmake-2.6.0-RC-8/Source/cmFindLibraryCommand.cxx -@@ -162,6 +162,7 @@ +--- a/Source/cmFindLibraryCommand.cxx ++++ b/Source/cmFindLibraryCommand.cxx +@@ -158,6 +158,7 @@ void cmFindLibraryCommand::AddLib64Paths() { @@ -8,11 +8,11 @@ if(!this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> GetLanguageEnabled("C")) { -@@ -209,6 +210,7 @@ +@@ -205,6 +206,7 @@ { this->SearchPaths = path64; } +#endif } - std::string cmFindLibraryCommand::FindLibrary(const char* name) + //---------------------------------------------------------------------------- diff --git a/debian/patches/manpage-generation-fixes.diff b/debian/patches/manpage-generation-fixes.diff new file mode 100644 index 000000000..f2509d9cc --- /dev/null +++ b/debian/patches/manpage-generation-fixes.diff @@ -0,0 +1,510 @@ +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 new file mode 100644 index 000000000..a59824f1a --- /dev/null +++ b/debian/patches/relative_path_fixes.diff @@ -0,0 +1,510 @@ +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 new file mode 100644 index 000000000..63966cf33 --- /dev/null +++ b/debian/patches/relative_path_fixes2.diff @@ -0,0 +1,38 @@ +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 @@ + bool optional) + { + const char* remotePath = this->GetRelativeRootPath(remote); ++ ++ // The relative root must have a path (i.e. not FULL or NONE) ++ assert(remotePath != 0); ++ + 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; +- } ++ ++ cmSystemTools::SplitPath(local, components); ++ result = this->ConvertToRelativePath(components, remotePath); + return this->ConvertToOutputFormat(result.c_str(), output); + } + else diff --git a/debian/patches/series b/debian/patches/series index eed83b97e..0af1d6a9b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,6 @@ 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 diff --git a/debian/rules b/debian/rules index 430c72b89..cb62f0c43 100755 --- a/debian/rules +++ b/debian/rules @@ -64,7 +64,7 @@ install: build # Add here commands to install the package into debian/cmake. cd Build && $(MAKE) DESTDIR=$(CURDIR)/debian/cmake install install -D -m 644 debian/cmake.xpm debian/cmake/usr/share/pixmaps/cmake.xpm - install -D -m 644 debian/cmake.lintian debian/cmake/usr/share/lintian/overrides/cmake + dh_lintian #cp Docs/cmake-indent.vim debian/cmake/usr/share/vim/addons/indent/cmake.vim #cp Docs/cmake-syntax.vim debian/cmake/usr/share/vim/addons/syntax/cmake.vim cp Docs/cmake-mode.el debian/cmake/usr/share/emacs/site-lisp/ diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..81fc3a05e --- /dev/null +++ b/debian/watch @@ -0,0 +1,5 @@ +version=3 + +# Track CMake 2.6.x releases including RCs +opts="uversionmangle=s/-RC-(\d+)/~rc$1/i" \ + http://www.cmake.org/files/v2.6/cmake-([\d.]+(?:-RC-\d+)?).tar.gz