Description: Remove the Python stub from the source, to decrease dependencies.
  The Debian package is build without Python support but KVIrc adds a stub for
  Python scriping even if Python support is disabled at build time.
  .
  This patch removes that stub.
  .
  This patch won't be forwarded, as it would be rejected upstream.
Author: Kai Wasserbäch <debian@carbon-project.org>
Last-Update: 2010-01-08
Origin: vendor, http://hg.debian.org/hg/pkg-kde/kde-extras/kvirc/raw-file/tip/debian/patches/20_rm_python_stub.patch
Forwarded: no
---
 src/kvirc/kvs/kvi_kvs_parser.h                   |    3 ---
 src/kvirc/kvs/kvi_kvs_parser_command.cpp         |   12 +++---------
 src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp |    3 ---
 src/modules/pythoncore/CMakeLists.txt            |    2 ++
 4 files changed, 5 insertions(+), 15 deletions(-)

Index: b/src/kvirc/kvs/kvi_kvs_parser_command.cpp
===================================================================
--- a/src/kvirc/kvs/kvi_kvs_parser_command.cpp
+++ b/src/kvirc/kvs/kvi_kvs_parser_command.cpp
@@ -130,7 +130,8 @@ KviKvsTreeNodeCommand * KviKvsParser::pa
 		// We're lookin' for interpreters like perl and python
 		// perl.begin and python.begin have a *really* half special
 		// parsing routine
-		if((iIdentifierLen == 4) || (iIdentifierLen == 6))
+        // DEB: Removed Python stub as we build without that module.
+		if(iIdentifierLen == 4)
 		{
 			if(pIdentifier->toLower().unicode() == 'p')
 			{
@@ -139,12 +140,9 @@ KviKvsTreeNodeCommand * KviKvsParser::pa
 				if(KviQString::equalCI(szIdentifier,"perl"))
 				{
 					szInterpreter = "perl";
-				} else if(KviQString::equalCI(szIdentifier,"python"))
-				{
-					szInterpreter = "python";
 				}
 
-				if((szInterpreter == "perl") || (szInterpreter == "python"))
+				if((szInterpreter == "perl"))
 				{
 					if(pSecondPart)
 					{
@@ -155,10 +153,6 @@ KviKvsTreeNodeCommand * KviKvsParser::pa
 							{
 								// yep, that's perl.begin
 								cmd = parseSpecialCommandPerlBegin();
-							} else if(szInterpreter == "python")
-							{
-								// yep, that's python.begin
-								cmd = parseSpecialCommandPythonBegin();
 							}
 
 							if(!cmd)
Index: b/src/kvirc/kvs/kvi_kvs_parser.h
===================================================================
--- a/src/kvirc/kvs/kvi_kvs_parser.h
+++ b/src/kvirc/kvs/kvi_kvs_parser.h
@@ -224,9 +224,6 @@ private:
 	// stops after the perl.end statement
 	KviKvsTreeNodeCommand                    * parseSpecialCommandPerlBegin();
 	// returns 0 only in case of error
-	// stops after the perl.end statement
-	KviKvsTreeNodeCommand                    * parseSpecialCommandPythonBegin();
-	// returns 0 only in case of error
 	// and stops after the end of the help command
 	KviKvsTreeNodeCommand                    * parseSpecialCommandHelp();
 
Index: b/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp
===================================================================
--- a/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp
+++ b/src/kvirc/kvs/kvi_kvs_parser_specialcommands.cpp
@@ -38,10 +38,8 @@ Once parsed, the command is routed to th
 with the interpreter code as FIRST parameter and the other parameters
 of the command following.
 the help page for perl.begin is in the perl module
-the help page for python.begin is in the python module
 
 perl.begin(context) <perl code> perl.end
-python.begin <python code> python.end
 */
 #define IMPLEMENT_EXTERNAL_INTERPRETER_BEGIN(__name) \
 	KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommand##__name##Begin() \
@@ -125,7 +123,6 @@ python.begin <python code> python.end
 	}
 
 IMPLEMENT_EXTERNAL_INTERPRETER_BEGIN(Perl)
-IMPLEMENT_EXTERNAL_INTERPRETER_BEGIN(Python)
 
 KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandBreak()
 {
Index: b/src/modules/pythoncore/CMakeLists.txt
===================================================================
--- a/src/modules/pythoncore/CMakeLists.txt
+++ b/src/modules/pythoncore/CMakeLists.txt
@@ -1,4 +1,5 @@
 # CMakeLists for src/modules/pythoncore
+IF(COMPILE_PYTHON_SUPPORT)
 
 #SET(kvipythoncore_MOC_HDRS
 #	pythoncoreinterface.h
@@ -18,3 +19,4 @@ SET(KVI_DEFAULT_FRAME_CAPTION "") 
 SET(kvi_module_name kvipythoncore)
 
 INCLUDE(${CMAKE_SOURCE_DIR}/cmake/module.rules.txt)
+ENDIF(COMPILE_PYTHON_SUPPORT)
