Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

126 lines
5.4KB

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