summaryrefslogtreecommitdiff
path: root/devel/kdevelop-base/patches/patch-ba
diff options
context:
space:
mode:
Diffstat (limited to 'devel/kdevelop-base/patches/patch-ba')
-rw-r--r--devel/kdevelop-base/patches/patch-ba78
1 files changed, 78 insertions, 0 deletions
diff --git a/devel/kdevelop-base/patches/patch-ba b/devel/kdevelop-base/patches/patch-ba
new file mode 100644
index 00000000000..434585c84e0
--- /dev/null
+++ b/devel/kdevelop-base/patches/patch-ba
@@ -0,0 +1,78 @@
+$NetBSD: patch-ba,v 1.1 2007/03/24 14:01:29 markd Exp $
+
+--- buildtools/lib/parsers/qmake/tests/runner.cpp.orig 2007-01-26 04:42:02.000000000 +1300
++++ buildtools/lib/parsers/qmake/tests/runner.cpp
+@@ -17,10 +17,26 @@
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+-#include <qmakeast.h>
+-#include <qmakeastvisitor.h>
+-#include <qmakedriver.h>
++
++#include <cstdlib>
++#include <iostream>
++#include <stdio.h>
++#include "qmakedriver.h"
++#include "qmakeastvisitor.h"
++
++#include <qstring.h>
++
+ #include <kdebug.h>
++#include <kcmdlineargs.h>
++#include <kurl.h>
++
++static const KCmdLineOptions options[] =
++{
++ {"silent", "Enable Parser debug output", 0},
++ {"!debug", "Disable output of the generated AST", 0},
++ {"!+files", "QMake project files", 0}
++};
++
+
+ class PrintAST : QMake::ASTVisitor
+ {
+@@ -120,14 +136,30 @@ private:
+ };
+ int main(int argc, char *argv[])
+ {
+- QMake::ProjectAST *projectAST;
+- int ret;
+- if (argc > 1)
++ KCmdLineArgs::init( argc, argv, "QMake Parser", "qmake-parser", "Parse QMake project files", "1.0.0");
++ KCmdLineArgs::addCmdLineOptions(options);
++
++ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
++
++ if( args->count() < 1 )
++ {
++ KCmdLineArgs::usage(0);
++ }
++
++ int debug = 0;
++ bool silent = false;
++
++ if( args->isSet("silent") )
++ silent = true;
++ if( args->isSet("debug") )
++ debug = 1;
++ for( int i = 0 ; i < args->count() ; i++ )
+ {
+- ret = QMake::Driver::parseFile(argv[1], &projectAST);
++ QMake::ProjectAST *projectAST;
++ int ret = QMake::Driver::parseFile(argv[1], &projectAST, debug);
+ PrintAST pa;
+ if ( ret == 0 )
+- if ((argc < 3) || ((argc == 3) && (strcmp(argv[2], "--silent") != 0)))
++ if ( !silent )
+ {
+ pa.processProject(projectAST);
+ QString profile;
+@@ -136,6 +168,5 @@ int main(int argc, char *argv[])
+ }
+ return ret;
+ }
+- else
+- return 0;
++ return 0;
+ }