root: 6.22.08 -> 6.24.00

We switched to the bundled llvm-clang combo because to use the llvm
provided in nixpkgs, clang also needs to be patched and built
externally, which is too much trouble.
This commit is contained in:
Yipeng Sun 2021-06-05 16:31:39 +02:00
parent f36a65f6e2
commit ffced8d681
2 changed files with 26 additions and 16 deletions

View file

@ -1,20 +1,20 @@
{ stdenv, lib, fetchurl, makeWrapper, cmake, ftgl, gl2ps, glew, gsl, llvm_5
, libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, xz, pcre
{ stdenv, lib, fetchurl, makeWrapper, cmake, git, ftgl, gl2ps, glew, gsl
, libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, xz, pcre, nlohmann_json
, pkg-config, python, xxHash, zlib, zstd
, libAfterImage, giflib, libjpeg, libtiff, libpng
, Cocoa, OpenGL, noSplash ? false }:
stdenv.mkDerivation rec {
pname = "root";
version = "6.22.08";
version = "6.24.00";
src = fetchurl {
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
sha256 = "0vrgi83hrw4n9zgx873fn4ba3vk54slrwk1cl4cc4plgxzv1y1kg";
sha256 = "12crjzd7pzx5qpk2pb3z0rhmxlw5gsqaqzfl48qiq8c9l940b8wx";
};
nativeBuildInputs = [ makeWrapper cmake pkg-config llvm_5.dev ];
buildInputs = [ ftgl gl2ps glew pcre zlib zstd llvm_5 libxml2 lz4 xz gsl xxHash libAfterImage giflib libjpeg libtiff libpng python.pkgs.numpy ]
nativeBuildInputs = [ makeWrapper cmake pkg-config git ];
buildInputs = [ ftgl gl2ps glew pcre zlib zstd libxml2 lz4 xz gsl xxHash libAfterImage giflib libjpeg libtiff libpng nlohmann_json python.pkgs.numpy ]
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
;
@ -28,6 +28,13 @@ stdenv.mkDerivation rec {
substituteInPlace cmake/modules/SearchInstalledSoftware.cmake \
--replace 'set(lcgpackages ' '#set(lcgpackages '
# Don't require textutil on macOS
: > cmake/modules/RootCPack.cmake
# Hardcode path to fix use with cmake
sed -i cmake/scripts/ROOTConfig.cmake.in \
-e 'iset(nlohmann_json_DIR "${nlohmann_json}/lib/cmake/nlohmann_json/")'
patchShebangs build/unix/
'' + lib.optionalString noSplash ''
substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true"
@ -35,11 +42,13 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-Drpath=ON"
"-DCMAKE_CXX_STANDARD=17"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-Dbuiltin_nlohmannjson=OFF"
"-Dbuiltin_openui5=OFF"
"-Dalien=OFF"
"-Dbonjour=OFF"
"-Dbuiltin_llvm=OFF"
"-Dcastor=OFF"
"-Dchirp=OFF"
"-Dclad=OFF"
@ -53,6 +62,7 @@ stdenv.mkDerivation rec {
"-Dgfal=OFF"
"-Dgviz=OFF"
"-Dhdfs=OFF"
"-Dhttp=ON"
"-Dkrb5=OFF"
"-Dldap=OFF"
"-Dmonalisa=OFF"
@ -64,9 +74,11 @@ stdenv.mkDerivation rec {
"-Dpythia6=OFF"
"-Dpythia8=OFF"
"-Drfio=OFF"
"-Droot7=OFF"
"-Dsqlite=OFF"
"-Dssl=OFF"
"-Dvdt=OFF"
"-Dwebgui=OFF"
"-Dxml=ON"
"-Dxrootd=OFF"
]

View file

@ -1,8 +1,8 @@
diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
--- a/cmake/modules/SetUpMacOS.cmake
+++ b/cmake/modules/SetUpMacOS.cmake
@@ -8,17 +8,10 @@ set(ROOT_ARCHITECTURE macosx)
set(ROOT_PLATFORM macosx)
@@ -28,17 +28,10 @@ if(CMAKE_VERSION VERSION_LESS 3.14.4)
endif()
if (CMAKE_SYSTEM_NAME MATCHES Darwin)
- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
@ -19,16 +19,15 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
#TODO: check haveconfig and rpath -> set rpath true
#TODO: check Thread, define link command
#TODO: more stuff check configure script
@@ -37,23 +30,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
@@ -57,22 +50,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -m64")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
- else()
- MESSAGE(STATUS "Found a 32bit system")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
- SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m32")
- endif()
endif()
- endif()
-
- if(MACOSX_VERSION VERSION_GREATER 10.6)
@ -40,11 +39,10 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
- if(MACOSX_VERSION VERSION_GREATER 10.8)
- set(MACOSX_GLU_DEPRECATED ON)
- endif()
+ endif()
if (CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "Found GNU compiler collection")
@@ -115,7 +92,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common")
@@ -130,7 +108,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
endif()
#---Set Linker flags----------------------------------------------------------------------