summaryrefslogtreecommitdiff
path: root/app-doc/root-docs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-doc/root-docs
reinit the tree, so we can have metadata
Diffstat (limited to 'app-doc/root-docs')
-rw-r--r--app-doc/root-docs/Manifest16
-rw-r--r--app-doc/root-docs/files/root-docs-6.00.01-fillpatterns.patch30
-rw-r--r--app-doc/root-docs/files/root-docs-6.00.01-makehtml.patch55
-rw-r--r--app-doc/root-docs/files/root-docs-6.04.06-tightlist.patch11
-rw-r--r--app-doc/root-docs/metadata.xml25
-rw-r--r--app-doc/root-docs/root-docs-5.34.36.ebuild137
-rw-r--r--app-doc/root-docs/root-docs-6.04.06.ebuild124
7 files changed, 398 insertions, 0 deletions
diff --git a/app-doc/root-docs/Manifest b/app-doc/root-docs/Manifest
new file mode 100644
index 000000000000..9ffad61f290c
--- /dev/null
+++ b/app-doc/root-docs/Manifest
@@ -0,0 +1,16 @@
+AUX root-docs-6.00.01-fillpatterns.patch 1023 SHA256 015f824ff9304ee455f94ef58790d378ee951ae5cb5c387a855c65797ec2df84 SHA512 a6f1ce23cd96046aa85158c5ec24f1cc84477cdd5c5e6f42e1e60f8a623994d4fce2727755b9cf73018a76c6d8d9320f4ad21fa39f6773aa59de1a5b4fe4a718 WHIRLPOOL bc967883de0e94bd095d347db1729a8d25b2e8b90886129bc91d0f7aead4be2c7a3241cc608e34adb43519dcd668d1caf786a87fcb70ca299084a37b626da36f
+AUX root-docs-6.00.01-makehtml.patch 1488 SHA256 32647c1d5846be77d6cf0aef7c9c54c715175b7da001be7656b04640ebfe13b4 SHA512 923b039511e5f0f53d4a0bfa15b678b37b53999ff3c6865369637a5e281a5c7bff3fcb8fadbeb8cdee06363dde1c7bc5604a4b6fdcfc09e0f62e1fea438b15db WHIRLPOOL b9bb964e55f46254c837e79e16c9cd17c5e5bfa775d7001cff6071639704f4835b94e59be55f22ae76c077e3065bc37f1fc4a65c9a1b04b3fac74df5d2f96a42
+AUX root-docs-6.04.06-tightlist.patch 614 SHA256 3cef62254dd6acc29723a326ce722c32c99e0f76ec2ae4c21bc7eeacdd40cf83 SHA512 d7179e324e7a40cca69194409f78f7da4ac9d801c7b9506291765a7a9dcfe4d34ea0ec9942cb217d3c3f6e5bc5413384663d2e24f96bb3812981403d7b5a7d28 WHIRLPOOL 7dba71458069f95e00f32bd1564ef966b91811f5271e7f95e0a941351b1333e2129f1c3406364e61126a13e82b6ecb53a2356379a1c78a1fdd430ddfca06544b
+DIST RooFit_Users_Manual_2.91-33.pdf 1330062 SHA256 101c4e4c41962238fcabf1caa86cafc51241a1800594491b2e62ef8b565a5646 SHA512 732d7dea3541b51e5f0b9b5b70dae57e1bdbb2504c4222d5e5095ec0f9b67307011c1f31c2c95be419b53dd8426f52f62f6c9370084208176a2ed3d7f25d783b WHIRLPOOL 033897bef4bdb13246a81ea6749f7895e6c4d639752e932130234ad9153bb399a4e5d416237850da27f139d3cccc53d9adb7a077abf20d257ce057157d6c3696
+DIST TMVAUsersGuide-v4.2.0.pdf 4099493 SHA256 b61614d14289a20f5fa429f79e474e596cdabb807632c901347479ad425791b9 SHA512 a52f36bdf9791c2e1c4b17f08dbcb100927d11c0db1d69ec611437017f80d90be557baf530af10aabc4d07dac626f1736352abd71845dba5e2c0899ff5b126d4 WHIRLPOOL 5be3affaf45dc6086329a82d582f95c9a251fedb7943fd84c14310b91504b7318db0d992a7da8e9da8b0b0fbbf4a7c58b7339bc4b529221804afb9988342829c
+DIST info.png 2060 SHA256 51de6661250f3fb71c6c8250cbc4bdc4dc4283cc90240b4dc1ee6168e8d40279 SHA512 81a730eefbe7a7e15d5840491402c7644bf7ed5d5f8f3830ed9457b343cc7882480e993ea84aef93500742cd0fe8469859cd2c925e5582b91ef56406804ae276 WHIRLPOOL 02ea6daf9e3d21947ebf5dd01c455a13f2fcbf9981be34a150056a3510122ca49e3d137d4f242c7218d4d06ace09566d513a04f09071723ac244f5a38e982bac
+DIST roofit_quickstart_3.00.pdf 501576 SHA256 65aaf9e0c88352e265fd55b97a2503a9ee4a51d3219daff69c6f7f6427fe22cf SHA512 e8e1bd3bb3ead0ae3883512d7ff297651b99937fd5df0b61cf559ea5dd6cfbda35dfd8ebc953ed11a12f471849f6e95e05869b58a1e433ea6e5d1d1aa08bbb93 WHIRLPOOL a58b221272e3b2775639bf934f63cd06919105871ad736a84e18e6f3949a579301d1c6d69df39576dcc11867aa27274f5c78f36146a929698437b1a0c310aebe
+DIST root-banner.png 132555 SHA256 d165e1cc175f654ff79af39193a6144678f600e14a53dd20e2b216b3e8951e94 SHA512 139347f396e88c8062d847d612949204cb80e551a826d926950ca8ab967f0d496487fed17a227fc796ae4db23fca758d91a0af7943142adbed358e98d7667b1f WHIRLPOOL dd23e26acf9303b404cda8135d6946af3b1abba3dfdff8d80e56096f810d50a01ebfb52dc1e6ee1d1b99fbb5859dc850e0e368155339b5007294d95ce8909857
+DIST root6-banner.jpg 32319 SHA256 9d6d226bbe61db257a1796a3ad04dfe97b3bb500a29349ff76bf6a929ed1e104 SHA512 f01dd253f24d59c374042efd239ce023e5ca82d3d617ca6763daf9720b169c4fb27a0f4573ea95d807f0e12095924606372df4940f65ce7d859164314d22b9af WHIRLPOOL 69976abe240235a4f4eb25d61a0ceb183dc5ad5f9e57e9130ae10615329dd23125848f45608e1ad2d65a286d1f191f95336316f7c8f1cc052d396c31433cbe4c
+DIST root_v5.34.36.source.tar.gz 75427331 SHA256 fc868e5f4905544c3f392cc9e895ef5571a08e48682e7fe173bd44c0ba0c7dcd SHA512 2cc0c8f8b63b2a3ce01c49c41704483548a7324d92c21a63e3e36a00f4d6f5656a7844fdf48cb71a6f2a2c974112527300ffd3bb5502d8365ffaf138e6ae4c7a WHIRLPOOL 137c054874645913372edca3e02087c0c4f2a3c4d662b488eedaec517f75a8ab956ade418e2942aee925e58da804b325bbd6756be653bd767cc1c82cb7a650c9
+DIST root_v6.04.06.source.tar.gz 99180724 SHA256 6deac9cd71fe2d7a48ea2bcbd793639222c4743275dbc946c158295b1e1fe330 SHA512 ac96ac998ed4894587b7d286d79bcbea7b33f15764cc2513ae089e86c584e2dcb064cd135d44a4bfd2bede368eb772ccbffcd6bf426857a1236f5d7e9f5ce6fd WHIRLPOOL 7ffca036917d798ade31e1a22e9518d567e4267af5d1db555ea0e82c1bc2c7a1f665c8cd76d3ce6511507ab7befea4881580259c6142f1e668edafbcbc5e496e
+EBUILD root-docs-5.34.36.ebuild 3898 SHA256 fbe187a1a7a17c9f117d09509640cb1465e37afe70b0991452fd0ca64f345ea3 SHA512 61b4a843aaedcfc9d218f57f9708ca4a6d1394877183f91e07b623a960d17e6ddce6e6b53d8ba304d1871537e35b80e256894c3700a2694a6e20c341c28c0809 WHIRLPOOL 450ea7dc1981135ca62c7ac6423e2796843096bf3d99c45f22697b0d156e9f0975ee2bce95514ae728c1fc07c9a47f809762c4d8d07f69f833bae69d768035bf
+EBUILD root-docs-6.04.06.ebuild 3571 SHA256 94cb5cf9ae1d1a876e513810ee227e67e285664fe0ff05bd43d6a9c4518132ad SHA512 540c6bb7656dd0fee30bf451efc5c2db9cff8886b0325751711befb6556c5ff713f7100acf49acd13160a920b8aadacd2622643c0ad7ca1f26715dfed8407089 WHIRLPOOL 3b90032e5162e8fcb33c37ccf47fd730c6d28a16663cb70ea467ad9275722840a299f60b69fe689a062cb3f0e634781a9498f0eadf7c3e6762304500ee4a5af3
+MISC ChangeLog 5657 SHA256 6aff9c95af17f3a00bca5cc20011ee06cfa420e82ea544c5f87c96dc3420a1dd SHA512 a2ec578f5f18ac6bf1a026d8580129cca7e7dc7ce977303f7b1265dbf628d07c0199a9c7100c46410fffdf5109301f230141a0c814bb50f07bd6f83eaad43547 WHIRLPOOL 86b87446c6285fd29146b344683da8f265a35c827790d5765d84a4bb090015f965f7eba7320a77f015213bc4d0d8343f9b04e77e81c81eabc889bd3def0eee79
+MISC ChangeLog-2015 9405 SHA256 eb2d1a1b9945f8156f53955cd1ae36d5dbf16b71b04343e56d39586b926d3b1e SHA512 a85abefa75c94e9ef3bd1036dc175b8106a0a8a7b6da026ca030538ccc8f0e2d05c7c479f6da0619b4df1b27ae8cd3376fe947c1236d6d88aff21fa8aaf3fb1b WHIRLPOOL d817be30f03449838c3ffb2f0eac7c9a5a99566c1d64cf34436fb9ee174afa02fb203acad7b970e2f3b77410f176b5c3fdc160b8e0ef6d077ca9b6455cca16b4
+MISC metadata.xml 908 SHA256 f6f6d60bb0a9753cc7ec69e76264a2507dbe48e77be2601fbbf8e4bfd6de49ec SHA512 0f50e77c8fcd2b77c383e8a4445bd73f87ae3ef5788cb820f76516d951aa688afbfefa6a5ff38c8c97ca92ed21d7af7b6df5aa911c6d4c723da3ec9f5c69431d WHIRLPOOL 324981cee1c6fe11a0dae0c2d5841079d6f387d14913f9cefcce9921ea5a65d8eeedc817338a859a2207d611400af263678fb46caf3ee35e754b1337111da176
diff --git a/app-doc/root-docs/files/root-docs-6.00.01-fillpatterns.patch b/app-doc/root-docs/files/root-docs-6.00.01-fillpatterns.patch
new file mode 100644
index 000000000000..e48a4f77568a
--- /dev/null
+++ b/app-doc/root-docs/files/root-docs-6.00.01-fillpatterns.patch
@@ -0,0 +1,30 @@
+diff --git a/core/base/doc/macros/fillpatterns.C b/core/base/doc/macros/fillpatterns.C
+index b0a5132..fca81c8 100644
+--- a/core/base/doc/macros/fillpatterns.C
++++ b/core/base/doc/macros/fillpatterns.C
+@@ -20,11 +20,11 @@ TCanvas * fillpatterns()
+
+ // Fixed patterns.
+ for (i=1; i<=5; i++) {
+- box(j++, 0.01, y-bh, 0.19, y);
+- box(j++, 0.21, y-bh, 0.39, y);
+- box(j++, 0.41, y-bh, 0.59, y);
+- box(j++, 0.61, y-bh, 0.79, y);
+- box(j++, 0.81, y-bh, 0.99, y);
++ box(j, 0.01, y-bh, 0.19, y); j++;
++ box(j, 0.21, y-bh, 0.39, y); j++;
++ box(j, 0.41, y-bh, 0.59, y); j++;
++ box(j, 0.61, y-bh, 0.79, y); j++;
++ box(j, 0.81, y-bh, 0.99, y); j++;
+ y = y-bh-db;
+ }
+
+@@ -55,7 +55,7 @@ TCanvas * fillpatterns()
+ return Pat;
+ }
+
+-box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
++void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
+ {
+ // Draw an box using the fill pattern "pat" with the "pat" value
+ // written on top.
diff --git a/app-doc/root-docs/files/root-docs-6.00.01-makehtml.patch b/app-doc/root-docs/files/root-docs-6.00.01-makehtml.patch
new file mode 100644
index 000000000000..613468629a53
--- /dev/null
+++ b/app-doc/root-docs/files/root-docs-6.00.01-makehtml.patch
@@ -0,0 +1,55 @@
+diff --git a/Makefile b/Makefile
+index 600e8db..afad025 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1072,16 +1072,7 @@ $(ROOTPCH): $(ROOTCLINGSTAGE1DEP) $(ALLHDRS) $(CLINGETCPCH) $(ORDER_) $(ALLLIBS)
+
+ ifeq ($(BUILDX11),yes)
+ ifeq ($(BUILDASIMAGE),yes)
+-html: rootexecs postbin changelog releasenotes
+-ifneq ($(USECONFIG),FALSE)
+- @if [ "x`which root.exe`" != "x$(DESTDIR)$(BINDIR)/root.exe" ] \
+- || [ "`which root.exe`" -ot "bin/root.exe" ]; then \
+- echo 'ERROR: root.exe has not been installed by this build.'; \
+- echo ' Run "make install" before running "make html".'; \
+- exit 1; \
+- fi
+-endif
+- @$(MAKELOGHTML)
++html: compiledata releasenotes
+ @$(MAKEHTML)
+ else
+ html:
+diff --git a/build/unix/makehtml.sh b/build/unix/makehtml.sh
+index a94e790..8b4589d 100755
+--- a/build/unix/makehtml.sh
++++ b/build/unix/makehtml.sh
+@@ -1,16 +1,16 @@
+ #! /bin/sh
+
+ dir=`pwd`
+-ROOT=$dir/bin/root
++ROOT=root
+ cd tutorials
+ # we need tutorials/hsimple.root
+ if [ ! -f hsimple.root ]; then
+- $ROOT -n -l -b -q hsimple.C
++ $ROOT -n -l -b -q hsimple.C && exit 1
+ fi
+ cd tree
+ # we need tutorials/tree/cernstaff.root
+ if [ ! -f cernstaff.root ]; then
+- $ROOT -n -l -b -q cernbuild.C
++ $ROOT -n -l -b -q cernbuild.C || exit 1
+ fi
+ cd $dir
+
+@@ -20,7 +20,7 @@ echo ""
+
+ # To generate the full documentation, we do need to
+ # use the graphics engine, so do not use '-b'.
+-$ROOT -n -l <<makedoc
++$ROOT -n -l <<makedoc || exit 1
+ THtml h;
+ h.LoadAllLibs();
+ h.MakeAll();
diff --git a/app-doc/root-docs/files/root-docs-6.04.06-tightlist.patch b/app-doc/root-docs/files/root-docs-6.04.06-tightlist.patch
new file mode 100644
index 000000000000..1eec11de7b33
--- /dev/null
+++ b/app-doc/root-docs/files/root-docs-6.04.06-tightlist.patch
@@ -0,0 +1,11 @@
+diff -r -U2 root-6.04.06/documentation/primer/template.tex root-6.04.06_new/documentation/primer/template.tex
+--- root-6.04.06/documentation/primer/template.tex 2015-10-13 12:41:18.000000000 +0200
++++ root-6.04.06_new/documentation/primer/template.tex 2015-12-22 20:38:25.454396212 +0100
+@@ -130,4 +130,6 @@
+ \setlength{\parskip}{6pt plus 2pt minus 1pt}
+ \setlength{\emergencystretch}{3em} % prevent overfull lines
++\providecommand{\tightlist}{%
++ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
+ $if(numbersections)$
+ \setcounter{secnumdepth}{5}
+Only in root-6.04.06_new/documentation/primer: template.tex~
diff --git a/app-doc/root-docs/metadata.xml b/app-doc/root-docs/metadata.xml
new file mode 100644
index 000000000000..47caabb1d8dd
--- /dev/null
+++ b/app-doc/root-docs/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ This package contains the automatically generated ROOT class
+ documentation.
+ </longdescription>
+ <use>
+ <flag name="api">Generate html API documentation</flag>
+ <flag name="http">Build HttpServer documentation</flag>
+ <flag name="math">Provide all math related documentation</flag>
+ <flag name="metric">Default to A4 paper size and metric measurement. Letter will be used otherwise</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">tmva</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-doc/root-docs/root-docs-5.34.36.ebuild b/app-doc/root-docs/root-docs-5.34.36.ebuild
new file mode 100644
index 000000000000..b9b09c53549b
--- /dev/null
+++ b/app-doc/root-docs/root-docs-5.34.36.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+ROOT_PN="root"
+ROOFIT_DOC_PV=2.91-33
+ROOFIT_QS_DOC_PV=3.00
+TMVA_DOC_PV=4.2.0
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EVCS_OFFLINE=yes # we need exactly the same checkout as root itself
+ EGIT_REPO_URI="http://root.cern.ch/git/root.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://root.cern.ch/download/${ROOT_PN}_v${PV}.source.tar.gz"
+ KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${ROOT_PN}"
+fi
+
+inherit eutils multilib virtualx
+
+DESCRIPTION="Documentation for ROOT Data Analysis Framework"
+HOMEPAGE="https://root.cern.ch"
+SRC_URI="${SRC_URI}
+ math? (
+ http://tmva.sourceforge.net/docu/TMVAUsersGuide.pdf -> TMVAUsersGuide-v${TMVA_DOC_PV}.pdf
+ https://root.cern.ch/download/doc/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf
+ http://root.cern.ch/drupal/sites/default/files/roofit_quickstart_${ROOFIT_QS_DOC_PV}.pdf )
+ api? (
+ ${HOMEPAGE}/sites/all/themes/newsflash/images/blue/root-banner.png
+ ${HOMEPAGE}/sites/all/themes/newsflash/images/info.png )"
+
+SLOT="0"
+LICENSE="LGPL-2.1"
+IUSE="api +math +metric http"
+
+VIRTUALX_REQUIRED="api"
+
+DEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc[bibutils]
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-latexrecommended
+ virtual/pkgconfig
+ api? (
+ media-fonts/dejavu
+ ~sci-physics/root-${PV}[X,graphviz,opengl]
+ )"
+RDEPEND=""
+
+DOC_DIR="/usr/share/doc/${ROOT_PN}-${PV}"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ # we need to force sci-physics/root checkout here
+ git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/${P}" "sci-physics/root/0"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ use api && epatch \
+ "${FILESDIR}/${PN}-6.00.01-makehtml.patch" \
+ "${FILESDIR}/${PN}-6.00.01-fillpatterns.patch"
+ # prefixify the configure script
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ configure || die "prefixify configure failed"
+}
+
+src_configure() {
+ # we need only to setup paths here, html docs doesn't depend on USE flags
+ if use api; then
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --etcdir="${EPREFIX}/etc/root" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${PN}" \
+ --docdir="${EPREFIX}${DOC_DIR}" \
+ --tutdir="${EPREFIX}${DOC_DIR}/examples/tutorials" \
+ --testdir="${EPREFIX}${DOC_DIR}/examples/tests" \
+ --with-llvm-config="${EPREFIX}/usr/bin/llvm-config" \
+ --with-sys-iconpath="${EPREFIX}/usr/share/pixmaps" \
+ --nohowto
+ fi
+}
+
+src_compile() {
+ pdf_target=( primer users-guide )
+ local pdf_size=pdfa4
+ use metric || pdf_size=pdfletter
+ use math && pdf_target+=( minuit2 spectrum )
+ use http && pdf_target+=( HttpServer JSROOT )
+
+ local i
+ for (( i=0; i<${#pdf_target[@]}; i++ )); do
+ emake -C documentation/"${pdf_target[i]}" "${pdf_size}"
+ done
+
+ if use api; then
+ # video drivers may want to access hardware devices
+ cards=$(echo -n /dev/dri/card* /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
+ [[ -n "${cards}" ]] && addpredict "${cards}"
+
+ ROOTSYS="${S}" Xemake html
+ # if root.exe crashes, return code will be 0 due to gdb attach,
+ # so we need to check if last html file was generated;
+ # this check is volatile and can't catch crash on the last file.
+ [[ -f htmldoc/timespec.html ]] || die "html doc generation crashed"
+ fi
+}
+
+src_install() {
+ insinto "${DOC_DIR}"
+
+ local i
+ for (( i=0; i<${#pdf_target[@]}; i++ )); do
+ doins documentation/"${pdf_target[i]}"/*.pdf
+ done
+ unset pdf_target
+
+ use math && doins \
+ "${DISTDIR}/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf" \
+ "${DISTDIR}/roofit_quickstart_${ROOFIT_QS_DOC_PV}.pdf" \
+ "${DISTDIR}/TMVAUsersGuide-v${TMVA_DOC_PV}.pdf"
+
+ if use api; then
+ # Install offline replacements for online messages
+ cp "${DISTDIR}"/{root-banner.png,info.png} htmldoc/ || die "cp failed"
+ # too large data to copy
+ dodir "${DOC_DIR}/html"
+ mv htmldoc/* "${ED}${DOC_DIR}/html/" || die
+ docompress -x ${DOC_DIR}/html
+ fi
+}
diff --git a/app-doc/root-docs/root-docs-6.04.06.ebuild b/app-doc/root-docs/root-docs-6.04.06.ebuild
new file mode 100644
index 000000000000..ed13a394f4bb
--- /dev/null
+++ b/app-doc/root-docs/root-docs-6.04.06.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+ROOT_PN="root"
+ROOFIT_DOC_PV=2.91-33
+ROOFIT_QS_DOC_PV=3.00
+TMVA_DOC_PV=4.2.0
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib virtualx python-any-r1
+
+DESCRIPTION="Documentation for ROOT Data Analysis Framework"
+HOMEPAGE="https://root.cern.ch"
+SRC_URI="https://root.cern.ch/download/${ROOT_PN}_v${PV}.source.tar.gz
+ math? (
+ http://tmva.sourceforge.net/docu/TMVAUsersGuide.pdf -> TMVAUsersGuide-v${TMVA_DOC_PV}.pdf
+ https://root.cern.ch/download/doc/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf
+ http://root.cern.ch/drupal/sites/default/files/roofit_quickstart_${ROOFIT_QS_DOC_PV}.pdf )
+ api? (
+ ${HOMEPAGE}/sites/default/files/images/root6-banner.jpg
+ ${HOMEPAGE}/sites/all/themes/newsflash/images/info.png )"
+
+SLOT="0"
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="api +math +metric http"
+
+VIRTUALX_REQUIRED="api"
+
+DEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc[bibutils]
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-latexrecommended
+ virtual/pkgconfig
+ ${PYTHON_DEPS}
+ api? (
+ media-fonts/dejavu
+ ~sci-physics/root-${PV}[X,graphviz,opengl]
+ )"
+RDEPEND=""
+
+DOC_DIR="/usr/share/doc/${ROOT_PN}-${PV}"
+
+S="${WORKDIR}/${ROOT_PN}-${PV}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-6.00.01-makehtml.patch" \
+ "${FILESDIR}/${PN}-6.04.06-tightlist.patch"
+
+ # prefixify the configure script
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ configure || die "prefixify configure failed"
+}
+
+src_configure() {
+ # we need only to setup paths here, html docs doesn't depend on USE flags
+ if use api; then
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --etcdir="${EPREFIX}/etc/root" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${PN}" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --tutdir="${EPREFIX}/usr/share/doc/${PF}/examples/tutorials" \
+ --testdir="${EPREFIX}/usr/share/doc/${PF}/examples/tests" \
+ --with-llvm-config="${EPREFIX}/usr/bin/llvm-config" \
+ --with-sys-iconpath="${EPREFIX}/usr/share/pixmaps" \
+ --nohowto
+ fi
+}
+
+src_compile() {
+ pdf_target=( primer users-guide )
+ local pdf_size=pdfa4
+ use metric || pdf_size=pdfletter
+ use math && pdf_target+=( minuit2 spectrum )
+ use http && pdf_target+=( HttpServer JSROOT )
+
+ local i
+ for (( i=0; i<${#pdf_target[@]}; i++ )); do
+ emake -C documentation/"${pdf_target[i]}" "${pdf_size}"
+ done
+
+ if use api; then
+ # video drivers may want to access hardware devices
+ cards=$(echo -n /dev/dri/card* /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
+ [[ -n "${cards}" ]] && addpredict "${cards}"
+
+ ROOTSYS="${S}" Xemake html
+ # if root.exe crashes, return code will be 0 due to gdb attach,
+ # so we need to check if last html file was generated;
+ # this check is volatile and can't catch crash on the last file.
+ [[ -f htmldoc/WindowAttributes_t.html ]] || die "html doc generation crashed"
+ fi
+}
+
+src_install() {
+ insinto "${DOC_DIR}"
+
+ local i
+ for (( i=0; i<${#pdf_target[@]}; i++ )); do
+ doins documentation/"${pdf_target[i]}"/*.pdf
+ done
+ unset pdf_target
+
+ use math && doins \
+ "${DISTDIR}/RooFit_Users_Manual_${ROOFIT_DOC_PV}.pdf" \
+ "${DISTDIR}/roofit_quickstart_${ROOFIT_QS_DOC_PV}.pdf" \
+ "${DISTDIR}/TMVAUsersGuide-v${TMVA_DOC_PV}.pdf"
+
+ if use api; then
+ # Install offline replacements for online messages
+ cp "${DISTDIR}"/{root6-banner.jpg,info.png} htmldoc/ || die "cp failed"
+ # too large data to copy
+ dodir "${DOC_DIR}/html"
+ mv htmldoc/* "${ED}${DOC_DIR}/html/" || die
+ docompress -x ${DOC_DIR}/html
+ fi
+}