Sunday, April 30, 2017

UPDATE: devel/coccinelle 1.0.6

Last fall, people discussed and reviewed jsg's patch to update
devel/coccinelle to 1.0.5:

https://marc.info/?t=147469915500001&r=1&w=2

Since then, 1.0.6 has been released.

It seems that jsg's patch stalled because there was, for an unknown
reason, a big regression in the test suite results. However, with the
below patch, I almost exactly the same score as the current port:

> --------------------------------
> total score
> --------------------------------
> good = 453/498
> Current score is equal to expected score; everything is fine

I don't know whether this is because of bugs fixed in the new version or
because of differences between our patches.

Aside from typical update fluff, my patch removes the mv command in the
port Makefile because the associated shared object seems like it's no
longer generated. Their changelog notes that they now only use the
bundled version of Pycaml:

http://coccinelle.lip6.fr/distrib/changes.html

That may be the cause of this change, but I'm not sure.

I also remove an additional pair of instances in which the -v flag is
passed to cp.

I'm interested to hear what people think.

Thanks for your time,
Mike


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/coccinelle/Makefile,v
retrieving revision 1.34
diff -u -p -u -r1.34 Makefile
--- Makefile 1 Nov 2016 22:02:59 -0000 1.34
+++ Makefile 30 Apr 2017 21:55:37 -0000
@@ -4,9 +4,8 @@ COMMENT = program matching and transform

# if updating, check for any additional use of diff/grep which
# may need to be switched to gdiff/ggrep
-DISTNAME = coccinelle-1.0.4
+DISTNAME = coccinelle-1.0.6
EXTRACT_SUFX = .tgz
-REVISION = 1

CATEGORIES = devel

@@ -67,8 +66,6 @@ pre-configure:
post-install:
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
${PREFIX}/share/coccinelle/python/coccilib
- mv ${PREFIX}/lib/coccinelle/dllpycaml_stubs.so \
- ${PREFIX}/lib/ocaml/stublibs/
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/coccinelle
cd ${WRKSRC}/docs/manual; \
${MAKE_PROGRAM} WEBDOCS=${PREFIX}/share/doc/coccinelle install
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/coccinelle/distinfo,v
retrieving revision 1.12
diff -u -p -u -r1.12 distinfo
--- distinfo 29 Oct 2015 15:41:36 -0000 1.12
+++ distinfo 30 Apr 2017 21:55:37 -0000
@@ -1,2 +1,2 @@
-SHA256 (coccinelle-1.0.4.tgz) = f4I4E6LqKZwPbAHYQZuDxNxmFxFtMrqZ1yZEOhwisG0=
-SIZE (coccinelle-1.0.4.tgz) = 2484218
+SHA256 (coccinelle-1.0.6.tgz) = hFLtJlwgna6Zy7M7Z7x5Eucvi8oeJPM/Goi6PXmF6Qk=
+SIZE (coccinelle-1.0.6.tgz) = 6684278
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/devel/coccinelle/patches/patch-Makefile,v
retrieving revision 1.10
diff -u -p -u -r1.10 patch-Makefile
--- patches/patch-Makefile 29 Oct 2015 15:41:36 -0000 1.10
+++ patches/patch-Makefile 30 Apr 2017 21:55:37 -0000
@@ -1,10 +1,22 @@
$OpenBSD: patch-Makefile,v 1.10 2015/10/29 15:41:36 sthen Exp $
---- Makefile.orig Wed Oct 28 14:07:59 2015
-+++ Makefile Thu Oct 29 15:36:45 2015
+--- Makefile.orig
++++ Makefile
+@@ -267,9 +267,9 @@ purebytecode:
+ # copies the stubs libraries (if any) to the root directory
+ copy-stubs:
+ @if test -f ./bundles/pyml/dllpyml_stubs.so; then \
+- cp -fv ./bundles/pyml/dllpyml_stubs.so .; fi
++ cp -f ./bundles/pyml/dllpyml_stubs.so .; fi
+ @if test -f ./bundles/pcre/dllpcre_stubs.so; then \
+- cp -fv ./bundles/pcre/dllpcre_stubs.so .; fi
++ cp -f ./bundles/pcre/dllpcre_stubs.so .; fi
+
+ ##############################################################################
+ # Build version information
@@ -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/spgen.1 $(DESTDIR)$(MANDIR)/man1/
- $(INSTALL_DATA) docs/Coccilib.3cocci $(DESTDIR)$(MANDIR)/man3/
+ $(INSTALL_DATA) docs/Coccilib.3cocci $(DESTDIR)$(MANDIR)/man3/Coccilib.3

@@ -13,9 +25,9 @@ $OpenBSD: patch-Makefile,v 1.10 2015/10/
@@ -378,9 +378,9 @@ install-python:
install-stubs:
$(MKDIR_P) $(DESTDIR)$(LIBDIR)
- @if test -f ./bundles/pycaml/dllpycaml_stubs.so; then \
-- cp -fv ./bundles/pycaml/dllpycaml_stubs.so $(DESTDIR)$(LIBDIR); fi
-+ cp -f ./bundles/pycaml/dllpycaml_stubs.so $(DESTDIR)$(LIBDIR); fi
+ @if test -f ./bundles/pyml/dllpyml_stubs.so; then \
+- cp -fv ./bundles/pyml/dllpyml_stubs.so $(DESTDIR)$(LIBDIR); fi
++ cp -f ./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
+ cp -f ./bundles/pcre/dllpcre_stubs.so $(DESTDIR)$(LIBDIR); fi
Index: patches/patch-cocci_ml
===================================================================
RCS file: /cvs/ports/devel/coccinelle/patches/patch-cocci_ml,v
retrieving revision 1.7
diff -u -p -u -r1.7 patch-cocci_ml
--- patches/patch-cocci_ml 27 Oct 2015 14:43:07 -0000 1.7
+++ patches/patch-cocci_ml 30 Apr 2017 21:55:37 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-cocci_ml,v 1.7 2015/10/27 14:43:07 sthen Exp $
---- cocci.ml.orig Mon Oct 26 16:22:50 2015
-+++ cocci.ml Tue Oct 27 14:33:27 2015
-@@ -245,8 +245,8 @@ let show_or_not_diff2 cfile outfile =
+--- cocci.ml.orig
++++ cocci.ml
+@@ -249,8 +249,8 @@ let show_or_not_diff2 cfile outfile =

let line =
match !Flag_parsing_c.diff_lines with
@@ -12,7 +12,7 @@ $OpenBSD: patch-cocci_ml,v 1.7 2015/10/2
let res = Common.cmd_to_list line in
(match res with
[] -> ()
-@@ -524,7 +524,7 @@ let worth_trying2 cfiles (tokens,_,query,_) =
+@@ -528,7 +528,7 @@ let worth_trying2 cfiles (tokens,_,query,_) =

) in
let com =
@@ -21,7 +21,7 @@ $OpenBSD: patch-cocci_ml,v 1.7 2015/10/2
(String.concat "|" tokens) (String.concat " " cfiles) in
(match Sys.command com with
| 0 (* success *) -> true
-@@ -2293,7 +2293,7 @@ let check_duplicate_modif2 xs =
+@@ -2222,7 +2222,7 @@ let check_duplicate_modif2 xs =
match res2 with
| None -> false
| Some res2 ->
Index: patches/patch-commons_common_ml
===================================================================
RCS file: /cvs/ports/devel/coccinelle/patches/patch-commons_common_ml,v
retrieving revision 1.6
diff -u -p -u -r1.6 patch-commons_common_ml
--- patches/patch-commons_common_ml 27 Oct 2015 14:43:07 -0000 1.6
+++ patches/patch-commons_common_ml 30 Apr 2017 21:55:37 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-commons_common_ml,v 1.6 2015/10/27 14:43:07 sthen Exp $
---- commons/common.ml.orig Mon Oct 26 16:22:50 2015
-+++ commons/common.ml Tue Oct 27 14:23:22 2015
-@@ -3277,7 +3277,7 @@ let glob pattern =
+--- commons/common.ml.orig
++++ commons/common.ml
+@@ -3281,7 +3281,7 @@ let glob pattern =
let files_of_dir_or_files ext xs =
xs +> List.map (fun x ->
if is_directory x
@@ -10,7 +10,7 @@ $OpenBSD: patch-commons_common_ml,v 1.6
else [x]
) +> List.concat

-@@ -3287,7 +3287,7 @@ let files_of_dir_or_files_no_vcs ext xs =
+@@ -3291,7 +3291,7 @@ let files_of_dir_or_files_no_vcs ext xs =
if is_directory x
then
cmd_to_list
@@ -19,7 +19,7 @@ $OpenBSD: patch-commons_common_ml,v 1.6
"| grep -v /.hg/ |grep -v /CVS/ | grep -v /.git/ |grep -v /_darcs/"
)
else [x]
-@@ -3300,7 +3300,7 @@ let files_of_dir_or_files_no_vcs_post_filter regex xs
+@@ -3304,7 +3304,7 @@ let files_of_dir_or_files_no_vcs_post_filter regex xs
then
cmd_to_list
("find " ^ x ^
@@ -28,7 +28,7 @@ $OpenBSD: patch-commons_common_ml,v 1.6
)
+> List.filter (fun s -> s =~ regex)
else [x]
-@@ -5241,7 +5241,7 @@ let (diff: (int -> int -> diff -> unit)-> (string list
+@@ -5256,7 +5256,7 @@ let (diff: (int -> int -> diff -> unit)-> (string list
write_file file1 (unwords xs);
write_file file2 (unwords ys);
command2
@@ -37,7 +37,7 @@ $OpenBSD: patch-commons_common_ml,v 1.6
let res = cat fileresult in
let a = ref 0 in
let b = ref 0 in
-@@ -5269,7 +5269,7 @@ let (diff2: (int -> int -> diff -> unit) -> (string *
+@@ -5284,7 +5284,7 @@ let (diff2: (int -> int -> diff -> unit) -> (string *
write_file "/tmp/diff1" xstr;
write_file "/tmp/diff2" ystr;
command2
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/coccinelle/pkg/PLIST,v
retrieving revision 1.12
diff -u -p -u -r1.12 PLIST
--- pkg/PLIST 24 Jun 2016 15:59:11 -0000 1.12
+++ pkg/PLIST 30 Apr 2017 21:55:37 -0000
@@ -1,9 +1,11 @@
-@comment $OpenBSD: PLIST,v 1.12 2016/06/24 15:59:11 krw Exp $
+@comment $OpenBSD$
%%dynlink%%
bin/pycocci
bin/spatch
bin/spatch.byte
+bin/spgen
lib/coccinelle/
+lib/coccinelle/dllpyml_stubs.so
lib/coccinelle/ocaml/
lib/coccinelle/ocaml/ast0_cocci.cmi
lib/coccinelle/ocaml/ast_c.cmi
@@ -12,6 +14,7 @@ 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
@@ -23,8 +26,8 @@ lib/coccinelle/ocaml/prepare_ocamlcocci.
lib/coccinelle/ocaml/pretty_print_c.cmi
lib/coccinelle/ocaml/regexp.cmi
lib/coccinelle/ocaml/run_ocamlcocci.cmi
-lib/coccinelle/ocaml/type_cocci.cmi
lib/coccinelle/ocaml/visitor_c.cmi
+lib/coccinelle/ocaml/yes_prepare_ocamlcocci.cmi
lib/coccinelle/python/
lib/coccinelle/python/coccilib/
lib/coccinelle/python/coccilib/__init__.py
@@ -39,17 +42,23 @@ lib/coccinelle/python/coccilib/coccigui/
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
@bin lib/coccinelle/spatch
+lib/coccinelle/spgen/
+@bin lib/coccinelle/spgen/spgen
+@bin lib/coccinelle/spgen/spgen.opt
lib/coccinelle/standard.h
lib/coccinelle/standard.iso
-lib/ocaml/stublibs/dllpycaml_stubs.so
+lib/ocaml/
+lib/ocaml/stublibs/
@man man/man1/pycocci.1
@man man/man1/spatch.1
+@man man/man1/spgen.1
@man man/man3/Coccilib.3
share/doc/coccinelle/
share/doc/coccinelle/contents_motif.gif
@@ -72,6 +81,8 @@ share/doc/coccinelle/main_grammar012.htm
share/doc/coccinelle/main_grammar013.html
share/doc/coccinelle/main_grammar014.html
share/doc/coccinelle/main_grammar015.html
+share/doc/coccinelle/main_grammar016.html
+share/doc/coccinelle/main_grammar017.html
share/doc/coccinelle/manual.pdf
share/doc/coccinelle/next_motif.gif
share/doc/coccinelle/options.pdf

No comments:

Post a Comment