From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/coccinelle/files/, dev-util/coccinelle/
Date: Sat, 29 Oct 2022 18:26:12 +0000 (UTC) [thread overview]
Message-ID: <1667067954.027818aade360d64a45ab7f9c5f7e278eccb9949.sam@gentoo> (raw)
commit: 027818aade360d64a45ab7f9c5f7e278eccb9949
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 29 18:10:43 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 29 18:25:54 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=027818aa
dev-util/coccinelle: new package, add 1.1.1
It was removed in the past because of no Python 3 support, but
it supports Python 3 now.
Bug: https://bugs.gentoo.org/734630
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/coccinelle/Manifest | 1 +
dev-util/coccinelle/coccinelle-1.1.1.ebuild | 126 +++++++++++++++++++++++
dev-util/coccinelle/files/50coccinelle-gentoo.el | 6 ++
dev-util/coccinelle/metadata.xml | 11 ++
4 files changed, 144 insertions(+)
diff --git a/dev-util/coccinelle/Manifest b/dev-util/coccinelle/Manifest
new file mode 100644
index 000000000000..55489c38c940
--- /dev/null
+++ b/dev-util/coccinelle/Manifest
@@ -0,0 +1 @@
+DIST coccinelle-1.1.1.tar.bz2 2118055 BLAKE2B 7efb0c86432c88daa1bce2710acdf2f62b6210c69245b4896ea8c5e39a0b28c538d94deae6ed1544e0ced66b2baa6edf8670f5e02dad40c2d1f5562326ce23e3 SHA512 fcb83203c91dae18122cf95f7db931d2e1576559b74a7a1c664c795437904acdffa005a8b9e732c1d99c8f0ab1c5f529d143eafe79c6397d28c4879848afca45
diff --git a/dev-util/coccinelle/coccinelle-1.1.1.ebuild b/dev-util/coccinelle/coccinelle-1.1.1.ebuild
new file mode 100644
index 000000000000..4affa4aee5a6
--- /dev/null
+++ b/dev-util/coccinelle/coccinelle-1.1.1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit autotools bash-completion-r1 elisp-common python-single-r1
+
+DESCRIPTION="Program matching and transformation engine"
+HOMEPAGE="http://coccinelle.lip6.fr/"
+SRC_URI="https://gitlab.inria.fr/coccinelle/coccinelle/-/archive/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc emacs +ocamlopt pcre python test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="strip !test? ( test )"
+
+RDEPEND="
+ >=dev-lang/ocaml-3.12:=[ocamlopt?]
+ dev-ml/sexplib:=[ocamlopt(+)?]
+ dev-ml/menhir:=[ocamlopt?]
+ dev-ml/camlp4:=[ocamlopt?]
+ dev-ml/parmap:=[ocamlopt?]
+ dev-ml/findlib:=[ocamlopt?]
+ emacs? ( >=app-editors/emacs-23.1:* )
+ pcre? (
+ dev-libs/libpcre
+ dev-ml/pcre-ocaml:=[ocamlopt?]
+ )
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+# dev-texlive/texlive-fontsextra contains 'ifsym.sty'
+BDEPEND="
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsextra
+ )
+"
+
+DOCS=( authors.txt bugs.txt changes.txt credits.txt readme.txt )
+
+SITEFILE=50coccinelle-gentoo.el
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ if use python ; then
+ # Fix python install location
+ sed -e "s:\$(LIBDIR)/python:$(python_get_sitedir):" \
+ -i Makefile || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-ocaml
+ --with-bash-completion="$(get_bashcompdir)"
+ --with-python="${EPYTHON}"
+
+ $(use_enable python)
+ $(use_enable pcre)
+ $(use_enable pcre pcre-syntax)
+ $(use_enable ocamlopt opt)
+ )
+
+ CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ export TARGET_SPATCH=$(usev !ocamlopt 'byte-only')
+
+ emake VERBOSE=yes -j1 $(usex ocamlopt 'all.opt' 'all-dev')
+
+ if use doc ; then
+ VARTEXFONTS="${T}"/fonts emake VERBOSE=yes docs
+ fi
+
+ if use emacs ; then
+ elisp-compile editors/emacs/cocci.el || die
+ fi
+}
+
+src_test() {
+ emake VERBOSE=yes check $(usev python pycocci-check)
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}" VERBOSE=yes install
+
+ if use python ; then
+ python_optimize
+ else
+ rm -rf "${ED}/usr/$(get_libdir)/${PN}/python" || die
+ fi
+
+ if use emacs ; then
+ elisp-install ${PN} editors/emacs/*
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ use doc && dodoc docs/manual/*.pdf
+
+ newdoc editors/vim/README README-vim
+ rm editors/vim/README || die
+ insinto /usr/share/vim/vimfiles
+ doins -r editors/vim/*
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-util/coccinelle/files/50coccinelle-gentoo.el b/dev-util/coccinelle/files/50coccinelle-gentoo.el
new file mode 100644
index 000000000000..6721b3c5e5a1
--- /dev/null
+++ b/dev-util/coccinelle/files/50coccinelle-gentoo.el
@@ -0,0 +1,6 @@
+
+;;; site-lisp configuration for coccinelle
+
+(add-to-list 'load-path "@SITELISP@")
+
+(autoload 'cocci-mode "cocci" "Major mode for editing cocci code." t)
diff --git a/dev-util/coccinelle/metadata.xml b/dev-util/coccinelle/metadata.xml
new file mode 100644
index 000000000000..313e852a9cce
--- /dev/null
+++ b/dev-util/coccinelle/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ml@gentoo.org</email>
+ <name>ML</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">coccinelle/coccinelle</remote-id>
+ </upstream>
+</pkgmetadata>
next reply other threads:[~2022-10-29 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-29 18:26 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-13 17:18 [gentoo-commits] repo/gentoo:master commit in: dev-util/coccinelle/files/, dev-util/coccinelle/ Alfredo Tupone
2025-05-29 16:49 Sam James
2024-06-06 6:41 Alfredo Tupone
2016-06-28 19:04 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1667067954.027818aade360d64a45ab7f9c5f7e278eccb9949.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox