Skip to content

Commit

Permalink
Gildas: update to 202502b
Browse files Browse the repository at this point in the history
  • Loading branch information
bardeau committed Feb 3, 2025
1 parent 2ac299d commit 807e499
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 129 deletions.
15 changes: 6 additions & 9 deletions science/gildas/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup compilers 1.0
PortGroup active_variants 1.1

name gildas
version 202501a
version 202502b
set my_version [string tolower [clock format [clock scan 2000-[string range ${version} 4 5]-10] -format %b]][string range ${version} 2 3][string range ${version} 6 end]

supported_archs arm64 x86_64
Expand All @@ -31,17 +31,14 @@ master_sites https://www.iram.fr/~gildas/dist/ \
distname ${name}-src-${my_version}
use_xz yes

checksums rmd160 0a8547885911553d5bfd371ec7c751a703d7af30 \
sha256 8fd4224351bfc424699ad943d574ad755bcc6168212d886bb32b0e7532c9e487 \
size 46401688
checksums rmd160 92994e93a681391a7bfb2eea6b40fd219eded9a9 \
sha256 64bc487d47cfc81e36b9eac763597b73fbc442d987e2a95c293c5d786b73e719 \
size 47160356

patch.pre_args-replace -p0 -p1
patchfiles patch-admin-Makefile.def.diff \
patch-admin-Makefile.python.diff \
patch-admin-Makefile.build.diff \
patch-admin-gildas-env.sh.diff \
patch-admin-define-system.sh.diff \
patch-admin-python-config-ldflags.py.diff
patch-admin-define-system.sh.diff

depends_lib path:lib/pkgconfig/gtk+-2.0.pc:gtk2 \
port:libpng \
Expand Down Expand Up @@ -85,7 +82,7 @@ configure {
reinplace -W ${worksrcpath}/admin "s|@CPP@|${configure.cpp}|g" Makefile.def define-system.sh
reinplace -W ${worksrcpath}/admin "s|@CPPFLAGS@|${configure.cppflags}|g" Makefile.def
reinplace -W ${worksrcpath}/admin "s|@LDFLAGS@|${configure.ldflags}|g" Makefile.def
reinplace -W ${worksrcpath}/admin "s|@PYTHON@|${configure.python}|g" Makefile.build Makefile.def Makefile.python gildas-env.sh python-config-ldflags.py
reinplace -W ${worksrcpath}/admin "s|@PYTHON@|${configure.python}|g" define-system.sh
}

build {
Expand Down
11 changes: 0 additions & 11 deletions science/gildas/files/patch-admin-Makefile.build.diff

This file was deleted.

19 changes: 5 additions & 14 deletions science/gildas/files/patch-admin-Makefile.def.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- gildas-src-dec15a/admin/Makefile.def.orig 2015-11-30 13:25:52.000000000 +0100
+++ gildas-src-dec15a/admin/Makefile.def 2015-12-04 16:19:05.000000000 +0100
@@ -72,12 +72,12 @@
--- gildas-src-feb25b/admin/Makefile.def.orig 2025-02-03 12:14:59
+++ gildas-src-feb25b/admin/Makefile.def 2025-02-03 15:20:06
@@ -70,12 +70,12 @@
# The following variables are provided to the user so that he can override
# the preprocessing, compilation and linking options defined by default
# later in this file. User can modify them here.
Expand All @@ -19,21 +19,12 @@

# The following variables are for mandatory GLOBAL definitions.
# They should be modified only in this file.
@@ -219,7 +219,7 @@
@@ -232,7 +232,7 @@
# Fortran preprocessing

# Preprocessor command
-CPP = cpp
+CPP = @CPP@

# Preprocessor generic flags
GLOBAL_CPPFLAGS += -P -traditional -C
@@ -551,7 +551,7 @@
SIC_SYS_LIBS =
SIC_LIB_DEPENDS += $(_GAG_LIBS) $(LEGACY_LIBS)
ifeq ($(PYTHON_PRESENT),yes)
- SIC_SYS_LIBS += $(shell python $(gagadmdir)/python-config-ldflags.py)
+ SIC_SYS_LIBS += $(shell @PYTHON@ $(gagadmdir)/python-config-ldflags.py)
endif
ifeq ($(CFITSIO_PRESENT),yes)
SIC_LIB_DEPENDS += -lcfitsio
GLOBAL_CPPFLAGS += -P -traditional -C
20 changes: 0 additions & 20 deletions science/gildas/files/patch-admin-Makefile.python.diff

This file was deleted.

25 changes: 18 additions & 7 deletions science/gildas/files/patch-admin-define-system.sh.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- gildas-src-feb24a/admin/define-system.sh.orig 2024-02-01 05:00:11
+++ gildas-src-feb24a/admin/define-system.sh 2024-02-01 09:55:06
--- gildas-src-feb25b/admin/define-system.sh.orig 2025-02-03 12:14:59
+++ gildas-src-feb25b/admin/define-system.sh 2025-02-03 15:43:56
@@ -25,7 +25,7 @@
# Return 0 if first argument is "lower or equal" the second argument
# NB: the line return in echo below is more portable than echo -e "\n"
Expand All @@ -9,7 +9,7 @@
}
verlt() {
# Return 0 if first argument is "lower than" second argument
@@ -283,18 +283,18 @@
@@ -272,18 +272,18 @@
else
GAG_MACHINE=pc
fi
Expand All @@ -34,7 +34,7 @@
fi
elif [ `uname -p` = "arm" ]; then
GAG_MACHINE=arm64
@@ -522,10 +522,12 @@
@@ -524,19 +524,19 @@
GAG_COMPILER_FLIBS="-lgfortran"
fi
#
Expand All @@ -47,13 +47,24 @@
+ GAG_COMPILER_CPPFLAGS="$GAG_COMPILER_CPPFLAGS -ffreestanding"
fi
#
export GAG_COMPILER_FFLAGS GAG_COMPILER_FLIBS GAG_COMPILER_CPPFLAGS
@@ -548,7 +550,7 @@
export GAG_COMPILER_FLIBS GAG_COMPILER_CPPFLAGS
export GAG_COMPILER_FFLAGS GAG_COMPILER_SLDFLAGS GAG_COMPILER_FLDFLAGS
#
- if \which python > /dev/null 2>&1; then
- GAG_PYTHON_EXE=python
- elif \which python3 > /dev/null 2>&1; then
- GAG_PYTHON_EXE=python3
+ if \which @PYTHON@ > /dev/null 2>&1; then
+ GAG_PYTHON_EXE=@PYTHON@
else
GAG_PYTHON_EXE=
fi
@@ -564,7 +564,7 @@
# source admin/gildas-env.sh -c ifort (use default ifort e.g. ifort 11) and
# source admin/gildas-env.sh -c ifort14 (i.e. use namely non default ifort 14)
# does not build their binaries in the same integration branch.
- GAG_EXEC_SYSTEM=$GAG_MACHINE-$GAG_TARGET_NAME-$GAG_COMPILER_FEXE$GAG_CONFIG
+ GAG_EXEC_SYSTEM=$GAG_MACHINE-$GAG_TARGET_NAME-$GAG_COMPILER_FKIND
export GAG_COMP_SYSTEM GAG_EXEC_SYSTEM
export GAG_MACHINE GAG_CONFIG
export GAG_ENV_KIND GAG_ENV_NAME GAG_ENV_VERS GAG_ENV_VERS_FULL
export GAG_ENV_KIND GAG_ENV_NAME GAG_ENV_VERS
63 changes: 6 additions & 57 deletions science/gildas/files/patch-admin-gildas-env.sh.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- gildas-src-dec22a/admin/gildas-env.sh.orig 2022-12-01 05:00:13
+++ gildas-src-dec22a/admin/gildas-env.sh 2022-12-02 09:35:21
@@ -238,19 +238,19 @@
--- gildas-src-feb25b/admin/gildas-env.sh.orig 2025-02-03 12:14:59
+++ gildas-src-feb25b/admin/gildas-env.sh 2025-02-03 15:34:33
@@ -250,19 +250,19 @@
FFTW3_PRESENT=no
FFTW3F_PRESENT=no
#
Expand Down Expand Up @@ -31,65 +31,14 @@
+# done
+# IFS=$OLDIFS
#
if [ "$GAG_CONFIG" = -openmp ]; then
if [ "$GAG_CONFIG" != -no_openmp ]; then
gagenv_message "FFTW v3 are not supported in OpenMP mode. Default to GILDAS FFT."
@@ -397,24 +397,24 @@
SQLITE3_PRESENT=no
SETUPTOOLS_PRESENT=no
PYTHONCONFIG_PRESENT=no
- if \which python > /dev/null 2>&1; then
+ if \which @PYTHON@ > /dev/null 2>&1; then
# Check the version of python the user is currently using
- if python -V 2>&1 > /dev/null 2>&1; then
- PYTHON_VERS_FULL=`python -V 2>&1 | cut -d' ' -f2`
+ if @PYTHON@ -V 2>&1 > /dev/null 2>&1; then
+ PYTHON_VERS_FULL=`@PYTHON@ -V 2>&1 | cut -d' ' -f2`
PYTHON_VERS=`echo $PYTHON_VERS_FULL | \sed "s%\([0-9]\.[0-9][0-9]*\).*%\1%"`
# Search for Python header and library. kernel/python/binding/setup.py
# does exactly the same, so this should be consistent
- PYTHON_INC_DIR=`python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
+ PYTHON_INC_DIR=`@PYTHON@ -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
if [ -e "$PYTHON_INC_DIR/Python.h" ]; then PYTHON_INC=yes; else PYTHON_INC=no; fi
- PYTHON_LIB_DIR=`python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"`
+ PYTHON_LIB_DIR=`@PYTHON@ -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"`
PYTHON_LIB=yes # libpython name on the various supported systems is just
# unpredictible. Can not check in advance if the linker will
# find it or not. See also our script python-config-ldflags.py
#
# Now search for Numpy
- if python -c "import numpy" > /dev/null 2>&1; then
+ if @PYTHON@ -c "import numpy" > /dev/null 2>&1; then
NUMPY_PRESENT=yes
- NUMPY_INC_DIR=`python -c "import numpy; print(numpy.__path__[0] + '/core/include')"`
+ NUMPY_INC_DIR=`@PYTHON@ -c "import numpy; print(numpy.__path__[0] + '/core/include')"`
if [ -e "$NUMPY_INC_DIR/numpy/arrayobject.h" ]; then
NUMPY_INC_PRESENT=yes
else
@@ -422,15 +422,15 @@
fi
fi
# Search for sqlite3
- if python -c "import sqlite3" > /dev/null 2>&1; then
+ if @PYTHON@ -c "import sqlite3" > /dev/null 2>&1; then
SQLITE3_PRESENT=yes
fi
# Search for setuptools
- if python -c "import setuptools" > /dev/null 2>&1; then
+ if @PYTHON@ -c "import setuptools" > /dev/null 2>&1; then
SETUPTOOLS_PRESENT=yes
fi
# Search for python-config
- if \which python-config > /dev/null 2>&1; then
+ if \which @PYTHON@-config > /dev/null 2>&1; then
PYTHONCONFIG_PRESENT=yes
fi
fi
@@ -740,6 +740,8 @@
@@ -760,6 +760,8 @@
# environment variables:
#
unset GAG_LIB_DEP_PATH GAG_INC_DEP_PATH # Incremented by detection functions
+ GAG_INC_DEP_PATH=@PREFIX@/include
+ GAG_LIB_DEP_PATH=@PREFIX@/lib
#
gagenv_detect_atm
gagenv_detect_openmp
gagenv_message ""
11 changes: 0 additions & 11 deletions science/gildas/files/patch-admin-python-config-ldflags.py.diff

This file was deleted.

0 comments on commit 807e499

Please sign in to comment.