No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

107 líneas
4.8KB

  1. SHELL:=/bin/bash
  2. #ubuntu1804:
  3. # # git clone https://github.com/rayburgemeestre/v8pp
  4. # #
  5. # git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
  6. # # will be factored out at some point
  7. # git clone https://github.com/pmed/v8pp || true
  8. # pushd v8pp && git checkout d62a0d581fd4ab05beb8a675216a12c72a5077c8 # master at time of writing
  9. #
  10. # bash ../ubuntu1804.sh make build
  11. # #bash ../ubuntu1804.sh make archive # outside container not enough permissions
  12. # bash ../ubuntu1804.sh make package # outside container not enough permissions
  13. #
  14. # # also packages v8pp for now
  15. # make fpm_package
  16. #
  17. #ubuntu2004:
  18. # # git clone https://github.com/rayburgemeestre/v8pp
  19. # #
  20. # git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
  21. # # will be factored out at some point
  22. # git clone https://github.com/pmed/v8pp || true
  23. # pushd v8pp && git checkout d62a0d581fd4ab05beb8a675216a12c72a5077c8 # master at time of writing
  24. # bash ../ubuntu2004.sh make build
  25. # #bash ../ubuntu2004.sh make archive # outside container not enough permissions
  26. # bash ../ubuntu2004.sh make package # outside container not enough permissions
  27. # # also packages v8pp for now
  28. # make fpm_package
  29. # bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  30. ubuntu2204:
  31. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
  32. #git clone -b v1.8.1 https://github.com/pmed/v8pp || true , next version 1.8.2, will probably contain the fix for clang-14 as well. for now..
  33. git clone -b master https://github.com/pmed/v8pp # ..we'll use master.
  34. bash ../ubuntu2204.sh make build # prepares packaging as well
  35. make fpm_package
  36. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  37. ubuntu2404:
  38. rm -rfv depot_tools
  39. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
  40. #git clone -b v1.8.1 https://github.com/pmed/v8pp || true , next version 1.8.2, will probably contain the fix for clang-14 as well. for now..
  41. git clone -b master https://github.com/pmed/v8pp # ..we'll use master.
  42. bash ../ubuntu2404.sh make build # prepares packaging as well
  43. make fpm_package
  44. bash ../ubuntu2404.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  45. build:
  46. # see issue https://exerror.com/fatal-detected-dubious-ownership-in-repository/
  47. git config --global --add safe.directory '*'
  48. switch-to-latest-clang
  49. apt-get update
  50. #apt-get install pkg-config python2.7 -y
  51. #cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts
  52. #cp -prv /usr/bin/python2.7 /usr/bin/python2 # stupid depot tool scripts
  53. ./build-v8.sh
  54. make prepare-package-v8
  55. ./build-v8pp.sh # basically only produces the v8pp/config.hpp (from config.hpp.in)
  56. make prepare-package-v8pp
  57. #archive:
  58. # rm -rf v8.a
  59. # #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  60. # # third_party/
  61. # # excluding buildtools/third_party directory which contains libc++ etc., or you will get linker errors.
  62. # # ./out/x64.release/obj/buildtools/third_party/libc++/libc++/
  63. # # second exclude for external snapshot, we need only the non-external one, or we get some weeiiird results of course!
  64. # # both implement DefaultSnapshotBlob() and we need to add the right one to the object file.
  65. # # ERR, ar rvs v8.a $$(find ./v8/out/x64.release/ -type f -name '*.o' | grep -v "buildtools/third_party/libc++/libc++" | grep -v "v8_external_snapshot")
  66. # # Let's go back to our white-list approach.. let's see...
  67. # #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  68. # # We no longer use our v8.a, still including it for now.
  69. # # no longer works with newer, missing some files echo all included object files listed below
  70. # # no longer works with newer, missing some files ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  71. # # We'll use this one below..
  72. # find ./v8/out/x64.release/ -name 'libv8_monolith.a' -type f
  73. # # We'll also include .so files..
  74. # find ./v8/out/x64.release/ -name '*.so' -type f
  75. prepare-package-v8:
  76. rm -rf out
  77. rm -rf v8pp_*_amd64.deb
  78. mkdir -p out/opt/cppse/build/v8pp/lib
  79. mkdir -p out/opt/cppse/build/v8pp/include
  80. cp -prv v8/out/x64.release/obj/libv8_monolith.a out/opt/cppse/build/v8pp/lib
  81. cp -prv v8/include out/opt/cppse/build/v8pp/include/v8
  82. prepare-package-v8pp:
  83. ls -alh v8pp/v8pp/config.hpp* || true
  84. cp -prv v8pp/v8pp out/opt/cppse/build/v8pp/include/
  85. fpm_package:
  86. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -v 1.1.1 -s dir -t deb -n v8pp --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "v8pp - build dependency" --url "https://github.com/rayburgemeestre/v8pp" --deb-generate-changes -C /src/out
  87. clean:
  88. rm -rf v8pp
  89. rm -rf v8
  90. rm -rf out
  91. rm -rf depot_tools
  92. rm -rf .gclient
  93. rm -rf .gclient_entries
  94. rm -rf ninja
  95. shell:
  96. FLAGS="-i --privileged" bash ../ubuntu2404.sh /bin/bash