mrklein / openfoam-os-x

Patches for OpenFOAM(R) to build it on OS X
93 stars 33 forks source link

updates for openfoam2112 #70

Closed olesenm closed 2 years ago

olesenm commented 3 years ago

Hi @mrklein - I still don't have everything to handle the SIP problem properly, but I did make some changes in the current develop branch to shell eval instead of the lib-dir helper and adjusted foamCleanPath to accept -path/-lib entries, which will do more of the same. Maybe there is a universal test for SIP active that we could hack into these to use the shadow "FOAM_DYLD_LIBRARY_PATH" instead?

Besides these changes, it would be good if you tried with setting an auxiliary etc directory (using the FOAM_CONFIG_ETC variable). For example, in your prefs.sh

export FOAM_CONFIG_ETC="etc-osx"

and then populate the various config files directly. For example,

# etc-osx/config.sh/paraview

#----------------------------------*-sh-*--------------------------------------
# OSX: system versions only

_paraviews=(/Applications/[Pp][Aa][Rr][Aa][Vv][Ii][Ee][Ww]*.app)
if [ -d "$_paraviews" ]
then
    unset -f paraview 2>/dev/null
    paraview()
    {
        local _paraviews=(/Applications/[Pp][Aa][Rr][Aa][Vv][Ii][Ee][Ww]*.app)
        "$_paraviews"/Contents/MacOS/paraview "$@"
    }
    export -f paraview

    if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ]
    then
        echo "Using paraview = $_paraviews" 1>&2
    fi
else
    echo 1>&2
    echo "Please download binary Paraview release from" 1>&2
    echo "http://paraview.org and install it in /Applications folder." 1>&2
    echo 1>&2
fi
#------------------------------------------------------------------------------

This should presumably make your life easier when creating the patches.

mrklein commented 2 years ago

@olesenm Thanks for the changes. Unfortunately I did not have time to look into the issue. Guess, changes are to be postponed until 2206 (or patch release of 2112).

olesenm commented 2 years ago

@mrklein - source packs are largely complete: https://sourceforge.net/projects/openfoam/files/v2112/OpenFOAM-v2112.tgz

mrklein commented 2 years ago

Guess, the issue is irrelevant, I have submitted patch for version 2206 to development repository.