# avoid memory exhaustion in GNU linker
eval "$(
  declare -f build | \
    sed '
      /make/ i \
        export LDFLAGS="-Wl,--no-keep-memory"
    '
)"

# nss 3.65 adds a global CLEANUP macro in 'nss/pk11hpke.h', collides with
# CLEANUP in enum in IDBTransaction (indexdb)
source+=('seamonkey-2.53.7.1-CLEANUP.patch')
sha256sums+=('7c0a7491ae5f76aa4b0b171c7dbc0bc108d7686da8741398f46a2b9b314152af')
eval "$(
  declare -f prepare | \
    sed '
      /patch.*rust.*/ a \ patch -p1 < ../seamonkey-2.53.7.1-CLEANUP.patch
    '
)"