live-bootstrap/sysa/heirloom-devtools-070527/heirloom-devtools-070527.kaem
fosslinux 10a55522a2 Change sources getting method.
- Rather than defining the urls where they are gotten (python sysa,
  python sysc, inside sysc), a spec file is now used that is easily
  interpretable and tool-independent.
- This is interpreted by rootfs.py and inside sysc.
- This is also used to make sources available and extract sources.
- Manual dirname selection is no longer required as is tarball renaming
  upon download - all of this is handled automatically.

Fixes #188
2022-10-02 09:48:20 +11:00

62 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
# Check tarball checksums
checksum-transcriber sources
sha256sum -c sources.SHA256SUM
mkdir build src
cd build
lexdir=/lex
# Extract
cp ${distfiles}/${pkg}.tar.bz2 ../src/
bunzip2 -f ../src/${pkg}.tar.bz2
tar xf ../src/${pkg}.tar ${pkg}/yacc ${pkg}/lex
rm -r ../src/
cd ${pkg}
# Prepare and patch
patch -Np0 -i ../../patches/yacc_remove_wchar.patch
patch -Np0 -i ../../patches/lex_remove_wchar.patch
# Build yacc
cd yacc
make -f Makefile.mk CC=tcc AR=tcc\ -ar CFLAGS=-DMAXPATHLEN=100\ -DEILSEQ=84\ -DMB_LEN_MAX=100 LDFLAGS=-lgetopt RANLIB=true
# Install yacc
install yacc ${bindir}
install -m 644 yaccpar /
# Build lex
cd ../lex
make -f Makefile.mk CC=tcc AR=tcc\ -ar CFLAGS=-DEILSEQ=84\ -DMB_LEN_MAX=100 LDFLAGS=-lgetopt RANLIB=true
# Install lex
mkdir ${lexdir}
install lex ${bindir}
install libl.a ${libdir}
install -m 644 ncform ${lexdir}
cd ../../..
# Checksums
if match x${UPDATE_CHECKSUMS} xTrue; then
sha256sum -o ${pkg}.checksums \
/usr/bin/yacc \
/usr/bin/lex \
/usr/lib/mes/libl.a \
/yaccpar \
/lex/ncform
install ${pkg}.checksums ${srcdir}
else
sha256sum -c ${pkg}.checksums
fi