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 184 185 186 187 188 189 190 191
|
# Bootstrap configuration.
# Copyright (C) 2021-2025 Simon Josefsson
# Copyright (C) 2006-2023 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=c89cd2fbd3b9f3d7c5a146247256599714c91ec7
gnulib_name=libgl
source_base=gl
tests_base=gltests
COPYRIGHT_HOLDER='Simon Josefsson'
checkout_only_file=.gitignore
# gnulib modules used by this package.
gnulib_modules="
autobuild
close
connect
error
getaddrinfo
getopt-gnu
getpass-gnu
git-version-gen
gitlog-to-changelog
manywarnings
netdb-h
netinet_in-h
pmccabe2html
poll
progname
quote
readline
readme-release
recv
shutdown
socket
striconv
strtok_r
sys_time-h
unistd-h
update-copyright
valgrind-tests
vasprintf
version-etc
version-stamp
xalloc
"
libgnulib_modules="
base64
c-ctype
crypto/gc
crypto/gc-hmac-md5
crypto/gc-hmac-sha1
crypto/gc-hmac-sha256
crypto/gc-md5
crypto/gc-pbkdf2
crypto/gc-random
crypto/gc-sha1
crypto/gc-sha256
getline
gettext-h
gss-extra
lib-msvc-compat
lib-symbol-versions
lib-symbol-visibility
memmem
memxor
minmax
strndup
strnlen
strverscmp
vasprintf
"
# Additional xgettext options to use. Use "\\\newline" to break lines.
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
--from-code=UTF-8\\\
--flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
--flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
--flag=wrapf:1:c-format\\\
'
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
# appears in configure.ac, exclude some unnecessary files.
# Without grep's -E option (not portable enough, pre-configure),
# the following test is ugly. Also, this depends on the existence
# of configure.ac, not the obsolescent-named configure.in. But if
# you're using this infrastructure, you should care about such things.
gettext_external=0
grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
gettext_external=1
grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
gettext_external=1
if test $gettext_external = 1; then
# Gettext supplies these files, but we don't need them since
# we don't have an intl subdirectory.
excluded_files='
m4/glibc2.m4
m4/intdiv0.m4
m4/lcmessage.m4
m4/lock.m4
m4/printf-posix.m4
m4/size_max.m4
m4/uintmax_t.m4
m4/ulonglong.m4
m4/visibility.m4
m4/xsize.m4
'
fi
# The following --avoid's were added to fix Mingw. The problem was
# that they ended up in gl/ but not lib/gl and lib/ called the
# function but not in any way that needed replacement. Thus it caused
# a rpl_fopen or rpl_strdup link failure.
#
# fopen: gnulib replaces it because 1) to read /dev/null properly, and
# 2) to handle "x" and "e" modifiers. We use neither.
# strdup: gnulib replaces it to get better errno.
gnulib_tool_option_extras="--without-tests --no-conditional-dependencies --avoid=fopen --avoid=fopen-gnu --avoid=strdup-posix"
# Build prerequisites
buildreq="\
autoconf 2.64
automake 1.13
git 1.5.5
tar -
"
# Prime po/*.po from fall-back copy stored in git.
for po_in in po/*.po.in; do
po=$(echo $po_in | sed 's/.in//')
test -f $po || cp -v $po_in $po
done
ls po/*.po | sed 's|.*/||; s|\.po$||' > po/LINGUAS
bootstrap_post_import_hook ()
{
${GNULIB_SRCDIR}/gnulib-tool --import --lib=liblgl --source-base=lib/gl --local-dir=lib/gl --m4-base=lib/m4 --doc-base=doc --aux-dir=build-aux --tests-base=lib/gltests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl --without-tests $libgnulib_modules
patch -d m4 < gl/0001-Fix-export-symbols-and-export-symbols-regex-support-.patch
touch ChangeLog
if ! gtkdocize; then
echo "warning: gtkdocize missing -- gtk-doc manual will be missing"
# rm because gtk-doc.make might be a link to a protected file
rm -f gtk-doc.make
echo "EXTRA_DIST =" > gtk-doc.make
echo "CLEANFILES =" >> gtk-doc.make
fi
rm -rf gltests
}
bootstrap_epilogue() {
perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
perl -pi -e "s/X.Y/X.Y.Z/g" README-release
# Run automake again. It seems the first time ./bootstrap runs
# automake, it will not add some files to am__DIST_COMMON in
# top-level Makefile.in, but on subsequent runs (for example
# through autoreconf, which is triggered on 'make release') it
# will add the files. The missing files include
# build-aux/depcomp, build-aux/mdate-sh, build-aux/texinfo.texi,
# and build-aux/ylwrap. We want the am__DIST_COMMON value to be
# identical so that "make dist" and "make release" tarballs are
# identical and reproducible.
# │ │ - build-aux/config.rpath build-aux/config.sub \
# │ │ - build-aux/install-sh build-aux/ltmain.sh build-aux/missing
# │ │ + build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
# │ │ + build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \
# │ │ + build-aux/missing build-aux/texinfo.tex
${AUTOMAKE=automake} --no-force
}
|