dev-util/coccinelle: bump to 1.0.8
authorJason A. Donenfeld <zx2c4@gentoo.org>
Tue, 3 Dec 2019 09:56:14 +0000 (10:56 +0100)
committerJason A. Donenfeld <zx2c4@gentoo.org>
Tue, 3 Dec 2019 09:56:19 +0000 (10:56 +0100)
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
dev-util/coccinelle/Manifest
dev-util/coccinelle/coccinelle-1.0.8.ebuild [new file with mode: 0644]

index a185a5b4b5829e8a029052808598d412198e9a63..e0e091baed97852f63685ac7d34f0403e9b23d9e 100644 (file)
@@ -1,2 +1,3 @@
 DIST coccinelle-1.0.5.tgz 5660596 BLAKE2B 9707e4773d165718b973e004e3359608428d8405d560d7013da66e2b1f0205f003ae0905c02a4f13c9725b39dc94710e5ccbc6b5b11ace66d7e87c3a303363c5 SHA512 0fee450554abc40feac9e745a252c1679f8016c82f04236e642e32e129618a950bb9657f1c447d62543289e95bbd4b1a8b0c6030373025c32a37068f82d30678
 DIST coccinelle-1.0.6.tgz 6684278 BLAKE2B b5b390488e818ce05c364f27782bd1c4dc63657a01c7564764d64faea8ff302c8409bb2ef172ce7ab7c2e00ae1a6f2c3bea76a1148eaf5a977f897d39a9fb23c SHA512 b667762ddf5ad30b126e93572cd8a8b3ffc21a790cd9d6df586e421c5db0a8d049af9587c6e5cb8f7a13f2c090ab2a9cca59ecba69069f9d3fe67b6f75dfe539
+DIST coccinelle-1.0.8.tar.gz 2670961 BLAKE2B 0a11d325f8e39a76111bb9b14afb5dc6c1de07b94fce7904b6be021b17a9346f1b2e09550e6de221280fa9ff57e6e4a41b2e733189e16cc3a460065844015901 SHA512 496b1632c92cc026fbe28f784f56d4cd78f89a8ccd28dc7db1069c0c6b2b239675a10da305e37ed2a03c605668ecd3399aeed522f12ec3fbbf3ca07277ab7bce
diff --git a/dev-util/coccinelle/coccinelle-1.0.8.ebuild b/dev-util/coccinelle/coccinelle-1.0.8.ebuild
new file mode 100644 (file)
index 0000000..5d8ee39
--- /dev/null
@@ -0,0 +1,122 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools multilib eutils python-single-r1 bash-completion-r1 elisp-common
+
+DESCRIPTION="Program matching and transformation engine"
+HOMEPAGE="http://coccinelle.lip6.fr/"
+SRC_URI="https://github.com/coccinelle/coccinelle/archive/1.0.8.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc emacs ocaml +ocamlopt pcre python test vim-syntax"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# ocaml enables ocaml scripting (uses findlib)
+CDEPEND=">=dev-lang/ocaml-3.12:=[ocamlopt?]
+       dev-ml/sexplib:=[ocamlopt(+)?]
+       dev-ml/menhir:=[ocamlopt?]
+       dev-ml/camlp4:=[ocamlopt?]
+       dev-ml/parmap:=[ocamlopt?]
+       emacs? ( virtual/emacs )
+       ocaml? ( dev-ml/findlib:= )
+       pcre? ( dev-ml/pcre-ocaml:=[ocamlopt(+)?] )
+       python? ( ${PYTHON_DEPS} )"
+
+RDEPEND="${CDEPEND}
+       vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+
+# dev-texlive/texlive-fontsextra contains 'ifsym.sty'
+DEPEND="${CDEPEND}
+       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 )
+
+RESTRICT=strip
+
+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() {
+       econf \
+               $(use_enable python) \
+               $(use_enable ocaml) \
+               $(use_enable pcre) \
+               $(use_enable pcre pcre-syntax) \
+               $(use_enable ocamlopt opt)
+}
+
+src_compile() {
+       emake -j1
+
+       if use ocamlopt ; then
+               emake all.opt
+       else
+               emake TARGET_SPATCH=byte-only all-dev
+       fi
+
+       if use doc ; then
+               VARTEXFONTS="${T}"/fonts emake docs
+       fi
+
+       if use emacs ; then
+               elisp-compile editors/emacs/cocci.el || die
+       fi
+}
+
+src_test() {
+       emake check
+       use python && emake pycocci-check
+}
+
+src_install() {
+       default
+
+       use doc && dodoc docs/manual/*.pdf
+       newbashcomp scripts/spatch.bash_completion spatch
+
+       if use emacs ; then
+               elisp-install ${PN} editors/emacs/*
+               elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+       fi
+
+       if use vim-syntax ; then
+               newdoc editors/vim/README README-vim
+               rm editors/vim/README || die
+               insinto /usr/share/vim/vimfiles
+               doins -r editors/vim/*
+       fi
+
+       use python && python_optimize
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
+}