summaryrefslogtreecommitdiffstats
path: root/bootstrap.conf
blob: caee513b7bc282c515829ad2c837358435973fae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# Bootstrap configuration.

# Copyright (C) 2006-2018 Free Software Foundation, Inc.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.


GNULIB_REVISION=d1b40e09c9c04d5c1ff120373397c6180bc16beb

# gnulib modules used by this package.
gnulib_modules="
  argp
  array-list
  attribute
  c99
  canonicalize
  closedir
  dirent
  dirname
  error
  fcntl-h
  flock
  fnmatch-gnu
  fstat
  getline
  gettext-h
  gitlog-to-changelog
  glob
  gnupload
  hash-map
  hash-pjw-bare
  hash-set
  havelib
  idpriv-drop
  idpriv-droptemp
  lchown
  lib-ignore
  linkedhash-list
  localcharset
  manywarnings
  memmem
  minmax
  mkdtemp
  mkstemp
  nanosleep
  nonblocking
  openat
  opendir
  progname
  raise
  rbtree-list
  regex
  rename
  renameat
  setenv
  sigaction
  signal-h
  sigpipe
  sigprocmask
  stat-time
  stdbool
  stpcpy
  strcase
  strcasestr
  strerror
  strsep
  tempname
  termios
  timespec
  unlinkat
  utimens
  verror
  warnings
  xalloc
  xgetcwd
  xlist
  xmap
  xset
  xstdopen
  xstrndup
  xvasprintf
  year2038-recommended
"

gnulib_tool_option_extras="\
 --no-conditional-dependencies \
 --libtool \
 --macro-prefix=gl \
 --no-vc-files \
"

# bootstrap's --skip-po option really just controls its own downloads, but
# it's somewhat useful to provide a way to skip the downloads performed by
# gnulib-tool as well.  Since we always suppress bootstrap's downloads due
# to maintaining man-db's own translations manually, we need to parse the
# command line ourselves to find out whether --skip-po was explicitly
# passed.
explicit_skip_po=
for option; do
  case $option in
    --skip-po)
      explicit_skip_po=t
      ;;
  esac
done

if [ -z "$explicit_skip_po" ]; then
  gnulib_tool_option_extras="$gnulib_tool_option_extras --po-base=gl/ref-po --po-domain=man-db"
fi

# This doesn't currently exist, but we set it to avoid confusion with 'gl'
# as the local output directory.
local_gl_dir=gnulib-local

gnulib_name=libgnu
source_base=gl/lib
m4_base=gl/m4

COPYRIGHT_HOLDER='Colin Watson <cjwatson@debian.org>'
MSGID_BUGS_ADDRESS="$COPYRIGHT_HOLDER"

# Additional xgettext options to use.  Use "\\\newline" to break lines.
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
 --from-code=UTF-8\\\
 --flag=debug:1:c-format\\\
 --flag=debug_error:1:c-format\\\
 --flag=fatal:2:c-format\\\
'

checkout_only_file=
copy=true
vc_ignore=

SKIP_PO=t

# Build prerequisites
buildreq="\
autoconf   2.64
automake   1.14
autopoint  0.18.3
gettext    0.18.3
git        1.5.5
tar        -
"

bootstrap_post_import_hook () {
  patch -s -p1 <patches/argp-domain.patch

  if [ -z "$explicit_skip_po" ]; then
    # gnulib-tool installs its own versions of gettext infrastructure files
    # such as po/Makefile.in.in, which don't necessarily match our
    # configured AM_GNU_GETTEXT_VERSION.  To cope with this, we tell
    # gnulib-tool to install into a temporary directory (using --po-base
    # above) and fix things up here.
    cp -a gl/ref-po/LINGUAS gl/ref-po/POTFILES.in gl/po/
    sed 's,^subdir *=.*,subdir = gl/po,' gl/ref-po/Makevars >gl/po/Makevars
    if ls gl/ref-po/*.po >/dev/null 2>&1; then
      cp -a gl/ref-po/*.po gl/po/
    fi
    rm -rf gl/ref-po
  fi
}

bootstrap_epilogue () {
  # If --copy is not used, then INSTALL may be a symbolic link, in which
  # case a simple "mv" could leave it pointing to the wrong target.  Arrange
  # (reasonably portably) for the target to end up as a regular file no
  # matter what.
  rm -f docs/INSTALL.autoconf
  cp -Lp INSTALL docs/INSTALL.autoconf
  rm -f INSTALL
}