gnature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VYFBL6r3Dz4Lr7; Mon, 6 May 2024 21:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715031467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SyA9RDnHvpILSaCAcTPQhsFXv6dS+MCJKBr6ZdJ72+o=; b=W+Slz0GESQ9/1lCCjVIgSI6WrlzFX4OiU0aSk1koH8KT2sdFK9NDZ+jUUWFMx7WZYVBHmu DBGAJRQscaJRByjdKBZoZBMzqTzdzBDDsvYf23mfV+XDZ92cmNmjSjvVKrWXXpP1NN/OAZ erDVvsqkZmmNc8t5VmUwlG0gmWl+2kpx3oWnRhMnY2NZy7qWlAwG8ROUyFmRHAvG63JaqN jtKfjilimh7AHzMvWkPqWHG6f6OOStq/M6pfRuAjrMBgRBMqZnVxBvJBa8LnMGK0K5PMhA w+Do6cUlLKgKFv8EHrxpPF8bVOFRTafHSoMYr/oa7fHkbXxnF8sA+ivA1Eg/8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715031467; a=rsa-sha256; cv=none; b=LgSWEdm5hUAzRDShK9kuEkNpp9kqLGcjuguZVkeG2CngqI7a+VCMi+zXsaT2U1reXdTaO5 l004HtEwxj58/6OSft/GIUaqJa391lFn7Wid54Iehx0ZztAoyhWgFWOsmbtoj91x/+mc2k agL1pwgtkkgmntDUQNDlVwKd5QPvvkqY+Y28+NvrUWp/3Tx/vjslp6HuI5TColGRgNU0ZR AujoPVS+65S0EgHi6Np42l5KBxEr0zDns2GtUY07HQknxWU/kKWnY9pdAchNmMQhllhTL4 tqAdXnW8nUDSIfAXo2OuuDBMadUK9e8HencU9IyqjRB8AqaoSBv7Q86E8fRTwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715031467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SyA9RDnHvpILSaCAcTPQhsFXv6dS+MCJKBr6ZdJ72+o=; b=AlvkojfxDxJrK6in1c7dl9WK+FddszCtNP7uTkZPAOa1IJYKtdoIv6hB6HCJYWghgJMqvm L1RYsc170wtery0aH+8AGb86pkAF+5s/X85hrTUnFrkd0uhAQS42bNyEFRLzQcDEJeSppI hyoB3EHnVMkvzKGxvg7ltx8o+rjEAfU3JRZOK8Hy8shBDyQVrFBe5MS/vwyIsMz9i1dspl JoBRApjx4cvdO+sM3aU5riRSfMdAhjrc7yHd8VM0ePjaYEu5/cxD/1GwJayK8choYzxZWH U76Oxc4YMwmdf9RGDOrAnmnFhYUKegW2a0ZLSenFXbbkoYTMKQjTngjTIy2XrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VYFBL6R6Yz1CsK; Mon, 6 May 2024 21:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 446LbkW7067720; Mon, 6 May 2024 21:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 446LbkgG067717; Mon, 6 May 2024 21:37:46 GMT (envelope-from git) Date: Mon, 6 May 2024 21:37:46 GMT Message-Id: <202405062137.446LbkgG067717@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: eb07e6a19a9f - main - devel/coccinelle: fix wrong default path for COCCINELLE_HOME List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb07e6a19a9f44e833bde9e4ecfe1f685359f606 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=eb07e6a19a9f44e833bde9e4ecfe1f685359f606 commit eb07e6a19a9f44e833bde9e4ecfe1f685359f606 Author: Baptiste Daroussin AuthorDate: 2024-05-06 21:37:12 +0000 Commit: Baptiste Daroussin CommitDate: 2024-05-06 21:37:12 +0000 devel/coccinelle: fix wrong default path for COCCINELLE_HOME This resulted on spatch never able to lookup for standard.iso --- devel/coccinelle/Makefile | 5 +- ...63-wrong-default-path-for-COCCINELLE_HOME.patch | 66 ++++++++++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/devel/coccinelle/Makefile b/devel/coccinelle/Makefile index 99533970bc10..488e3a5d6de2 100644 --- a/devel/coccinelle/Makefile +++ b/devel/coccinelle/Makefile @@ -1,12 +1,14 @@ PORTNAME= coccinelle PORTVERSION= 1.1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= ports@FreeBSD.org 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 @@ -23,7 +25,6 @@ BINARY_ALIAS= make=${LOCALBASE}/bin/gmake SHEBANG_FILES= tools/pycocci USE_PERL5= build GNU_CONFIGURE= yes -GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CONFIGURE_ENV= PYTHON="${PYTHON_CMD}" PYVER="${PYTHON_VER}" MAKE_ARGS= PYTHON_VERSION="${PYTHON_VER}" 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 new file mode 100644 index 000000000000..098ac1583b51 --- /dev/null +++ b/devel/coccinelle/files/0001-Fix-263-wrong-default-path-for-COCCINELLE_HOME.patch @@ -0,0 +1,66 @@ +From 540888ff426e0b1f7907b63ce26e712d1fc172cc Mon Sep 17 00:00:00 2001 +Message-Id: <540888ff426e0b1f7907b63ce26e712d1fc172cc.1660153142.git.osandov@osandov.com> +From: Thierry Martinez +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 +