5593c8
# Bootstrap configuration.
5593c8
5593c8
# Copyright (C) 2006-2019 Free Software Foundation, Inc.
5593c8
5593c8
# This program is free software: you can redistribute it and/or modify
5593c8
# it under the terms of the GNU General Public License as published by
5593c8
# the Free Software Foundation; either version 3 of the License, or
5593c8
# (at your option) any later version.
5593c8
5593c8
# This program is distributed in the hope that it will be useful,
5593c8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
5593c8
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5593c8
# GNU General Public License for more details.
5593c8
5593c8
# You should have received a copy of the GNU General Public License
5593c8
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
5593c8
5593c8
5593c8
GNULIB_REVISION=d271f868a8df9bbec29049d01e056481b7a1a263
5593c8
5593c8
# gnulib modules used by this package.
5593c8
# mbswidth is used by gnulib-fix-width.diff's changes to argp rather than
5593c8
# directly.
5593c8
gnulib_modules="
5593c8
  argp
5593c8
  base64
5593c8
  error
5593c8
  fnmatch
5593c8
  getdelim
5593c8
  getline
5593c8
  gettext-h
5593c8
  gitlog-to-changelog
5593c8
  mbswidth
5593c8
  progname
5593c8
  realloc-gnu
5593c8
  regex
5593c8
  save-cwd
5593c8
"
5593c8
5593c8
gnulib_tool_option_extras="\
5593c8
  --no-conditional-dependencies \
5593c8
  --no-vc-files \
5593c8
"
5593c8
5593c8
gnulib_name=libgnu
5593c8
source_base=grub-core/lib/gnulib
5593c8
gnulib_extra_files="
5593c8
  build-aux/install-sh
5593c8
  build-aux/mdate-sh
5593c8
  build-aux/texinfo.tex
5593c8
  build-aux/depcomp
5593c8
  build-aux/config.guess
5593c8
  build-aux/config.sub
5593c8
"
5593c8
5593c8
# Additional xgettext options to use.  Use "\\\newline" to break lines.
5593c8
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
5593c8
 --from-code=UTF-8\\\
5593c8
'
5593c8
5593c8
checkout_only_file=
5593c8
copy=true
5593c8
vc_ignore=
5593c8
5593c8
SKIP_PO=t
5593c8
5593c8
# Build prerequisites
5593c8
buildreq="\
5593c8
autoconf   2.63
5593c8
automake   1.11
5593c8
gettext    0.18.3
5593c8
git        1.5.5
5593c8
tar        -
5593c8
"
5593c8
5593c8
# bootstrap doesn't give us a reasonable way to stop Automake from
5593c8
# overwriting this, so we just copy our version aside and put it back later.
5593c8
cp -a INSTALL INSTALL.grub
5593c8
5593c8
bootstrap_post_import_hook () {
5593c8
  set -e
5593c8
  for patchname in fix-base64 fix-null-deref fix-null-state-deref fix-regcomp-uninit-token \
5593c8
      fix-regexec-null-deref fix-uninit-structure fix-unused-value fix-width no-abort; do
5593c8
    patch -d grub-core/lib/gnulib -p2 \
5593c8
      < "grub-core/lib/gnulib-patches/$patchname.patch"
5593c8
  done
5593c8
  for patchname in \
5593c8
      0001-Support-POTFILES-shell \
5593c8
      0002-Handle-gettext_printf-shell-function \
5593c8
      0003-Make-msgfmt-output-in-little-endian \
5593c8
      0004-Use-SHELL-rather-than-bin-sh; do
5593c8
    patch -d po -p3 \
5593c8
      < "po/gettext-patches/$patchname.patch"
5593c8
  done
5593c8
  FROM_BOOTSTRAP=1 ./autogen.sh
5593c8
  set +e  # bootstrap expects this
5593c8
}
5593c8
5593c8
bootstrap_epilogue () {
5593c8
  mv INSTALL.grub INSTALL
5593c8
}