Import sparse.
Sparse, the semantic parser, provides a compiler frontend capable of parsing most of ANSI C as well as many GCC extensions, and a collection of sample compiler backends, including a static analyzer also called "sparse". Sparse provides a set of annotations designed to convey semantic information about types, such as what address space pointers point to, or what locks a function acquires or releases. Linus Torvalds started writing Sparse in 2003, initially targeting issues such as mixing pointers to user address space and pointers to kernel address space.
This commit is contained in:
parent
8bf63be7ff
commit
fc02787c53
5 changed files with 100 additions and 0 deletions
11
devel/sparse/DESCR
Normal file
11
devel/sparse/DESCR
Normal file
|
@ -0,0 +1,11 @@
|
|||
Sparse, the semantic parser, provides a compiler frontend capable
|
||||
of parsing most of ANSI C as well as many GCC extensions, and a
|
||||
collection of sample compiler backends, including a static analyzer
|
||||
also called "sparse". Sparse provides a set of annotations designed
|
||||
to convey semantic information about types, such as what address
|
||||
space pointers point to, or what locks a function acquires or
|
||||
releases.
|
||||
|
||||
Linus Torvalds started writing Sparse in 2003, initially targeting
|
||||
issues such as mixing pointers to user address space and pointers
|
||||
to kernel address space.
|
22
devel/sparse/Makefile
Normal file
22
devel/sparse/Makefile
Normal file
|
@ -0,0 +1,22 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2007/05/21 20:46:43 reed Exp $
|
||||
#
|
||||
|
||||
DISTNAME= sparse-0.3
|
||||
CATEGORIES= devel lang
|
||||
MASTER_SITES= http://kernel.org/pub/software/devel/sparse/dist/
|
||||
|
||||
MAINTAINER= reed@reedmedia.net
|
||||
HOMEPAGE= http://kernel.org/pub/software/devel/sparse/
|
||||
COMMENT= Semantic parser for C
|
||||
|
||||
INSTALLATION_DIRS+= share/doc/sparse
|
||||
PKGCONFIG_OVERRIDE+= sparse.pc.in
|
||||
REPLACE_PERL= cgcc
|
||||
USE_TOOLS+= gmake perl:run
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/FAQ ${PREFIX}/share/doc/sparse/
|
||||
${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/sparse/
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/sparse/
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
26
devel/sparse/PLIST
Normal file
26
devel/sparse/PLIST
Normal file
|
@ -0,0 +1,26 @@
|
|||
@comment $NetBSD: PLIST,v 1.1.1.1 2007/05/21 20:46:43 reed Exp $
|
||||
bin/cgcc
|
||||
bin/sparse
|
||||
include/sparse/allocate.h
|
||||
include/sparse/bitmap.h
|
||||
include/sparse/compat.h
|
||||
include/sparse/dissect.h
|
||||
include/sparse/expression.h
|
||||
include/sparse/flow.h
|
||||
include/sparse/ident-list.h
|
||||
include/sparse/lib.h
|
||||
include/sparse/linearize.h
|
||||
include/sparse/parse.h
|
||||
include/sparse/ptrlist.h
|
||||
include/sparse/scope.h
|
||||
include/sparse/storage.h
|
||||
include/sparse/symbol.h
|
||||
include/sparse/target.h
|
||||
include/sparse/token.h
|
||||
lib/libsparse.a
|
||||
lib/pkgconfig/sparse.pc
|
||||
share/doc/sparse/FAQ
|
||||
share/doc/sparse/LICENSE
|
||||
share/doc/sparse/README
|
||||
@dirrm include/sparse
|
||||
@dirrm share/doc/sparse
|
6
devel/sparse/distinfo
Normal file
6
devel/sparse/distinfo
Normal file
|
@ -0,0 +1,6 @@
|
|||
$NetBSD: distinfo,v 1.1.1.1 2007/05/21 20:46:43 reed Exp $
|
||||
|
||||
SHA1 (sparse-0.3.tar.gz) = 1d868b29234176abd5f3f5463aad1f11d5268dc2
|
||||
RMD160 (sparse-0.3.tar.gz) = 36bb7e5611f56c5b222f33a0853e8315af406704
|
||||
Size (sparse-0.3.tar.gz) = 177462 bytes
|
||||
SHA1 (patch-aa) = 234aa80cdd04835b9a8b2bfe4e41b0c7a1f07ff2
|
35
devel/sparse/patches/patch-aa
Normal file
35
devel/sparse/patches/patch-aa
Normal file
|
@ -0,0 +1,35 @@
|
|||
$NetBSD: patch-aa,v 1.1.1.1 2007/05/21 20:46:43 reed Exp $
|
||||
|
||||
--- Makefile.orig 2007-05-21 15:15:45.000000000 -0500
|
||||
+++ Makefile 2007-05-21 15:17:21.000000000 -0500
|
||||
@@ -15,8 +15,8 @@
|
||||
#
|
||||
CFLAGS += -DDEBUG
|
||||
|
||||
-DESTDIR=
|
||||
-PREFIX=$(HOME)
|
||||
+DESTDIR?=
|
||||
+PREFIX?=$(HOME)
|
||||
BINDIR=$(PREFIX)/bin
|
||||
LIBDIR=$(PREFIX)/lib
|
||||
INCLUDEDIR=$(PREFIX)/include
|
||||
@@ -48,15 +48,15 @@
|
||||
install -d $(DESTDIR)$(INCLUDEDIR)/sparse
|
||||
install -d $(DESTDIR)$(PKGCONFIGDIR)
|
||||
for f in $(INST_PROGRAMS); do \
|
||||
- install -v $$f $(DESTDIR)$(BINDIR)/$$f || exit 1; \
|
||||
+ install $$f $(DESTDIR)$(BINDIR)/$$f || exit 1; \
|
||||
done
|
||||
for f in $(LIBS); do \
|
||||
- install -m 644 -v $$f $(DESTDIR)$(LIBDIR)/$$f || exit 1; \
|
||||
+ install -m 644 $$f $(DESTDIR)$(LIBDIR)/$$f || exit 1; \
|
||||
done
|
||||
for f in $(LIB_H); do \
|
||||
- install -m 644 -v $$f $(DESTDIR)$(INCLUDEDIR)/sparse/$$f || exit 1; \
|
||||
+ install -m 644 $$f $(DESTDIR)$(INCLUDEDIR)/sparse/$$f || exit 1; \
|
||||
done
|
||||
- install -m 644 -v sparse.pc $(DESTDIR)$(PKGCONFIGDIR)/sparse.pc
|
||||
+ install -m 644 sparse.pc $(DESTDIR)$(PKGCONFIGDIR)/sparse.pc
|
||||
|
||||
sparse.pc: sparse.pc.in
|
||||
sed 's|@version@|$(VERSION)|g;s|@prefix@|$(PREFIX)|g;s|@libdir@|$(LIBDIR)|g;s|@includedir@|$(INCLUDEDIR)|g' sparse.pc.in > sparse.pc
|
Loading…
Reference in a new issue