Wed Jan 18 08:21:32 2023 UTC ()
tree-sitter: use ${PKGBASE} instead of ${PKGNAME}

the package version is not needed in the library name


(wiz)
diff -r1.1 -r1.2 pkgsrc/textproc/tree-sitter/grammar.mk

cvs diff -r1.1 -r1.2 pkgsrc/textproc/tree-sitter/grammar.mk (expand / switch to unified diff)

--- pkgsrc/textproc/tree-sitter/grammar.mk 2023/01/18 08:18:16 1.1
+++ pkgsrc/textproc/tree-sitter/grammar.mk 2023/01/18 08:21:32 1.2
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1# $NetBSD: grammar.mk,v 1.1 2023/01/18 08:18:16 wiz Exp $ 1# $NetBSD: grammar.mk,v 1.2 2023/01/18 08:21:32 wiz Exp $
2# 2#
3# Common logic to build and install tree-sitter grammars. 3# Common logic to build and install tree-sitter grammars.
4# 4#
5# GRAMMAR_LIBRARY_NAME 5# GRAMMAR_LIBRARY_NAME
6# Name of the grammar library to build and install. 6# Name of the grammar library to build and install.
7# 7#
8 8
9GRAMMAR_LIBRARY_NAME?= lib${PKGNAME} 9GRAMMAR_LIBRARY_NAME?= lib${PKGBASE}
10 10
11USE_LANGUAGES+= c c++ 11USE_LANGUAGES+= c c++
12 12
13do-build: 13do-build:
14 cd ${WRKSRC}/src && \ 14 cd ${WRKSRC}/src && \
15 ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC parser.c 15 ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC parser.c
16 cd ${WRKSRC}/src && \ 16 cd ${WRKSRC}/src && \
17 if [ -f scanner.c ]; then ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC scanner.c; else \ 17 if [ -f scanner.c ]; then ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC scanner.c; else \
18 ${CXX} ${CXXFLAGS} -I. -c -fPIC scanner.cc; fi 18 ${CXX} ${CXXFLAGS} -I. -c -fPIC scanner.cc; fi
19 cd ${WRKSRC}/src && \ 19 cd ${WRKSRC}/src && \
20 ${CXX} -shared -o ${GRAMMAR_LIBRARY_NAME}.so scanner.o parser.o 20 ${CXX} -shared -o ${GRAMMAR_LIBRARY_NAME}.so scanner.o parser.o
21 21
22INSTALLATION_DIRS+= lib 22INSTALLATION_DIRS+= lib