You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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