Gentoo Archives: gentoo-commits

From: Guilherme Amadio <amadio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/root/
Date: Thu, 05 Jul 2018 11:15:37
Message-Id: 1530788699.07b894710cc425e03d54562c56eab0731d333dc1.amadio@gentoo
1 commit: 07b894710cc425e03d54562c56eab0731d333dc1
2 Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 5 09:10:07 2018 +0000
4 Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 5 11:04:59 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07b89471
7
8 sci-physics/root: add live ebuild
9
10 Package-Manager: Portage-2.3.41, Repoman-2.3.9
11
12 sci-physics/root/root-9999.ebuild | 324 ++++++++++++++++++++++++++++++++++++++
13 1 file changed, 324 insertions(+)
14
15 diff --git a/sci-physics/root/root-9999.ebuild b/sci-physics/root/root-9999.ebuild
16 new file mode 100644
17 index 00000000000..5b56c0cea83
18 --- /dev/null
19 +++ b/sci-physics/root/root-9999.ebuild
20 @@ -0,0 +1,324 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +
26 +CMAKE_BUILD_TYPE=Release
27 +# ninja does not work due to fortran
28 +CMAKE_MAKEFILE_GENERATOR=emake
29 +FORTRAN_NEEDED="fortran"
30 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
31 +
32 +inherit cmake-utils eapi7-ver elisp-common eutils fortran-2 \
33 + prefix python-single-r1 toolchain-funcs
34 +
35 +if [[ ${PV} == "9999" ]] ; then
36 + inherit git-r3
37 + KEYWORDS=""
38 + EGIT_REPO_URI="http://root.cern/git/root.git"
39 + SLOT=0
40 +else
41 + KEYWORDS="~amd64 ~x86"
42 + SRC_URI="https://root.cern/download/${PN}_v${PV}.source.tar.gz"
43 + SLOT="$(ver_cut 1-2)/$(ver_cut 3)"
44 +fi
45 +
46 +DESCRIPTION="C++ data analysis framework and interpreter from CERN"
47 +HOMEPAGE="https://root.cern"
48 +
49 +IUSE="+X avahi aqua +asimage +davix emacs +examples fits fftw fortran
50 + +gdml graphviz +gsl http jemalloc kerberos ldap libcxx memstat
51 + +minuit mysql odbc +opengl oracle postgres prefix pythia6 pythia8
52 + +python qt4 qt5 R +roofit root7 shadow sqlite +ssl table +tbb test
53 + +threads +tiff +tmva +unuran vc xinetd +xml xrootd"
54 +
55 +LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
56 +
57 +REQUIRED_USE="
58 + !X? ( !asimage !opengl !qt4 !qt5 !tiff )
59 + python? ( ${PYTHON_REQUIRED_USE} )
60 + tmva? ( gsl )
61 + davix? ( ssl xml )
62 +"
63 +
64 +CDEPEND="
65 + app-arch/lz4
66 + app-arch/xz-utils
67 + fortran? ( dev-lang/cfortran )
68 + dev-libs/libpcre:3=
69 + dev-libs/xxhash
70 + media-fonts/dejavu
71 + media-libs/freetype:2=
72 + media-libs/libpng:0=
73 + sys-devel/llvm:5=
74 + sys-libs/ncurses:=
75 + sys-libs/zlib
76 + X? (
77 + x11-libs/libX11:0=
78 + x11-libs/libXext:0=
79 + x11-libs/libXft:0=
80 + x11-libs/libXpm:0=
81 + opengl? (
82 + media-libs/ftgl:0=
83 + media-libs/glew:0=
84 + virtual/opengl
85 + virtual/glu
86 + x11-libs/gl2ps:0=
87 + )
88 + qt4? (
89 + dev-qt/qtcore:4=
90 + dev-qt/qtgui:4=
91 + )
92 + qt5? (
93 + dev-qt/qtcore:5=
94 + dev-qt/qtgui:5=
95 + dev-qt/qtwebengine:5=
96 + )
97 + )
98 + asimage? ( || (
99 + media-libs/libafterimage[gif,jpeg,png,tiff?]
100 + >=x11-wm/afterstep-2.2.11[gif,jpeg,png,tiff?]
101 + ) )
102 + avahi? ( net-dns/avahi[mdnsresponder-compat] )
103 + davix? ( net-libs/davix )
104 + emacs? ( virtual/emacs )
105 + fftw? ( sci-libs/fftw:3.0= )
106 + fits? ( sci-libs/cfitsio:0= )
107 + graphviz? ( media-gfx/graphviz:0= )
108 + gsl? ( sci-libs/gsl )
109 + http? ( dev-libs/fcgi:0= )
110 + jemalloc? ( dev-libs/jemalloc )
111 + kerberos? ( virtual/krb5 )
112 + ldap? ( net-nds/openldap:0= )
113 + libcxx? ( sys-libs/libcxx )
114 + unuran? ( sci-mathematics/unuran:0= )
115 + minuit? ( !sci-libs/minuit )
116 + mysql? ( virtual/mysql )
117 + odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
118 + oracle? ( dev-db/oracle-instantclient-basic )
119 + postgres? ( dev-db/postgresql:= )
120 + pythia6? ( sci-physics/pythia:6= )
121 + pythia8? ( sci-physics/pythia:8= )
122 + python? ( ${PYTHON_DEPS} )
123 + R? ( dev-lang/R )
124 + shadow? ( virtual/shadow )
125 + sqlite? ( dev-db/sqlite:3 )
126 + ssl? ( dev-libs/openssl:0= )
127 + tbb? ( dev-cpp/tbb )
128 + vc? ( dev-libs/vc )
129 + xml? ( dev-libs/libxml2:2= )
130 + xrootd? ( net-libs/xrootd:0= )
131 +"
132 +
133 +DEPEND="${CDEPEND}
134 + virtual/pkgconfig"
135 +
136 +RDEPEND="${CDEPEND}
137 + xinetd? ( sys-apps/xinetd )"
138 +
139 +PATCHES=(
140 + "${FILESDIR}"/${PN}-6.12.04-no-ocaml.patch
141 + "${FILESDIR}"/${PN}-6.13.02-hsimple.patch
142 +)
143 +
144 +pkg_setup() {
145 + use fortran && fortran-2_pkg_setup
146 + use python && python-single-r1_pkg_setup
147 +
148 + echo
149 + elog "There are extra options on packages not yet in Gentoo:"
150 + elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite,"
151 + elog "HDFS, Monalisa, MaxDB/SapDB, SRP, VecCore."
152 + elog "You can use the env variable EXTRA_ECONF variable for this."
153 + elog "For example, for Chirp, you would set: "
154 + elog "EXTRA_ECONF=\"-Dchirp=ON\""
155 + echo
156 +}
157 +
158 +src_prepare() {
159 + cmake-utils_src_prepare
160 +
161 + sed -i "/CLING_BUILD_PLUGINS/d" interpreter/CMakeLists.txt || die
162 +
163 + # CSS should use local images
164 + sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed"
165 +}
166 +
167 +# Note: ROOT uses bundled clang because it is patched and API-incompatible
168 +# with vanilla clang. The patches enable the C++ interpreter to work.
169 +# Since ROOT installs many small files into /etc (~100MB in total),
170 +# we install it into another directory to avoid making /etc too big.
171 +
172 +src_configure() {
173 + local mycmakeargs=(
174 + -DCMAKE_C_FLAGS="${CFLAGS}"
175 + -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
176 + -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr/$(get_libdir)/${PN}/$(ver_cut 1-2)"
177 + -DCMAKE_INSTALL_MANDIR="${EPREFIX%/}/usr/$(get_libdir)/${PN}/$(ver_cut 1-2)/share/man"
178 + -DMCAKE_INSTALL_LIBDIR=$(get_libdir)
179 + -DDEFAULT_SYSROOT="${EPREFIX}"
180 + -DLLVM_CONFIG="${EPREFIX%/}/usr/lib/llvm/5/bin/llvm-config"
181 + -DCLING_BUILD_PLUGINS=OFF
182 + -Dexplicitlink=ON
183 + -Dexceptions=ON
184 + -Dfail-on-missing=ON
185 + -Dshared=ON
186 + -Dsoversion=ON
187 + -Dbuiltin_llvm=OFF
188 + -Dbuiltin_afterimage=OFF
189 + -Dbuiltin_cfitsio=OFF
190 + -Dbuiltin_davix=OFF
191 + -Dbuiltin_fftw3=OFF
192 + -Dbuiltin_freetype=OFF
193 + -Dbuiltin_ftgl=OFF
194 + -Dbuiltin_gl2ps=OFF
195 + -Dbuiltin_glew=OFF
196 + -Dbuiltin_gsl=OFF
197 + -Dbuiltin_lz4=OFF
198 + -Dbuiltin_lzma=OFF
199 + -Dbuiltin_openssl=OFF
200 + -Dbuiltin_pcre=OFF
201 + -Dbuiltin_tbb=OFF
202 + -Dbuiltin_unuran=OFF
203 + -Dbuiltin_vc=OFF
204 + -Dbuiltin_vdt=OFF
205 + -Dbuiltin_veccore=OFF
206 + -Dbuiltin_xrootd=OFF
207 + -Dbuiltin_xxhash=OFF
208 + -Dbuiltin_zlib=OFF
209 + -Dx11=$(usex X)
210 + -Dxft=$(usex X)
211 + -Dafdsmgrd=OFF
212 + -Dafs=OFF # not implemented
213 + -Dalien=OFF
214 + -Dasimage=$(usex asimage)
215 + -Dastiff=$(usex tiff)
216 + -Dbonjour=$(usex avahi)
217 + -Dlibcxx=$(usex libcxx)
218 + -Dccache=OFF # use ccache via portage
219 + -Dcastor=OFF
220 + -Dchirp=OFF
221 + -Dcling=ON # cling=OFF is broken
222 + -Dcocoa=$(usex aqua)
223 + -Dcxx14=$(usex root7)
224 + -Dcxxmodules=OFF # requires clang, unstable
225 + -Ddavix=$(usex davix)
226 + -Ddcache=OFF
227 + -Dfftw3=$(usex fftw)
228 + -Dfitsio=$(usex fits)
229 + -Dfortran=$(usex fortran)
230 + -Dftgl=$(usex opengl)
231 + -Dgdml=$(usex gdml)
232 + -Dgenvector=ON # genvector=OFF ignored
233 + -Dgeocad=OFF
234 + -Dgfal=OFF
235 + -Dgl2ps=$(usex opengl)
236 + -Dglite=OFF # not implemented
237 + -Dglobus=OFF
238 + -Dgminimal=OFF
239 + -Dgnuinstall=OFF
240 + -Dgsl_shared=$(usex gsl)
241 + -Dgviz=$(usex graphviz)
242 + -Dhdfs=OFF
243 + -Dhttp=$(usex http)
244 + -Dimt=$(usex tbb)
245 + -Djemalloc=$(usex jemalloc)
246 + -Dkrb5=$(usex kerberos)
247 + -Dldap=$(usex ldap)
248 + -Dmathmore=$(usex gsl)
249 + -Dmemstat=$(usex memstat)
250 + -Dminimal=OFF
251 + -Dminuit2=$(usex minuit)
252 + -Dminuit=$(usex minuit)
253 + -Dmonalisa=OFF
254 + -Dmysql=$(usex mysql)
255 + -Dodbc=$(usex odbc)
256 + -Dopengl=$(usex opengl)
257 + -Doracle=$(usex oracle)
258 + -Dpch=ON # pch=OFF is broken
259 + -Dpgsql=$(usex postgres)
260 + -Dpythia6=$(usex pythia6)
261 + -Dpythia8=$(usex pythia8)
262 + -Dpython=$(usex python)
263 + -Dqt5web=$(usex qt5)
264 + -Dqtgsi=$(usex qt4)
265 + -Dqt=$(usex qt4)
266 + -Drfio=OFF
267 + -Droofit=$(usex roofit)
268 + -Droot7=$(usex root7)
269 + -Drootbench=OFF
270 + -Droottest=$(usex test)
271 + -Drpath=ON # needed for multi-slot to work
272 + -Druby=OFF # deprecated and broken
273 + -Druntime_cxxmodules=OFF # does not work yet
274 + -Dr=$(usex R)
275 + -Dsapdb=OFF # not implemented
276 + -Dshadowpw=$(usex shadow)
277 + -Dsqlite=$(usex sqlite)
278 + -Dsrp=OFF # not implemented
279 + -Dssl=$(usex ssl)
280 + -Dtable=$(usex table)
281 + -Dtbb=$(usex tbb)
282 + -Dtcmalloc=OFF
283 + -Dtesting=$(usex test)
284 + -Dthread=$(usex threads)
285 + -Dtmva-cpu=$(usex tmva)
286 + -Dtmva-gpu=OFF
287 + -Dtmva=$(usex tmva)
288 + -Dunuran=$(usex unuran)
289 + -Dvc=$(usex vc)
290 + -Dvdt=OFF
291 + -Dveccore=OFF
292 + -Dxml=$(usex xml)
293 + -Dxrootd=$(usex xrootd)
294 + ${EXTRA_ECONF}
295 + )
296 +
297 + cmake-utils_src_configure
298 +}
299 +
300 +src_install() {
301 + cmake-utils_src_install
302 +
303 + ROOTSYS=${EPREFIX%/}/usr/$(get_libdir)/${PN}/$(ver_cut 1-2)
304 + ROOTENV=9999${PN}-$(ver_cut 1-2)
305 +
306 + # ROOT fails without this symlink because it only looks in lib
307 + if [[ ! -d ${D}/${ROOTSYS}/lib ]]; then
308 + dosym $(get_libdir) /usr/$(get_libdir)/${PN}/$(ver_cut 1-2)/lib
309 + fi
310 +
311 + cat > ${ROOTENV} <<- EOF || die
312 + MANPATH="${ROOTSYS}/share/man"
313 + PATH="${ROOTSYS}/bin"
314 + ROOTPATH="${ROOTSYS}/bin"
315 + LDPATH="${ROOTSYS}/$(get_libdir)"
316 + EOF
317 +
318 + if use python; then
319 + echo "PYTHONPATH=${ROOTSYS}/$(get_libdir)" >> ${ROOTENV} || die
320 + fi
321 +
322 + doenvd ${ROOTENV}
323 +
324 + pushd "${D}/${ROOTSYS}" > /dev/null
325 +
326 + if use emacs; then
327 + elisp-install ${PN}-$(ver_cut 1-2) "${BUILD_DIR}"/root-help.el
328 + fi
329 +
330 + if ! use gdml; then
331 + rm -r geom || die
332 + fi
333 +
334 + if ! use examples; then
335 + rm -r test tutorials || die
336 + fi
337 +
338 + if use tmva; then
339 + rm -r tmva || die
340 + fi
341 +
342 + # clean up unnecessary files from installation
343 + rm -r bin/clang* config emacs etc/vmc fonts || die
344 +}