[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde4support] modules: Find docbook better when the package version is part of the DTD path.
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2014-03-04 22:33:40
Message-ID: E1WKxu8-0001PN-9e () scm ! kde ! org
[Download RAW message or body]

Git commit 9d53e35ee487bc300011c5f0f7491736c285f612 by Matthew Woehlke.
Committed on 13/05/2010 at 01:49.
Pushed by ltoscano into branch 'master'.

Find docbook better when the package version is part of the DTD path.

This is (somewhat) less hackish than the previous approach and is
reportedly needed for OpenSolaris. It should work on all Fedora versions
past and future that use the same convention (and have the required DTD
version, of course) and for anything else with similar conventions.

svn path=/trunk/KDE/kdelibs/; revision=1126043

Commit e6741ce784dab86d89fcca4b4ec8184ba6721d25 in extra-cmake-modules

Commit 37373e8beb8d76bcbce94cb9c79cf29867a4ece4 in kdoctools

M  +11   -7    modules/FindDocBookXML.cmake

http://commits.kde.org/kde4support/9d53e35ee487bc300011c5f0f7491736c285f612

diff --git a/modules/FindDocBookXML.cmake b/modules/FindDocBookXML.cmake
index 3ed4a1d..ec3c0d6 100644
--- a/modules/FindDocBookXML.cmake
+++ b/modules/FindDocBookXML.cmake
@@ -27,15 +27,19 @@ set (DTD_PATH_LIST
    share/xml/docbook/${DOCBOOKXML_CURRENTDTD_VERSION}
 )
 
-#hacks for Fedora
-set (DTD_PATH_LIST ${DTD_PATH_LIST}
-   share/sgml/docbook/xml-dtd-4.2-1.0-48.fc12
-   share/sgml/docbook/xml-dtd-4.2-1.0-50.fc13
-)
- 
+# hacks for systems that use the package version in the DTD dirs,
+# e.g. Fedora, OpenSolaris
+foreach (DTD_PREFIX_ITER ${CMAKE_SYSTEM_PREFIX_PATH})
+   file(GLOB DTD_SUFFIX_ITER RELATIVE ${DTD_PREFIX_ITER}
+        ${DTD_PREFIX_ITER}/share/sgml/docbook/xml-dtd-${DOCBOOKXML_CURRENTDTD_VERSION}-*
+   )
+   if (DTD_SUFFIX_ITER)
+      list (APPEND DTD_PATH_LIST ${DTD_SUFFIX_ITER})
+   endif ()
+endforeach ()
+
 find_path (DOCBOOKXML_CURRENTDTD_DIR docbookx.dtd
    PATHS ${CMAKE_SYSTEM_PREFIX_PATH}
-
    PATH_SUFFIXES ${DTD_PATH_LIST}
 )
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic