summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake15
-rw-r--r--config.h.cmake8
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/files.cpp3
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp25
-rw-r--r--quanta/parsers/dtd/dtdparser.cpp6
5 files changed, 5 insertions, 52 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 6b936f76..6a0e50de 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -64,19 +64,10 @@ if( (BUILD_QUANTA) OR (BUILD_KXSLDBG) OR (BUILD_KLINKSTATUS) )
##### check for libxml-2.0
- pkg_search_module( LIBXML libxml-2.0 )
+ pkg_search_module( LIBXML libxml-2.0>=2.6 )
if( NOT LIBXML_FOUND )
- tde_message_fatal( "libxml-2.0 is required but was not found on your system" )
- elseif( ${LIBXML_VERSION} VERSION_LESS "2.6" )
- tde_message_fatal( "libxml-2.0 version must be, at least, up to 2.6" )
- else()
- set( LIBXML_2_5 1 )
- tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
- set( CMAKE_REQUIRED_INCLUDES ${LIBXML_INCLUDE_DIRS} )
- set( CMAKE_REQUIRED_LIBRARIES ${LIBXML_LIBRARIES} )
- check_function_exists( xmlSetEntityReferenceFunc HAVE_INCLUDE_FIX )
- tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
+ tde_message_fatal( "libxml-2.0 version >= 2.6 is required but was not found on your system" )
endif( NOT LIBXML_FOUND )
@@ -128,7 +119,7 @@ if( (BUILD_QUANTA) OR (BUILD_KXSLDBG) OR (BUILD_KLINKSTATUS) )
tde_save( CMAKE_REQUIRED_INCLUDES )
set( CMAKE_REQUIRED_INCLUDES ${LIBXML_INCLUDE_DIRS} )
- check_include_file( "libxml/DOCBparser.h" LIBXML_DOCB_ENABLED )
+ set( LIBXML_DOCB_ENABLED 1 CACHE BOOL "Enable docbook input files" )
check_include_file( "libxml/xinclude.h" LIBXML_XINCLUDE_ENABLED )
tde_restore( CMAKE_REQUIRED_INCLUDES )
diff --git a/config.h.cmake b/config.h.cmake
index 121c38d9..2e2ebdf4 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -58,18 +58,12 @@
/* Defined if you build with cvsservice */
#cmakedefine ENABLE_CVSSERVICE 1
-/* Defined if libxml-2.0 is up to 2.6 */
-#cmakedefine LIBXML_2_5 1
-
-/* Defined if you have <libxml/DOCBparser.h> header file */
+/* Defined if you build with enabled docbook input files */
#cmakedefine LIBXML_DOCB_ENABLED
/* Defined if you have <libxml/xinclude.h> header file */
#cmakedefine LIBXML_XINCLUDE_ENABLED
-/* Defined if you have xmlSetEntityReferenceFunc within libxml2 */
-#cmakedefine HAVE_INCLUDE_FIX 1
-
/* Define the kmdr-executor executable path */
#cmakedefine KMDR_EXECUTOR_PATH "@KMDR_EXECUTOR_PATH@"
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/files.cpp b/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
index 73d3713b..3a7c6add 100644
--- a/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
+++ b/kxsldbg/kxsldbgpart/libxsldbg/files.cpp
@@ -743,9 +743,6 @@ filesInit(void)
tempDocument = NULL;
topStylesheet = NULL;
entityNameList = arrayListNew(4, (freeItemFunc) filesFreeEntityInfo);
-#if defined(HAVE_INCLUDE_FIX) && (LIBXML_VERSION < 20508)
- xmlSetEntityReferenceFunc(filesEntityRef);
-#endif
/* setup the encoding */
encodeInBuff = xmlBufferCreate();
diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
index 08de69d7..a3d01cab 100644
--- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
+++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp
@@ -82,9 +82,6 @@
#include <libxml/xmlerror.h>
#include <libxml/HTMLtree.h>
#include <libxml/xmlIO.h>
-#ifdef LIBXML_DOCB_ENABLED
-#include <libxml/DOCBparser.h>
-#endif
#ifdef LIBXML_XINCLUDE_ENABLED
#include <libxml/xinclude.h>
#endif
@@ -975,22 +972,11 @@ xsldbgLoadXmlData(void)
#endif
#ifdef LIBXML_DOCB_ENABLED
if (optionsGetIntOption(OPTIONS_DOCBOOK))
-# if LIBXML_VERSION >= 20600
doc = xmlParseFile((char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME));
-# else
- doc = docbParseFile((char *)
- optionsGetStringOption(OPTIONS_DATA_FILE_NAME),
- NULL);
-# endif
else
#endif
-
-#if LIBXML_VERSION >= 20600
doc = xmlSAXParseFile(&mySAXHandler,
(char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME), 0);
-#else
- doc = xmlParseFile((char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME));
-#endif
if (doc == NULL) {
xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))));
if (!optionsGetIntOption(OPTIONS_SHELL)) {
@@ -1031,11 +1017,7 @@ xsldbgLoadXmlTemporary(const xmlChar * path)
#endif
#ifdef LIBXML_DOCB_ENABLED
if (optionsGetIntOption(OPTIONS_DOCBOOK))
-# if LIBXML_VERSION >= 20600
doc = xmlParseFile((char *) path);
-# else
- doc = docbParseFile((char *) path, NULL);
-# endif
else
#endif
doc = xmlSAXParseFile(&mySAXhdlr, (char *) path, 0);
@@ -1100,7 +1082,7 @@ handler_routine(DWORD dwCtrlType)
#endif
-#if LIBXML_VERSION >= 2006000
+#if 0
/* libxml/ handlers */
void xsldbgStructErrorHandler(void * userData, xmlErrorPtr error)
{
@@ -1230,16 +1212,11 @@ xsldbgInit()
/* set up the parser */
xmlInitParser();
#if 0
-#if LIBXML_VERSION >= 20600
xmlSetGenericErrorFunc(NULL, NULL);
xmlSetStructuredErrorFunc(NULL , (xmlStructuredErrorFunc)xsldbgStructErrorHandler);
#else
xmlSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
xsltSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
-#endif
-#else
- xmlSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
- xsltSetGenericErrorFunc(0, xsldbgGenericErrorFunc);
#endif
/*
diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp
index 0562f61e..4f1b9d14 100644
--- a/quanta/parsers/dtd/dtdparser.cpp
+++ b/quanta/parsers/dtd/dtdparser.cpp
@@ -36,10 +36,6 @@
#include <tdeio/netaccess.h>
//other includes
-#ifdef LIBXML_2_5
-#include <libxml/hash.h>
-#endif
-
#include <libxml/parser.h>
#include <libxml/valid.h>
@@ -86,7 +82,6 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
if( DTD::dtd_ptr == NULL )
{
TQString errorStr = i18n("Unknown");
-#ifndef LIBXML_2_5
xmlErrorPtr errorPtr = xmlGetLastError();
if (errorPtr != NULL)
{
@@ -105,7 +100,6 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
errorStr += TQString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2);
xmlResetError(errorPtr);
}
-#endif
KMessageBox::error(0, i18n("<qt>Error while parsing the DTD.<br>The error message is:<br><i>%1</i></qt>").arg(errorStr));
return false;
}