logo

live-bootstrap

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

pass1.sh (1652B)


  1. # SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
  2. # SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
  3. #
  4. # SPDX-License-Identifier: GPL-3.0-or-later
  5. src_prepare() {
  6. default
  7. # Regenerate bison files
  8. sed -i '/yydestruct/d' perly.y
  9. rm -f perly.c perly.h
  10. bison -d perly.y
  11. mv perly.tab.c perly.c
  12. mv perly.tab.h perly.h
  13. # Regenerate other prebuilt header files
  14. rm -f proto.h pp.sym pp_proto.h perlapi.c perlapi.h opnames.h opcode.h \
  15. objXSUB.h embedvar.h global.sym
  16. for file in opcode embed keywords; do
  17. rm -f ${file}.h
  18. perl ${file}.pl
  19. done
  20. rm -f regnodes.h
  21. perl regcomp.pl
  22. rm -f ext/ByteLoader/byterun.h ext/ByteLoader/byterun.c ext/B/B/Asmdata.pm
  23. perl bytecode.pl
  24. rm -f warnings.h lib/warnings.pm
  25. perl warnings.pl
  26. # Regenerate prebuilt perl files
  27. rm -rf lib/unicode/Is lib/unicode/In lib/unicode/To lib/unicode/*.pl
  28. # Manpages
  29. rm -f lib/Pod/Man.pm
  30. # Workaround for some linking problems, remove if possible
  31. sed -i 's/perl_call_method/Perl_call_method/' ext/Data/Dumper/Dumper.xs
  32. sed -i 's/perl_call_sv/Perl_call_sv/' ext/Data/Dumper/Dumper.xs
  33. sed -i 's/sv_setptrobj/Perl_sv_setref_iv/' ext/POSIX/POSIX.xs
  34. # We are using non-standard locations
  35. sed -i "s#/usr/include/errno.h#${PREFIX}/include/bits/errno.h#" ext/Errno/Errno_pm.PL
  36. }
  37. src_compile() {
  38. make -j1 PREFIX="${PREFIX}"
  39. cd lib/unicode
  40. # We don't use the Makefile because $0 is encoded and it uses ./mktables.PL
  41. # whereas the original uses mktables.PL
  42. ../../miniperl -I../../lib mktables.PL
  43. cd ../..
  44. }