From 009897642a869d630779716efc51af1554f72867 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 29 Oct 2022 22:01:57 +0100 Subject: gentoo auto-resync : 29:10:2022 - 22:01:57 --- dev-util/coccinelle/Manifest | 4 + dev-util/coccinelle/coccinelle-1.1.1-r1.ebuild | 129 +++++++++++++++++++++++ dev-util/coccinelle/files/50coccinelle-gentoo.el | 6 ++ dev-util/coccinelle/metadata.xml | 11 ++ 4 files changed, 150 insertions(+) create mode 100644 dev-util/coccinelle/Manifest create mode 100644 dev-util/coccinelle/coccinelle-1.1.1-r1.ebuild create mode 100644 dev-util/coccinelle/files/50coccinelle-gentoo.el create mode 100644 dev-util/coccinelle/metadata.xml (limited to 'dev-util/coccinelle') diff --git a/dev-util/coccinelle/Manifest b/dev-util/coccinelle/Manifest new file mode 100644 index 000000000000..6518e621cb22 --- /dev/null +++ b/dev-util/coccinelle/Manifest @@ -0,0 +1,4 @@ +AUX 50coccinelle-gentoo.el 154 BLAKE2B debbfe7a00bf6195db370b33430d18fb7121123da26f97c01703704918f977f886090abfa0b6f226f8d713bca566ff6e39fabefb07e098a2bfd7cbd64eaebe6a SHA512 dc99ec43c65fc3b6735b8d06f664c09dabe89bb6dec2a0c0390e97ea2bacb1d76ff33d94124c2a2d1f16795648480c33e0306020e151d67d530e35aa9f4f009d +DIST coccinelle-1.1.1.tar.bz2 2118055 BLAKE2B 7efb0c86432c88daa1bce2710acdf2f62b6210c69245b4896ea8c5e39a0b28c538d94deae6ed1544e0ced66b2baa6edf8670f5e02dad40c2d1f5562326ce23e3 SHA512 fcb83203c91dae18122cf95f7db931d2e1576559b74a7a1c664c795437904acdffa005a8b9e732c1d99c8f0ab1c5f529d143eafe79c6397d28c4879848afca45 +EBUILD coccinelle-1.1.1-r1.ebuild 2866 BLAKE2B 0d5dd7513c3a580e5aa5a3cc96c540b3cd7712be1d136ea9a3596a6f933dcccd7e8b5049f511c821239a4d38bfc8b9aa825fa139d1394046346d91b3cd30443c SHA512 2f0a4a308c42846e853a63e24d7bec015d86313e5f348894019d688f2581439fad1735e654c291200967f5e2dabdafbc46c4b2726e0e3c73cf48a133d1a36acc +MISC metadata.xml 318 BLAKE2B 0d950c53a548409db938f27ae7e6941875f2d3260237c72fb3771659ed35e876e456e48823f2340122e68da18bf80bc4f16b58182937117977567579d49d48ad SHA512 c32dd8ca3473e147b69f305fe58412f10ba00dd939eba5fb871d366c6440cffbd623ce4922cd5879b2fefed19a3cf3ffb29bd588021e707623a32f85640905c4 diff --git a/dev-util/coccinelle/coccinelle-1.1.1-r1.ebuild b/dev-util/coccinelle/coccinelle-1.1.1-r1.ebuild new file mode 100644 index 000000000000..bd296f7e09d3 --- /dev/null +++ b/dev-util/coccinelle/coccinelle-1.1.1-r1.ebuild @@ -0,0 +1,129 @@ +# 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="https://coccinelle.gitlabpages.inria.fr/website/ https://gitlab.inria.fr/coccinelle/coccinelle" +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}" +# Test failures need investigation +RESTRICT="strip !test? ( 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? ( + dev-texlive/texlive-latexextra + dev-texlive/texlive-fontsextra + virtual/latex-base + ) +" + +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() { + # TODO: See Fedora's method? + # https://src.fedoraproject.org/rpms/coccinelle/blob/rawhide/f/coccinelle.spec#_231 + 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 @@ + + + + + ml@gentoo.org + ML + + + coccinelle/coccinelle + + -- cgit v1.2.3