Blame SOURCES/sqlite-3.6.23-lemon-system-template.patch

032533
diff -up sqlite-3.6.23/tool/lemon.c.system-template sqlite-3.6.23/tool/lemon.c
032533
--- sqlite-3.6.23/tool/lemon.c.system-template	2010-03-10 16:40:35.000000000 +0200
032533
+++ sqlite-3.6.23/tool/lemon.c	2010-03-10 16:40:39.000000000 +0200
032533
@@ -3363,6 +3363,8 @@ PRIVATE FILE *tplt_open(struct lemon *le
032533
     tpltname = buf;
032533
   }else if( access(templatename,004)==0 ){
032533
     tpltname = templatename;
032533
+  }else if( access("/usr/share/lemon/lempar.c", R_OK)==0){
032533
+    tpltname = "/usr/share/lemon/lempar.c";
032533
   }else{
032533
     tpltname = pathsearch(lemp->argv0,templatename,0);
032533
   }
032533
@@ -3374,7 +3376,7 @@ PRIVATE FILE *tplt_open(struct lemon *le
032533
   }
032533
   in = fopen(tpltname,"rb");
032533
   if( in==0 ){
032533
-    fprintf(stderr,"Can't open the template file \"%s\".\n",templatename);
032533
+    fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
032533
     lemp->errorcnt++;
032533
     return 0;
032533
   }