pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/tree-sitter



Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Jan 18 13:28:15 UTC 2023

Modified Files:
        pkgsrc/textproc/tree-sitter: grammar.mk

Log Message:
tree-sitter: not all grammars come with a scanner, make it optional


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/textproc/tree-sitter/grammar.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/tree-sitter/grammar.mk
diff -u pkgsrc/textproc/tree-sitter/grammar.mk:1.2 pkgsrc/textproc/tree-sitter/grammar.mk:1.3
--- pkgsrc/textproc/tree-sitter/grammar.mk:1.2  Wed Jan 18 08:21:32 2023
+++ pkgsrc/textproc/tree-sitter/grammar.mk      Wed Jan 18 13:28:15 2023
@@ -1,4 +1,4 @@
-# $NetBSD: grammar.mk,v 1.2 2023/01/18 08:21:32 wiz Exp $
+# $NetBSD: grammar.mk,v 1.3 2023/01/18 13:28:15 wiz Exp $
 #
 # Common logic to build and install tree-sitter grammars.
 #
@@ -14,10 +14,11 @@ do-build:
        cd ${WRKSRC}/src && \
        ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC parser.c
        cd ${WRKSRC}/src && \
-       if [ -f scanner.c ]; then ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC scanner.c; else \
-       ${CXX} ${CXXFLAGS} -I. -c -fPIC scanner.cc; fi
+       if [ -f scanner.c ]; then ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC scanner.c; fi
        cd ${WRKSRC}/src && \
-       ${CXX} -shared -o ${GRAMMAR_LIBRARY_NAME}.so scanner.o parser.o
+       if [ -f scanner.cc ]; then ${CXX} ${CXXFLAGS} -I. -c -fPIC scanner.cc; fi
+       cd ${WRKSRC}/src && \
+       ${CXX} -shared -o ${GRAMMAR_LIBRARY_NAME}.so *.o
 
 INSTALLATION_DIRS+=    lib
 



Home | Main Index | Thread Index | Old Index