diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-28 04:02:14 +0200 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-28 04:02:14 +0200 |
commit | 7f45fee52a693123c5027e554fa38a8dc0debd40 (patch) | |
tree | d80d200737e36b48ec5b2d5b5e30a545700d88f9 /pkgs/applications/science/astronomy | |
parent | 19c30e016f04874d60ed0922bf58be4aa9a15e53 (diff) | |
parent | 32a79f412e8665f3d0b17833f73914f9e9549a0d (diff) |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/applications/science/astronomy')
4 files changed, 94 insertions, 31 deletions
diff --git a/pkgs/applications/science/astronomy/gildas/aarch64.patch b/pkgs/applications/science/astronomy/gildas/aarch64.patch deleted file mode 100644 index 40696a03dec71..0000000000000 --- a/pkgs/applications/science/astronomy/gildas/aarch64.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN gildas-src-jul18a/admin/define-system.sh gildas-src-jul18a.aarch64/admin/define-system.sh ---- gildas-src-jul18a/admin/define-system.sh 2018-06-12 15:22:32.000000000 +0200 -+++ gildas-src-jul18a.aarch64/admin/define-system.sh 2018-07-21 13:05:52.000000000 +0200 -@@ -174,7 +174,7 @@ - DEFAULT_CONFIG= # Default config is empty - case `uname` in - Linux) -- if [ `uname -m | grep -c "x86_64"` -ne 0 ]; then -+ if [ `uname -m | grep -c "64"` -ne 0 ]; then - GAG_MACHINE=x86_64 - else - GAG_MACHINE=pc diff --git a/pkgs/applications/science/astronomy/gildas/clang.patch b/pkgs/applications/science/astronomy/gildas/clang.patch index 4d6654a99aee1..aee010835248e 100644 --- a/pkgs/applications/science/astronomy/gildas/clang.patch +++ b/pkgs/applications/science/astronomy/gildas/clang.patch @@ -1,22 +1,77 @@ -diff -ruN gildas-src-jun18a/admin/define-system.sh gildas-src-jun18a.clang/admin/define-system.sh ---- gildas-src-jun18a/admin/define-system.sh 2018-03-12 11:07:57.000000000 +0100 -+++ gildas-src-jun18a.clang/admin/define-system.sh 2018-06-12 14:56:14.000000000 +0200 -@@ -218,13 +218,13 @@ +diff --git a/admin/Makefile.def b/admin/Makefile.def +index 932d18f102..309114e339 100644 +--- a/admin/Makefile.def ++++ b/admin/Makefile.def +@@ -310,7 +310,7 @@ endif + + # Apple CLANG flags (identical to GCC) + ifeq ($(GAG_COMPILER_CKIND),clang) +- GLOBAL_CFLAGS += -pipe -fPIC ++ GLOBAL_CFLAGS += -fPIC + ifeq ($(RELEASE_MODE),no) + OPTION_CFLAGS += -Wall + endif +@@ -360,7 +360,7 @@ endif + + # GFORTRAN flags + ifeq ($(GAG_COMPILER_FKIND),gfortran) +- GLOBAL_FFLAGS += -J$(moddir) -pipe -fno-backslash -fno-range-check ++ GLOBAL_FFLAGS += -J$(moddir) -fno-backslash -fno-range-check + ifeq ($(GAG_USE_SANITIZE),yes) + GLOBAL_FFLAGS += -fsanitize=address -fsanitize=null + # Can not be used with our memory(ip): +diff --git a/admin/define-system.sh b/admin/define-system.sh +index b6eda9fdfd..704050a9ac 100644 +--- a/admin/define-system.sh ++++ b/admin/define-system.sh +@@ -272,34 +272,23 @@ EOF else GAG_MACHINE=pc fi - if which gcc > /dev/null 2>&1; then - DEFAULT_CCOMPILER=gcc -+ if which clang > /dev/null 2>&1; then -+ DEFAULT_CCOMPILER=clang - fi +- fi - if which g++ > /dev/null 2>&1; then - DEFAULT_CXXCOMPILER=g++ - elif which clang++ > /dev/null 2>&1; then -+ if which clang++ > /dev/null 2>&1; then - DEFAULT_CXXCOMPILER=clang++ -+ elif which g++ > /dev/null 2>&1; then -+ DEFAULT_CXXCOMPILER=g++ - fi - if which ifort > /dev/null 2>&1; then - DEFAULT_FCOMPILER=ifort +- DEFAULT_CXXCOMPILER=clang++ +- fi +- if which ifort > /dev/null 2>&1; then +- DEFAULT_FCOMPILER=ifort +- elif which gfortran > /dev/null 2>&1; then +- DEFAULT_FCOMPILER=gfortran +- fi +- elif [ `uname -p` = "arm" ]; then ++ elif [ `uname -p` = "arm" ]; then + GAG_MACHINE=arm64 +- if which gcc > /dev/null 2>&1; then +- DEFAULT_CCOMPILER=gcc +- fi +- if which clang++ > /dev/null 2>&1; then +- DEFAULT_CXXCOMPILER=clang++ +- elif which g++ > /dev/null 2>&1; then +- DEFAULT_CXXCOMPILER=g++ +- fi +- if which ifort > /dev/null 2>&1; then +- DEFAULT_FCOMPILER=ifort +- elif which gfortran > /dev/null 2>&1; then +- DEFAULT_FCOMPILER=gfortran +- fi ++ fi ++ if which clang > /dev/null 2>&1; then ++ DEFAULT_CCOMPILER=clang ++ elif which gcc > /dev/null 2>&1; then ++ DEFAULT_CCOMPILER=gcc ++ fi ++ if which clang++ > /dev/null 2>&1; then ++ DEFAULT_CXXCOMPILER=clang++ ++ elif which g++ > /dev/null 2>&1; then ++ DEFAULT_CXXCOMPILER=g++ ++ fi ++ if which ifort > /dev/null 2>&1; then ++ DEFAULT_FCOMPILER=ifort ++ elif which gfortran > /dev/null 2>&1; then ++ DEFAULT_FCOMPILER=gfortran + fi ;; + CYGWIN*) + if [ `uname -m | grep -c "x86_64"` -ne 0 ]; then diff --git a/pkgs/applications/science/astronomy/gildas/cpp-darwin.patch b/pkgs/applications/science/astronomy/gildas/cpp-darwin.patch new file mode 100644 index 0000000000000..09085c29bf944 --- /dev/null +++ b/pkgs/applications/science/astronomy/gildas/cpp-darwin.patch @@ -0,0 +1,17 @@ +diff --git a/admin/Makefile.def b/admin/Makefile.def +index 0395d9d4f0..932d18f102 100644 +--- a/admin/Makefile.def ++++ b/admin/Makefile.def +@@ -228,7 +228,11 @@ GLOBAL_DIRTY = $(builddir) *~ TAGS ChangeLog* Makefile.bak + # Fortran preprocessing + + # Preprocessor command +-CPP = cpp ++ifdef GAG_CPP ++ CPP = $(GAG_CPP) ++else ++ CPP = cpp ++endif + + # Preprocessor generic flags + GLOBAL_CPPFLAGS += -P -traditional -C diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index b5b92bd8fe4f8..5767efab733cb 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -7,8 +7,8 @@ let in stdenv.mkDerivation rec { - srcVersion = "aug23a"; - version = "20230801_a"; + srcVersion = "apr24a"; + version = "20240401_a"; pname = "gildas"; src = fetchurl { @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { # source code of the previous release to a different directory urls = [ "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.xz" "http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.xz" ]; - sha256 = "sha256-jlyv2K1V+510C4uLek4oofm13d40nGJ46wqjW+tjfq4="; + sha256 = "sha256-Eq6S5S8xrhkCo6O2wUaHnoMDVG9WeiSurGvOc+2JKbM="; }; nativeBuildInputs = [ pkg-config groff perl getopt gfortran which ]; @@ -24,10 +24,14 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2-x11 lesstif cfitsio python3Env ncurses ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation ]); - patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ]; + patches = [ ./wrapper.patch ] + ++ lib.optionals stdenv.isDarwin ([ ./clang.patch ./cpp-darwin.patch ]); env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument"; + # Workaround for https://github.com/NixOS/nixpkgs/issues/304528 + env.GAG_CPP = lib.optionalString stdenv.isDarwin "${gfortran.outPath}/bin/cpp"; + NIX_LDFLAGS = lib.optionalString stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks"); configurePhase='' @@ -66,7 +70,6 @@ stdenv.mkDerivation rec { license = lib.licenses.free; maintainers = [ lib.maintainers.bzizou lib.maintainers.smaret ]; platforms = lib.platforms.all; - broken = stdenv.isDarwin && stdenv.isAarch64; }; } |