Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
m4/iconv.m4, config/config.rpath: Import using gnulib-tool --import i…
Browse files Browse the repository at this point in the history
…conv
  • Loading branch information
Matthias Koeppe committed Jun 18, 2022
1 parent a6e696e commit 318f58c
Show file tree
Hide file tree
Showing 5 changed files with 977 additions and 50 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
# Autotools generated files
/aclocal.m4
/autom4te.cache/
/config/
/config/install-sh
/config/compile
/config/config.guess
/config/config.sub
/config/install-sh
/config/missing
/config.log
/config.status
/configure
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ distclean: build-clean
# Delete all auto-generated files which are distributed as part of the
# source tarball
bootstrap-clean:
rm -rf config configure build/make/Makefile-auto.in
rm -rf config/install-sh config/compile config/config.guess config/config.sub config/install-sh config/missing configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt
rm -rf src/doc/en/reference/spkg/*.rst
rm -f environment.yml
Expand Down
51 changes: 3 additions & 48 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,6 @@ PKG=build/pkgs/configure
MAKE="${MAKE:-make}"
CONFVERSION=$(cat $PKG/package-version.txt)

install_config_rpath() {
# The file config.rpath which comes from gettext is supposed to be
# installed by automake, but due to a bug in most distros it is not;
# see https://trac.sagemath.org/ticket/27823#comment:17
#
# Here we need to determine where gettext stores its data files and
# copy config.rpath from there to config/
gettextize="$(command -v gettextize)"
if [ -z "$gettextize" ]; then
echo >&2 "gettext and the gettextize program must be installed and be in"
echo >&2 "your PATH. E.g. Homebrew installs them in /usr/local/opt/gettext/bin."
return 179
fi
eval `sed -n '/^prefix=.*$/p' "$gettextize"`
eval `sed -n '/^datarootdir=.*$/p' "$gettextize"`
eval `sed -n '/^: \${gettext_datadir=.*$/p' "$gettextize"`

if [ -z "$gettext_datadir" ]; then
eval `sed -n '/^gettext_dir=.*$/p' "$gettextize"`
# In older versions (before 2014) this is spelled gettext_dir
# See https://github.com/autotools-mirror/gettext/commit/ff18897068486560e2bb421004cfbd42b7cdd0f8
gettext_datadir="$gettext_dir"
fi

if [ -z "$gettext_datadir" ]; then
echo >&2 "Failed to read the gettext_datadir directory from $gettextize"
echo >&2 "The config.rpath file must manually be copied into config/"
echo >&2 "This file is installed with gettext typically in /usr/share/gettext"
return 179
fi

config_rpath="$gettext_datadir/config.rpath"
if [ ! -f "$config_rpath" ]; then
echo >&2 "Missing $config_rpath file; this indicates a broken gettext install."
return 179
fi

if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
echo "bootstrap:$LINENO: installing 'config/config.rpath'"
fi
cp "$config_rpath" config/
}



bootstrap () {
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
Expand Down Expand Up @@ -160,7 +116,6 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
# third, filter, and then swap them back.
./bootstrap-conda && \
src/doc/bootstrap && \
install_config_rpath && \
aclocal -I m4 && \
automake --add-missing --copy build/make/Makefile-auto 3>&1 1>&2 2>&3 \
| sed "${QUIET_SED_FILTER}" 3>&1 1>&2 2>&3 && \
Expand All @@ -170,7 +125,7 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
case $st in
0) true;; # Success

179|16|63|127) # install_config_rpath failed|no m4 for pkg-config|autotools not installed|or version too old
179|16|63|127) # no m4 for pkg-config|autotools not installed|or version too old
if [ $DOWNLOAD = yes ]; then
echo >&2 "Bootstrap failed, downloading required files instead."
bootstrap_download || exit $?
Expand All @@ -182,7 +137,7 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
else
verb="upgrade"
fi
echo >&2 "Bootstrap failed. Either $verb autotools and gettext; or run bootstrap with"
echo >&2 "Bootstrap failed. Either $verb autotools; or run bootstrap with"
echo >&2 "the -d option to download the auto-generated files instead."

SYSTEM=$(build/bin/sage-guess-package-system)
Expand Down Expand Up @@ -243,7 +198,7 @@ save () {
mkdir -p upstream
tar zcf "$NEWCONFBALL" \
configure \
config/* \
config/install-sh config/compile config/config.guess config/config.sub config/install-sh config/missing \
build/make/Makefile-auto.in \
src/doc/en/installation/*.txt \
src/doc/en/reference/spkg/*.rst \
Expand Down
Loading

0 comments on commit 318f58c

Please sign in to comment.