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

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