logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 6a6c5acf1c1e87b74181fe4cfa37ecf39964e744
parent 9f92dd2fb1e84bc65df229bcb16133bcb3ff853b
Author: fosslinux <fosslinux@aussies.space>
Date:   Sun, 28 Feb 2021 12:06:52 +1100

Merge pull request #52 from stikonas/autoconf

Autotools

Diffstat:

MSHA256SUMS.sources4++++
Mparts.rst42+++++++++++++++++++++++++++++++++++++++++-
Mrootfs.sh12++++++++++++
Asysa/autoconf-2.12/autoconf-2.12.sh14++++++++++++++
Asysa/autoconf-2.12/checksums0
Asysa/autoconf-2.13/autoconf-2.13.sh14++++++++++++++
Asysa/autoconf-2.13/checksums0
Asysa/autoconf-2.52/checksums0
Asysa/autoconf-2.52/stage1.sh22++++++++++++++++++++++
Asysa/autoconf-2.52/stage2.sh27+++++++++++++++++++++++++++
Asysa/automake-1.4-p6/checksums0
Asysa/automake-1.4-p6/stage1.sh24++++++++++++++++++++++++
Asysa/automake-1.4-p6/stage2.sh21+++++++++++++++++++++
Msysa/run.sh24++++++++++++++++++++++++
14 files changed, 203 insertions(+), 1 deletion(-)

diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources @@ -1,3 +1,7 @@ +66fde474e124e80c843560041cd68820c9dce56e696f388312ba30361a814a16 autoconf-2.12.tar.gz +f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.tar.gz +534e99b61b81e79327b6d08f1a3edb0755ac246e1249009b0e1bf5887b60d7a9 autoconf-2.52.tar.gz +503cdc2b0992a4309545d17f462cb15f99bb57b7161dfc4082b2e7188f2bcc0f automake-1.4-p6.tar.gz ba03d412998cc54bd0b0f2d6c32100967d3137098affdc2d32e6e7c11b163fe4 bash-2.05b.tar.gz 7007fc89c216fbfaff5525359b02a7e5b612694df5168c74673f67055f015095 bison-3.4.1.tar.gz ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 bzip2-1.0.8.tar.gz diff --git a/parts.rst b/parts.rst @@ -351,4 +351,44 @@ introduces the new pregenerated files ``regnodes.h`` and perl 5.6.2 ========== -Even more perl. 5.6.2 is the last version buildable with 5.004. +Even more perl. 5.6.2 is the last version buildable with 5.005. + +autoconf 2.52 +============= + +GNU Autoconf is a tool for producing ``configure`` scripts for building, installing and +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``. + +Version 2.52 is the newest version that runs on ``miniperl``. + +automake 1.4-p6 +=============== + +GNU Automake is a tool for automatically generating Makefile.in files. Together with +Autoconf they from 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``. + +Version 1.4-p6 is again the newest version that runs on ``miniperl``. + +autoconf 2.52 +============= + +We now properly rebuild ``autoconf`` using ``autoconf`` and ``automake``. + +autoconf 2.13 +============= + +Different versions of autotools are not fully compatible, so build older ``autoconf`` too. + +autoconf 2.12 +============= + +Yet another old autoconf version that we will need for GNU Binutils. diff --git a/rootfs.sh b/rootfs.sh @@ -201,6 +201,18 @@ get_file https://www.cpan.org/src/5.0/perl5.005_03.tar.gz # perl 5.6.2 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.4-p6 +get_file https://ftp.gnu.org/gnu/automake/automake-1.4-p6.tar.gz + +# autoconf 2.13 +get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz + +# autoconf 2.12 +get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.12.tar.gz + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/autoconf-2.12/autoconf-2.12.sh b/sysa/autoconf-2.12/autoconf-2.12.sh @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure + autoconf-2.52 + + sed -i '/^acdatadir/s:$:-2.12:' Makefile.in +} + +src_configure() { + ./configure --prefix=${PREFIX} --program-suffix=-2.12 +} diff --git a/sysa/autoconf-2.12/checksums b/sysa/autoconf-2.12/checksums diff --git a/sysa/autoconf-2.13/autoconf-2.13.sh b/sysa/autoconf-2.13/autoconf-2.13.sh @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure + autoconf-2.52 + + sed -i '/^acdatadir/s:$:-2.13:' Makefile.in +} + +src_configure() { + ./configure --prefix=${PREFIX} --program-suffix=-2.13 +} diff --git a/sysa/autoconf-2.13/checksums b/sysa/autoconf-2.13/checksums diff --git a/sysa/autoconf-2.52/checksums b/sysa/autoconf-2.52/checksums diff --git a/sysa/autoconf-2.52/stage1.sh b/sysa/autoconf-2.52/stage1.sh @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +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 + chmod +x autoconf + + m4 autoconf.m4 --freeze-state=autoconf.m4f +} + +src_install() { + install autoconf ${PREFIX}/bin/autoconf-2.52 + mkdir -p ${PREFIX}/share/autoconf-2.52 + cp -r *.m4* ${PREFIX}/share/autoconf-2.52/ +} diff --git a/sysa/autoconf-2.52/stage2.sh b/sysa/autoconf-2.52/stage2.sh @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm Makefile.in */Makefile.in + rm configure + autoconf-2.52 + automake-1.4 + + # Install autoconf data files into versioned directory + for file in */Makefile.in Makefile.in; do + sed -i '/^pkgdatadir/s:$:-@VERSION@:' $file + done +} + +src_configure() { + ./configure --prefix=${PREFIX} --program-suffix=-2.52 +} + +src_install() { + # Remove manually installed autoconf + rm ${PREFIX}/bin/autoconf-2.52 + rm -rf ${PREFIX}/share/autoconf-2.52 + + default_src_install +} diff --git a/sysa/automake-1.4-p6/checksums b/sysa/automake-1.4-p6/checksums diff --git a/sysa/automake-1.4-p6/stage1.sh b/sysa/automake-1.4-p6/stage1.sh @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# 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() { + : +} + +src_install() { + install automake ${PREFIX}/bin/automake-1.4 + mkdir -p ${PREFIX}/share/automake-1.4 + cp -r *.am ${PREFIX}/share/automake-1.4/ +} diff --git a/sysa/automake-1.4-p6/stage2.sh b/sysa/automake-1.4-p6/stage2.sh @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + rm configure Makefile.in */Makefile.in + autoconf-2.52 + automake-1.4 +} + +src_configure() { + ./configure --prefix=/after +} + +src_install() { + # cleanup old manual install + rm ${PREFIX}/bin/automake-1.4 + rm -rf ${PREFIX}/share/automake-1.4 + + default_src_install +} diff --git a/sysa/run.sh b/sysa/run.sh @@ -10,6 +10,17 @@ set -e # shellcheck source=sysa/helpers.sh . helpers.sh +populate_device_nodes() { + # http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html + test -c /dev/console || mknod -m 622 /dev/console c 5 1 + test -c /dev/null || mknod -m 666 /dev/null c 1 3 + test -c /dev/zero || mknod -m 666 /dev/zero c 1 5 + test -c /dev/ptmx || mknod -m 666 /dev/ptmx c 5 2 + test -c /dev/tty || mknod -m 666 /dev/tty c 5 0 + test -c /dev/random || mknod -m 444 /dev/random c 1 8 + test -c /dev/urandom || mknod -m 444 /dev/urandom c 1 9 +} + export PREFIX=/after build flex-2.5.11 @@ -55,4 +66,17 @@ build perl5.005_03 build perl-5.6.2 +populate_device_nodes + +build autoconf-2.52 stage1.sh + +build automake-1.4-p6 stage1.sh +build automake-1.4-p6 stage2.sh + +build autoconf-2.52 stage2.sh + +build autoconf-2.13 + +build autoconf-2.12 + echo "Bootstrapping completed."