git: 909a3d1f1406 - main - devel/coccinelle: update 1.1.1 → 1.2, take maintainership

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sat, 27 Jul 2024 23:19:36 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=909a3d1f1406d5af1b6296202642589861e30b47

commit 909a3d1f1406d5af1b6296202642589861e30b47
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2024-07-27 23:16:47 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-27 23:16:47 +0000

    devel/coccinelle: update 1.1.1 → 1.2, take maintainership
    
    Commit log:
    https://github.com/coccinelle/coccinelle/compare/1.1.1...1.2
    
    While here pet portclippy.
    
    PR:     280297
---
 devel/coccinelle/Makefile                          | 24 ++++----
 devel/coccinelle/distinfo                          |  8 ++-
 ...63-wrong-default-path-for-COCCINELLE_HOME.patch | 66 ----------------------
 devel/coccinelle/files/patch-stdcompat-fix         | 39 -------------
 4 files changed, 18 insertions(+), 119 deletions(-)

diff --git a/devel/coccinelle/Makefile b/devel/coccinelle/Makefile
index f5368a119995..a63b0ecabefc 100644
--- a/devel/coccinelle/Makefile
+++ b/devel/coccinelle/Makefile
@@ -1,14 +1,11 @@
 PORTNAME=	coccinelle
-PORTVERSION=	1.1.1
-PORTREVISION=	3
+PORTVERSION=	1.2
 CATEGORIES=	devel
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	freebsd@dev.thsi.be
 COMMENT=	Program matching and transformation engine
 WWW=		http://coccinelle.lip6.fr/
 
-EXTRA_PATCHES=	${FILESDIR}/0001-Fix-263-wrong-default-path-for-COCCINELLE_HOME.patch:-p1
-
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/license.txt
 
@@ -17,18 +14,23 @@ BUILD_DEPENDS=	menhir:devel/menhir \
 		ocaml-pcre>=0:devel/ocaml-pcre
 LIB_DEPENDS=	libpcre.so:devel/pcre
 
-USE_OCAML=	3.0+
-USE_OCAML_CAMLP4=yes
-
 USES=		autoreconf gmake perl5 pkgconfig:build python shebangfix
-BINARY_ALIAS=	make=${LOCALBASE}/bin/gmake
-SHEBANG_FILES=	tools/pycocci
+USE_GITHUB=	yes
+# until coccinelle/stdcompat releases with ocaml 5.2 support.
+GH_TUPLE=	thierry-martinez:stdcompat:d53390d788027fe0a2282c4745eb3d1626341f99:stdcompat
+USE_OCAML=	3.0+
+USE_OCAML_CAMLP4=	yes
 USE_PERL5=	build
+SHEBANG_FILES=	tools/pycocci
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	PYTHON="${PYTHON_CMD}" PYVER="${PYTHON_VER}"
 MAKE_ARGS=	PYTHON_VERSION="${PYTHON_VER}"
+BINARY_ALIAS=	make=${LOCALBASE}/bin/gmake
 
-USE_GITHUB=	yes
+post-extract:
+	${RM} -r ${WRKSRC}/bundles/stdcompat/stdcompat-current
+	(cd ${WRKSRC_stdcompat} && ${COPYTREE_SHARE} . \
+		${WRKSRC}/bundles/stdcompat/stdcompat-current)
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/spatch
diff --git a/devel/coccinelle/distinfo b/devel/coccinelle/distinfo
index 95cc097a296d..c01146f6a5f0 100644
--- a/devel/coccinelle/distinfo
+++ b/devel/coccinelle/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1683065204
-SHA256 (coccinelle-coccinelle-1.1.1_GH0.tar.gz) = 095919e129ac563586d880ebbc5aac829fec224177090aebe34dc34ed5f142bf
-SIZE (coccinelle-coccinelle-1.1.1_GH0.tar.gz) = 2743457
+TIMESTAMP = 1717434330
+SHA256 (coccinelle-coccinelle-1.2_GH0.tar.gz) = 095dbcddce82c8e3bc3e1ab8c83c0ed6feae8a26c921045a3e73d72f0ae13f33
+SIZE (coccinelle-coccinelle-1.2_GH0.tar.gz) = 2948051
+SHA256 (thierry-martinez-stdcompat-d53390d788027fe0a2282c4745eb3d1626341f99_GH0.tar.gz) = 1324c4c5a2fdcefe254459f81083dedd1e6dd61efe59498e9b4aa27d5e0a3d4d
+SIZE (thierry-martinez-stdcompat-d53390d788027fe0a2282c4745eb3d1626341f99_GH0.tar.gz) = 617733
diff --git a/devel/coccinelle/files/0001-Fix-263-wrong-default-path-for-COCCINELLE_HOME.patch b/devel/coccinelle/files/0001-Fix-263-wrong-default-path-for-COCCINELLE_HOME.patch
deleted file mode 100644
index 098ac1583b51..000000000000
--- a/devel/coccinelle/files/0001-Fix-263-wrong-default-path-for-COCCINELLE_HOME.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 540888ff426e0b1f7907b63ce26e712d1fc172cc Mon Sep 17 00:00:00 2001
-Message-Id: <540888ff426e0b1f7907b63ce26e712d1fc172cc.1660153142.git.osandov@osandov.com>
-From: Thierry Martinez <Thierry.Martinez@inria.fr>
-Date: Mon, 7 Feb 2022 11:24:49 +0100
-Subject: [PATCH] Fix 263: wrong default path for COCCINELLE_HOME
-
-COCCINELLE_HOME is the directory where standard.iso is looked for.
-If COCCINELLE_HOME is not defined, we consider the directory $bindir
-where the current executable is. If $bindir/standard.iso exists,
-we use COCCINELLE_HOME=$bindir (this is a usual case during
-development, where we run spatch.opt from the working directory of the
-repository).
-
-Otherwise, we suppose that coccinelle has been installed (make
-install), and that standard.iso is installed in $libdir, where
-$libdir is $exec_prefix/lib.
-
-Before this commit, we considered wrongly that $exec_prefix was equal
-to $bindir, whereas the default value for $bindir is
-$exec_prefix/bin. Therefore, we should take for $exec_prefix the
-parent directory of $bindir.
----
- globals/config.ml.in | 22 ++++++++++++++++++----
- 1 file changed, 18 insertions(+), 4 deletions(-)
-
-diff --git a/globals/config.ml.in b/globals/config.ml.in
-index da1e9da4..6505a911 100644
---- a/globals/config.ml.in
-+++ b/globals/config.ml.in
-@@ -26,15 +26,29 @@ let rec realpath path =
-     end
- 
- let path =
-+  (* COCCINELLE_HOME is the directory where standard.iso is looked for. *)
-   try (Sys.getenv "COCCINELLE_HOME")
-   with Not_found->
-+    (* If COCCINELLE_HOME is not defined, we consider the directory $bindir
-+       where the current executable is. *)
-     let exec_realpath = realpath Sys.executable_name in
--    let exec_dir = Filename.dirname exec_realpath in
--    if Sys.file_exists (Filename.concat exec_dir "standard.iso") then
--      exec_dir
-+    let bin_dir = Filename.dirname exec_realpath in
-+    if Sys.file_exists (Filename.concat bin_dir "standard.iso") then
-+       (* If $bindir/standard.iso exists,
-+          we use COCCINELLE_HOME=$bindir (this is a usual case during
-+          development, where we run spatch.opt from the working directory
-+          of the repository). *)
-+      bin_dir
-     else
-+      (* Otherwise, we suppose that coccinelle has been installed (make
-+         install), and that standard.iso is installed in $libdir, where
-+         $libdir is $exec_prefix/lib.
-+         The default value for $bindir is $exec_prefix/bin.
-+         Therefore, we should take for $exec_prefix the parent directory
-+         of $bindir.*)
-       let libdir =
--        Str.global_replace (Str.regexp "[$]{exec_prefix}") exec_dir "@libdir@"
-+        Str.global_replace (Str.regexp "[$]{exec_prefix}")
-+          (Filename.dirname bin_dir) "@libdir@"
-       in
-       Filename.concat libdir "coccinelle"
- 
--- 
-2.37.1
-
diff --git a/devel/coccinelle/files/patch-stdcompat-fix b/devel/coccinelle/files/patch-stdcompat-fix
deleted file mode 100644
index 16e0167634a1..000000000000
--- a/devel/coccinelle/files/patch-stdcompat-fix
+++ /dev/null
@@ -1,39 +0,0 @@
-From fa4d4abc816a1fe1d0ac98a0b9520bae5ea559d6 Mon Sep 17 00:00:00 2001
-From: Thierry Martinez <Thierry.Martinez@inria.fr>
-Date: Thu, 4 Nov 2021 14:22:08 +0100
-Subject: [PATCH] Add empty rule to make .cmt targets depend on .cmx
-
-Fix bug reported by Sabyrzhan Tasbolatov
----
- bundles/stdcompat/stdcompat-current/Makefile.am | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/bundles/stdcompat/stdcompat-current/Makefile.am b/bundles/stdcompat/stdcompat-current/Makefile.am
-index f0d8dbc38..1b955cf86 100644
---- bundles/stdcompat/stdcompat-current/Makefile.am
-+++ bundles/stdcompat/stdcompat-current/Makefile.am
-@@ -71,10 +71,12 @@ mypkg_SCRIPTS = META $(MODULES_native) $(MODULES_native:.ml=.cmi) \
- 
- if OCAML_SUPPORTS_BYTECODE
- mypkg_SCRIPTS += stdcompat.cma
-+BEST_SUFFIX := .cmo
- endif
- 
- if OCAML_SUPPORTS_NATIVE
- mypkg_SCRIPTS += stdcompat.cmxa stdcompat.a $(MODULES_native:.ml=.cmx)
-+BEST_SUFFIX := .cmx
- endif
- 
- if OCAML_SUPPORTS_SHARED
-@@ -113,6 +115,8 @@ SUFFIXES = .ml .mli .cmi .cmo .cmx .cmxa .cmxs .cmt
- .ml.cmx :
- 	$(OCAMLOPT) -c $(OCAMLCFLAGS) $< -o $@
- 
-+$(BEST_SUFFIX).cmt : ;
-+
- stdcompat__stubs.$(OBJEXT) : stdcompat__stubs.c
- 	$(OCAMLC) -c $<
- 
--- 
-GitLab
-