Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/root/, sci-physics/root/files/
Date: Tue, 20 Mar 2018 14:15:36
Message-Id: 1521555323.0fa97fd6f71bb38beb26c4015a1bf6b02d6207d3.heroxbd@gentoo
1 commit: 0fa97fd6f71bb38beb26c4015a1bf6b02d6207d3
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 20 14:14:56 2018 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 20 14:15:23 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fa97fd6
7
8 sci-physics/root: have root6 compile on Prefix.
9
10 1. DEFAULT_SYSROOT of bundled llvm points to EPREFIX, so that system
11 headers inside EPREFIX is used.
12 2. prefixify the CMakeList system headers copies.
13 3. disable ftgl search when USE=opengl is not set.
14
15 Package-Manager: Portage-2.3.24, Repoman-2.3.6
16
17 .../root/files/root-6.12.06-disable-ftgl.patch | 45 ++++++++++++++++++++++
18 sci-physics/root/root-6.12.06-r1.ebuild | 6 ++-
19 2 files changed, 50 insertions(+), 1 deletion(-)
20
21 diff --git a/sci-physics/root/files/root-6.12.06-disable-ftgl.patch b/sci-physics/root/files/root-6.12.06-disable-ftgl.patch
22 new file mode 100644
23 index 00000000000..89d8d550d30
24 --- /dev/null
25 +++ b/sci-physics/root/files/root-6.12.06-disable-ftgl.patch
26 @@ -0,0 +1,45 @@
27 +Forwarded: https://sft.its.cern.ch/jira/browse/ROOT-9315
28 +
29 +Index: root-6.12.06/cmake/modules/SearchInstalledSoftware.cmake
30 +===================================================================
31 +--- root-6.12.06.orig/cmake/modules/SearchInstalledSoftware.cmake
32 ++++ root-6.12.06/cmake/modules/SearchInstalledSoftware.cmake
33 +@@ -1075,22 +1075,24 @@ if(globus)
34 + endif()
35 +
36 + #---Check for ftgl if needed----------------------------------------------------------
37 +-if(NOT builtin_ftgl)
38 +- find_package(FTGL)
39 +- if(NOT FTGL_FOUND)
40 +- if(fail-on-missing)
41 +- message(FATAL_ERROR "ftgl library not found and is required ('builtin_ftgl' is OFF). Set varible FTGL_ROOT_DIR to installation location")
42 +- else()
43 +- message(STATUS "ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation")
44 +- message(STATUS "For the time being switching ON 'builtin_ftgl' option")
45 +- set(builtin_ftgl ON CACHE BOOL "" FORCE)
46 ++if(buildgl)
47 ++ if(NOT builtin_ftgl)
48 ++ find_package(FTGL)
49 ++ if(NOT FTGL_FOUND)
50 ++ if(fail-on-missing)
51 ++ message(FATAL_ERROR "ftgl library not found and is required ('builtin_ftgl' is OFF). Set varible FTGL_ROOT_DIR to installation location")
52 ++ else()
53 ++ message(STATUS "ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation")
54 ++ message(STATUS "For the time being switching ON 'builtin_ftgl' option")
55 ++ set(builtin_ftgl ON CACHE BOOL "" FORCE)
56 ++ endif()
57 + endif()
58 + endif()
59 +-endif()
60 +-if(builtin_ftgl)
61 +- set(FTGL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/graf3d/ftgl/inc)
62 +- set(FTGL_CFLAGS -DBUILTIN_FTGL)
63 +- set(FTGL_LIBRARIES FTGL)
64 ++ if(builtin_ftgl)
65 ++ set(FTGL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/graf3d/ftgl/inc)
66 ++ set(FTGL_CFLAGS -DBUILTIN_FTGL)
67 ++ set(FTGL_LIBRARIES FTGL)
68 ++ endif()
69 + endif()
70 +
71 + #---Check for chirp--------------------------------------------------------------------
72
73 diff --git a/sci-physics/root/root-6.12.06-r1.ebuild b/sci-physics/root/root-6.12.06-r1.ebuild
74 index c0815302e7d..6f44ce517b4 100644
75 --- a/sci-physics/root/root-6.12.06-r1.ebuild
76 +++ b/sci-physics/root/root-6.12.06-r1.ebuild
77 @@ -9,7 +9,7 @@ CMAKE_MAKEFILE_GENERATOR=emake
78 FORTRAN_NEEDED="fortran"
79 PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
80
81 -inherit cmake-utils elisp-common eutils fortran-2 gnome2-utils \
82 +inherit cmake-utils elisp-common eutils fortran-2 gnome2-utils prefix \
83 python-single-r1 toolchain-funcs user versionator xdg-utils
84
85 DESCRIPTION="C++ data analysis framework and interpreter from CERN"
86 @@ -115,6 +115,7 @@ PATCHES=(
87 "${FILESDIR}"/${PN}-6.11.02-hsimple.patch
88 "${FILESDIR}"/${PN}-6.12.04-no-ocaml.patch
89 "${FILESDIR}"/${PN}-6.12.04-z3.patch
90 + "${FILESDIR}"/${PN}-6.12.06-disable-ftgl.patch
91 )
92
93 pkg_setup() {
94 @@ -151,6 +152,8 @@ src_prepare() {
95
96 # CSS should use local images
97 sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed"
98 +
99 + hprefixify build/CMakeLists.txt core/clingutils/CMakeLists.txt
100 }
101
102 # Note: ROOT uses bundled LLVM, because it is patched and API-incompatible with system LLVM.
103 @@ -162,6 +165,7 @@ src_configure() {
104 -DCMAKE_C_FLAGS="${CFLAGS}"
105 -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
106 -DCMAKE_INSTALL_PREFIX="${EPREFIX}/${MY_PREFIX}"
107 + -DDEFAULT_SYSROOT="${EPREFIX}" # for llvm system headers
108 -Dexplicitlink=ON
109 -Dexceptions=ON
110 -Dfail-on-missing=ON