Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

120 lines
5.2KB

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