logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

pass1.sh (1930B)


  1. # SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
  2. # SPDX-FileCopyrightText: 2025 fosslinux <fosslinux@aussies.space>
  3. #
  4. # SPDX-License-Identifier: GPL-3.0-or-later
  5. # sources note: Unfortunately, xz's xz tarballs use SHA-256 checksum, which
  6. # is not widely supported (including by xz), so we use bz2 tarball instead.
  7. src_prepare() {
  8. # Delete translation catalogs
  9. rm po/*.gmo
  10. # Delete generated documentation
  11. rm -rf po4a/man
  12. # Would have detected the xz backdoor
  13. rm tests/files/*.{x,l}z
  14. # Regenerate these c files/headers
  15. rm src/liblzma/rangecoder/price_table.c src/liblzma/lzma/fastpos_table.c \
  16. src/liblzma/lz/lz_encoder_hash_table.h \
  17. src/liblzma/check/crc{32,64}_table_*.h
  18. pushd src/liblzma/rangecoder
  19. gcc -std=c99 -o price_tablegen price_tablegen.c
  20. ./price_tablegen > price_table.c
  21. popd
  22. pushd src/liblzma/lzma
  23. gcc -std=c99 -o fastpos_tablegen fastpos_tablegen.c
  24. ./fastpos_tablegen > fastpos_table.c
  25. popd
  26. pushd src/liblzma/check
  27. gcc -std=c99 -o crc32_tablegen_le crc32_tablegen.c
  28. ./crc32_tablegen_le > crc32_table_le.h
  29. gcc -std=c99 -DWORDS_BIGENDIAN -o crc32_tablegen_be crc32_tablegen.c
  30. ./crc32_tablegen_be > crc32_table_be.h
  31. gcc -std=c99 -DLZ_HASH_TABLE -o crc32_tablegen_hashtable crc32_tablegen.c
  32. ./crc32_tablegen_hashtable > ../lz/lz_encoder_hash_table.h
  33. gcc -std=c99 -o crc64_tablegen_le crc64_tablegen.c
  34. ./crc64_tablegen_le > crc64_table_le.h
  35. gcc -std=c99 -DWORDS_BIGENDIAN -o crc64_tablegen_be crc64_tablegen.c
  36. ./crc64_tablegen_be > crc64_table_be.h
  37. popd
  38. AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 AUTOCONF=autoconf-2.69 AUTOM4TE=autom4te-2.69 autoreconf-2.69 -f
  39. }
  40. src_configure() {
  41. ./configure \
  42. --prefix="${PREFIX}" \
  43. --disable-shared \
  44. --disable-nls \
  45. --build=i386-unknown-linux-musl \
  46. --libdir="${LIBDIR}"
  47. }