Merge pull request #107335 from veprbl/pr/root_6_20_08

root: 6.18.04 -> 6.22.06, don't build vendored LLVM

authored by

Dmitry Kalinkin and committed by
GitHub
8bee208b 1e9dee0b

+76 -48
+16 -7
pkgs/applications/science/misc/root/default.nix
··· 1 - { stdenv, lib, fetchurl, makeWrapper, cmake, gl2ps, gsl, libX11, libXpm, libXft 2 - , libXext, libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash 3 - , zlib 1 + { stdenv, lib, fetchurl, makeWrapper, cmake, ftgl, gl2ps, glew, gsl, llvm_5 2 + , libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, lzma, pcre 3 + , pkgconfig, python, xxHash, zlib, zstd 4 + , libAfterImage, giflib, libjpeg, libtiff, libpng 4 5 , Cocoa, OpenGL, noSplash ? false }: 5 6 6 7 stdenv.mkDerivation rec { 7 8 pname = "root"; 8 - version = "6.18.04"; 9 + version = "6.22.06"; 9 10 10 11 src = fetchurl { 11 12 url = "https://root.cern.ch/download/root_v${version}.source.tar.gz"; 12 - sha256 = "196ghma6g5a7sqz52wyjkgvmh4hj4vqwppm0zwdypy33hgy8anii"; 13 + sha256 = "0mqvj42nax0bmz8h83jjlwjm3xxjy1n0n10inc8csip9ly28fs64"; 13 14 }; 14 15 15 16 nativeBuildInputs = [ makeWrapper cmake pkgconfig ]; 16 - buildInputs = [ gl2ps pcre zlib libxml2 lz4 lzma gsl xxHash python.pkgs.numpy ] 17 + buildInputs = [ ftgl gl2ps glew pcre zlib zstd llvm_5 libxml2 lz4 lzma gsl xxHash libAfterImage giflib libjpeg libtiff libpng python.pkgs.numpy ] 17 18 ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] 18 19 ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ] 19 20 ; ··· 38 39 "-DCMAKE_INSTALL_INCLUDEDIR=include" 39 40 "-Dalien=OFF" 40 41 "-Dbonjour=OFF" 42 + "-Dbuiltin_llvm=OFF" 41 43 "-Dcastor=OFF" 42 44 "-Dchirp=OFF" 43 45 "-Dclad=OFF" ··· 69 71 "-Dxrootd=OFF" 70 72 ] 71 73 ++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.lib.getDev stdenv.cc.libc}/include" 72 - ++ stdenv.lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; 74 + ++ stdenv.lib.optionals stdenv.isDarwin [ 75 + "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" 76 + "-DCMAKE_DISABLE_FIND_PACKAGE_Python2=TRUE" 77 + 78 + # fatal error: module map file '/nix/store/<hash>-Libsystem-osx-10.12.6/include/module.modulemap' not found 79 + # fatal error: could not build module '_Builtin_intrinsics' 80 + "-Druntime_cxxmodules=OFF" 81 + ]; 73 82 74 83 enableParallelBuilding = true; 75 84
+21 -33
pkgs/applications/science/misc/root/sw_vers.patch
··· 1 - diff a/build/unix/compiledata.sh b/build/unix/compiledata.sh 2 - --- a/build/unix/compiledata.sh 3 - +++ b/build/unix/compiledata.sh 4 - @@ -47,7 +47,7 @@ fi 5 - 6 - if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \ 7 - [ "$ARCH" = "macosxicc" ]; then 8 - - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` 9 - + macosx_minor=12 10 - SOEXT="so" 11 - if [ $macosx_minor -ge 5 ]; then 12 - if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then 13 1 diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake 14 2 --- a/cmake/modules/SetUpMacOS.cmake 15 3 +++ b/cmake/modules/SetUpMacOS.cmake 16 - @@ -2,17 +2,8 @@ set(ROOT_ARCHITECTURE macosx) 4 + @@ -8,17 +8,10 @@ set(ROOT_ARCHITECTURE macosx) 17 5 set(ROOT_PLATFORM macosx) 18 6 19 7 if (CMAKE_SYSTEM_NAME MATCHES Darwin) ··· 21 9 - COMMAND cut -d . -f 1-2 22 10 - OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) 23 11 - 24 - - MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}") 25 - - 12 + MESSAGE(STATUS "Found a macOS system ${MACOSX_VERSION}") 13 + 26 14 - if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang) 27 15 set(libcxx ON CACHE BOOL "Build using libc++" FORCE) 28 16 - endif() ··· 31 19 #TODO: check haveconfig and rpath -> set rpath true 32 20 #TODO: check Thread, define link command 33 21 #TODO: more stuff check configure script 34 - @@ -25,23 +16,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) 22 + @@ -37,23 +30,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) 35 23 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") 36 24 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") 37 25 SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64") ··· 56 44 57 45 if (CMAKE_COMPILER_IS_GNUCXX) 58 46 message(STATUS "Found GNU compiler collection") 59 - @@ -104,7 +79,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) 47 + @@ -115,7 +92,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) 60 48 endif() 61 49 62 50 #---Set Linker flags---------------------------------------------------------------------- ··· 67 55 diff a/config/root-config.in b/config/root-config.in 68 56 --- a/config/root-config.in 69 57 +++ b/config/root-config.in 70 - @@ -306,12 +306,6 @@ macosxicc) 71 - auxlibs="-lm -ldl" 58 + @@ -312,12 +312,6 @@ macosxicc) 72 59 ;; 73 - macosx64) 74 - - # MacOS X with gcc (GNU cc v4.x) in 64 bit mode 60 + macosx64|macosxarm64) 61 + # MacOS X with gcc (GNU cc v4.x) in 64 bit mode 62 + - macosx_major=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1 | sed -e 's/^[[:space:]]*//'` 75 63 - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` 76 64 - # cannot find the one linked to libGraf if relocated after built 77 - - if [ $macosx_minor -le 4 ]; then 65 + - if [ $macosx_major -eq 10 -a $macosx_minor -le 4 ]; then 78 66 - rootlibs="$rootlibs -lfreetype" 79 67 - fi 80 68 auxcflags="${cxxversionflag} -m64" 81 69 auxldflags="-m64" 82 70 auxlibs="-lm -ldl" 83 - @@ -375,18 +369,11 @@ freebsd* | openbsd* | linux*) 71 + @@ -378,18 +372,11 @@ freebsd* | openbsd* | linux*) 72 + done 73 + ;; 84 74 macosx*) 75 + - if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then 76 + auxcflags="-pthread $auxcflags" 77 + auxlibs="-lpthread $auxlibs" 78 + - else 79 + - auxcflags="-D_REENTRANT $auxcflags" 80 + - auxlibs="-lpthread $auxlibs" 81 + - fi 85 82 for f in $features ; do 86 - if test "x$f" = "xthread" ; then 87 - - if [ $macosx_minor -ge 5 ]; then 88 - auxcflags="-pthread $auxcflags" 89 - auxlibs="-lpthread $auxlibs" 90 - - else 91 - - auxcflags="-D_REENTRANT $auxcflags" 92 - - auxlibs="-lpthread $auxlibs" 93 - - fi 94 - fi 95 83 if test "x$f" = "xrpath" ; then 96 - - if [ $macosx_minor -ge 5 ]; then 84 + - if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then 97 85 auxlibs="-Wl,-rpath,$libdir $auxlibs" 98 86 - fi 99 87 fi
+3 -4
pkgs/development/libraries/glew/1.10.nix
··· 1 1 { stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi 2 - , AGL ? null 2 + , AGL, OpenGL 3 3 }: 4 4 5 5 with stdenv.lib; ··· 12 12 sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r"; 13 13 }; 14 14 15 - buildInputs = [ xlibsWrapper libXmu libXi ] 16 - ++ optionals stdenv.isDarwin [ AGL ]; 17 - propagatedBuildInputs = [ libGLU ]; # GL/glew.h includes GL/glu.h 15 + buildInputs = if stdenv.isDarwin then [ AGL ] else [ xlibsWrapper libXmu libXi ]; 16 + propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h 18 17 19 18 patchPhase = '' 20 19 sed -i 's|lib64|lib|' config/Makefile.linux
+3 -2
pkgs/development/libraries/glew/default.nix
··· 1 1 { stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi 2 + , OpenGL 2 3 }: 3 4 4 5 with stdenv.lib; ··· 13 14 14 15 outputs = [ "bin" "out" "dev" "doc" ]; 15 16 16 - buildInputs = [ xlibsWrapper libXmu libXi ]; 17 - propagatedBuildInputs = [ libGLU ]; # GL/glew.h includes GL/glu.h 17 + buildInputs = optionals (!stdenv.isDarwin) [ xlibsWrapper libXmu libXi ]; 18 + propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h 18 19 19 20 patchPhase = '' 20 21 sed -i 's|lib64|lib|' config/Makefile.linux
+25
pkgs/development/libraries/libAfterImage/default.nix
··· 1 + { stdenv, fetchurl, zlib }: 2 + 3 + stdenv.mkDerivation { 4 + pname = "libAfterImage"; 5 + version = "1.20"; 6 + 7 + src = fetchurl { 8 + name = "libAfterImage-1.20.tar.bz2"; 9 + urls = [ 10 + "https://sourceforge.net/projects/afterstep/files/libAfterImage/1.20/libAfterImage-1.20.tar.bz2/download" 11 + "ftp://ftp.afterstep.org/stable/libAfterImage/libAfterImage-1.20.tar.bz2" 12 + ]; 13 + sha256 = "0n74rxidwig3yhr6fzxsk7y19n1nq1f296lzrvgj5pfiyi9k48vf"; 14 + }; 15 + 16 + buildInputs = [ zlib ]; 17 + 18 + meta = with stdenv.lib; { 19 + homepage = "http://www.afterstep.org/afterimage/"; 20 + description = "A generic image manipulation library"; 21 + platforms = platforms.unix; 22 + maintainers = [ maintainers.veprbl ]; 23 + license = licenses.lgpl21; 24 + }; 25 + }
+2
pkgs/development/libraries/physics/yoda/default.nix
··· 39 39 homepage = "https://yoda.hepforge.org"; 40 40 platforms = stdenv.lib.platforms.unix; 41 41 maintainers = with stdenv.lib.maintainers; [ veprbl ]; 42 + # https://gitlab.com/hepcedar/yoda/-/issues/24 43 + broken = withRootSupport; 42 44 }; 43 45 }
+6 -2
pkgs/top-level/all-packages.nix
··· 13153 13153 13154 13154 gle = callPackage ../development/libraries/gle { }; 13155 13155 13156 - glew = callPackage ../development/libraries/glew { }; 13156 + glew = callPackage ../development/libraries/glew { 13157 + inherit (darwin.apple_sdk.frameworks) OpenGL; 13158 + }; 13157 13159 glew110 = callPackage ../development/libraries/glew/1.10.nix { 13158 - inherit (darwin.apple_sdk.frameworks) AGL; 13160 + inherit (darwin.apple_sdk.frameworks) AGL OpenGL; 13159 13161 }; 13160 13162 13161 13163 glfw = glfw3; ··· 13819 13821 lib3ds = callPackage ../development/libraries/lib3ds { }; 13820 13822 13821 13823 lib3mf = callPackage ../development/libraries/lib3mf { }; 13824 + 13825 + libAfterImage = callPackage ../development/libraries/libAfterImage { }; 13822 13826 13823 13827 libaacs = callPackage ../development/libraries/libaacs { }; 13824 13828