From 338bf2293883f7022818ad5130c148e019127f85 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sun, 5 Sep 2021 15:49:18 -0400 Subject: [PATCH] Update gnulib/dxcommon to lastest bits. --- .gitignore | 1 + Makefile.am | 14 ++++++++------ bootstrap | 40 ++++++++++++++++++++++++++++++++-------- common | 2 +- configure.ac | 3 ++- gnulib | 2 +- m4/.gitignore | 28 +++++++++++++++++++++++++--- m4/gnulib-cache.m4 | 19 ++++++++++++++++--- 8 files changed, 86 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index a312577..28514f7 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ stamp-h1 liblbx-*.tar.gz /test-suite.log +/INSTALL diff --git a/Makefile.am b/Makefile.am index 5d40a75..e1599dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright © 2009-2010, 2013 Nick Bowler +# Copyright © 2009-2010,2013-2014,2021 Nick Bowler # # License WTFPL2: Do What The Fuck You Want To Public License, version 2. # This is free software: you are free to do what the fuck you want to. @@ -7,10 +7,12 @@ AUTOMAKE_OPTIONS = parallel-tests color-tests ACLOCAL_AMFLAGS = -I m4 -I common/m4 -EXTRA_DIST = m4/gnulib-cache.m4 -CLEANFILES = -MOSTLYCLEANFILES = -noinst_LTLIBRARIES = +# For Gnulib +MOSTLYCLEANFILES = +EXTRA_LTLIBRARIES = + +EXTRA_DIST = bootstrap $(DX_BASEDIR)/scripts/fix-gnulib.pl m4/gnulib-cache.m4 +CLEANFILES = $(EXTRA_LTLIBRARIES) AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib -I$(top_srcdir)/src AM_CFLAGS = $(LIBPNG_CFLAGS) $(GTK_CFLAGS) @@ -35,7 +37,7 @@ lbxtool_SOURCES = src/lbxtool.c src/tools.c lbxtool_LDADD = liblbx.la libgnu.la $(lbxtool_OBJECTS): $(gnulib_headers) -lbximg_SOURCES = src/lbximg.c src/tools.c src/pnm.c +lbximg_SOURCES = src/lbximg.c src/tools.c src/pnm.c src/imgoutput.h lbximg_LDADD = liblbx.la libgnu.la $(LIBPNG_LIBS) $(lbximg_OBJECTS): $(gnulib_headers) diff --git a/bootstrap b/bootstrap index 460094f..a58c083 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright © 2011-2012 Nick Bowler +# Copyright © 2011-2012, 2021 Nick Bowler # # Simple script to get started from a fresh git checkout. # @@ -11,15 +11,16 @@ scriptname=$0 err() { - printf '%s: %s\n' "$scriptname" "$@" 1>&2 + printf '%s: %s\n' "$scriptname" "$*" 1>&2 } die() { - err "$@" - exit 1 + err "$@" + exit 1 } : ${AUTORECONF=autoreconf} +: ${AUTOMAKE=automake} : ${GNULIB=gnulib} : ${GIT=git} : ${PERL=perl} @@ -27,15 +28,38 @@ die() { $GIT submodule update --init || err "Failed to update submodules from git." if test -x $GNULIB/gnulib-tool; then - $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib." + $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib." else - die "Gnulib sources are not properly installed in gnulib/." + err "Gnulib sources are not properly installed in $GNULIB/" + cat >&2 <<'EOF' + +To bootstrap this package using an external Gnulib, you can set the GNULIB +environment variable to indicate the location of the Gnulib sources. +EOF + + test ! -f configure || cat >&2 <<'EOF' + +However, it seems this package is already bootstrapped. It should not +normally be necessary to run this script from a release tarball. +EOF + exit 1 fi $PERL common/scripts/fix-gnulib.pl -o lib/gnulib.mk -i lib/gnulib.mk.in \ - || die "Failed to fixup Gnulib makefile fragment." + || die "Failed to fixup Gnulib makefile fragment." + +# Rewrite if ! ... construts produced by gnulib conditional dependencies +# as these fail in heirloom-sh. +sed 's/if ! *\(.*gnulib_enabled[^;]*\); then/if \1; then :; else/' \ + m4/gnulib-comp.m4 >m4/gnulib-comp.m4.new || exit +mv -f m4/gnulib-comp.m4.new m4/gnulib-comp.m4 || exit # Punt some automake-generated files so that Gentoo's wrapper script doesn't # try to detect the automake version in use. rm -f Makefile.in aclocal.m4 -$AUTORECONF -fis +$AUTORECONF -fis || exit + +amdir=`$AUTOMAKE --print-libdir` +if test -f "$amdir/INSTALL"; then + ln -sf "$amdir/INSTALL" INSTALL +fi diff --git a/common b/common index 566987f..aa6ab45 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 566987f66af50062d1de9aaba7695b1ef265754f +Subproject commit aa6ab453c6ff523a4d8538554c068117f2de3aca diff --git a/configure.ac b/configure.ac index a53ad7c..bb9334f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl Copyright © 2009, 2013-2014 Nick Bowler +dnl Copyright © 2009, 2013-2014, 2021 Nick Bowler dnl dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2. dnl This is free software: you are free to do what the fuck you want to. @@ -11,6 +11,7 @@ AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects]) AM_SILENT_RULES([yes]) +DX_AUTOMAKE_COMPAT AC_PROG_CC_C99 AM_PROG_CC_C_O diff --git a/gnulib b/gnulib index 68f90af..b50c644 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 68f90afdb82204c27a50e7bce169d2b3795a1ddd +Subproject commit b50c6442e43d79471a31a2a202d3e50c0557446f diff --git a/m4/.gitignore b/m4/.gitignore index 2017327..4a24969 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -1,22 +1,30 @@ 00gnulib.m4 +__inline.m4 +absolute-header.m4 alloca.m4 +btowc.m4 +builtin-expect.m4 codeset.m4 -configmake.m4 +ctype_h.m4 extensions.m4 extern-inline.m4 -fcntl-o.m4 +flexmember.m4 fnmatch.m4 +fnmatch_h.m4 getopt.m4 -glibc21.m4 gnulib-common.m4 gnulib-comp.m4 gnulib-tool.m4 include_next.m4 +inttypes.m4 +isblank.m4 libtool.m4 +limits-h.m4 localcharset.m4 locale-fr.m4 locale-ja.m4 locale-zh.m4 +locale_h.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 @@ -25,18 +33,32 @@ mbrtowc.m4 mbsinit.m4 mbsrtowcs.m4 mbstate_t.m4 +mbtowc.m4 memchr.m4 +mempcpy.m4 mmap-anon.m4 +multiarch.m4 nocrash.m4 off_t.m4 +pid_t.m4 +setlocale_null.m4 ssize_t.m4 +std-gnu11.m4 stdbool.m4 stddef_h.m4 +stdint.m4 +stdlib_h.m4 string_h.m4 +strnlen.m4 sys_types_h.m4 +threadlib.m4 unistd_h.m4 +visibility.m4 warn-on-use.m4 wchar_h.m4 wchar_t.m4 wctype_h.m4 wint_t.m4 +wmemchr.m4 +wmempcpy.m4 +zzgnulib.m4 diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index 1f1f05f..3626ead 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this file. If not, see . +# along with this file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that @@ -27,7 +27,20 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk.in --conditional-dependencies --libtool --macro-prefix=gl --no-vc-files fnmatch getopt-gnu +# gnulib-tool --import \ +# --lib=libgnu \ +# --source-base=lib \ +# --m4-base=m4 \ +# --doc-base=doc \ +# --tests-base=tests \ +# --aux-dir=. \ +# --makefile-name=gnulib.mk.in \ +# --conditional-dependencies \ +# --libtool \ +# --macro-prefix=gl \ +# --no-vc-files \ +# fnmatch \ +# getopt-gnu # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) -- 2.43.2