pkgsrc-WIP-changes archive

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

coccinelle: Import coccinelle-1.0.6 as wip/coccinelle



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Fri May 5 13:15:11 2017 +0200
Changeset:	a9ce3cd3af2460c78e18810c08113395aedaead8

Modified Files:
	Makefile
Added Files:
	coccinelle/DESCR
	coccinelle/Makefile
	coccinelle/PLIST
	coccinelle/TODO
	coccinelle/distinfo
	coccinelle/patches/patch-Makefile
	coccinelle/patches/patch-bundles_pyml_pyml-current_py.ml

Log Message:
coccinelle: Import coccinelle-1.0.6 as wip/coccinelle

Coccinelle is a program matching and transformation engine which provides
the language SmPL (Semantic Patch Language) for specifying desired matches
and transformations in C code. Coccinelle was initially targeted towards
performing collateral evolutions in Linux. Such evolutions comprise the
changes that are needed in client code in response to evolutions in library
APIs, and may include modifications such as renaming a function, adding a
function argument whose value is somehow context-dependent, and reorganizing
a data structure. Beyond collateral evolutions, Coccinelle is successfully
used (by us and others) for finding and fixing bugs in systems code.

XXX: This package is intended to be used to update devel/coccinelle in pkgsrc
XXX: but there are some issues still not properly investigated that need
XXX: to be solved in order to be able to update it. For more information please
XXX: give a look to coccinelle/TODO.

TODO: (about the TODO) try to describe the issues more in depth!

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a9ce3cd3af2460c78e18810c08113395aedaead8

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

diffstat:
 Makefile                                           |  1 +
 coccinelle/DESCR                                   |  9 ++++
 coccinelle/Makefile                                | 52 ++++++++++++++++++++++
 coccinelle/PLIST                                   | 52 ++++++++++++++++++++++
 coccinelle/TODO                                    |  7 +++
 coccinelle/distinfo                                |  8 ++++
 coccinelle/patches/patch-Makefile                  | 26 +++++++++++
 .../patches/patch-bundles_pyml_pyml-current_py.ml  | 24 ++++++++++
 8 files changed, 179 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 088cb9c1f2..9ff49c653e 100644
--- a/Makefile
+++ b/Makefile
@@ -388,6 +388,7 @@ SUBDIR+=	clutter-gst
 SUBDIR+=	cm-unicode-ttf
 SUBDIR+=	cmetrics
 SUBDIR+=	cmusfm
+SUBDIR+=	coccinelle
 SUBDIR+=	coldfire
 SUBDIR+=	collectd-unbound
 SUBDIR+=	colord
diff --git a/coccinelle/DESCR b/coccinelle/DESCR
new file mode 100644
index 0000000000..ed49aa6e7a
--- /dev/null
+++ b/coccinelle/DESCR
@@ -0,0 +1,9 @@
+Coccinelle is a program matching and transformation engine which provides
+the language SmPL (Semantic Patch Language) for specifying desired matches
+and transformations in C code. Coccinelle was initially targeted towards
+performing collateral evolutions in Linux. Such evolutions comprise the
+changes that are needed in client code in response to evolutions in library
+APIs, and may include modifications such as renaming a function, adding a
+function argument whose value is somehow context-dependent, and reorganizing
+a data structure. Beyond collateral evolutions, Coccinelle is successfully
+used (by us and others) for finding and fixing bugs in systems code.
diff --git a/coccinelle/Makefile b/coccinelle/Makefile
new file mode 100644
index 0000000000..18cb2d514f
--- /dev/null
+++ b/coccinelle/Makefile
@@ -0,0 +1,52 @@
+# $NetBSD: Makefile,v 1.29 2016/12/30 11:16:58 jaapb Exp $
+
+DISTNAME=	coccinelle-1.0.6
+CATEGORIES=	devel
+MASTER_SITES=	http://coccinelle.lip6.fr/distrib/
+EXTRACT_SUFX=	.tgz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://coccinelle.lip6.fr/
+COMMENT=	Tool for writing and applying semantic patches
+LICENSE=	gnu-gpl-v2
+
+BUILD_DEPENDS+=	ocaml-findlib-[0-9]*:../../devel/ocaml-findlib
+
+# the current version rejects this package's .mly file
+#DEPENDS+=	menhir>=20071212:../../devel/menhir
+CONFIGURE_ARGS+=	--without-menhir
+CONFIGURE_ARGS+=	--disable-pyml
+
+MAKE_JOBS_SAFE=		no
+
+GNU_CONFIGURE=	yes
+USE_TOOLS+=	gmake pkg-config
+BUILD_TARGET=	all all.opt
+
+REPLACE_PYTHON=	tools/pycocci
+
+SUBST_CLASSES+=		man
+SUBST_FILES.man+=	configure
+SUBST_SED.man+=		-e "s,$${prefix}/man,$${prefix}/${PKGMANDIR},g"
+SUBST_STAGE.man=	pre-configure
+SUBST_MESSAGE.man=	Fixing manpath.
+
+SUBST_CLASSES+=		python
+SUBST_FILES.python+=	bundles/pyml/pyml-current/py.ml
+SUBST_VARS.python+=	PYVERSSUFFIX
+SUBST_STAGE.python=	pre-configure
+SUBST_MESSAGE.python=	Fixing python command invokation.
+
+TEST_TARGET=	test
+
+.include "../../lang/python/tool.mk"
+
+.include "../../mk/dlopen.buildlink3.mk"
+
+BUILDLINK_TRANSFORM+=	opt:-ldl:${BUILDLINK_LDADD.dl:M*}
+
+BUILDLINK_API_DEPENDS.ocaml+=	ocaml>=3.11
+.include "../../lang/ocaml/buildlink3.mk"
+.include "../../lang/camlp4/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/coccinelle/PLIST b/coccinelle/PLIST
new file mode 100644
index 0000000000..dd036ff061
--- /dev/null
+++ b/coccinelle/PLIST
@@ -0,0 +1,52 @@
+@comment $NetBSD$
+bin/pycocci
+bin/spatch
+bin/spatch.opt
+bin/spgen
+lib/coccinelle/ocaml/ast0_cocci.cmi
+lib/coccinelle/ocaml/ast_c.cmi
+lib/coccinelle/ocaml/ast_cocci.cmi
+lib/coccinelle/ocaml/coccilib.cmi
+lib/coccinelle/ocaml/common.cmi
+lib/coccinelle/ocaml/config.cmi
+lib/coccinelle/ocaml/exposed_modules.cmi
+lib/coccinelle/ocaml/externalanalysis.cmi
+lib/coccinelle/ocaml/flag.cmi
+lib/coccinelle/ocaml/iteration.cmi
+lib/coccinelle/ocaml/lexer_c.cmi
+lib/coccinelle/ocaml/lib_parsing_c.cmi
+lib/coccinelle/ocaml/ocamlcocci_aux.cmi
+lib/coccinelle/ocaml/parse_c.cmi
+lib/coccinelle/ocaml/parser_c.cmi
+lib/coccinelle/ocaml/prepare_ocamlcocci.cmi
+lib/coccinelle/ocaml/pretty_print_c.cmi
+lib/coccinelle/ocaml/regexp.cmi
+lib/coccinelle/ocaml/run_ocamlcocci.cmi
+lib/coccinelle/ocaml/visitor_c.cmi
+lib/coccinelle/ocaml/yes_prepare_ocamlcocci.cmi
+lib/coccinelle/python/coccilib/__init__.py
+lib/coccinelle/python/coccilib/coccigui/__init__.py
+lib/coccinelle/python/coccilib/coccigui/coccigui.py
+lib/coccinelle/python/coccilib/coccigui/pycoccimodel.py
+lib/coccinelle/python/coccilib/coccigui/pygui.glade
+lib/coccinelle/python/coccilib/coccigui/pygui.gladep
+lib/coccinelle/python/coccilib/coccigui/vim.py
+lib/coccinelle/python/coccilib/coccigui/vimcom.py
+lib/coccinelle/python/coccilib/coccigui/vimeditor.py
+lib/coccinelle/python/coccilib/coccigui/vimembed.py
+lib/coccinelle/python/coccilib/elems.py
+lib/coccinelle/python/coccilib/iteration.py
+lib/coccinelle/python/coccilib/org.py
+lib/coccinelle/python/coccilib/output.py
+lib/coccinelle/python/coccilib/report.py
+lib/coccinelle/python/coccilib/trac.py
+lib/coccinelle/python/coccilib/xml_firehose.py
+lib/coccinelle/spatch.opt
+lib/coccinelle/spgen/spgen
+lib/coccinelle/spgen/spgen.opt
+lib/coccinelle/standard.h
+lib/coccinelle/standard.iso
+man/man1/pycocci.1
+man/man1/spatch.1
+man/man1/spgen.1
+man/man3/Coccilib.3
diff --git a/coccinelle/TODO b/coccinelle/TODO
new file mode 100644
index 0000000000..0f00de7e1d
--- /dev/null
+++ b/coccinelle/TODO
@@ -0,0 +1,7 @@
+Still not ready for using it to update devel/coccinelle. The following issues
+should be investigated further and if possible fixed:
+
+ - pkgsrc `test' target no longer works (manually invoking that on ${WRKSRC}
+   does the trick, I guess that some naughty things happen when
+   compiling/linking test programs)
+ - Update to coccinelle-1.0.6 breaks textproc/coccigrep
diff --git a/coccinelle/distinfo b/coccinelle/distinfo
new file mode 100644
index 0000000000..bbed64403c
--- /dev/null
+++ b/coccinelle/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.12 2015/11/03 03:27:19 agc Exp $
+
+SHA1 (coccinelle-1.0.6.tgz) = a1c06d8acc7a34a943b3d72e0773cdf54e533bca
+RMD160 (coccinelle-1.0.6.tgz) = f3cd1de8566936d867c1fab31f52071ec3b80d9c
+SHA512 (coccinelle-1.0.6.tgz) = b667762ddf5ad30b126e93572cd8a8b3ffc21a790cd9d6df586e421c5db0a8d049af9587c6e5cb8f7a13f2c090ab2a9cca59ecba69069f9d3fe67b6f75dfe539
+Size (coccinelle-1.0.6.tgz) = 6684278 bytes
+SHA1 (patch-Makefile) = 799c488aaaa9111b7a1104b621c2ea61894d5365
+SHA1 (patch-bundles_pyml_pyml-current_py.ml) = 7389c0b3f93871f8653516a1eb7ac6134fa7016a
diff --git a/coccinelle/patches/patch-Makefile b/coccinelle/patches/patch-Makefile
new file mode 100644
index 0000000000..4b330b538d
--- /dev/null
+++ b/coccinelle/patches/patch-Makefile
@@ -0,0 +1,26 @@
+$NetBSD: patch-Makefile,v 1.1 2012/11/17 11:50:14 ryoon Exp $
+
+- Install Coccilib man page just as Coccilib.3 (no need to have a custom
+  `cocci' suffix)
+- Do not install pyml bundle
+
+--- Makefile.orig	2016-09-27 20:47:06.000000000 +0000
++++ Makefile
+@@ -347,7 +347,7 @@ install-man:
+ 	$(INSTALL_DATA) docs/spatch.1 $(DESTDIR)$(MANDIR)/man1/
+ 	$(INSTALL_DATA) docs/pycocci.1 $(DESTDIR)$(MANDIR)/man1/
+ 	$(INSTALL_DATA) docs/spgen.1 $(DESTDIR)$(MANDIR)/man1/
+-	$(INSTALL_DATA) docs/Coccilib.3cocci $(DESTDIR)$(MANDIR)/man3/
++	$(INSTALL_DATA) docs/Coccilib.3cocci $(DESTDIR)$(MANDIR)/man3/Coccilib.3
+ 
+ install-bash:
+ 	@$(ECHO) "Installing bash completion in: ${DESTDIR}${BASH_COMPLETION_DIR}"
+@@ -377,8 +377,6 @@ install-python:
+ 
+ install-stubs:
+ 	$(MKDIR_P) $(DESTDIR)$(LIBDIR)
+-	@if test -f ./bundles/pyml/dllpyml_stubs.so; then \
+-		cp -fv ./bundles/pyml/dllpyml_stubs.so $(DESTDIR)$(LIBDIR); fi
+ 	@if test -f ./bundles/pcre/dllpcre_stubs.so; then \
+ 		cp -fv ./bundles/pcre/dllpcre_stubs.so $(DESTDIR)$(LIBDIR); fi
+ 
diff --git a/coccinelle/patches/patch-bundles_pyml_pyml-current_py.ml b/coccinelle/patches/patch-bundles_pyml_pyml-current_py.ml
new file mode 100644
index 0000000000..f882c5a994
--- /dev/null
+++ b/coccinelle/patches/patch-bundles_pyml_pyml-current_py.ml
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Make python command SUBST_VARSible.
+
+--- bundles/pyml/pyml-current/py.ml.orig	2016-09-27 20:47:06.000000000 +0000
++++ bundles/pyml/pyml-current/py.ml
+@@ -145,7 +145,7 @@ let find_library_path version_major vers
+     None ->
+       let library_paths =
+         try
+-          [Filename.concat (Filename.dirname (run_command "which python" false))
++          [Filename.concat (Filename.dirname (run_command "which python@PYVERSSUFFIX@" false))
+              "../lib"]
+         with Failure _ -> [] in
+       let library_filenames =
+@@ -178,7 +178,7 @@ let find_library_path version_major vers
+       (library_paths, [library_filename])
+ 
+ let initialize_version_value () =
+-  let version_line = run_command "python --version" true in
++  let version_line = run_command "python@PYVERSSUFFIX@ --version" true in
+   let version = extract_version version_line in
+   let (version_major, version_minor) = extract_version_major_minor version in
+   version_value := version;


Home | Main Index | Thread Index | Old Index