1 # Copyright (C) 2016,2018 Tim Rühsen
2 # Copyright (C) 2016-2017 Simon Josefsson
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
22 gnulib_tool_option_extras="--with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests"
25 local_gl_dir=gl/override/
26 required_submodules="tests/suite/tls-fuzzer/python-ecdsa tests/suite/tls-fuzzer/tlsfuzzer tests/suite/tls-fuzzer/tlslite-ng"
28 # Reproduce by: gnulib-tool --import --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files alloca byteswap c-ctype extensions func gendocs getline gettext-h gettimeofday hash-pjw-bare havelib intprops lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file secure_getenv snprintf stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf warnings
31 alloca byteswap c-ctype c-strcase extensions func gendocs getline gettext-h gettimeofday hash-pjw-bare havelib arpa_inet inet_ntop inet_pton intprops lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file secure_getenv setsockopt snprintf stdint strcase strdup-posix strndup strtok_r strverscmp sys_socket sys_stat sys_types time_r unistd valgrind-tests vasprintf vsnprintf warnings
35 unictype/category-all unictype/property-default-ignorable-code-point unictype/property-join-control unictype/property-not-a-character uninorm/nfc uninorm/nfkc uninorm/u16-normalize uninorm/u32-normalize uninorm/u8-normalize unistr/u16-to-u8 unistr/u32-to-u8 unistr/u8-check unistr/u8-to-u16 unistr/u8-to-u32
39 accept bind close connect getaddrinfo getpass gettext-h arpa_inet inet_ntop inet_pton listen minmax parse-datetime progname read-file recv recvfrom select send sendto servent setsockopt shutdown socket sockets socklen inttypes
54 GTKDOCIZE=$(which gtkdocize 2>/dev/null)
55 if test $? -ne 0; then
56 echo "No gtk-doc support found. You can't build the docs."
57 # rm because gtk-doc.make might be a link to a protected file
58 rm -f gtk-doc.make 2>/dev/null
59 echo "EXTRA_DIST =" >gtk-doc.make
60 echo "CLEANFILES =" >>gtk-doc.make
66 # update git submodules
68 if test -n "$SUBMODULE_NOFETCH"; then
69 git_options="--no-fetch"
72 for mod in $required_submodules;do
73 git submodule update --init $git_options $mod
76 if test -d ./gnulib;then
77 TMP_GNULIB_SRCDIR="${GNULIB_SRCDIR:-./gnulib/}"
79 deps=$(${TMP_GNULIB_SRCDIR}/gnulib-tool --extract-recursive-dependencies ${gnulib_modules})
80 deps="echo -n ${deps} ${gnulib_modules}|sort -u"
82 *select*|*poll*|*sockets*|*recv*|*send*)
83 echo "******************************************************************"
84 die "the library cannot include the gnulib sockets; see CONTRIBUTION.md"
89 bootstrap_post_import_hook ()
91 # we re-use malloc-posix from the original gnulib
92 # for i in ${unistring_modules}; do
93 # sed -i 's/malloc-posix//g' ${GNULIB_SRCDIR}/modules/$i
96 ${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=lib/unistring/override --lib=libunistring --source-base=lib/unistring --m4-base=lib/unistring/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3orGPLv2 --no-conditional-dependencies --libtool --macro-prefix=unistring ${unistring_modules}
98 ${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=src/gl/override --lib=libgnu_gpl --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=ggl --no-vc-files ${src_modules}
100 # git -C ${GNULIB_SRCDIR} reset --hard
102 # Automake requires that ChangeLog exist.
103 touch ChangeLog || return 1