From 9fb1287f13dd61f7ffd5b71e0c4c51e831eeb902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Mon, 15 Mar 2021 23:50:26 +0000 Subject: [PATCH 1/3] Replace automake 1.5 with automake 1.6.3 --- SHA256SUMS.sources | 2 +- parts.rst | 13 +++-- rootfs.sh | 4 +- sysa/automake-1.5/patches/automake-1.4.patch | 60 -------------------- sysa/automake-1.5/stage1.sh | 25 -------- sysa/automake-1.5/stage2.sh | 27 --------- sysa/automake-1.6.3/stage1.sh | 31 ++++++++++ sysa/automake-1.6.3/stage2.sh | 24 ++++++++ sysa/run2.sh | 4 +- 9 files changed, 67 insertions(+), 123 deletions(-) delete mode 100644 sysa/automake-1.5/patches/automake-1.4.patch delete mode 100755 sysa/automake-1.5/stage1.sh delete mode 100755 sysa/automake-1.5/stage2.sh create mode 100755 sysa/automake-1.6.3/stage1.sh create mode 100755 sysa/automake-1.6.3/stage2.sh diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index 3b8dbc0f..b64b7869 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -2,7 +2,7 @@ f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.tar.gz 534e99b61b81e79327b6d08f1a3edb0755ac246e1249009b0e1bf5887b60d7a9 autoconf-2.52.tar.gz 503cdc2b0992a4309545d17f462cb15f99bb57b7161dfc4082b2e7188f2bcc0f automake-1.4-p6.tar.gz -24b4775e3143fd3e35db5cbaba80845d9359c7bfd751a6cebe3014fbf6115d78 automake-1.5.tar.gz +0dbafacaf21e135cab35d357a14bdcd981d2f2d00e1387801be8091a31b7bb81 automake-1.6.3.tar.bz2 ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4 bash-2.05b.tar.gz 3fa9daf85ebf35068f090ce51283ddeeb3c75eb5bc70b1a4a7cb05868bfe06a4 bash-3.2.57.tar.gz e20bdd49a0fb317959b410c1fe81269a620ec21207045d8a37cadea621be4b59 binutils-2.14.tar.bz2 diff --git a/parts.rst b/parts.rst index 3879f3be..a8836f7d 100644 --- a/parts.rst +++ b/parts.rst @@ -103,8 +103,7 @@ tar 1.12 GNU ``tar`` is the most common archive format used by software source code, often compressed also. To avoid continuing using submodules, we -build GNU tar 1.12, the last version compilable by tinycc without -significant patching. +build GNU tar 1.12, the last version compilable with mes libc. gzip 1.2.4 ========== @@ -440,8 +439,10 @@ provides new features, and is built with GNU readline support so it can be used as an interactive shell. autoconf 2.52 is used to regenerate the configure script and bison is used to recreate some included generated files. -automake 1.5 -============ +automake 1.6.3 +============== -We build a newer version of GNU Automake. We first build a slightly patched -version with ``automake-1.4`` and then use it to rebuild ``automake 1.5``. +This is a newer version of GNU Automake that is required to build newer +versions of ``autoconf``. We again use two stage approach like we did +with ``automake-1.4`` because previous versions of ``automake`` are too old +to properly build ``automake-1.6``. diff --git a/rootfs.sh b/rootfs.sh index 347401e5..0d6f69b0 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -228,8 +228,8 @@ get_file https://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 # bash 3.2.57 get_file https://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz -# automake 1.5 -get_file https://ftp.gnu.org/gnu/automake/automake-1.5.tar.gz +# automake 1.6.3 +get_file https://ftp.gnu.org/gnu/automake/automake-1.6.3.tar.bz2 # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/automake-1.5/patches/automake-1.4.patch b/sysa/automake-1.5/patches/automake-1.4.patch deleted file mode 100644 index 38070891..00000000 --- a/sysa/automake-1.5/patches/automake-1.4.patch +++ /dev/null @@ -1,60 +0,0 @@ -SPDX-FileCopyrightText: 2021 Andrius Štikonas - -SPDX-License-Identifier: GPL-2.0-or-later - -Remove parts that automake 1.4 does not understand. -This breaks installation but builds a functional automake 1.5 -that can then rebuild itself. - -diff -U3 -r automake-1.5.orig/lib/am/Makefile.am automake-1.5/lib/am/Makefile.am ---- lib/am/Makefile.am 2001-05-14 05:48:45.000000000 +0100 -+++ lib/am/Makefile.am 2021-03-14 00:34:52.204432782 +0000 -@@ -2,10 +2,4 @@ - - amdir = $(pkgdatadir)/am - --dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ --configure.am data.am dejagnu.am depend.am depend2.am distdir.am \ --footer.am header-vars.am header.am install.am java.am lang-compile.am \ --lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ --mans-vars.am mans.am multilib.am program.am progs.am python.am \ --remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \ --texinfos.am yacc.am -+ -diff -U3 -r automake-1.5.orig/lib/Automake/Makefile.am automake-1.5/lib/Automake/Makefile.am ---- lib/Automake/Makefile.am 2001-05-03 09:32:37.000000000 +0100 -+++ lib/Automake/Makefile.am 2021-03-14 00:35:01.164658975 +0000 -@@ -1,4 +1,3 @@ - ## Process this file with automake to create Makefile.in - - perllibdir = $(pkgdatadir)/Automake --dist_perllib_DATA = Struct.pm -diff -U3 -r automake-1.5.orig/lib/Makefile.am automake-1.5/lib/Makefile.am ---- lib/Makefile.am 2001-05-14 05:48:45.000000000 +0100 -+++ lib/Makefile.am 2021-03-14 00:34:38.234080302 +0000 -@@ -2,14 +2,10 @@ - - SUBDIRS = Automake am - --dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 -- - ## These must all be executable when installed. However, if we use - ## _SCRIPTS, then the program transform will be applied, which is not - ## what we want. So we make them executable by hand. - scriptdir = $(pkgdatadir) --dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \ --mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile - - install-data-hook: - @$(POST_INSTALL) -diff -U3 -r automake-1.5.orig/Makefile.am automake-1.5/Makefile.am ---- Makefile.am 2001-06-09 01:34:28.000000000 +0100 -+++ Makefile.am 2021-03-14 00:33:52.742934180 +0000 -@@ -1,6 +1,6 @@ - ## Process this file with automake to create Makefile.in - --AUTOMAKE_OPTIONS = 1.4 dist-bzip2 -+AUTOMAKE_OPTIONS = 1.4 - - ## We need `.' in SUBDIRS because we want `check' to build `.' before - ## tests. diff --git a/sysa/automake-1.5/stage1.sh b/sysa/automake-1.5/stage1.sh deleted file mode 100755 index e7ad3129..00000000 --- a/sysa/automake-1.5/stage1.sh +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Andrius Štikonas -# -# SPDX-License-Identifier: GPL-3.0-or-later - -src_prepare() { - default_src_prepare - - rm configure Makefile.in */Makefile.in */*/Makefile.in - autoconf-2.52 - - aclocal-1.4 - automake-1.4 -} - -src_configure() { - ./configure --prefix=/after -} - -src_install() { - install automake "${PREFIX}/bin/automake-1.5" - mkdir -p "${PREFIX}/share/automake/Automake" - install -m644 lib/Automake/Struct.pm "${PREFIX}/share/automake/Automake/" - mkdir -p "${PREFIX}/share/automake/am" - cp lib/am/*.am "${PREFIX}/share/automake/am/" -} diff --git a/sysa/automake-1.5/stage2.sh b/sysa/automake-1.5/stage2.sh deleted file mode 100755 index 3d28bf47..00000000 --- a/sysa/automake-1.5/stage2.sh +++ /dev/null @@ -1,27 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Andrius Štikonas -# -# SPDX-License-Identifier: GPL-3.0-or-later - -src_prepare() { - rm configure Makefile.in */Makefile.in */*/Makefile.in - - autoconf-2.52 - - sed -i 's#$(datadir)/aclocal#$(datadir)/aclocal-1.5#' m4/Makefile.am - aclocal-1.4 - automake-1.5 - - sed -i 's#@datadir@/@PACKAGE@#@datadir@/@PACKAGE@-@VERSION@#' automake.in - for file in Makefile.in */Makefile.in */*/Makefile.in; do - sed -i '/^pkgdatadir/s:$:-@VERSION@:' $file - done -} - -src_configure() { - ./configure --prefix=/after --program-suffix=-1.5 -} - -src_install() { - rm -rf "${PREFIX}/share/automake" - default_src_install -} diff --git a/sysa/automake-1.6.3/stage1.sh b/sysa/automake-1.6.3/stage1.sh new file mode 100755 index 00000000..0a04c719 --- /dev/null +++ b/sysa/automake-1.6.3/stage1.sh @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + sed -i '/Makefile/d' configure.in + + rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4 + autoconf-2.52 +} + +src_configure() { + ./configure --prefix=/after +} + +src_compile() { + cp m4/amversion.in m4/amversion.m4 + sed -i 's/@VERSION@/1.6.3/' m4/amversion.m4 + sed -i 's/@APIVERSION@/1.6/' m4/amversion.m4 +} + +src_install() { + install automake "${PREFIX}"/bin/automake-1.6 + mkdir -p "${PREFIX}"/share/automake-1.6/{Automake,am} + cp lib/Automake/*.pm "${PREFIX}"/share/automake-1.6/Automake/ + cp -r lib/am/*.am "${PREFIX}"/share/automake-1.6/am/ + + install aclocal "${PREFIX}"/bin/aclocal-1.6 + mkdir -p "${PREFIX}"/share/aclocal-1.6 + cp -r m4/*.m4 "${PREFIX}"/share/aclocal-1.6/ +} diff --git a/sysa/automake-1.6.3/stage2.sh b/sysa/automake-1.6.3/stage2.sh new file mode 100755 index 00000000..02caaeec --- /dev/null +++ b/sysa/automake-1.6.3/stage2.sh @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4 + aclocal-1.6 + autoconf-2.52 + automake-1.6 +} + +src_configure() { + ./configure --prefix=/after +} + +src_install() { + # cleanup old manual install + rm "${PREFIX}"/bin/automake-1.6 + rm "${PREFIX}"/bin/aclocal-1.6 + rm -rf "${PREFIX}"/share/automake-1.6 + rm -rf "${PREFIX}"/share/aclocal-1.6 + + default_src_install +} diff --git a/sysa/run2.sh b/sysa/run2.sh index 82c43571..fadc238e 100755 --- a/sysa/run2.sh +++ b/sysa/run2.sh @@ -9,8 +9,8 @@ set -e . helpers.sh -build automake-1.5 stage1.sh -build automake-1.5 stage2.sh +build automake-1.6.3 stage1.sh +build automake-1.6.3 stage2.sh echo "Bootstrapping completed." From bb4d24509e13a8381fbfcb9818469bb195254c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Tue, 16 Mar 2021 09:07:10 +0000 Subject: [PATCH 2/3] Fix occasional flakiness in autoconf 2.12 build. --- sysa/autoconf-2.12/autoconf-2.12.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysa/autoconf-2.12/autoconf-2.12.sh b/sysa/autoconf-2.12/autoconf-2.12.sh index 04cfef95..6b5de6fa 100755 --- a/sysa/autoconf-2.12/autoconf-2.12.sh +++ b/sysa/autoconf-2.12/autoconf-2.12.sh @@ -12,3 +12,7 @@ src_prepare() { src_configure() { ./configure --prefix=${PREFIX} --program-suffix=-2.12 } + +src_compile() { + make MAKEINFO=true +} From 52cdbad4050a970cf4be2c4f70df8442653f3aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 17 Mar 2021 00:24:37 +0000 Subject: [PATCH 3/3] Bootstrap aclocal. --- parts.rst | 43 ++++++++++--------- rootfs.sh | 12 +++--- sysa/autoconf-2.52/stage1.sh | 9 ++-- sysa/autoconf-2.52/stage2.sh | 2 +- sysa/automake-1.4-p6/automake-1.4-p6.sh | 17 ++++++++ sysa/automake-1.4-p6/stage1.sh | 30 ------------- sysa/automake-1.6.3/stage1.sh | 21 ++++----- sysa/automake-1.6.3/stage2.sh | 25 +++++++---- .../stage2.sh => automake-1.6.3/stage3.sh} | 13 +++--- sysa/run.sh | 7 ++- sysa/run2.sh | 3 -- 11 files changed, 86 insertions(+), 96 deletions(-) create mode 100755 sysa/automake-1.4-p6/automake-1.4-p6.sh delete mode 100755 sysa/automake-1.4-p6/stage1.sh rename sysa/{automake-1.4-p6/stage2.sh => automake-1.6.3/stage3.sh} (52%) diff --git a/parts.rst b/parts.rst index a8836f7d..507d99c1 100644 --- a/parts.rst +++ b/parts.rst @@ -171,7 +171,7 @@ bzip2 1.0.8 ``bzip2`` is a compression format that compresses more than ``gzip``. It is preferred where we can use it, and makes source code sizes smaller. -coreutils 5.0.0 +coreutils 5.0 =============== GNU Coreutils is a collection of widely used utilities such as ``cat``, @@ -370,32 +370,43 @@ packaging software on computer systems where a Bourne shell is available. At this stage we still do not have a working autotools system, so we manually install ``autoconf`` script and replace a few placeholder variables with ``sed``. +Autoconf 2.52 is the newest version of ``autoconf`` that does not need ``perl``, and hence +a bit easier to install. + +automake 1.6.3 +============== + +GNU Automake is a tool for automatically generating Makefile.in files. It is another major +part of GNU Autotools build system and consists of ``aclocal`` and ``automake`` scripts. + +We bootstrap it using a 3 stage process: + +1. Use ``sed`` to replace a few placeholder variables in ``aclocal.in`` script. + Then we manually install ``aclocal`` script and its dependencies. +2. Patch ``configure.in`` to create ``automake`` file but skip ``Makefile.in`` processing. + Again we manually install ``automake`` script and its dependencies. +3. We now use ``aclocal``, ``autoconf``, and ``automake`` to do a proper build and install. + automake 1.4-p6 =============== -GNU Automake is a tool for automatically generating Makefile.in files. It is another -major part of GNU Autotools build system. - -``automake`` again needs both ``automake`` and ``autoconf``. In order to bootstrap it -we patch ``configure.in`` file to produce ``automake`` and skip ``Makefile`` effectively -removing dependency on ``automake`` at the cost of having to install ``automake`` manually. - -Then we rebuild both ``automake`` using already installed ``autoconf`` and ``automake``. +This is an older version of GNU Automake. Various versions of GNU Autotools are not fully +compatible, and we will need older ``automake`` to build some older software. autoconf 2.52 ============= -We now properly rebuild ``autoconf`` using ``autoconf`` and ``automake``. +We now properly rebuild ``autoconf`` using ``automake-1.4`` and manually installed ``autoconf``. autoconf 2.13 ============= -Different versions of autotools are not fully compatible, so build older ``autoconf`` too. +An older ``autoconf`` will be necessary to build GNU Binutils. autoconf 2.12 ============= -Yet another old autoconf version that we will need for GNU Binutils. +Yet another old autoconf version that we will need for some parts of GNU Binutils. libtool 1.4 =========== @@ -438,11 +449,3 @@ interactively. This newer version of ``bash`` compiles without any patches, provides new features, and is built with GNU readline support so it can be used as an interactive shell. autoconf 2.52 is used to regenerate the configure script and bison is used to recreate some included generated files. - -automake 1.6.3 -============== - -This is a newer version of GNU Automake that is required to build newer -versions of ``autoconf``. We again use two stage approach like we did -with ``automake-1.4`` because previous versions of ``automake`` are too old -to properly build ``automake-1.6``. diff --git a/rootfs.sh b/rootfs.sh index 0d6f69b0..7abaa558 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -156,9 +156,6 @@ get_file ftp://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz 1 # coreutils 5.0 get_file https://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 1 -# coreutils 6.3 -get_file https://ftp.gnu.org/gnu/coreutils/coreutils-6.3.tar.bz2 - # heirloom-devtools get_file http://downloads.sourceforge.net/project/heirloom/heirloom-devtools/070527/heirloom-devtools-070527.tar.bz2 @@ -189,6 +186,9 @@ get_file https://ftp.gnu.org/gnu/grep/grep-2.4.tar.gz # diffutils 2.7 get_file https://ftp.gnu.org/gnu/diffutils/diffutils-2.7.tar.gz +# coreutils 6.3 +get_file https://ftp.gnu.org/gnu/coreutils/coreutils-6.3.tar.bz2 + # gawk 3.0.4 get_file https://ftp.gnu.org/gnu/gawk/gawk-3.0.4.tar.gz @@ -210,6 +210,9 @@ get_file https://www.cpan.org/src/5.0/perl-5.6.2.tar.gz # autoconf 2.52 get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz +# automake 1.6.3 +get_file https://ftp.gnu.org/gnu/automake/automake-1.6.3.tar.bz2 + # automake 1.4-p6 get_file https://ftp.gnu.org/gnu/automake/automake-1.4-p6.tar.gz @@ -228,9 +231,6 @@ get_file https://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 # bash 3.2.57 get_file https://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz -# automake 1.6.3 -get_file https://ftp.gnu.org/gnu/automake/automake-1.6.3.tar.bz2 - # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/autoconf-2.52/stage1.sh b/sysa/autoconf-2.52/stage1.sh index 0708858e..aed76b56 100755 --- a/sysa/autoconf-2.52/stage1.sh +++ b/sysa/autoconf-2.52/stage1.sh @@ -4,12 +4,9 @@ src_compile() { cp autoconf.in autoconf - sed -i "s# @SHELL@#/bin/sh#" autoconf - sed -i 's/@M4@/m4/' autoconf - sed -i 's/@AWK@/awk/' autoconf - sed -i 's/@PACKAGE_NAME@/Autoconf/' autoconf - sed -i 's/@VERSION@/2.52/' autoconf - sed -i "s#@datadir@#${PREFIX}/share/autoconf-2.52#" autoconf + sed -i -e "s# @SHELL@#/bin/sh#" -e 's/@M4@/m4/' -e 's/@AWK@/awk/' \ + -e 's/@PACKAGE_NAME@/Autoconf/' -e 's/@VERSION@/2.52/' \ + -e "s#@datadir@#${PREFIX}/share/autoconf-2.52#" autoconf chmod +x autoconf m4 autoconf.m4 --freeze-state=autoconf.m4f diff --git a/sysa/autoconf-2.52/stage2.sh b/sysa/autoconf-2.52/stage2.sh index da084a6e..2be0069a 100755 --- a/sysa/autoconf-2.52/stage2.sh +++ b/sysa/autoconf-2.52/stage2.sh @@ -10,7 +10,7 @@ src_prepare() { # Install autoconf data files into versioned directory for file in */Makefile.in Makefile.in; do - sed -i '/^pkgdatadir/s:$:-@VERSION@:' $file + sed -i '/^pkgdatadir/s:$:-@VERSION@:' $file done } diff --git a/sysa/automake-1.4-p6/automake-1.4-p6.sh b/sysa/automake-1.4-p6/automake-1.4-p6.sh new file mode 100755 index 00000000..0708c57c --- /dev/null +++ b/sysa/automake-1.4-p6/automake-1.4-p6.sh @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure Makefile.in */Makefile.in aclocal.m4 + aclocal-1.6 + autoconf-2.52 + # When building with newer automake we get the following error + # Makefile.am:59: ETAGS_ARGS multiply defined in condition TRUE + sed -i '/ETAGS_ARGS/,+1d' Makefile.am + automake-1.6 +} + +src_configure() { + ./configure --prefix=/after +} diff --git a/sysa/automake-1.4-p6/stage1.sh b/sysa/automake-1.4-p6/stage1.sh deleted file mode 100755 index 88b8163f..00000000 --- a/sysa/automake-1.4-p6/stage1.sh +++ /dev/null @@ -1,30 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Andrius Štikonas -# -# SPDX-License-Identifier: GPL-3.0-or-later - -src_prepare() { - sed -i 's#m4/Makefile tests/Makefile##; s/Makefile //' configure.in - - rm configure Makefile.in */Makefile.in - autoconf-2.52 -} - -src_configure() { - ./configure --prefix=/after -} - -src_compile() { - cp m4/amversion.in m4/amversion.m4 - sed -i 's/@VERSION@/1.4-p6/' m4/amversion.m4 - sed -i 's/@APIVERSION@/1.4/' m4/amversion.m4 -} - -src_install() { - install automake "${PREFIX}"/bin/automake-1.4 - mkdir -p "${PREFIX}"/share/automake-1.4 - cp -r *.am "${PREFIX}"/share/automake-1.4/ - - install aclocal "${PREFIX}"/bin/aclocal-1.4 - mkdir -p "${PREFIX}"/share/aclocal-1.4 - cp -r m4/*.m4 "${PREFIX}"/share/aclocal-1.4/ -} diff --git a/sysa/automake-1.6.3/stage1.sh b/sysa/automake-1.6.3/stage1.sh index 0a04c719..db6685e5 100755 --- a/sysa/automake-1.6.3/stage1.sh +++ b/sysa/automake-1.6.3/stage1.sh @@ -3,27 +3,22 @@ # SPDX-License-Identifier: GPL-3.0-or-later src_prepare() { - sed -i '/Makefile/d' configure.in - rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4 - autoconf-2.52 -} - -src_configure() { - ./configure --prefix=/after + cp aclocal.in aclocal + cp m4/amversion.in m4/amversion.m4 } src_compile() { - cp m4/amversion.in m4/amversion.m4 - sed -i 's/@VERSION@/1.6.3/' m4/amversion.m4 - sed -i 's/@APIVERSION@/1.6/' m4/amversion.m4 + sed -i -e 's/@VERSION@/1.6.3/' -e 's/@APIVERSION@/1.6/' m4/amversion.m4 + + sed -i -e 's#@PERL@#/after/bin/perl#' -e 's/@PACKAGE@/automake/' \ + -e 's/@APIVERSION@/1.6/' -e 's/@VERSION@/1.6.3/' \ + -e 's#@prefix@#/after#' -e 's#@datadir@#/after/share#' aclocal } src_install() { - install automake "${PREFIX}"/bin/automake-1.6 - mkdir -p "${PREFIX}"/share/automake-1.6/{Automake,am} + mkdir -p "${PREFIX}"/share/automake-1.6/Automake cp lib/Automake/*.pm "${PREFIX}"/share/automake-1.6/Automake/ - cp -r lib/am/*.am "${PREFIX}"/share/automake-1.6/am/ install aclocal "${PREFIX}"/bin/aclocal-1.6 mkdir -p "${PREFIX}"/share/aclocal-1.6 diff --git a/sysa/automake-1.6.3/stage2.sh b/sysa/automake-1.6.3/stage2.sh index 02caaeec..87691c9d 100755 --- a/sysa/automake-1.6.3/stage2.sh +++ b/sysa/automake-1.6.3/stage2.sh @@ -3,22 +3,29 @@ # SPDX-License-Identifier: GPL-3.0-or-later src_prepare() { + sed -i '/Makefile/d' configure.in + rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4 aclocal-1.6 autoconf-2.52 - automake-1.6 } src_configure() { ./configure --prefix=/after } -src_install() { - # cleanup old manual install - rm "${PREFIX}"/bin/automake-1.6 - rm "${PREFIX}"/bin/aclocal-1.6 - rm -rf "${PREFIX}"/share/automake-1.6 - rm -rf "${PREFIX}"/share/aclocal-1.6 - - default_src_install +src_compile() { + cp m4/amversion.in m4/amversion.m4 + sed -i 's/@VERSION@/1.6.3/' m4/amversion.m4 + sed -i 's/@APIVERSION@/1.6/' m4/amversion.m4 +} + +src_install() { + install automake "${PREFIX}"/bin/automake-1.6 + mkdir -p "${PREFIX}"/share/automake-1.6/am + cp lib/Automake/*.pm "${PREFIX}"/share/automake-1.6/Automake/ + cp -r lib/am/*.am "${PREFIX}"/share/automake-1.6/am/ + + install aclocal "${PREFIX}"/bin/aclocal-1.6 + cp -r m4/*.m4 "${PREFIX}"/share/aclocal-1.6/ } diff --git a/sysa/automake-1.4-p6/stage2.sh b/sysa/automake-1.6.3/stage3.sh similarity index 52% rename from sysa/automake-1.4-p6/stage2.sh rename to sysa/automake-1.6.3/stage3.sh index f88ac94a..02caaeec 100755 --- a/sysa/automake-1.4-p6/stage2.sh +++ b/sysa/automake-1.6.3/stage3.sh @@ -3,10 +3,10 @@ # SPDX-License-Identifier: GPL-3.0-or-later src_prepare() { - rm configure Makefile.in */Makefile.in + rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4 + aclocal-1.6 autoconf-2.52 - aclocal-1.4 - automake-1.4 + automake-1.6 } src_configure() { @@ -15,9 +15,10 @@ src_configure() { src_install() { # cleanup old manual install - rm "${PREFIX}"/bin/automake-1.4 - rm -rf "${PREFIX}"/share/automake-1.4 - rm -rf "${PREFIX}"/share/aclocal-1.4 + rm "${PREFIX}"/bin/automake-1.6 + rm "${PREFIX}"/bin/aclocal-1.6 + rm -rf "${PREFIX}"/share/automake-1.6 + rm -rf "${PREFIX}"/share/aclocal-1.6 default_src_install } diff --git a/sysa/run.sh b/sysa/run.sh index 9f0707de..386942d3 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -76,8 +76,11 @@ populate_device_nodes build autoconf-2.52 stage1.sh -build automake-1.4-p6 stage1.sh -build automake-1.4-p6 stage2.sh +build automake-1.6.3 stage1.sh +build automake-1.6.3 stage2.sh +build automake-1.6.3 stage3.sh + +build automake-1.4-p6 build autoconf-2.52 stage2.sh diff --git a/sysa/run2.sh b/sysa/run2.sh index fadc238e..9ace4cc8 100755 --- a/sysa/run2.sh +++ b/sysa/run2.sh @@ -9,9 +9,6 @@ set -e . helpers.sh -build automake-1.6.3 stage1.sh -build automake-1.6.3 stage2.sh - echo "Bootstrapping completed." exec env - PATH=/after/bin PS1="\w # " bash -i