logo

live-bootstrap

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

pass1.sh (1910B)


  1. # SPDX-FileCopyrightText: 2022 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. # perly.c looks suspiciously like it is from bison, but is not; from the
  9. # below script:
  10. # Note that perly.c is *not* regenerated - this is now a static file which
  11. # is not dependent on perly.y any more.
  12. perl regen_perly.pl
  13. # Regenerate other prebuilt header files
  14. # Taken from headers of regen scripts
  15. rm -f embed.h embedvar.h perlapi.c perlapi.h proto.h mg_names.inc mg_raw.h \
  16. mg_vtable.h opcode.h opnames.h pp_proto.h \
  17. lib/B/Op_private.pm overload.h overload.inc lib/overload/numbers.pm \
  18. reentr.h reentr.c regnodes.h lib/warnings.pm \
  19. warnings.h lib/feature.pm feature.h
  20. perl regen.pl
  21. # Regenerate configure + config_h.SH
  22. rm -f Configure config_h.SH
  23. ln -s ../metaconfig-5.32.1\~rc1/.package .
  24. ln -s ../metaconfig-5.32.1\~rc1/U .
  25. metaconfig -m
  26. }
  27. src_configure() {
  28. ./Configure -des \
  29. -Dprefix="${PREFIX}" \
  30. -Dcc=gcc \
  31. -Dusedl=false \
  32. -Ddate=':' \
  33. -Dccflags="-U__DATE__ -U__TIME__" \
  34. -Darchname="i386-linux" \
  35. -Dmyhostname="(none)" \
  36. -Dmaildomain="(none)"
  37. }
  38. src_install() {
  39. default
  40. # Remove messed up manpages
  41. rm "${DESTDIR}/"*.0
  42. rm "${DESTDIR}${PREFIX}/lib/perl5/5.32.1/pod/perldebguts.pod"
  43. # Improve reproducibility. hostcat might be empty or set to "cat /etc/hosts"
  44. # depending on whether /etc/hosts was available during the build.
  45. sed -i "s_^hostcat='.*'\$_hostcat=''_g" "${DESTDIR}${PREFIX}/lib/perl5/5.32.1/i386-linux/Config_heavy.pl"
  46. # There are strange permissions on installed files.
  47. find "${DESTDIR}${PREFIX}/lib" -type f -exec chmod 644 {} \;
  48. }