uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
149
pkgs/applications/science/misc/root/5.nix
Normal file
149
pkgs/applications/science/misc/root/5.nix
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, pcre
|
||||
, pkg-config
|
||||
, python2
|
||||
, libX11
|
||||
, libXpm
|
||||
, libXft
|
||||
, libXext
|
||||
, libGLU
|
||||
, libGL
|
||||
, zlib
|
||||
, libxml2
|
||||
, lz4
|
||||
, xz
|
||||
, gsl_1
|
||||
, xxHash
|
||||
, Cocoa
|
||||
, OpenGL
|
||||
, noSplash ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "root";
|
||||
version = "5.34.38";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
|
||||
sha256 = "1ln448lszw4d6jmbdphkr2plwxxlhmjkla48vmmq750xc1lxlfrc";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ pcre python2 zlib libxml2 lz4 xz gsl_1 xxHash ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
|
||||
++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
|
||||
;
|
||||
|
||||
patches = [
|
||||
./sw_vers_root5.patch
|
||||
|
||||
# prevents rootcint from looking in /usr/includes and such
|
||||
./purify_include_paths_root5.patch
|
||||
|
||||
# disable dictionary generation for stuff that includes libc headers
|
||||
# our glibc requires a modern compiler
|
||||
./disable_libc_dicts_root5.patch
|
||||
|
||||
(fetchpatch {
|
||||
name = "root5-gcc9-fix.patch";
|
||||
url = "https://github.com/root-project/root/commit/348f30a6a3b5905ef734a7bd318bc0ee8bca6dc9.diff";
|
||||
sha256 = "0dvrsrkpacyn5z87374swpy7aciv9a8s6m61b4iqd7a956r67rn3";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "root5-gcc10-fix.patch";
|
||||
url = "https://github.com/root-project/root/commit/3c243b18768d3c3501faf3ca4e4acfc071021350.diff";
|
||||
sha256 = "1hjmgnp4zx6im8ps78673x0rrhmfyy1nffhgxjlfl1r2z8cq210z";
|
||||
})
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
# binutils 2.37 fixes
|
||||
fixupList=(
|
||||
cint/demo/gl/make0
|
||||
cint/demo/exception/Makefile
|
||||
cint/demo/makecint/KRcc/Makefile
|
||||
cint/demo/makecint/Stub2/Make2
|
||||
cint/demo/makecint/Array/Makefile
|
||||
cint/demo/makecint/DArray/Makefile
|
||||
cint/demo/makecint/ReadFile/Makefile
|
||||
cint/demo/makecint/stl/Makefile
|
||||
cint/demo/makecint/Stub2/Make1
|
||||
cint/cint/include/makemat
|
||||
cint/cint/lib/WildCard/Makefile
|
||||
cint/cint/include/make.arc
|
||||
cint/cint/lib/qt/Makefile
|
||||
cint/cint/lib/pthread/Makefile
|
||||
graf2d/asimage/src/libAfterImage/Makefile.in
|
||||
)
|
||||
for toFix in "''${fixupList[@]}"; do
|
||||
substituteInPlace "$toFix" --replace "clq" "cq"
|
||||
done
|
||||
|
||||
patchShebangs build/unix/
|
||||
ln -s ${lib.getDev stdenv.cc.libc}/include/AvailabilityMacros.h cint/cint/include/
|
||||
|
||||
# __malloc_hook is deprecated
|
||||
substituteInPlace misc/memstat/src/TMemStatHook.cxx \
|
||||
--replace "defined(R__GNU) && (defined(R__LINUX) || defined(__APPLE__))" \
|
||||
"defined(R__GNU) && (defined(__APPLE__))"
|
||||
''
|
||||
# Fix CINTSYSDIR for "build" version of rootcint
|
||||
# This is probably a bug that breaks out-of-source builds
|
||||
+ ''
|
||||
substituteInPlace cint/cint/src/loadfile.cxx\
|
||||
--replace 'env = "cint";' 'env = "'`pwd`'/cint";'
|
||||
'' + lib.optionalString noSplash ''
|
||||
substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true"
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-Drpath=ON"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
||||
"-Dalien=OFF"
|
||||
"-Dbonjour=OFF"
|
||||
"-Dcastor=OFF"
|
||||
"-Dchirp=OFF"
|
||||
"-Ddavix=OFF"
|
||||
"-Ddcache=OFF"
|
||||
"-Dfftw3=OFF"
|
||||
"-Dfitsio=OFF"
|
||||
"-Dfortran=OFF"
|
||||
"-Dgfal=OFF"
|
||||
"-Dgsl_shared=ON"
|
||||
"-Dgviz=OFF"
|
||||
"-Dhdfs=OFF"
|
||||
"-Dkrb5=OFF"
|
||||
"-Dldap=OFF"
|
||||
"-Dmathmore=ON"
|
||||
"-Dmonalisa=OFF"
|
||||
"-Dmysql=OFF"
|
||||
"-Dodbc=OFF"
|
||||
"-Dopengl=ON"
|
||||
"-Doracle=OFF"
|
||||
"-Dpgsql=OFF"
|
||||
"-Dpythia6=OFF"
|
||||
"-Dpythia8=OFF"
|
||||
"-Drfio=OFF"
|
||||
"-Dsqlite=OFF"
|
||||
"-Dssl=OFF"
|
||||
"-Dxml=ON"
|
||||
"-Dxrootd=OFF"
|
||||
]
|
||||
++ lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks";
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://root.cern.ch/";
|
||||
description = "A data analysis framework";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
license = licenses.lgpl21;
|
||||
};
|
||||
}
|
||||
192
pkgs/applications/science/misc/root/default.nix
Normal file
192
pkgs/applications/science/misc/root/default.nix
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, makeWrapper
|
||||
, cmake
|
||||
, git
|
||||
, ftgl
|
||||
, gl2ps
|
||||
, glew
|
||||
, gsl
|
||||
, lapack
|
||||
, libX11
|
||||
, libXpm
|
||||
, libXft
|
||||
, libXext
|
||||
, libGLU
|
||||
, libGL
|
||||
, libxml2
|
||||
, llvm_9
|
||||
, lz4
|
||||
, xz
|
||||
, openblas
|
||||
, pcre
|
||||
, nlohmann_json
|
||||
, pkg-config
|
||||
, python
|
||||
, xxHash
|
||||
, zlib
|
||||
, zstd
|
||||
, libAfterImage
|
||||
, giflib
|
||||
, libjpeg
|
||||
, libtiff
|
||||
, libpng
|
||||
, tbb
|
||||
, Cocoa
|
||||
, CoreSymbolication
|
||||
, OpenGL
|
||||
, noSplash ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "root";
|
||||
version = "6.24.06";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
|
||||
sha256 = "sha256-kH9p9LrKHk8w7rSXlZjKdZm2qoA8oEboDiW2u6oO9SI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper cmake pkg-config git ];
|
||||
buildInputs = [
|
||||
ftgl
|
||||
gl2ps
|
||||
glew
|
||||
pcre
|
||||
zlib
|
||||
zstd
|
||||
lapack
|
||||
libxml2
|
||||
llvm_9
|
||||
lz4
|
||||
xz
|
||||
gsl
|
||||
openblas
|
||||
xxHash
|
||||
libAfterImage
|
||||
giflib
|
||||
libjpeg
|
||||
libtiff
|
||||
libpng
|
||||
nlohmann_json
|
||||
python.pkgs.numpy
|
||||
tbb
|
||||
]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
|
||||
++ lib.optionals (stdenv.isDarwin) [ Cocoa CoreSymbolication OpenGL ]
|
||||
;
|
||||
|
||||
patches = [
|
||||
./sw_vers.patch
|
||||
|
||||
# Fix builtin_llvm=OFF support
|
||||
(fetchpatch {
|
||||
url = "https://github.com/root-project/root/commit/0cddef5d3562a89fe254e0036bb7d5ca8a5d34d2.diff";
|
||||
excludes = [ "interpreter/cling/tools/plugins/clad/CMakeLists.txt" ];
|
||||
sha256 = "sha256-VxWUbxRHB3O6tERFQdbGI7ypDAZD3sjSi+PYfu1OAbM=";
|
||||
})
|
||||
];
|
||||
|
||||
# Fix build against vanilla LLVM 9
|
||||
postPatch = ''
|
||||
sed \
|
||||
-e '/#include "llvm.*RTDyldObjectLinkingLayer.h"/i#define private protected' \
|
||||
-e '/#include "llvm.*RTDyldObjectLinkingLayer.h"/a#undef private' \
|
||||
-i interpreter/cling/lib/Interpreter/IncrementalJIT.h
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
rm -rf builtins/*
|
||||
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 '1iset(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"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# Eliminate impure reference to /System/Library/PrivateFrameworks
|
||||
substituteInPlace core/CMakeLists.txt \
|
||||
--replace "-F/System/Library/PrivateFrameworks" ""
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-Drpath=ON"
|
||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-Dbuiltin_llvm=OFF"
|
||||
"-Dbuiltin_nlohmannjson=OFF"
|
||||
"-Dbuiltin_openui5=OFF"
|
||||
"-Dalien=OFF"
|
||||
"-Dbonjour=OFF"
|
||||
"-Dcastor=OFF"
|
||||
"-Dchirp=OFF"
|
||||
"-Dclad=OFF"
|
||||
"-Ddavix=OFF"
|
||||
"-Ddcache=OFF"
|
||||
"-Dfail-on-missing=ON"
|
||||
"-Dfftw3=OFF"
|
||||
"-Dfitsio=OFF"
|
||||
"-Dfortran=OFF"
|
||||
"-Dimt=ON"
|
||||
"-Dgfal=OFF"
|
||||
"-Dgviz=OFF"
|
||||
"-Dhdfs=OFF"
|
||||
"-Dhttp=ON"
|
||||
"-Dkrb5=OFF"
|
||||
"-Dldap=OFF"
|
||||
"-Dmonalisa=OFF"
|
||||
"-Dmysql=OFF"
|
||||
"-Dodbc=OFF"
|
||||
"-Dopengl=ON"
|
||||
"-Doracle=OFF"
|
||||
"-Dpgsql=OFF"
|
||||
"-Dpythia6=OFF"
|
||||
"-Dpythia8=OFF"
|
||||
"-Drfio=OFF"
|
||||
"-Droot7=OFF"
|
||||
"-Dsqlite=OFF"
|
||||
"-Dssl=OFF"
|
||||
"-Dtmva=ON"
|
||||
"-Dvdt=OFF"
|
||||
"-Dwebgui=OFF"
|
||||
"-Dxml=ON"
|
||||
"-Dxrootd=OFF"
|
||||
]
|
||||
++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
|
||||
"-DCMAKE_DISABLE_FIND_PACKAGE_Python2=TRUE"
|
||||
|
||||
# fatal error: module map file '/nix/store/<hash>-Libsystem-osx-10.12.6/include/module.modulemap' not found
|
||||
# fatal error: could not build module '_Builtin_intrinsics'
|
||||
"-Druntime_cxxmodules=OFF"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
for prog in rootbrowse rootcp rooteventselector rootls rootmkdir rootmv rootprint rootrm rootslimtree; do
|
||||
wrapProgram "$out/bin/$prog" \
|
||||
--set PYTHONPATH "$out/lib" \
|
||||
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib"
|
||||
done
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://root.cern.ch/";
|
||||
description = "A data analysis framework";
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.veprbl ];
|
||||
license = licenses.lgpl21;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt
|
||||
--- a/cint/ROOT/CMakeLists.txt
|
||||
+++ b/cint/ROOT/CMakeLists.txt
|
||||
@@ -47,21 +47,13 @@ set(CINTSTLDLLHEADERS
|
||||
${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdcxxfunc.h
|
||||
)
|
||||
set(CINTINCDLLNAMES
|
||||
- stdfunc
|
||||
+# stdfunc
|
||||
# stdcxxfunc
|
||||
)
|
||||
set(CINTINCDLLHEADERS
|
||||
- ${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdfunc.h
|
||||
+# ${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdfunc.h
|
||||
# ${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdcxxfunc.h
|
||||
)
|
||||
-if(NOT WIN32)
|
||||
- set(CINTSTLDLLNAMES ${CINTSTLDLLNAMES} valarray)
|
||||
- set(CINTSTLDLLHEADERS ${CINTSTLDLLHEADERS} ${CINTDLLDIR}/vary.h)
|
||||
- set(CINTINCDLLNAMES ${CINTINCDLLNAMES} posix ipc)
|
||||
- set(CINTINCDLLHEADERS ${CINTINCDLLHEADERS}
|
||||
- ${CMAKE_SOURCE_DIR}/cint/cint/lib/posix/exten.h
|
||||
- ${CMAKE_SOURCE_DIR}/cint/cint/lib/ipc/ipcif.h)
|
||||
-endif()
|
||||
|
||||
set(CINTBUILDLOADER
|
||||
vector
|
||||
|
|
@ -0,0 +1,204 @@
|
|||
diff --git a/cint/cint/src/loadfile.cxx b/cint/cint/src/loadfile.cxx
|
||||
--- a/cint/cint/src/loadfile.cxx
|
||||
+++ b/cint/cint/src/loadfile.cxx
|
||||
@@ -1365,92 +1365,6 @@ int G__statfilename(const char *filenamein, struct stat *statBuf,
|
||||
}
|
||||
}
|
||||
#endif /* G__EDU_VERSION */
|
||||
-
|
||||
-#ifdef G__VISUAL
|
||||
- /**********************************************
|
||||
- * try /msdev/include
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- workname.Format("/msdev/include/%s%s",filename(),addpost[i2]);
|
||||
- res = stat( workname, statBuf );
|
||||
- if (res==0) {
|
||||
- if (fullPath) fullPath->Swap(workname);
|
||||
- return res;
|
||||
- }
|
||||
- }
|
||||
-#endif /* G__VISUAL */
|
||||
-
|
||||
-#ifdef G__SYMANTEC
|
||||
- /**********************************************
|
||||
- * try /sc/include
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- workname.Format("/sc/include/%s%s",filename(),addpost[i2]);
|
||||
- res = stat( workname, statBuf );
|
||||
- if (res==0) {
|
||||
- if (fullPath) fullPath->Swap(workname);
|
||||
- return res;
|
||||
- }
|
||||
- }
|
||||
-#endif // G__SYMANTEC
|
||||
-
|
||||
-#ifndef G__WIN32
|
||||
- /**********************************************
|
||||
- * try /usr/include/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- workname.Format("/usr/include/%s%s",filename(),addpost[i2]);
|
||||
- res = stat( workname, statBuf );
|
||||
- if (res==0) {
|
||||
- if (fullPath) fullPath->Swap(workname);
|
||||
- return res;
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-#ifdef __GNUC__
|
||||
- /**********************************************
|
||||
- * try /usr/include/g++/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- workname.Format("/usr/include/g++/%s%s",filename(),addpost[i2]);
|
||||
- res = stat( workname, statBuf );
|
||||
- if (res==0) {
|
||||
- if (fullPath) fullPath->Swap(workname);
|
||||
- return res;
|
||||
- }
|
||||
- }
|
||||
-#endif /* __GNUC__ */
|
||||
-
|
||||
-#ifndef G__WIN32
|
||||
- /* #ifdef __hpux */
|
||||
- /**********************************************
|
||||
- * try /usr/include/CC/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- workname.Format("/usr/include/CC/%s%s",filename(),addpost[i2]);
|
||||
- res = stat( workname, statBuf );
|
||||
- if (res==0) {
|
||||
- if (fullPath) fullPath->Swap(workname);
|
||||
- return res;
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
-#ifndef G__WIN32
|
||||
- /**********************************************
|
||||
- * try /usr/include/codelibs/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- workname.Format("/usr/include/codelibs/%s%s"
|
||||
- ,filename(),addpost[i2]);
|
||||
- res = stat( workname, statBuf );
|
||||
- if (res==0) {
|
||||
- if (fullPath) fullPath->Swap(workname);
|
||||
- return res;
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -1960,107 +1874,6 @@ int G__loadfile(const char *filenamein)
|
||||
}
|
||||
if(G__ifile.fp) break;
|
||||
#endif /* G__EDU_VERSION */
|
||||
-
|
||||
-#ifdef G__VISUAL
|
||||
- /**********************************************
|
||||
- * try /msdev/include
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- G__snprintf(G__ifile.name,G__MAXFILENAME,"/msdev/include/%s%s",filename(),addpost[i2]);
|
||||
-#ifndef G__WIN32
|
||||
- G__ifile.fp = fopen(G__ifile.name,"r");
|
||||
-#else
|
||||
- G__ifile.fp = fopen(G__ifile.name,"rb");
|
||||
-#endif
|
||||
- G__globalcomp=G__store_globalcomp;
|
||||
- }
|
||||
- if(G__ifile.fp) break;
|
||||
-#endif /* G__VISUAL */
|
||||
-
|
||||
-#ifdef G__SYMANTEC
|
||||
- /**********************************************
|
||||
- * try /sc/include
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- G__snprintf(G__ifile.name,G__MAXFILENAME,"/sc/include/%s%s",filename(),addpost[i2]);
|
||||
-#ifndef G__WIN32
|
||||
- G__ifile.fp = fopen(G__ifile.name,"r");
|
||||
-#else
|
||||
- G__ifile.fp = fopen(G__ifile.name,"rb");
|
||||
-#endif
|
||||
- G__globalcomp=G__store_globalcomp;
|
||||
- }
|
||||
- if(G__ifile.fp) break;
|
||||
-#endif /* G__SYMANTEC */
|
||||
-
|
||||
-#ifndef G__WIN32
|
||||
- /**********************************************
|
||||
- * try /usr/include/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/%s%s",filename(),addpost[i2]);
|
||||
-#ifndef G__WIN32
|
||||
- G__ifile.fp = fopen(G__ifile.name,"r");
|
||||
-#else
|
||||
- G__ifile.fp = fopen(G__ifile.name,"rb");
|
||||
-#endif
|
||||
- G__globalcomp=G__store_globalcomp;
|
||||
- }
|
||||
- if(G__ifile.fp) break;
|
||||
-#endif
|
||||
-
|
||||
-#ifdef __GNUC__
|
||||
- /**********************************************
|
||||
- * try /usr/include/g++/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/g++/%s%s",filename(),addpost[i2]);
|
||||
-#ifndef G__WIN32
|
||||
- G__ifile.fp = fopen(G__ifile.name,"r");
|
||||
-#else
|
||||
- G__ifile.fp = fopen(G__ifile.name,"rb");
|
||||
-#endif
|
||||
- G__globalcomp=G__store_globalcomp;
|
||||
- }
|
||||
- if(G__ifile.fp) break;
|
||||
-#endif /* __GNUC__ */
|
||||
-
|
||||
-#ifndef G__WIN32
|
||||
-/* #ifdef __hpux */
|
||||
- /**********************************************
|
||||
- * try /usr/include/CC/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/CC/%s%s",filename(),addpost[i2]);
|
||||
-#ifndef G__WIN32
|
||||
- G__ifile.fp = fopen(G__ifile.name,"r");
|
||||
-#else
|
||||
- G__ifile.fp = fopen(G__ifile.name,"rb");
|
||||
-#endif
|
||||
- G__globalcomp=G__store_globalcomp;
|
||||
- }
|
||||
- if(G__ifile.fp) break;
|
||||
-/* #endif __hpux */
|
||||
-#endif
|
||||
-
|
||||
-#ifndef G__WIN32
|
||||
-/* #ifdef __hpux */
|
||||
- /**********************************************
|
||||
- * try /usr/include/codelibs/filename
|
||||
- **********************************************/
|
||||
- if('\0'!=G__cintsysdir[0]) {
|
||||
- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/codelibs/%s%s"
|
||||
- ,filename(),addpost[i2]);
|
||||
-#ifndef G__WIN32
|
||||
- G__ifile.fp = fopen(G__ifile.name,"r");
|
||||
-#else
|
||||
- G__ifile.fp = fopen(G__ifile.name,"rb");
|
||||
-#endif
|
||||
- G__globalcomp=G__store_globalcomp;
|
||||
- }
|
||||
- if(G__ifile.fp) break;
|
||||
-/* #endif __hpux */
|
||||
-#endif
|
||||
}
|
||||
}
|
||||
|
||||
13
pkgs/applications/science/misc/root/setup-hook.sh
Normal file
13
pkgs/applications/science/misc/root/setup-hook.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
thisroot () {
|
||||
# Workaround thisroot.sh dependency on man
|
||||
if [ -z "${MANPATH-}" ]; then
|
||||
MANPATH=:
|
||||
fi
|
||||
local oldOpts="-u"
|
||||
shopt -qo nounset || oldOpts="+u"
|
||||
set +u
|
||||
source @out@/bin/thisroot.sh
|
||||
set "$oldOpts"
|
||||
}
|
||||
|
||||
postHooks+=(thisroot)
|
||||
87
pkgs/applications/science/misc/root/sw_vers.patch
Normal file
87
pkgs/applications/science/misc/root/sw_vers.patch
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
|
||||
--- a/cmake/modules/SetUpMacOS.cmake
|
||||
+++ b/cmake/modules/SetUpMacOS.cmake
|
||||
@@ -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"
|
||||
- COMMAND cut -d . -f 1-2
|
||||
- OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
-
|
||||
MESSAGE(STATUS "Found a macOS system ${MACOSX_VERSION}")
|
||||
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
|
||||
set(libcxx ON CACHE BOOL "Build using libc++" FORCE)
|
||||
- endif()
|
||||
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.4)
|
||||
#TODO: check haveconfig and rpath -> set rpath true
|
||||
#TODO: check Thread, define link command
|
||||
#TODO: more stuff check configure script
|
||||
@@ -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")
|
||||
- else()
|
||||
- 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()
|
||||
-
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.6)
|
||||
- set(MACOSX_SSL_DEPRECATED ON)
|
||||
- endif()
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.7)
|
||||
- set(MACOSX_ODBC_DEPRECATED ON)
|
||||
- endif()
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.8)
|
||||
- set(MACOSX_GLU_DEPRECATED ON)
|
||||
- endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
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----------------------------------------------------------------------
|
||||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=${MACOSX_VERSION}")
|
||||
else (CMAKE_SYSTEM_NAME MATCHES Darwin)
|
||||
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
|
||||
+++ b/config/root-config.in
|
||||
@@ -312,12 +312,6 @@ macosxicc)
|
||||
;;
|
||||
macosx64|macosxarm64)
|
||||
# MacOS X with gcc (GNU cc v4.x) in 64 bit mode
|
||||
- macosx_major=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1 | sed -e 's/^[[:space:]]*//'`
|
||||
- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
|
||||
- # cannot find the one linked to libGraf if relocated after built
|
||||
- if [ $macosx_major -eq 10 -a $macosx_minor -le 4 ]; then
|
||||
- rootlibs="$rootlibs -lfreetype"
|
||||
- fi
|
||||
auxcflags="${cxxversionflag} -m64"
|
||||
auxldflags="-m64"
|
||||
auxlibs="-lm -ldl"
|
||||
@@ -378,18 +372,11 @@ freebsd* | openbsd* | linux*)
|
||||
done
|
||||
;;
|
||||
macosx*)
|
||||
- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then
|
||||
auxcflags="-pthread $auxcflags"
|
||||
auxlibs="-lpthread $auxlibs"
|
||||
- else
|
||||
- auxcflags="-D_REENTRANT $auxcflags"
|
||||
- auxlibs="-lpthread $auxlibs"
|
||||
- fi
|
||||
for f in $features ; do
|
||||
if test "x$f" = "xrpath" ; then
|
||||
- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then
|
||||
auxlibs="-Wl,-rpath,$libdir $auxlibs"
|
||||
- fi
|
||||
fi
|
||||
if test "x$f" = "xlibcxx" ; then
|
||||
auxcflags="-stdlib=libc++ $auxcflags"
|
||||
104
pkgs/applications/science/misc/root/sw_vers_root5.patch
Normal file
104
pkgs/applications/science/misc/root/sw_vers_root5.patch
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
diff --git a/build/unix/compiledata.sh b/build/unix/compiledata.sh
|
||||
--- a/build/unix/compiledata.sh
|
||||
+++ b/build/unix/compiledata.sh
|
||||
@@ -49,7 +49,7 @@ fi
|
||||
|
||||
if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \
|
||||
[ "$ARCH" = "macosxicc" ]; then
|
||||
- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
|
||||
+ macosx_minor=7
|
||||
SOEXT="so"
|
||||
if [ $macosx_minor -ge 5 ]; then
|
||||
if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then
|
||||
diff --git a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
|
||||
--- a/cmake/modules/SetUpMacOS.cmake
|
||||
+++ b/cmake/modules/SetUpMacOS.cmake
|
||||
@@ -12,25 +12,11 @@ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/X11R6)
|
||||
#---------------------------------------------------------------------------------------------------------
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES Darwin)
|
||||
- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
|
||||
- COMMAND cut -d . -f 1-2
|
||||
- OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
- 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} STREQUAL Clang)
|
||||
set(libcxx ON CACHE BOOL "Build using libc++" FORCE)
|
||||
- endif()
|
||||
|
||||
- if(${MACOSX_MINOR} GREATER 4)
|
||||
#TODO: check haveconfig and rpath -> set rpath true
|
||||
#TODO: check Thread, define link command
|
||||
#TODO: more stuff check configure script
|
||||
- execute_process(COMMAND /usr/sbin/sysctl machdep.cpu.extfeatures OUTPUT_VARIABLE SYSCTL_OUTPUT)
|
||||
- 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,28 +24,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
|
||||
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(${SYSCTL_OUTPUT} MATCHES 64)
|
||||
- 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(${SYSCTL_OUTPUT} MATCHES 64)
|
||||
- endif()
|
||||
-
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.6)
|
||||
- set(MACOSX_SSL_DEPRECATED ON)
|
||||
- endif()
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.7)
|
||||
- set(MACOSX_ODBC_DEPRECATED ON)
|
||||
- endif()
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.8)
|
||||
- set(MACOSX_GLU_DEPRECATED ON)
|
||||
- set(MACOSX_KRB5_DEPRECATED ON)
|
||||
- set(MACOSX_TMPNAM_DEPRECATED ON)
|
||||
- endif()
|
||||
- if(MACOSX_VERSION VERSION_GREATER 10.9)
|
||||
- set(MACOSX_LDAP_DEPRECATED ON)
|
||||
- endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
message(STATUS "Found GNU compiler collection")
|
||||
@@ -132,7 +96,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
|
||||
endif()
|
||||
|
||||
#---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} -Wl,-rpath,@loader_path/../lib")
|
||||
|
||||
|
||||
else (CMAKE_SYSTEM_NAME MATCHES Darwin)
|
||||
diff --git a/config/root-config.in b/config/root-config.in
|
||||
--- a/config/root-config.in
|
||||
+++ b/config/root-config.in
|
||||
@@ -391,7 +391,7 @@ macosxicc)
|
||||
;;
|
||||
macosx64)
|
||||
# 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=7
|
||||
# cannot find the one linked to libGraf if relocated after built
|
||||
if [ $macosx_minor -le 4 ]; then
|
||||
rootlibs="$rootlibs -lfreetype"
|
||||
diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt
|
||||
--- a/cint/ROOT/CMakeLists.txt
|
||||
+++ b/cint/ROOT/CMakeLists.txt
|
||||
@@ -232,9 +232,7 @@ foreach(_name ${CINTINCDLLNAMES})
|
||||
DEPENDS ${HEADER_OUTPUT_PATH}/systypes.h
|
||||
)
|
||||
|
||||
- if(MACOSX_MINOR GREATER 4)
|
||||
set(_ExtraFlag "-D__DARWIN_UNIX03")
|
||||
- endif()
|
||||
|
||||
add_custom_command(OUTPUT ${OutFileName}
|
||||
COMMAND cint_tmp -K -w1 -z${_name} -n${OutFileName} -D__MAKECINT__ -DG__MAKECINT ${_ExtraFlag} -c-2 -Z0 ${InFileName} ${AdditionalHeaderFiles} ${CMAKE_BINARY_DIR}/cint/cint/include/sys/types.h ${CMAKE_SOURCE_DIR}/cint/cint/lib/posix/posix.h
|
||||
Loading…
Add table
Add a link
Reference in a new issue