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.

115 lines
4.9KB

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