mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: add stub for config.sh/readline (#3427)
- add homebrew support for readline in foamConfigurePaths
This commit is contained in:
@ -120,6 +120,7 @@ Components specified by absolute path
|
|||||||
-kahip-path DIR Path for 'KAHIP_ARCH_PATH' (overrides -kahip)
|
-kahip-path DIR Path for 'KAHIP_ARCH_PATH' (overrides -kahip)
|
||||||
-metis-path DIR Path for 'METIS_ARCH_PATH' (overrides -metis)
|
-metis-path DIR Path for 'METIS_ARCH_PATH' (overrides -metis)
|
||||||
-petsc-path DIR Path for 'PETSC_ARCH_PATH' (overrides -petsc)
|
-petsc-path DIR Path for 'PETSC_ARCH_PATH' (overrides -petsc)
|
||||||
|
-readline-path Path for 'READLINE_ARCH_PATH'
|
||||||
-scotch-path DIR Path for 'SCOTCH_ARCH_PATH' (overrides -scotch)
|
-scotch-path DIR Path for 'SCOTCH_ARCH_PATH' (overrides -scotch)
|
||||||
|
|
||||||
-gmp-path DIR Path for 'GMP_ARCH_PATH' (in cgal config)
|
-gmp-path DIR Path for 'GMP_ARCH_PATH' (in cgal config)
|
||||||
@ -128,7 +129,7 @@ Components specified by absolute path
|
|||||||
Components specified by homebrew (treat like system locations)
|
Components specified by homebrew (treat like system locations)
|
||||||
Sets version as system, path from brew --prefix
|
Sets version as system, path from brew --prefix
|
||||||
-adios-brew, -adios2-brew, -boost-brew, -cgal-brew,
|
-adios-brew, -adios2-brew, -boost-brew, -cgal-brew,
|
||||||
-fftw-brew, -kahip-brew, -metis-brew, -scotch-brew
|
-fftw-brew, -kahip-brew, -metis-brew, -readline-brew -scotch-brew
|
||||||
|
|
||||||
-with-homebrew Shortcut for selecting all the above
|
-with-homebrew Shortcut for selecting all the above
|
||||||
|
|
||||||
@ -500,6 +501,7 @@ then
|
|||||||
-fftw-brew \
|
-fftw-brew \
|
||||||
-kahip-brew \
|
-kahip-brew \
|
||||||
-metis-brew \
|
-metis-brew \
|
||||||
|
-readline-brew \
|
||||||
-scotch-brew \
|
-scotch-brew \
|
||||||
"$@"
|
"$@"
|
||||||
fi
|
fi
|
||||||
@ -1174,6 +1176,35 @@ CONFIG_CSH
|
|||||||
adjusted=true
|
adjusted=true
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-readline-path)
|
||||||
|
# Replace READLINE_ARCH_PATH=...
|
||||||
|
getOptionValue "$@"; shift "${nOptArgs:-0}"
|
||||||
|
|
||||||
|
if [ -n "$optValue" ]
|
||||||
|
then
|
||||||
|
# Remove leading '#config#' marker
|
||||||
|
removeEtcConfigMarker config.sh/readline READLINE_ARCH_PATH
|
||||||
|
|
||||||
|
replaceEtc config.sh/readline READLINE_ARCH_PATH "\"$optValue\""
|
||||||
|
adjusted=true
|
||||||
|
else
|
||||||
|
: "${adjusted:=empty}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
-readline-brew)
|
||||||
|
brewName=readline; optValue="${brewName}-system"
|
||||||
|
|
||||||
|
# Remove leading '#config#' marker
|
||||||
|
removeEtcConfigMarker config.sh/readline READLINE_ARCH_PATH
|
||||||
|
|
||||||
|
# Replace READLINE_ARCH_PATH=...
|
||||||
|
replaceBrewEtc config.sh/readline READLINE_ARCH_PATH "$brewName"
|
||||||
|
|
||||||
|
# Replaced READLINE_ARCH_PATH=...
|
||||||
|
adjusted=true
|
||||||
|
;;
|
||||||
|
|
||||||
-scotch | -scotchVersion | --scotchVersion)
|
-scotch | -scotchVersion | --scotchVersion)
|
||||||
# Replace SCOTCH_VERSION=...
|
# Replace SCOTCH_VERSION=...
|
||||||
getOptionValue "$@"; shift "${nOptArgs:-0}"
|
getOptionValue "$@"; shift "${nOptArgs:-0}"
|
||||||
|
|||||||
27
etc/config.sh/readline
Normal file
27
etc/config.sh/readline
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#----------------------------------*-sh-*--------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2025 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# File
|
||||||
|
# etc/config.sh/readline
|
||||||
|
# [optional/experimental: not sourced by OpenFOAM-*/etc/bashrc]
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Example setup for READLINE locations
|
||||||
|
#
|
||||||
|
# The leading '#config#' marker provides an edit point for
|
||||||
|
# foamConfigurePaths
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
|
||||||
|
|
||||||
|
#config# export READLINE_ARCH_PATH=...
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user