summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2011-11-04 08:07:40 +0000
committerTim Harder <radhermit@gentoo.org>2011-11-04 08:07:40 +0000
commitae72c74bf08fe747aa5c49ffda3525ef8d22d078 (patch)
treec8270041e3a939afe47971b0c03f33246d353b67 /dev-util/coccinelle
parentRemove old version (diff)
downloadgentoo-2-ae72c74bf08fe747aa5c49ffda3525ef8d22d078.tar.gz
gentoo-2-ae72c74bf08fe747aa5c49ffda3525ef8d22d078.tar.bz2
gentoo-2-ae72c74bf08fe747aa5c49ffda3525ef8d22d078.zip
Version bump (fixes bug #369343). Update to EAPI 4 and improve python support (bug #324381).
(Portage version: 2.2.0_alpha72/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/coccinelle')
-rw-r--r--dev-util/coccinelle/ChangeLog11
-rw-r--r--dev-util/coccinelle/coccinelle-1.0.0_rc7.ebuild95
-rw-r--r--dev-util/coccinelle/files/coccinelle-1.0.0_rc7-parallel-make.patch8
-rw-r--r--dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre-linking.patch19
-rw-r--r--dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre.patch30
5 files changed, 162 insertions, 1 deletions
diff --git a/dev-util/coccinelle/ChangeLog b/dev-util/coccinelle/ChangeLog
index b318ffc2d10c..edba328c7d7a 100644
--- a/dev-util/coccinelle/ChangeLog
+++ b/dev-util/coccinelle/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-util/coccinelle
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/coccinelle/ChangeLog,v 1.11 2011/10/05 19:01:26 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/coccinelle/ChangeLog,v 1.12 2011/11/04 08:07:40 radhermit Exp $
+
+*coccinelle-1.0.0_rc7 (04 Nov 2011)
+
+ 04 Nov 2011; Tim Harder <radhermit@gentoo.org> +coccinelle-1.0.0_rc7.ebuild,
+ +files/coccinelle-1.0.0_rc7-parallel-make.patch,
+ +files/coccinelle-1.0.0_rc7-pcre.patch,
+ +files/coccinelle-1.0.0_rc7-pcre-linking.patch:
+ Version bump (fixes bug #369343). Update to EAPI 4 and improve python support
+ (bug #324381).
05 Oct 2011; Alexis Ballier <aballier@gentoo.org> coccinelle-0.2.5-r2.ebuild:
remove ptex dep as it is going away
diff --git a/dev-util/coccinelle/coccinelle-1.0.0_rc7.ebuild b/dev-util/coccinelle/coccinelle-1.0.0_rc7.ebuild
new file mode 100644
index 000000000000..7164a5d39350
--- /dev/null
+++ b/dev-util/coccinelle/coccinelle-1.0.0_rc7.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/coccinelle/coccinelle-1.0.0_rc7.ebuild,v 1.1 2011/11/04 08:07:40 radhermit Exp $
+
+EAPI="4"
+PYTHON_DEPEND="python? 2"
+
+inherit multilib eutils python bash-completion-r1
+
+MY_P="${P/_/-}"
+DESCRIPTION="Program matching and transformation engine"
+HOMEPAGE="http://coccinelle.lip6.fr/"
+SRC_URI="http://coccinelle.lip6.fr/distrib/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ocaml +ocamlopt pcre python test"
+
+# ocaml enables ocaml scripting (uses findlib)
+RDEPEND=">=dev-lang/ocaml-3.10[ocamlopt?]
+ dev-ml/sexplib
+ ocaml? ( dev-ml/findlib )
+ pcre? ( dev-ml/pcre-ocaml )"
+
+# dev-texlive/texlive-fontsextra contains 'ifsym.sty'
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsextra )"
+
+REQUIRED_USE="test? ( ocaml python )"
+
+DOCS=( authors.txt bugs.txt changes.txt credits.txt readme.txt )
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-pcre.patch
+ epatch "${FILESDIR}"/${P}-pcre-linking.patch
+ epatch "${FILESDIR}"/${P}-parallel-make.patch
+
+ # Fix python install location
+ sed -i -e "s:\$(SHAREDIR)/python:$(python_get_sitedir):" Makefile || die
+ sed -i -e "/export PYTHONPATH/s:\$COCCINELLE_HOME/python:$(python_get_sitedir):" \
+ scripts/spatch.sh || die
+}
+
+src_configure() {
+ # non-autoconf
+ ./configure \
+ --prefix=/usr \
+ $(use ocamlopt || echo "--no-opt") \
+ $(use_with python) \
+ $(use_with ocaml) \
+ $(use_with pcre) \
+ || die
+
+ sed -i -e "s:^LIBDIR=.*:LIBDIR=/usr/$(get_libdir)/ocaml/stublibs/:" \
+ -e "s:^SHAREDIR=.*:SHAREDIR=/usr/$(get_libdir)/ocaml/${PN}/:" \
+ -e "s:^MANDIR=.*:MANDIR=/usr/share/man/:" \
+ Makefile.config || die
+}
+
+src_compile() {
+ emake depend
+ emake
+ if use doc ; then
+ VARTEXFONTS="${T}"/fonts emake docs
+ fi
+ if use ocamlopt ; then
+ emake opt
+ fi
+}
+
+src_test() {
+ source env.sh # needed for built in-place python plugin
+ ./spatch standard.h -parse_c -dir tests/ || die
+ yes | ./spatch -iso_file standard.iso -macro_file_builtins standard.h -testall || die
+ if use ocamlopt ; then
+ ./spatch.opt -iso_file standard.iso -macro_file_builtins standard.h -testall || die
+ fi
+}
+
+src_install() {
+ default
+ use doc && dodoc docs/manual/*.pdf
+ newbashcomp scripts/spatch.bash_completion spatch
+ export STRIP_MASK='*/coccinelle/spatch'
+}
diff --git a/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-parallel-make.patch b/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-parallel-make.patch
new file mode 100644
index 000000000000..a95eba1711aa
--- /dev/null
+++ b/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-parallel-make.patch
@@ -0,0 +1,8 @@
+--- coccinelle-1.0.0-rc7/docs/Makefile.orig
++++ coccinelle-1.0.0-rc7/docs/Makefile
+@@ -13,4 +13,4 @@
+ rm -f spatch.1
+
+ all clean distclean::
+- make -C $(SUBDIR) $@
++ $(MAKE) -C $(SUBDIR) $@
diff --git a/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre-linking.patch b/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre-linking.patch
new file mode 100644
index 000000000000..271dcf9ceedc
--- /dev/null
+++ b/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre-linking.patch
@@ -0,0 +1,19 @@
+--- coccinelle-1.0.0-rc7/Makefile.orig
++++ coccinelle-1.0.0-rc7/Makefile
+@@ -225,13 +225,13 @@
+ $(OPTOBJS):$(LIBS:.cma=.cmxa)
+
+ $(EXEC): $(LIBS) $(OBJS)
+- $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS) $(SEXPLIB) $^
++ $(OCAMLC) $(BYTECODE_STATIC) -o $@ $(SYSLIBS) $(SEXPLIB) $^ $(PCRELIB)
+
+ $(EXEC).opt: $(LIBS:.cma=.cmxa) $(OPTOBJS)
+- $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(OPTSEXPLIB) $(OPTLIBFLAGS) $^
++ $(OCAMLOPT) $(STATIC) -o $@ $(SYSLIBS:.cma=.cmxa) $(OPTSEXPLIB) $(OPTLIBFLAGS) $^ $(PCRELIB:.cma=.cmxa)
+
+ $(EXEC).top: $(LIBS) $(OBJS)
+- $(OCAMLMKTOP) -custom -o $@ $(SYSLIBS) $(SEXPLIB) $^
++ $(OCAMLMKTOP) -custom -o $@ $(SYSLIBS) $(SEXPLIB) $^ $(PCRELIB)
+
+ clean::
+ rm -f $(TARGET) $(TARGET).opt $(TARGET).top
diff --git a/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre.patch b/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre.patch
new file mode 100644
index 000000000000..d9b5c9e3f427
--- /dev/null
+++ b/dev-util/coccinelle/files/coccinelle-1.0.0_rc7-pcre.patch
@@ -0,0 +1,30 @@
+http://www.mail-archive.com/cocci@diku.dk/msg01695.html
+
+diff --git a/parsing_cocci/function_prototypes.ml b/parsing_cocci/function_prototypes.ml
+index 2f2225a..257e0ca 100644
+--- a/parsing_cocci/function_prototypes.ml
++++ b/parsing_cocci/function_prototypes.ml
+@@ -153,18 +153,19 @@ and strip =
+ ref [],-1) in
+
+ (* need a case for everything that has an unvisited component and can be in
+- a function prototype *)
++ a function prototype. Also get rid of constraints because pcre
++ constraints cannot be compared. *)
+
+ let ident r k e =
+ donothing r k
+ (Ast0.rewrap e
+ (match Ast0.unwrap e with
+ Ast0.MetaId(nm,constraints,seed,pure) ->
+- Ast0.MetaId(nm,constraints,seed,Ast0.Pure)
++ Ast0.MetaId(nm,Ast.IdNoConstraint,seed,Ast0.Pure)
+ | Ast0.MetaFunc(nm,constraints,pure) ->
+- Ast0.MetaFunc(nm,constraints,Ast0.Pure)
++ Ast0.MetaFunc(nm,Ast.IdNoConstraint,Ast0.Pure)
+ | Ast0.MetaLocalFunc(nm,constraints,pure) ->
+- Ast0.MetaLocalFunc(nm,constraints,Ast0.Pure)
++ Ast0.MetaLocalFunc(nm,Ast.IdNoConstraint,Ast0.Pure)
+ | e -> e)) in
+
+ let typeC r k e =