Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

89 lines
4.0KB

  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. build:
  28. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
  29. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
  30. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
  31. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
  32. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
  33. apt-get update
  34. apt-get install pkg-config python2.7 -y
  35. cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts
  36. cp -prv /usr/bin/python2.7 /usr/bin/python2 # stupid depot tool scripts
  37. ./build-v8.sh
  38. archive:
  39. rm -rf v8.a
  40. #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  41. # third_party/
  42. # excluding buildtools/third_party directory which contains libc++ etc., or you will get linker errors.
  43. # ./out/x64.release/obj/buildtools/third_party/libc++/libc++/
  44. # second exclude for external snapshot, we need only the non-external one, or we get some weeiiird results of course!
  45. # both implement DefaultSnapshotBlob() and we need to add the right one to the object file.
  46. # 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")
  47. # Let's go back to our white-list approach.. let's see...
  48. #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  49. # We no longer use our v8.a, still including it for now.
  50. # no longer works with newer, missing some files echo all included object files listed below
  51. # no longer works with newer, missing some files ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  52. # We'll use this one below..
  53. find ./v8/out/x64.release/ -name 'libv8_monolith.a' -type f
  54. # We'll also include .so files..
  55. find ./v8/out/x64.release/ -name '*.so' -type f
  56. package:
  57. rm -rf out
  58. rm -rf v8pp_*_amd64.deb
  59. mkdir -p out/opt/cppse/build/v8pp/lib
  60. mkdir -p out/opt/cppse/build/v8pp/include
  61. # Legacy include our own v8.a
  62. # no longer works with newer, missing some files cp -prv v8.a out/opt/cppse/build/v8pp/lib
  63. cp -prv v8/out/x64.release/obj/libv8_monolith.a out/opt/cppse/build/v8pp/lib
  64. # We'll also include .so files..
  65. #echo TEMP find ./v8/out/x64.release/ -name '*.so' -type f | xargs -n 1 cp -prv -t out/opt/cppse/build/v8pp/lib
  66. cp -prv v8pp/v8pp out/opt/cppse/build/v8pp/include/
  67. cp -prv v8/include out/opt/cppse/build/v8pp/include/v8
  68. fpm_package:
  69. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 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
  70. clean:
  71. rm -rf v8pp
  72. rm -rf v8
  73. rm -rf out
  74. rm -rf depot_tools
  75. rm -rf .gclient
  76. rm -rf .gclient_entries
  77. shell:
  78. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash