imager: 4.4-01 -> 4.5-01

+14 -159
+11 -49
pkgs/by-name/im/imager/clang.patch
··· 1 1 diff --git a/admin/Makefile.def b/admin/Makefile.def 2 - index 43ef322..cad3de2 100644 2 + index facc205..0daceaf 100644 3 3 --- a/admin/Makefile.def 4 4 +++ b/admin/Makefile.def 5 - @@ -306,7 +306,7 @@ endif 5 + @@ -310,7 +310,7 @@ endif 6 6 7 7 # Apple CLANG flags (identical to GCC) 8 8 ifeq ($(GAG_COMPILER_CKIND),clang) ··· 11 11 ifeq ($(RELEASE_MODE),no) 12 12 OPTION_CFLAGS += -Wall 13 13 endif 14 - @@ -356,7 +356,7 @@ endif 14 + @@ -360,7 +360,7 @@ endif 15 15 16 16 # GFORTRAN flags 17 17 ifeq ($(GAG_COMPILER_FKIND),gfortran) ··· 21 21 GLOBAL_FFLAGS += -fsanitize=address -fsanitize=null 22 22 # Can not be used with our memory(ip): 23 23 diff --git a/admin/define-system.sh b/admin/define-system.sh 24 - index f68274d..dd1a9be 100644 24 + index 36d4ab9..0233259 100644 25 25 --- a/admin/define-system.sh 26 26 +++ b/admin/define-system.sh 27 - @@ -279,35 +279,22 @@ EOF 28 - else 29 - GAG_MACHINE=pc 30 - fi 31 - - if which gcc > /dev/null 2>&1; then 32 - - DEFAULT_CCOMPILER=gcc 33 - - fi 34 - - if which g++ > /dev/null 2>&1; then 35 - - DEFAULT_CXXCOMPILER=g++ 36 - - elif which clang++ > /dev/null 2>&1; then 37 - - DEFAULT_CXXCOMPILER=clang++ 38 - - fi 39 - - if which ifort > /dev/null 2>&1; then 40 - - DEFAULT_FCOMPILER=ifort 41 - - elif which gfortran > /dev/null 2>&1; then 42 - - DEFAULT_FCOMPILER=gfortran 43 - - fi 27 + @@ -287,8 +287,8 @@ EOF 28 + fi 44 29 elif [ `uname -p` = "arm" ]; then 45 - defsys_message "WARNING: experimental ARM support" 46 30 GAG_MACHINE=arm64 47 31 - if which gcc > /dev/null 2>&1; then 48 32 - DEFAULT_CCOMPILER=gcc 49 - - fi 50 - - if which g++ > /dev/null 2>&1; then 51 - - DEFAULT_CXXCOMPILER=g++ 52 - - elif which clang++ > /dev/null 2>&1; then 53 - - DEFAULT_CXXCOMPILER=clang++ 54 - - fi 55 - - if which ifort > /dev/null 2>&1; then 56 - - DEFAULT_FCOMPILER=ifort 57 - - elif which gfortran > /dev/null 2>&1; then 58 - - DEFAULT_FCOMPILER=gfortran 59 - - fi 60 - + fi 61 - + if which clang > /dev/null 2>&1; then 62 - + DEFAULT_CCOMPILER=clang 63 - + fi 64 - + if which clang++ > /dev/null 2>&1; then 65 - + DEFAULT_CXXCOMPILER=clang++ 66 - + elif which g++ > /dev/null 2>&1; then 67 - + DEFAULT_CXXCOMPILER=g++ 68 - + fi 69 - + if which ifort > /dev/null 2>&1; then 70 - + DEFAULT_FCOMPILER=ifort 71 - + elif which gfortran > /dev/null 2>&1; then 72 - + DEFAULT_FCOMPILER=gfortran 73 - fi ;; 74 - CYGWIN*) 75 - if [ `uname -m | grep -c "x86_64"` -ne 0 ]; then 33 + + if which clang > /dev/null 2>&1; then 34 + + DEFAULT_CCOMPILER=clang 35 + fi 36 + if which clang++ > /dev/null 2>&1; then 37 + DEFAULT_CXXCOMPILER=clang++
+3 -6
pkgs/by-name/im/imager/package.nix
··· 26 26 in 27 27 28 28 stdenv.mkDerivation (finalAttrs: { 29 - version = "4.4-01"; 29 + version = "4.5-01"; 30 30 pname = "imager"; 31 31 32 32 src = fetchurl { 33 33 # The recommended download link is on Nextcloud instance that 34 34 # requires to accept some general terms of use. Use a mirror at 35 35 # univ-grenoble-alpes.fr instead. 36 - url = "https://cloud.univ-grenoble-alpes.fr/s/J6yEqA6yZ8tX9da/download?path=%2F&files=imager-dec24.tar.gz"; 37 - hash = "sha256-Pq92IsGY4heekm5zNGngnp6J6YiCHYAyuMT2RsD1/9o="; 36 + url = "https://cloud.univ-grenoble-alpes.fr/s/J6yEqA6yZ8tX9da/download?path=%2F&files=imager-may25.tar.gz"; 37 + hash = "sha256-E3JjdVGEQ0I/ogYj0G1OZxfQ3hA+sRgA4LAfHK52Sec="; 38 38 }; 39 39 40 40 nativeBuildInputs = [ ··· 55 55 ]; 56 56 57 57 patches = [ 58 - # Update the Python link flag script from Gildas upstream 59 - # version. This patch will be included in the the IMAGER release. 60 - ./python-ldflags.patch 61 58 # Use Clang as the default compiler on Darwin. 62 59 ./clang.patch 63 60 # Replace hardcoded cpp with GAG_CPP (see below).
-104
pkgs/by-name/im/imager/python-ldflags.patch
··· 1 - diff --git a/admin/python-config-ldflags.py b/admin/python-config-ldflags.py 2 - index 0854698..f397a7c 100644 3 - --- a/admin/python-config-ldflags.py 4 - +++ b/admin/python-config-ldflags.py 5 - @@ -1,38 +1,70 @@ 6 - -#!/usr/bin/env python 7 - +# This scripts retrieves the proper options to be used to link against 8 - +# the libpython, in a machine-independant way. It invokes the official 9 - +# script python-config (which thankfully deals with all the details). 10 - 11 - -# DUPLICATE of "python-config --ldflags", fixed for the library location 12 - +import sys 13 - +newerpython = (sys.version_info[0] == 3 and sys.version_info[1] > 7) 14 - 15 - -# This utility is known to work with: 16 - -# python2.6 (system install) under SL6.4 17 - -# python2.7 (custom install) under SL6.4 18 - -# python3.4 (custom install) under SL6.4 19 - -# python2.7 (system install) under Fedora20 20 - -# python2.7 (Apple install) under MacOSX 21 - -# python2.7 (MacPorts install) under MacOSX 22 - -# python3.4 (MacPorts install) under MacOSX 23 - +if newerpython: 24 - + # From now on avoid duplicating python-config, which evolves on its own. 25 - + # Invoke 'python-config --ldflags --embed'. The embed option (under 26 - + # Python 3) adds the libpython itself, whose name is highly 27 - + # unpredictible under the variety of machines and configurations we 28 - + # support 29 - + import subprocess 30 - + output = subprocess.check_output(['python-config', '--ldflags','--embed']) 31 - + output = output.decode('utf-8') 32 - + #print(output) 33 - 34 - -import sys 35 - -import sysconfig 36 - + args = output.split() 37 - 38 - -pyver = sysconfig.get_config_var('VERSION') 39 - -getvar = sysconfig.get_config_var 40 - + output = '' 41 - + for arg in args: 42 - + # Discard /usr/lib* path which causes troubles on the link command 43 - + # line, as it basically overrides all other custom paths coming after 44 - + # it. No need to put these paths on command line, they are found 45 - + # implicitly by the linker. 46 - + if arg not in ['-L/usr/lib','-L/usr/lib32','-L/usr/lib64']: 47 - + output += arg+' ' 48 - + 49 - + print(output) 50 - 51 - -libs = getvar('LIBS').split() + getvar('SYSLIBS').split() 52 - -if (hasattr(sys,'abiflags')): 53 - - libs.append('-lpython' + pyver + sys.abiflags) 54 - else: 55 - - libs.append('-lpython' + pyver) 56 - + # DUPLICATE of "python-config --ldflags", fixed for the library location 57 - + # This proved to work gracefully up to Python 3.5 (exact limit unclear) 58 - + 59 - + # This utility is known to work with: 60 - + # python2.6 (system install) under SL6.4 61 - + # python2.7 (custom install) under SL6.4 62 - + # python3.4 (custom install) under SL6.4 63 - + # python3.7 (custom install) under Debian12 64 - + # python2.7 (system install) under Fedora20 65 - + # python2.7 (Apple install) under MacOSX 66 - + # python2.7 (MacPorts install) under MacOSX 67 - + # python3.4 (MacPorts install) under MacOSX 68 - + 69 - + import sys 70 - + import sysconfig 71 - + 72 - + pyver = sysconfig.get_config_var('VERSION') 73 - + getvar = sysconfig.get_config_var 74 - + 75 - + libs = getvar('LIBS').split() + getvar('SYSLIBS').split() 76 - + if (hasattr(sys,'abiflags')): 77 - + libs.append('-lpython' + pyver + sys.abiflags) 78 - + else: 79 - + libs.append('-lpython' + pyver) 80 - 81 - -# Add the library path, except /usr/lib* which causes troubles 82 - -# on the link command line, as it basically overrides all other 83 - -# custom paths coming after it. No need to put these paths on 84 - -# command line, they are found implicitly by the linker. 85 - -ldpath = getvar('LIBDIR') 86 - -if ldpath not in ['/usr/lib','/usr/lib32','/usr/lib64']: 87 - - libs.insert(0, '-L' + getvar('LIBDIR')) 88 - + # Add the library path, except /usr/lib* which causes troubles 89 - + # on the link command line, as it basically overrides all other 90 - + # custom paths coming after it. No need to put these paths on 91 - + # command line, they are found implicitly by the linker. 92 - + ldpath = getvar('LIBDIR') 93 - + if ldpath not in ['/usr/lib','/usr/lib32','/usr/lib64']: 94 - + libs.insert(0, '-L' + getvar('LIBDIR')) 95 - 96 - -# Framework (specific for Mac) 97 - -if not getvar('PYTHONFRAMEWORK'): 98 - - libs.extend(getvar('LINKFORSHARED').split()) 99 - + # Framework (specific for Mac) 100 - + if not getvar('PYTHONFRAMEWORK'): 101 - + libs.extend(getvar('LINKFORSHARED').split()) 102 - 103 - -print(' '.join(libs)) 104 - + print(' '.join(libs))