commit:     eb497cec6903e1d22b1f7ac6285217ba6ace468e
Author:     Andrew Savchenko <bircoph <AT> gmail <DOT> com>
AuthorDate: Wed Jul  2 16:30:40 2014 +0000
Commit:     Andrew Savchenko <bircoph <AT> gmail <DOT> com>
CommitDate: Wed Jul  2 16:30:40 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=eb497cec

sci-physics/root: fix ROOT's CLI commands

Arrange changes required for .credits, .demos and .license to work
properly.

---
 sci-physics/root/ChangeLog                         |  6 +++++
 .../root/files/root-6.00.01-tutorials-path.patch   | 27 ++++++++++++++++++++++
 sci-physics/root/root-6.00.01-r1.ebuild            |  8 ++++++-
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/sci-physics/root/ChangeLog b/sci-physics/root/ChangeLog
index 98e1940..9b12ba5 100644
--- a/sci-physics/root/ChangeLog
+++ b/sci-physics/root/ChangeLog
@@ -2,6 +2,12 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/sci-physics/root/ChangeLog,v 1.96 
2012/03/29 18:21:49 bicatali Exp $
 
+  02 Jul 2014; Andrew Savchenko <birc...@gmail.com> root-6.00.01-r1.ebuild,
+  +files/root-6.00.01-tutorials-path.patch:
+  Honor --tutdir from .demos CLI command.
+  Install files for .license and .credits commands to work.
+  Disable compression for files needed by commands above.
+
 *root-6.00.01-r1 (02 Jul 2014)
 
   02 Jul 2014; Andrew Savchenko <birc...@gmail.com> -root-6.00.01.ebuild,

diff --git a/sci-physics/root/files/root-6.00.01-tutorials-path.patch 
b/sci-physics/root/files/root-6.00.01-tutorials-path.patch
new file mode 100644
index 0000000..2e496a4
--- /dev/null
+++ b/sci-physics/root/files/root-6.00.01-tutorials-path.patch
@@ -0,0 +1,27 @@
+diff --git a/config/RConfigure.in b/config/RConfigure.in
+index 5950401..e4fbfbf 100644
+--- a/config/RConfigure.in
++++ b/config/RConfigure.in
+@@ -11,6 +11,7 @@
+ #define ROOTDATADIR   "@datadir@"
+ #define ROOTDOCDIR    "@docdir@"
+ #define ROOTMACRODIR  "@macrodir@"
++#define ROOTTUTDIR    "@tutdir@"
+ #define ROOTSRCDIR    "@srcdir@"
+ #define ROOTICONPATH  "@iconpath@"
+ #define EXTRAICONPATH "@extraiconpath@"
+diff --git a/core/base/src/TApplication.cxx b/core/base/src/TApplication.cxx
+index 1c1809a..7d7ed37 100644
+--- a/core/base/src/TApplication.cxx
++++ b/core/base/src/TApplication.cxx
+@@ -866,8 +866,8 @@ Long_t TApplication::ProcessLine(const char *line, Bool_t 
sync, Int_t *err)
+          Error("ProcessLine", "Cannot show demos in batch mode!");
+          return 1;
+       }
+-#ifdef ROOTDOCDIR
+-      ProcessLine(".x " ROOTDOCDIR "/tutorials/demos.C");
++#ifdef ROOTTUTDIR
++      ProcessLine(".x " ROOTTUTDIR "/demos.C");
+ #else
+       ProcessLine(".x $(ROOTSYS)/tutorials/demos.C");
+ #endif

diff --git a/sci-physics/root/root-6.00.01-r1.ebuild 
b/sci-physics/root/root-6.00.01-r1.ebuild
index bfb8e40..74c7af8 100644
--- a/sci-physics/root/root-6.00.01-r1.ebuild
+++ b/sci-physics/root/root-6.00.01-r1.ebuild
@@ -201,7 +201,8 @@ src_prepare() {
                "${FILESDIR}"/${PN}-6.00.01-prop-flags.patch \
                "${FILESDIR}"/${PN}-6.00.01-llvm.patch \
                "${FILESDIR}"/${PN}-6.00.01-geocad.patch \
-               "${FILESDIR}"/${PN}-6.00.01-cling.patch
+               "${FILESDIR}"/${PN}-6.00.01-cling.patch \
+               "${FILESDIR}"/${PN}-6.00.01-tutorials-path.patch
 
        # make sure we use system libs and headers
        rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die
@@ -423,6 +424,11 @@ src_install() {
        daemon_install
        desktop_install
        cleanup_install
+
+       # do not copress files used by ROOT's CLI (.credit, .demo, .license)
+       docompress -x "${DOC_DIR}/{CREDITS,LICENSE,examples/tutorials}"
+       # needed for .license command to work
+       dosym "${ED}"/usr/portage/licenses/LGPL-2.1 "${DOC_DIR}/LICENSE"
 }
 
 pkg_postinst() {

Reply via email to