SHELL:=/bin/bash UBUNTU_VERSION ?= 2404 CODENAME ?= noble VERSION:=10.0.139.9 #VERSION:=11.9.169.4 #VERSION:=13.0.245.25 build: $(CODENAME)/cppse-v8_$(VERSION)_amd64.deb $(CODENAME)/cppse-v8_$(VERSION)_amd64.deb: mkdir -p $(CODENAME) make ubuntu$(UBUNTU_VERSION) #ubuntu1804: # # git clone https://github.com/rayburgemeestre/v8pp # # # git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true # # will be factored out at some point # git clone https://github.com/pmed/v8pp || true # pushd v8pp && git checkout d62a0d581fd4ab05beb8a675216a12c72a5077c8 # master at time of writing # # bash ../ubuntu1804.sh make build # #bash ../ubuntu1804.sh make archive # outside container not enough permissions # bash ../ubuntu1804.sh make package # outside container not enough permissions # # # also packages v8pp for now # make fpm_package # #ubuntu2004: # # git clone https://github.com/rayburgemeestre/v8pp # # # git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true # # will be factored out at some point # git clone https://github.com/pmed/v8pp || true # pushd v8pp && git checkout d62a0d581fd4ab05beb8a675216a12c72a5077c8 # master at time of writing # bash ../ubuntu2004.sh make build # #bash ../ubuntu2004.sh make archive # outside container not enough permissions # bash ../ubuntu2004.sh make package # outside container not enough permissions # # also packages v8pp for now # make fpm_package # bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions # #ubuntu2204: # git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true # #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.. # git clone -b master https://github.com/pmed/v8pp # ..we'll use master. # bash ../ubuntu2204.sh make impl # prepares packaging as well # make fpm_package # bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions ubuntu$(UBUNTU_VERSION): rm -rfv depot_tools git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true #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.. #git clone -b master https://github.com/pmed/v8pp || true # ..we'll use master. git clone -b v2.1.1 https://github.com/pmed/v8pp || true # ..we'll use master. make impl1 # v8 only, doesn't deal with docker rootless very well # no v8pp anymore: bash ../ubuntu$(UBUNTU_VERSION).sh make impl2 # prepares packaging as well make fpm_package bash ../ubuntu$(UBUNTU_VERSION).sh chown $$(id -u):$$(id -g) . -R # fix permissions impl1: # see issue https://exerror.com/fatal-detected-dubious-ownership-in-repository/ #git config --global --add safe.directory '*' #switch-to-latest-clang #apt-get update #apt-get install pkg-config python2.7 -y #cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts #cp -prv /usr/bin/python2.7 /usr/bin/python2 # stupid depot tool scripts ./build-v8.sh make prepare-package-v8 impl2: ./build-v8pp.sh # basically only produces the v8pp/config.hpp (from config.hpp.in) make prepare-package-v8pp #archive: # rm -rf v8.a # #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o') # # third_party/ # # excluding buildtools/third_party directory which contains libc++ etc., or you will get linker errors. # # ./out/x64.release/obj/buildtools/third_party/libc++/libc++/ # # second exclude for external snapshot, we need only the non-external one, or we get some weeiiird results of course! # # both implement DefaultSnapshotBlob() and we need to add the right one to the object file. # # 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") # # Let's go back to our white-list approach.. let's see... # #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o') # # We no longer use our v8.a, still including it for now. # # no longer works with newer, missing some files echo all included object files listed below # # no longer works with newer, missing some files ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o') # # We'll use this one below.. # find ./v8/out/x64.release/ -name 'libv8_monolith.a' -type f # # We'll also include .so files.. # find ./v8/out/x64.release/ -name '*.so' -type f prepare-package-v8: rm -rf out mkdir -p out/opt/cppse/build/v8/lib mkdir -p out/opt/cppse/build/v8/include cp -prv v8/out/x64.release/obj/libv8_monolith.a out/opt/cppse/build/v8/lib cp -prv v8/include out/opt/cppse/build/v8/include/v8 prepare-package-v8pp: # no v8pp anymore: ls -alh v8pp/v8pp/config.hpp* || true # no v8pp anymore: cp -prv v8pp/v8pp out/opt/cppse/build/v8pp/include/ echo no-op fpm_package: rm -rf $(CODENAME)/cppse-v8_*_amd64.deb 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 " --description "v8 - build dependency" --url "https://github.com/rayburgemeestre/v8pp" --deb-generate-changes -C /src/out cp -prv cppse-v8_*_amd64.deb $(CODENAME)/ clean: rm -rf v8pp rm -rf v8 rm -rf out rm -rf depot_tools rm -rf .gclient rm -rf .gclient_entries rm -rf ninja shell: FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash