Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/coccinelle: ChangeLog coccinelle-1.0.0_rc15-r1.ebuild
Date: Fri, 31 Aug 2012 21:28:24
Message-Id: 20120831212813.C39D820DF3@flycatcher.gentoo.org
1 radhermit 12/08/31 21:28:13
2
3 Modified: ChangeLog
4 Added: coccinelle-1.0.0_rc15-r1.ebuild
5 Log:
6 Revision bump. Fix script location for spatch binary.
7
8 (Portage version: 2.2.0_alpha123/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.25 dev-util/coccinelle/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/coccinelle/ChangeLog?rev=1.25&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/coccinelle/ChangeLog?rev=1.25&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/coccinelle/ChangeLog?r1=1.24&r2=1.25
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/coccinelle/ChangeLog,v
20 retrieving revision 1.24
21 retrieving revision 1.25
22 diff -u -r1.24 -r1.25
23 --- ChangeLog 20 Aug 2012 17:34:06 -0000 1.24
24 +++ ChangeLog 31 Aug 2012 21:28:13 -0000 1.25
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-util/coccinelle
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/coccinelle/ChangeLog,v 1.24 2012/08/20 17:34:06 radhermit Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-util/coccinelle/ChangeLog,v 1.25 2012/08/31 21:28:13 radhermit Exp $
30 +
31 +*coccinelle-1.0.0_rc15-r1 (31 Aug 2012)
32 +
33 + 31 Aug 2012; Tim Harder <radhermit@g.o>
34 + +coccinelle-1.0.0_rc15-r1.ebuild:
35 + Revision bump. Fix script location for spatch binary.
36
37 20 Aug 2012; Tim Harder <radhermit@g.o> -coccinelle-1.0.0_rc12.ebuild:
38 Remove old.
39
40
41
42 1.1 dev-util/coccinelle/coccinelle-1.0.0_rc15-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/coccinelle/coccinelle-1.0.0_rc15-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/coccinelle/coccinelle-1.0.0_rc15-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: coccinelle-1.0.0_rc15-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-util/coccinelle/coccinelle-1.0.0_rc15-r1.ebuild,v 1.1 2012/08/31 21:28:13 radhermit Exp $
52
53 EAPI="4"
54 PYTHON_DEPEND="python? 2"
55
56 inherit multilib eutils python bash-completion-r1 elisp-common autotools
57
58 MY_P="${P/_/-}"
59 DESCRIPTION="Program matching and transformation engine"
60 HOMEPAGE="http://coccinelle.lip6.fr/"
61 SRC_URI="http://coccinelle.lip6.fr/distrib/${MY_P}.tgz"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~amd64 ~x86"
66 IUSE="doc emacs ocaml +ocamlopt pcre python test vim-syntax"
67
68 # ocaml enables ocaml scripting (uses findlib)
69 CDEPEND=">=dev-lang/ocaml-3.10[ocamlopt?]
70 dev-ml/sexplib
71 emacs? ( virtual/emacs )
72 ocaml? ( dev-ml/findlib )
73 pcre? ( dev-ml/pcre-ocaml )"
74
75 RDEPEND="${CDEPEND}
76 vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
77
78 # dev-texlive/texlive-fontsextra contains 'ifsym.sty'
79 DEPEND="${CDEPEND}
80 virtual/pkgconfig
81 doc? (
82 virtual/latex-base
83 dev-texlive/texlive-latexextra
84 dev-texlive/texlive-fontsextra
85 )"
86
87 REQUIRED_USE="test? ( ocaml python )"
88
89 DOCS=( authors.txt bugs.txt changes.txt credits.txt readme.txt )
90
91 S=${WORKDIR}/${MY_P}
92
93 SITEFILE=50coccinelle-gentoo.el
94
95 pkg_setup() {
96 if use python ; then
97 python_set_active_version 2
98 python_pkg_setup
99 fi
100 }
101
102 src_prepare() {
103 if use python ; then
104 # Fix python install location
105 sed -i -e "s:\$(SHAREDIR)/python:$(python_get_sitedir):" \
106 -e "s:PYTHON_TARGET:PYTHON_INSTALL_TARGET:" Makefile || die
107 fi
108
109 sed -i "s:^SHAREDIR=.*:SHAREDIR=/usr/$(get_libdir)/ocaml/${PN}/:" scripts/spatch.sh.in || die
110
111 epatch "${FILESDIR}"/${PN}-1.0.0_rc14-findtool.patch
112 cp Makefile Makefile.orig || die
113 eautoreconf
114 }
115
116 src_configure() {
117 econf \
118 $(use_enable python) \
119 $(use_enable ocaml) \
120 $(use_enable pcre) \
121 $(use_enable pcre pcre-syntax)
122
123 sed -i -e "s:^LIBDIR=.*:LIBDIR=/usr/$(get_libdir)/ocaml/stublibs/:" \
124 -e "s:^SHAREDIR=.*:SHAREDIR=/usr/$(get_libdir)/ocaml/${PN}/:" \
125 Makefile.config || die
126
127 cp Makefile.orig Makefile || die
128 }
129
130 src_compile() {
131 emake depend
132 emake
133
134 use ocamlopt && emake opt
135
136 if use doc ; then
137 VARTEXFONTS="${T}"/fonts emake docs
138 fi
139
140 if use emacs ; then
141 elisp-compile editors/emacs/cocci.el || die
142 fi
143 }
144
145 src_test() {
146 source env.sh # needed for built in-place python plugin
147 ./spatch standard.h -parse_c -dir tests/ || die
148 yes | ./spatch -iso_file standard.iso -macro_file_builtins standard.h -testall || die
149 if use ocamlopt ; then
150 ./spatch.opt -iso_file standard.iso -macro_file_builtins standard.h -testall || die
151 fi
152 }
153
154 src_install() {
155 default
156
157 use doc && dodoc docs/manual/*.pdf
158 newbashcomp scripts/spatch.bash_completion spatch
159
160 if use emacs ; then
161 elisp-install ${PN} editors/emacs/*
162 elisp-site-file-install "${FILESDIR}"/${SITEFILE}
163 fi
164
165 if use vim-syntax ; then
166 newdoc editors/vim/README README-vim
167 rm editors/vim/README || die
168 insinto /usr/share/vim/vimfiles
169 doins -r editors/vim/*
170 fi
171
172 export STRIP_MASK='*/coccinelle/spatch'
173 }
174
175 pkg_postinst() {
176 use emacs && elisp-site-regen
177 }
178
179 pkg_postrm() {
180 use emacs && elisp-site-regen
181 }