# This patch removes all need for the ThirdParty files of OpenFOAM. # Derived from EasyBuild patch by Ward Poelmans . # Modified for GNU Guix by Paul Garlick . diff -ur OpenFOAM-4.x-version-4.1.org/applications/utilities/mesh/manipulation/setSet/Allwmake OpenFOAM-4.x-version-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake --- OpenFOAM-4.x-version-4.1.org/applications/utilities/mesh/manipulation/setSet/Allwmake +++ OpenFOAM-4.x-version-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake @@ -9,7 +9,7 @@ # # use readline if available # -if [ -f /usr/include/readline/readline.h ] +if true then echo "Found -- enabling readline support." export COMP_FLAGS="-DHAS_READLINE" diff -ur OpenFOAM-4.x-version-4.1.org/etc/bashrc OpenFOAM-4.x-version-4.1/etc/bashrc --- OpenFOAM-4.x-version-4.1.org/etc/bashrc +++ OpenFOAM-4.x-version-4.1/etc/bashrc @@ -43,8 +43,10 @@ # Please set to the appropriate path if the default is not correct. # [ $BASH_SOURCE ] && \ -export FOAM_INST_DIR=$(cd ${BASH_SOURCE%/*/*/*} && pwd -P) || \ +export FOAM_INST_DIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) || \ export FOAM_INST_DIR=$HOME/$WM_PROJECT +# For GNU Guix: set initially for build then re-set at runtime +# # export FOAM_INST_DIR=~$WM_PROJECT # export FOAM_INST_DIR=/opt/$WM_PROJECT # export FOAM_INST_DIR=/usr/local/$WM_PROJECT diff -ur OpenFOAM-4.x-version-4.1.org/etc/config.sh/CGAL OpenFOAM-4.x-version-4.1/etc/config.sh/CGAL --- OpenFOAM-4.x-version-4.1.org/etc/config.sh/CGAL +++ OpenFOAM-4.x-version-4.1/etc/config.sh/CGAL @@ -36,37 +36,7 @@ # #------------------------------------------------------------------------------ -boost_version=boost-system -cgal_version=cgal-system -#cgal_version=CGAL-4.8 - -if [ -z "$SOURCE_CGAL_VERSIONS_ONLY" ] -then - - common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_CO
;; -*- mode: scheme; -*-
;; This is an operating-system configuration template of a
;; 64-bit minimal system for a Raspberry Pi with local storage.

;; It neither installs firmware nor device-tree files for the Raspberry Pi.
;; It just assumes them to be existing in boot/efi in the same way that some
;; UEFI firmware with ACPI data is usually assumed to be existing on PCs.

;; It expects the boot-partition to be mounted as boot/efi in the same way
;; as it is usually expeted on PCs with UEFI firmware.

(use-modules (gnu)
             (gnu artwork)
             (gnu system nss))
(use-service-modules admin
                     avahi
                     networking
                     ssh)
(use-package-modules linux
                     raspberry-pi
                     ssh)

(define-public raspberry-pi-64
  (operating-system
    (host-name "raspberrypi-guix")
    (timezone "Europe/Berlin")
    (bootloader (bootloader-configuration
                 (bootloader grub-efi-bootloader-chain-raspi-64)
                 (targets (list "/boot/efi"))
                 (theme (grub-theme
                         (resolution '(1920 . 1080))
                         (image (file-append
                                 %artwork-repository
                                 "/grub/GuixSD-fully-black-16-9.svg"))))))
    (kernel (customize-linux #:linux linux-libre-arm64-generic
                             ;; It is possible to use a specific defconfig
                             ;; file, for example the "bcmrpi3_defconfig" with
                             ;; the variable shown below.  Unfortunately the
                             ;; kernel built from the linux-libre sources with
                             ;; this defconfig file does not boot.
                             ;;#:extra-version "gnu-bcmrpi3"
                             ;;#:defconfig %bcmrpi3-defconfig
                             ))
    (initrd-modules '())
    (file-systems (cons* (file-system
                           (mount-point "/")
                           (type "ext4")
                           (device (file-system-label "Guix")))
                         (file-system
                           (mount-point "/boot/efi")
                           (type "vfat")
                           (device (file-system-label "EFI")))
                         %base-file-systems))
    (swap-devices (list (swap-space
                         (target "/run/swapfile"))))
    (users (cons* (user-account
                   (name "pi")
                   (group "users")
                   (supplementary-groups '("wheel" "netdev" "audio" "video"))
                   (home-directory "/home/pi"))
                  %base-user-accounts))
    (packages (cons* openssh
                     %base-packages))
    (services (cons* (service avahi-service-type)
                     (service dhcp-client-service-type)
                     (service ntp-service-type)
                     (service openssh-service-type
                              (openssh-configuration
                               (x11-forwarding? #t)))
                     %base-services))
    (name-service-switch %mdns-host-lookup-nss)))

raspberry-pi-64
/options --- OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/ptscotchDecomp/Make/options +++ OpenFOAM-4.x-version-4.1/src/parallel/decompose/ptscotchDecomp/Make/options @@ -5,8 +5,7 @@ $(PFLAGS) $(PINC) \ -I$(SCOTCH_ROOT)/include \ -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \ - -I/usr/include/scotch \ -I../decompositionMethods/lnInclude LIB_LIBS = \ - -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt + -L$(SCOTCH_ROOT)/lib -L$(MPI_ARCH_PATH)/lib -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt diff -ur OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/scotchDecomp/Make/options OpenFOAM-4.x-version-4.1/src/parallel/decompose/scotchDecomp/Make/options --- OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/scotchDecomp/Make/options +++ OpenFOAM-4.x-version-4.1/src/parallel/decompose/scotchDecomp/Make/options @@ -9,8 +9,7 @@ $(PFLAGS) $(PINC) \ -I$(SCOTCH_ROOT)/include \ -I$(SCOTCH_ARCH_PATH)/include \ - -I/usr/include/scotch \ -I../decompositionMethods/lnInclude LIB_LIBS = \ - -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt + -L$(SCOTCH_ROOT)/lib -lscotch -lscotcherrexit -lrt diff -ur OpenFOAM-4.x-version-4.1.org/wmake/makefiles/general OpenFOAM-4.x-version-4.1/wmake/makefiles/general --- OpenFOAM-4.x-version-4.1.org/wmake/makefiles/general +++ OpenFOAM-4.x-version-4.1/wmake/makefiles/general @@ -33,7 +33,6 @@ # The Makefile uses a POSIX shell #------------------------------------------------------------------------------ -SHELL = /bin/sh #------------------------------------------------------------------------------ diff -ur OpenFOAM-4.x-version-4.1.org/wmake/wmake OpenFOAM-4.x-version-4.1/wmake/wmake --- OpenFOAM-4.x-version-4.1.org/wmake/wmake +++ OpenFOAM-4.x-version-4.1/wmake/wmake @@ -163,7 +163,7 @@ then if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ] then - lockDir=$HOME/.$WM_PROJECT/.wmake + lockDir=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P)/.$WM_PROJECT/.wmake if [ -d $lockDir ] then diff -ur OpenFOAM-4.x-version-4.1.org/wmake/wmakeScheduler OpenFOAM-4.x-version-4.1/wmake/wmakeScheduler --- OpenFOAM-4.x-version-4.1.org/wmake/wmakeScheduler +++ OpenFOAM-4.x-version-4.1/wmake/wmakeScheduler @@ -53,7 +53,7 @@ # csh sets HOST, bash sets HOSTNAME : ${HOST:=$HOSTNAME} -lockDir=$HOME/.$WM_PROJECT/.wmake +lockDir=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P)/.$WM_PROJECT/.wmake # Fallback - 1 core on current host : ${WM_HOSTS:=$HOST:1} diff -ur OpenFOAM-4.x-version-4.1.org/wmake/wmakeSchedulerUptime OpenFOAM-4.x-version-4.1/wmake/wmakeSchedulerUptime --- OpenFOAM-4.x-version-4.1.org/wmake/wmakeSchedulerUptime +++ OpenFOAM-4.x-version-4.1/wmake/wmakeSchedulerUptime @@ -53,7 +53,7 @@ # csh sets HOST, bash sets HOSTNAME : ${HOST:=$HOSTNAME} -lockDir=$HOME/.$WM_PROJECT/.wmake +lockDir=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P)/.$WM_PROJECT/.wmake # Fallback - 1 core on current host : ${WM_HOSTS:=$HOST:1} diff -ur OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/metisDecomp/metisDecomp.C OpenFOAM-4.x-version-4.1/src/parallel/decompose/metisDecomp/metisDecomp.C --- OpenFOAM-4.x-version-4.1.org/src/parallel/decompose/metisDecomp/metisDecomp.C +++ OpenFOAM-4.x-version-4.1/src/parallel/decompose/metisDecomp/metisDecomp.C @@ -67,7 +67,7 @@ // Processor weights initialised with no size, only used if specified in // a file - Field processorWeights; + Field processorWeights; // Cell weights (so on the vertices of the dual) List