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