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

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