# symlink for 32-bit Pascal compiler

# temporary:
# the package has been built wrongly in the past, so we have to force
# a ppc386 symlink in build (PP variable) because the Makefile is trying to
# guess the target platform by executing fpc

eval "$(
  declare -f package | \
    sed '
      /"\$CARCH" = "x86_64"/ {
        p
        s@ppcx64@ppc386@g
        s@x86_64@i686@
        p
        s@i686@i486@
        p
        s@i486@pentium4@
      }
      s@NOGDB=1@NOGDB=1 PP=/usr/lib/fpc/$pkgver/ppc386 @
    '
  declare -f build | \
    sed '
      s@NOGDB=1@NOGDB=1 PP=/usr/lib/fpc/$pkgver/ppc386 @
    '
)"