mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
- Rename sources to distfiles for clarity. - Per sys(a/c) distfiles to reduce rootfs.py processing and reduce RAM usage in sysa. - Canonicalise early kaem mes/tcc files to kaem script conventions. - Cleanup unused setup in python.
47 lines
1,021 B
Bash
Executable file
47 lines
1,021 B
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
|
|
|
|
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
|
|
sha256sum -c checksums
|