root: 6.12.06 -> 6.18.04

Also switch to python3.
This commit is contained in:
Dmitry Kalinkin 2019-12-11 20:04:29 -05:00 committed by Jon
parent 6498f468af
commit b6d8873825
3 changed files with 61 additions and 42 deletions

View File

@ -1,27 +1,32 @@
{ stdenv, fetchurl, cmake, pcre, pkgconfig, python2 { stdenv, fetchurl, cmake, gl2ps, gsl, libX11, libXpm, libXft, libXext
, libX11, libXpm, libXft, libXext, libGLU, libGL, zlib, libxml2, lz4, lzma, gsl, xxHash , libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash, zlib
, Cocoa, OpenGL, noSplash ? false }: , Cocoa, OpenGL, noSplash ? false }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "root"; pname = "root";
version = "6.12.06"; version = "6.18.04";
src = fetchurl { src = fetchurl {
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz"; url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
sha256 = "1557b9sdragsx9i15qh6lq7fn056bgi87d31kxdl4vl0awigvp5f"; sha256 = "196ghma6g5a7sqz52wyjkgvmh4hj4vqwppm0zwdypy33hgy8anii";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ cmake pcre python2 zlib libxml2 lz4 lzma gsl xxHash ] buildInputs = [ gl2ps pcre python zlib libxml2 lz4 lzma gsl xxHash ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
; ;
propagatedBuildInputs = [ python.pkgs.numpy ];
patches = [ patches = [
./sw_vers.patch ./sw_vers.patch
]; ];
preConfigure = '' preConfigure = ''
rm -rf builtins/*
substituteInPlace cmake/modules/SearchInstalledSoftware.cmake \
--replace 'set(lcgpackages ' '#set(lcgpackages '
patchShebangs build/unix/ patchShebangs build/unix/
'' + stdenv.lib.optionalString noSplash '' '' + stdenv.lib.optionalString noSplash ''
substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true" substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true"
@ -35,8 +40,10 @@ stdenv.mkDerivation rec {
"-Dbonjour=OFF" "-Dbonjour=OFF"
"-Dcastor=OFF" "-Dcastor=OFF"
"-Dchirp=OFF" "-Dchirp=OFF"
"-Dclad=OFF"
"-Ddavix=OFF" "-Ddavix=OFF"
"-Ddcache=OFF" "-Ddcache=OFF"
"-Dfail-on-missing=ON"
"-Dfftw3=OFF" "-Dfftw3=OFF"
"-Dfitsio=OFF" "-Dfitsio=OFF"
"-Dfortran=OFF" "-Dfortran=OFF"
@ -57,6 +64,7 @@ stdenv.mkDerivation rec {
"-Drfio=OFF" "-Drfio=OFF"
"-Dsqlite=OFF" "-Dsqlite=OFF"
"-Dssl=OFF" "-Dssl=OFF"
"-Dvdt=OFF"
"-Dxml=ON" "-Dxml=ON"
"-Dxrootd=OFF" "-Dxrootd=OFF"
] ]

View File

@ -1,54 +1,46 @@
diff --git a/build/unix/compiledata.sh b/build/unix/compiledata.sh diff a/build/unix/compiledata.sh b/build/unix/compiledata.sh
--- a/build/unix/compiledata.sh --- a/build/unix/compiledata.sh
+++ b/build/unix/compiledata.sh +++ b/build/unix/compiledata.sh
@@ -49,7 +49,7 @@ fi @@ -47,7 +47,7 @@ fi
if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \ if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \
[ "$ARCH" = "macosxicc" ]; then [ "$ARCH" = "macosxicc" ]; then
- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
+ macosx_minor=7 + macosx_minor=12
SOEXT="so" SOEXT="so"
if [ $macosx_minor -ge 5 ]; then if [ $macosx_minor -ge 5 ]; then
if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then
diff --git a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
--- a/cmake/modules/SetUpMacOS.cmake --- a/cmake/modules/SetUpMacOS.cmake
+++ b/cmake/modules/SetUpMacOS.cmake +++ b/cmake/modules/SetUpMacOS.cmake
@@ -12,25 +12,11 @@ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/X11R6) @@ -2,17 +2,8 @@ set(ROOT_ARCHITECTURE macosx)
#--------------------------------------------------------------------------------------------------------- set(ROOT_PLATFORM macosx)
if (CMAKE_SYSTEM_NAME MATCHES Darwin) if (CMAKE_SYSTEM_NAME MATCHES Darwin)
- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion" - EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
- COMMAND cut -d . -f 1-2 - COMMAND cut -d . -f 1-2
- OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) - OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-
- MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}") - MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}")
- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
- COMMAND cut -d . -f 2
- OUTPUT_VARIABLE MACOSX_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE)
- -
- if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang) - if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
set(libcxx ON CACHE BOOL "Build using libc++" FORCE) set(libcxx ON CACHE BOOL "Build using libc++" FORCE)
- endif() - endif()
- if(${MACOSX_MINOR} GREATER 4) - if(MACOSX_VERSION VERSION_GREATER 10.4)
#TODO: check haveconfig and rpath -> set rpath true #TODO: check haveconfig and rpath -> set rpath true
#TODO: check Thread, define link command #TODO: check Thread, define link command
#TODO: more stuff check configure script #TODO: more stuff check configure script
- execute_process(COMMAND /usr/sbin/sysctl machdep.cpu.extfeatures OUTPUT_VARIABLE SYSCTL_OUTPUT) @@ -25,23 +16,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
- if(${SYSCTL_OUTPUT} MATCHES 64)
- MESSAGE(STATUS "Found a 64bit system")
set(ROOT_ARCHITECTURE macosx64)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -m64")
@@ -38,27 +24,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64") SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
- else(${SYSCTL_OUTPUT} MATCHES 64) - else()
- MESSAGE(STATUS "Found a 32bit system") - MESSAGE(STATUS "Found a 32bit system")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
- SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m32") - SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m32")
- endif(${SYSCTL_OUTPUT} MATCHES 64) - endif()
- endif() - endif()
- -
- if(MACOSX_VERSION VERSION_GREATER 10.6) - if(MACOSX_VERSION VERSION_GREATER 10.6)
@ -59,32 +51,51 @@ diff --git a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
- endif() - endif()
- if(MACOSX_VERSION VERSION_GREATER 10.8) - if(MACOSX_VERSION VERSION_GREATER 10.8)
- set(MACOSX_GLU_DEPRECATED ON) - set(MACOSX_GLU_DEPRECATED ON)
- set(MACOSX_KRB5_DEPRECATED ON)
- endif()
- if(MACOSX_VERSION VERSION_GREATER 10.9)
- set(MACOSX_LDAP_DEPRECATED ON)
- endif() - endif()
+ endif()
if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "Found GNU compiler collection") message(STATUS "Found GNU compiler collection")
@@ -135,7 +100,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) @@ -104,7 +79,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
endif() endif()
#---Set Linker flags---------------------------------------------------------------------- #---Set Linker flags----------------------------------------------------------------------
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=${MACOSX_VERSION} -Wl,-rpath,@loader_path/../lib") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=${MACOSX_VERSION}")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/../lib")
else (CMAKE_SYSTEM_NAME MATCHES Darwin) else (CMAKE_SYSTEM_NAME MATCHES Darwin)
diff --git a/config/root-config.in b/config/root-config.in MESSAGE(FATAL_ERROR "There is no setup for this this Apple system up to now. Don't know waht to do. Stop cmake at this point.")
endif (CMAKE_SYSTEM_NAME MATCHES Darwin)
diff a/config/root-config.in b/config/root-config.in
--- a/config/root-config.in --- a/config/root-config.in
+++ b/config/root-config.in +++ b/config/root-config.in
@@ -304,7 +304,7 @@ macosxicc) @@ -306,12 +306,6 @@ macosxicc)
auxlibs="-lm -ldl"
;; ;;
macosx64) macosx64)
# MacOS X with gcc (GNU cc v4.x) in 64 bit mode - # MacOS X with gcc (GNU cc v4.x) in 64 bit mode
- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
+ macosx_minor=7 - # cannot find the one linked to libGraf if relocated after built
# cannot find the one linked to libGraf if relocated after built - if [ $macosx_minor -le 4 ]; then
if [ $macosx_minor -le 4 ]; then - rootlibs="$rootlibs -lfreetype"
rootlibs="$rootlibs -lfreetype" - fi
auxcflags="${cxxversionflag} -m64"
auxldflags="-m64"
auxlibs="-lm -ldl"
@@ -375,18 +369,11 @@ freebsd* | openbsd* | linux*)
macosx*)
for f in $features ; do
if test "x$f" = "xthread" ; then
- if [ $macosx_minor -ge 5 ]; then
auxcflags="-pthread $auxcflags"
auxlibs="-lpthread $auxlibs"
- else
- auxcflags="-D_REENTRANT $auxcflags"
- auxlibs="-lpthread $auxlibs"
- fi
fi
if test "x$f" = "xrpath" ; then
- if [ $macosx_minor -ge 5 ]; then
auxlibs="-Wl,-rpath,$libdir $auxlibs"
- fi
fi
if test "x$f" = "xlibcxx" ; then
auxcflags="-stdlib=libc++ $auxcflags"

View File

@ -24228,8 +24228,8 @@ in
ns-3 = callPackage ../development/libraries/science/networking/ns-3 { python = python3; }; ns-3 = callPackage ../development/libraries/science/networking/ns-3 { python = python3; };
root = callPackage ../applications/science/misc/root { root = callPackage ../applications/science/misc/root {
python = python3;
inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL; inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
}; };
root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix { root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix {