From 54906a00d64a475ee27cb25157b5878d853168de Mon Sep 17 00:00:00 2001 From: layman Date: Thu, 2 Apr 2020 03:59:26 -0700 Subject: [PATCH] update electron:7/electron:6 and add electron-8.2.0 --- dev-util/electron/Manifest | 9 +- dev-util/electron/electron-6.1.4.ebuild | 37 +- dev-util/electron/electron-7.1.1.ebuild | 33 +- ...ron-7.0.1.ebuild => electron-7.2.1.ebuild} | 43 +- dev-util/electron/electron-8.2.0.ebuild | 684 ++++++++++++++++++ .../electron/files/chromium-80-include.patch | 33 + .../files/chromium-80-unbundle-libxml.patch | 101 +++ 7 files changed, 863 insertions(+), 77 deletions(-) rename dev-util/electron/{electron-7.0.1.ebuild => electron-7.2.1.ebuild} (95%) create mode 100644 dev-util/electron/electron-8.2.0.ebuild create mode 100644 dev-util/electron/files/chromium-80-include.patch create mode 100644 dev-util/electron/files/chromium-80-unbundle-libxml.patch diff --git a/dev-util/electron/Manifest b/dev-util/electron/Manifest index d1d54b2..296822d 100644 --- a/dev-util/electron/Manifest +++ b/dev-util/electron/Manifest @@ -1,11 +1,10 @@ DIST chromium-76.0.3809.136.tar.xz 728890936 BLAKE2B 1c605af9d60f306bbe29a11be5cd7d2680e65da0717f1da9a9067916ede4416b9472e69bd115ced9f4dceada36242554e7bab803bbc2b1b1da3c3ef35c2642ef SHA512 b595be91818cae808567aac35da793b8b58b0014f4c3bb2c3cd05e715ad5f2a15d053d5447fd424833774cba99a5f3282a4c921e99eb3405d3c7017c1a9dff22 -DIST chromium-78.0.3904.90.tar.xz 742823212 BLAKE2B 2203eac96b6ecd9232a7f5bada6be9627e552a7532abcbea5638e9d1e989cdccf3697d58f594f201646a4ba83399fbed8a6eeb4281a5bc617ced1352a5ebedc0 SHA512 e8708797581cb0cf455c245563168833904a86e48d6d4440f100bf5411082ebbb9f0bdfc100f72ae45cd91872bea16db80e0e9f0db49cf0bfa5596711670beac DIST chromium-78.0.3904.97.tar.xz 742793812 BLAKE2B e7fada913f5831d805a50445da41ecbca7e27af52574ce242f427c0e4c83a74ae0283eb1667d74d39eb88f05e88e5a389945628666e24e26d635f74c43c8bc55 SHA512 e29312fe5c15eb6888a2e4d7e197c710d53feeecdf4e534c59f3db26973fee13f48880b46a7c3b132bb9989eb617db9c6138b809c3cb762332a9db25ad6d33dc +DIST chromium-80.0.3987.158.tar.xz 796918580 BLAKE2B 1cdbd4c22afee34035bcc10c5aab3ef2f977ab02d6afeb0d888bcb40f74c00413b77e37ec72d9a01bbefa4c3f2de92d372df6f91fe9ee7d7b18e014bb42567cd SHA512 c629c07e2464ccf44847643c62e33b796f35b5afec38a26fa25df914cfb823ed751467bba445b61a8be1433f24d8f18a74ced49108622f6d4b9e4559ac8e22dd DIST electron-6.1.4.tar.gz 4152215 BLAKE2B 4d2b4ca2b3de2d08a444706af272fc7d9fcbf307a23940e9027c547ffad5db7bac883855dc3fa3519595baef92c2ba7818697fd9c2e25f854b389bf7969c6099 SHA512 cf91159587e5760b6df11da8239f9ff5146c7997f938dd63e7a1e0233c224bf4cd37a7db57860c3740ab539778988ff152df90ebae88559183834888f850f6d5 -DIST electron-7.0.1.tar.gz 5328288 BLAKE2B 1e9db45e04b38ff819b2426217ac0bfed773f401764a63fc89f1991acb7d8409b26f11730358890408af8e6f80c864fcf80cbee7c79986a5ceb06e06a9409282 SHA512 3918378ea1835b3765d0ecfb5de04d252aba5165ea9e7c24a9e201a1c0c7cda194d659ab525f1028c568c5e6fc6e2ed0f5da0447b39f450e7e5272a175284942 DIST electron-7.1.1.tar.gz 5344054 BLAKE2B 7265a3c8d3ad83a57c876aa064a042903c10e05915238927a75e09e2c294307371e3cbe6a0e295bd755d82d3f01add8366600a71f743b1c3300af2c061dc3f26 SHA512 944b33568c21ef07b3cdeba76ce3c6ac9517c8c63cda4104e35dd6f1dd07dbab7bc5829617a54f76990a76d33646bac93fb89ea52852f9cc7e86075793545d72 -DIST electron-node-modules-6.1.4.tar.xz 26190372 BLAKE2B e37c1ae08a872b6f8028267a942514154eccb74c1ccc0322433f540599f0442cbc6b47cb69b37c6c20ca12edd32334d85843c4b9797eaf51871dd1e5c73fcd47 SHA512 37b8c9fceb7bb43fa8f29f8b3b718ae0dcc823f782dbd632c88c5838b0e826466176594a72cdda179c696139fdad5ddea109eb7606ed5ab5b195c0b8bb72a5af -DIST electron-node-modules-7.0.1.tar.xz 20507972 BLAKE2B d8620ef9b685f50b7b80e8199805b491a077a125e3316bc040a6d62fea25aa08f510cb79cc992ac90b5b6d0d318ccfa32abbf22e75dea4dfb646a474b5cbf755 SHA512 3d75ba452aac8a4fee2689bdd2bd7585cf9a6309c7b74eba0df60dc1f9e1a85bf78068839156671ba8de6e77843c5dcea6bb45893efc05887faef8af94e2ad23 -DIST electron-node-modules-7.1.1.tar.xz 20506016 BLAKE2B 62cc7b23bc348413f5d86cd53c81e2ba70c6596f3885b139d4765d8ce40ab4f4fc7bebeb2cb6f8184dc56590cf38cc09dcef860263582bf61f7d1915aba97499 SHA512 657d1a1c8f47cf317664ef55f2dbc005428ede329a49d99570edd2f8cc7da4baa5be2b3396dee014fd8fa5adbd44c61cb7feb75430767a5088c7fa377051837c +DIST electron-7.2.1.tar.gz 5396136 BLAKE2B 625d3a9bc999148e6381c61f6c03253fef1716ba9423fb60dce9bf2f9510274f3e89f34032d2e57770d394b845e86078960489514504469097dbac1a5df94009 SHA512 95b1c83776919fb10de5cbb83216a97d2281d2d7932a5f462d5d791e8115d7c98720ee3a4fc5e97f0d06adace60d88adf1d952dd3ea0bc0fbc544ccdcfcf1677 +DIST electron-8.2.0.tar.gz 5428140 BLAKE2B ee5933bfd4f854df8fad1347bd21af183663890a22edaf9477a723188214e4672d2b4ff070b450e0b5fbb91ce10aa12bd6733bc07542daf78c6654d32915cd75 SHA512 952ac3c50f4f3629e39572a2133df97b717baa81b8387679de279828a22694a386847a603fa30b1b7859300403c6e9c9210fb77f4b203b1ea3406978b082eeb9 +DIST node-12.13.0.tar.gz 72661495 BLAKE2B c67fb623de6e1efe59714b5fe86b20ee32b44e7eb95d19a2a40c9c54570b3c79a4e6e65003154fb17c81d091f8bf319df4bb1cc1f4f85c0c44f641183fe7dd0c SHA512 4698b7f9fed657ca1707c33dbf5892dea396c3e049ece38e77db02ce80573ee1ad548d1103cdc963861d814288e579ae6332f9885258d511c4861df9ce40b7c3 DIST node-12.4.0.tar.gz 70296027 BLAKE2B 9fb09be463714b326e3e75787b20a46974358010b04b0709c2ba655d3c78e1bbd22af1f6b5a978bc2b7acce9f745e66eca42c321da8242f83b489522d425fbaf SHA512 1fb97d96cea3ec74a5fc81566d9f5289056ca56ad3d1bf3470edd27c7e7f025294832e1604e3acfaab1e8fcc87d9f47eca21d53655cd8433020771e393495a18 DIST node-12.8.1.tar.gz 72104419 BLAKE2B e3bfdc0b4b5f049c685008a55913cf415591ed8fc1d3a0ed6ee9b5b98777c7638b78c21dd2d0f74a026310098b954d821c4eb7f82be201d2a70b47c3bd854206 SHA512 17d8d33a5c4154d6d0c1ce09b933a6ac0986242335fb6c45a4c1ed4190aede9bc08dbcb537d8547c5f53c15958e323bb26e6eefd51b139835e6825b45d73efa4 diff --git a/dev-util/electron/electron-6.1.4.ebuild b/dev-util/electron/electron-6.1.4.ebuild index 8ab353e..78192cd 100644 --- a/dev-util/electron/electron-6.1.4.ebuild +++ b/dev-util/electron/electron-6.1.4.ebuild @@ -15,10 +15,10 @@ VERSION_MIN="1" DESCRIPTION="Cross platform application development framework based on web technologies" HOMEPAGE="https://electronjs.org/" LICENSE="MIT" -SLOT="${VERSION_MAJ}/${VERSION_MIN}" +SLOT="6/1" KEYWORDS="~amd64" -IUSE="cups custom-cflags gconf gnome-keyring kerberos pulseaudio +IUSE="cups custom-cflags gconf gnome-keyring kerberos proxy pulseaudio +system-ffmpeg +system-libvpx +system-ssl component-build proprietary-codecs jumbo-build tcmalloc +suid debug" @@ -27,6 +27,7 @@ REQUIRED_USE="debug? ( component-build )" RESTRICT=" !system-ffmpeg? ( proprietary-codecs? ( bindist ) ) component-build? ( tcmalloc? ( usersandbox ) ) + network-sandbox " @@ -116,21 +117,7 @@ DEPEND="${COMMON_DEPEND} amd64? ( >=sys-devel/gcc-6.4.0[multilib] ) sys-devel/clang[xml] >=dev-util/gperf-3.0.4:= - $(python_gen_any_dep ' - dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] - dev-python/beautifulsoup:4[${PYTHON_USEDEP}] - dev-python/html5lib[${PYTHON_USEDEP}] - dev-python/simplejson[${PYTHON_USEDEP}] - dev-python/dbusmock[${PYTHON_USEDEP}] - ') " -python_check_deps() { - has_version -b "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && - has_version -b "dev-python/beautifulsoup:4[${PYTHON_USEDEP}]" && - has_version -b "dev-python/html5lib[${PYTHON_USEDEP}]" && - has_version -b "dev-python/simplejson[${PYTHON_USEDEP}]" && - has_version -b "dev-python/dbusmock[${PYTHON_USEDEP}]" -} llvm_check_deps() { has_version -b "sys-devel/clang:${LLVM_SLOT}" } @@ -146,9 +133,6 @@ NODE_VERSION="12.4.0" NODE_P="node-${NODE_VERSION}" NODE_S="${S}/vendor/node" -NODEMODULES_P="electron-node-modules-${PV}" -NODEMODULES_S="${S}/node_modules" - #deps included with chromium BORINGSSL_S="${CHROMIUM_S}/third_party/boringssl" PERFETTO_S="${CHROMIUM_S}/third_party/perfetto" @@ -169,7 +153,6 @@ SRC_URI=" https://github.com/electron/electron/archive/v${PV}.tar.gz -> ${P}.tar.gz https://storage.googleapis.com/chromium-browser-official/${CHROMIUM_P}.tar.xz https://github.com/nodejs/node/archive/v${NODE_VERSION}.tar.gz -> ${NODE_P}.tar.gz - https://gitlab.com/rexy712/electron-node-modules/raw/master/${NODEMODULES_P}.tar.xz " _get_target_arch() { @@ -221,11 +204,9 @@ src_unpack() { unpack "${P}.tar.gz" || die unpack "${CHROMIUM_P}.tar.xz" || die unpack "${NODE_P}.tar.gz" || die - unpack "${NODEMODULES_P}.tar.xz" || die mv "${CHROMIUM_P}" "${CHROMIUM_S}" || die mv "${P}" "${S}" || die mv "${NODE_P}" "${NODE_S}" || die - mv "node_modules" "${NODEMODULES_S}" || die } do_patches() { local dir="$1" @@ -240,6 +221,15 @@ do_patches() { src_prepare() { python_setup + cd "${S}" + if ! use proxy;then + my_proxy="" + else + my_proxy="$http_proxy" + fi + http_proxy="$my_proxy" yarn install || die "Yarn module installation failed" + + #apply electron patches if declare -p PATCHES | grep -q "^declare -a "; then [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" @@ -473,8 +463,7 @@ src_prepare() { cd "${S}" || die #Make sure we use python2.7 - python_export - python_wrapper_setup + python_setup eapply_user } diff --git a/dev-util/electron/electron-7.1.1.ebuild b/dev-util/electron/electron-7.1.1.ebuild index 476bc11..50b479d 100644 --- a/dev-util/electron/electron-7.1.1.ebuild +++ b/dev-util/electron/electron-7.1.1.ebuild @@ -15,10 +15,10 @@ VERSION_MIN="1" DESCRIPTION="Cross platform application development framework based on web technologies" HOMEPAGE="https://electronjs.org/" LICENSE="MIT" -SLOT="${VERSION_MAJ}/${VERSION_MIN}" +SLOT="7/1" KEYWORDS="~amd64" -IUSE="cups custom-cflags gconf gnome-keyring kerberos pulseaudio +IUSE="cups custom-cflags gconf gnome-keyring kerberos proxy pulseaudio +system-ffmpeg +system-libvpx +system-ssl component-build proprietary-codecs jumbo-build tcmalloc +suid debug" @@ -27,6 +27,7 @@ REQUIRED_USE="debug? ( component-build )" RESTRICT=" !system-ffmpeg? ( proprietary-codecs? ( bindist ) ) component-build? ( tcmalloc? ( usersandbox ) ) + network-sandbox " @@ -116,21 +117,7 @@ DEPEND="${COMMON_DEPEND} amd64? ( >=sys-devel/gcc-6.4.0[multilib] ) sys-devel/clang[xml] >=dev-util/gperf-3.0.4:= - $(python_gen_any_dep ' - dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] - dev-python/beautifulsoup:4[${PYTHON_USEDEP}] - dev-python/html5lib[${PYTHON_USEDEP}] - dev-python/simplejson[${PYTHON_USEDEP}] - dev-python/dbusmock[${PYTHON_USEDEP}] - ') " -python_check_deps() { - has_version -b "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && - has_version -b "dev-python/beautifulsoup:4[${PYTHON_USEDEP}]" && - has_version -b "dev-python/html5lib[${PYTHON_USEDEP}]" && - has_version -b "dev-python/simplejson[${PYTHON_USEDEP}]" && - has_version -b "dev-python/dbusmock[${PYTHON_USEDEP}]" -} llvm_check_deps() { has_version -b "sys-devel/clang:${LLVM_SLOT}" } @@ -146,9 +133,6 @@ NODE_VERSION="12.8.1" NODE_P="node-${NODE_VERSION}" NODE_S="${S}/vendor/node" -NODEMODULES_P="electron-node-modules-${PV}" -NODEMODULES_S="${S}/node_modules" - #deps included with chromium ANGLE_S="${CHROMIUM_S}/third_party/angle" BORINGSSL_S="${CHROMIUM_S}/third_party/boringssl" @@ -173,7 +157,6 @@ SRC_URI=" https://github.com/electron/electron/archive/v${PV}.tar.gz -> ${P}.tar.gz https://storage.googleapis.com/chromium-browser-official/${CHROMIUM_P}.tar.xz https://github.com/nodejs/node/archive/v${NODE_VERSION}.tar.gz -> ${NODE_P}.tar.gz - https://gitlab.com/rexy712/electron-node-modules/raw/master/${NODEMODULES_P}.tar.xz " _get_target_arch() { @@ -225,11 +208,9 @@ src_unpack() { unpack "${P}.tar.gz" || die unpack "${CHROMIUM_P}.tar.xz" || die unpack "${NODE_P}.tar.gz" || die - unpack "${NODEMODULES_P}.tar.xz" || die mv "${CHROMIUM_P}" "${CHROMIUM_S}" || die mv "${P}" "${S}" || die mv "${NODE_P}" "${NODE_S}" || die - mv "node_modules" "${NODEMODULES_S}" || die } do_patches() { local dir="$1" @@ -244,6 +225,14 @@ do_patches() { src_prepare() { python_setup + cd "${S}" + if ! use proxy;then + my_proxy="" + else + my_proxy="$http_proxy" + fi + http_proxy="$my_proxy" yarn install || die "Yarn module installation failed" + #apply electron patches if declare -p PATCHES | grep -q "^declare -a "; then [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" diff --git a/dev-util/electron/electron-7.0.1.ebuild b/dev-util/electron/electron-7.2.1.ebuild similarity index 95% rename from dev-util/electron/electron-7.0.1.ebuild rename to dev-util/electron/electron-7.2.1.ebuild index 15ec1a0..7fc97d0 100644 --- a/dev-util/electron/electron-7.0.1.ebuild +++ b/dev-util/electron/electron-7.2.1.ebuild @@ -10,15 +10,15 @@ inherit check-reqs chromium-2 multilib ninja-utils python-any-r1 toolchain-funcs #META VERSION_MAJ="7" -VERSION_MIN="0" +VERSION_MIN="2" DESCRIPTION="Cross platform application development framework based on web technologies" HOMEPAGE="https://electronjs.org/" LICENSE="MIT" -SLOT="${VERSION_MAJ}/${VERSION_MIN}" +SLOT="7/2" KEYWORDS="~amd64" -IUSE="cups custom-cflags gconf gnome-keyring kerberos pulseaudio +IUSE="cups custom-cflags gconf gnome-keyring kerberos proxy pulseaudio +system-ffmpeg +system-libvpx +system-ssl component-build proprietary-codecs jumbo-build tcmalloc +suid debug" @@ -27,6 +27,7 @@ REQUIRED_USE="debug? ( component-build )" RESTRICT=" !system-ffmpeg? ( proprietary-codecs? ( bindist ) ) component-build? ( tcmalloc? ( usersandbox ) ) + network-sandbox " @@ -114,29 +115,16 @@ DEPEND="${COMMON_DEPEND} virtual/pkgconfig dev-vcs/git amd64? ( >=sys-devel/gcc-6.4.0[multilib] ) + sys-apps/yarn sys-devel/clang[xml] >=dev-util/gperf-3.0.4:= - $(python_gen_any_dep ' - dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] - dev-python/beautifulsoup:4[${PYTHON_USEDEP}] - dev-python/html5lib[${PYTHON_USEDEP}] - dev-python/simplejson[${PYTHON_USEDEP}] - dev-python/dbusmock[${PYTHON_USEDEP}] - ') " -python_check_deps() { - has_version -b "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && - has_version -b "dev-python/beautifulsoup:4[${PYTHON_USEDEP}]" && - has_version -b "dev-python/html5lib[${PYTHON_USEDEP}]" && - has_version -b "dev-python/simplejson[${PYTHON_USEDEP}]" && - has_version -b "dev-python/dbusmock[${PYTHON_USEDEP}]" -} llvm_check_deps() { has_version -b "sys-devel/clang:${LLVM_SLOT}" } #PACKAGE VERSIONS/EXTRACTION LOCATIONS -CHROMIUM_VERSION="78.0.3904.90" +CHROMIUM_VERSION="78.0.3904.97" CHROMIUM_P="chromium-${CHROMIUM_VERSION}" CHROMIUM_S="${WORKDIR}/chromium" @@ -146,9 +134,6 @@ NODE_VERSION="12.8.1" NODE_P="node-${NODE_VERSION}" NODE_S="${S}/vendor/node" -NODEMODULES_P="electron-node-modules-${PV}" -NODEMODULES_S="${S}/node_modules" - #deps included with chromium ANGLE_S="${CHROMIUM_S}/third_party/angle" BORINGSSL_S="${CHROMIUM_S}/third_party/boringssl" @@ -173,7 +158,6 @@ SRC_URI=" https://github.com/electron/electron/archive/v${PV}.tar.gz -> ${P}.tar.gz https://storage.googleapis.com/chromium-browser-official/${CHROMIUM_P}.tar.xz https://github.com/nodejs/node/archive/v${NODE_VERSION}.tar.gz -> ${NODE_P}.tar.gz - https://gitlab.com/rexy712/electron-node-modules/raw/master/${NODEMODULES_P}.tar.xz " _get_target_arch() { @@ -225,11 +209,9 @@ src_unpack() { unpack "${P}.tar.gz" || die unpack "${CHROMIUM_P}.tar.xz" || die unpack "${NODE_P}.tar.gz" || die - unpack "${NODEMODULES_P}.tar.xz" || die mv "${CHROMIUM_P}" "${CHROMIUM_S}" || die mv "${P}" "${S}" || die mv "${NODE_P}" "${NODE_S}" || die - mv "node_modules" "${NODEMODULES_S}" || die } do_patches() { local dir="$1" @@ -244,6 +226,16 @@ do_patches() { src_prepare() { python_setup + cd "${S}" + + if ! use "proxy";then + my_proxy="" + else + my_proxy="$http_proxy" + fi + http_proxy="$my_proxy" yarn install || die "Yarn module installation failed" + + #apply electron patches if declare -p PATCHES | grep -q "^declare -a "; then [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" @@ -485,8 +477,7 @@ src_prepare() { cd "${S}" || die #Make sure we use python2.7 - python_export - python_wrapper_setup + python_setup 'python2*' eapply_user } diff --git a/dev-util/electron/electron-8.2.0.ebuild b/dev-util/electron/electron-8.2.0.ebuild new file mode 100644 index 0000000..f396ac4 --- /dev/null +++ b/dev-util/electron/electron-8.2.0.ebuild @@ -0,0 +1,684 @@ +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) + +CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he + hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr + sv sw ta te th tr uk vi zh-CN zh-TW" + +inherit check-reqs chromium-2 multilib ninja-utils python-any-r1 toolchain-funcs flag-o-matic pax-utils llvm + +#META +VERSION_MAJ="8" +VERSION_MIN="2" + +DESCRIPTION="Cross platform application development framework based on web technologies" +HOMEPAGE="https://electronjs.org/" +LICENSE="MIT" +SLOT="8/2" +KEYWORDS="~amd64" + +IUSE="cups custom-cflags gconf gnome-keyring kerberos proxy pulseaudio + +system-ffmpeg +system-libvpx +system-ssl component-build + proprietary-codecs jumbo-build tcmalloc +suid debug" + +REQUIRED_USE="debug? ( component-build )" + +RESTRICT=" + !system-ffmpeg? ( proprietary-codecs? ( bindist ) ) + component-build? ( tcmalloc? ( usersandbox ) ) + network-sandbox +" + + +#DEPS +COMMON_DEPEND=" + >=app-eselect/eselect-electron-2.2 + cups? ( >=net-print/cups-2.2:= ) + dev-libs/expat:= + dev-libs/glib:2 + >=dev-libs/icu-64:= + dev-libs/libxml2:=[icu] + dev-libs/libxslt:= + dev-libs/nspr:= + >=dev-libs/nss-3.40.1:= + system-ssl? ( >=dev-libs/openssl-1.1.1d-r2:= ) + dev-libs/re2:= + gconf? ( >=gnome-base/gconf-3.2.6-r4:= ) + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.28.2:= ) + >=media-libs/alsa-lib-1.1.2:= + media-libs/fontconfig:= + media-libs/freetype:= + >=media-libs/harfbuzz-2.6.1:=[icu] + media-libs/libexif:= + media-libs/libjpeg-turbo:= + media-libs/libpng:= + media-libs/openh264:= + system-libvpx? ( >=media-libs/libvpx-1.8.0:=[postproc,svc] ) + >=media-libs/openh264-1.7.0:= + pulseaudio? ( media-sound/pulseaudio:= ) + system-ffmpeg? ( + >=media-video/ffmpeg-4:= + || ( + media-video/ffmpeg[-samba] + >=net-fs/samba-4.8.6-r2[-debug(-)] + ) + media-libs/opus:= + ) + >=net-dns/c-ares-1.13.0:= + >=net-libs/nghttp2-1.39.2:= + net-misc/curl:=[ssl] + sys-apps/dbus:= + sys-apps/pciutils:= + virtual/udev + x11-libs/cairo:= + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3[X] + x11-libs/libdrm + x11-libs/libnotify:= + x11-libs/libX11:= + x11-libs/libXcomposite:= + x11-libs/libXcursor:= + x11-libs/libXdamage:= + x11-libs/libXext:= + x11-libs/libXfixes:= + x11-libs/libXi:= + x11-libs/libXrandr:= + x11-libs/libXrender:= + x11-libs/libXScrnSaver:= + x11-libs/libXtst:= + x11-libs/pango:= + app-arch/snappy:= + media-libs/flac:= + media-libs/libwebp:= + sys-libs/zlib:=[minizip] + kerberos? ( virtual/krb5 ) + sys-libs/libcap:= +" +RDEPEND="${COMMON_DEPEND} + x11-misc/xdg-utils + virtual/opengl + virtual/ttf-fonts + tcmalloc? ( ! /dev/null 2>&1 || die + local patchlist=( $(cat "${patchloc}/.patches") ) + for file in "${patchlist[@]}";do + eapply -p1 "${file/#/${patchloc}/}" || die + done + popd > /dev/null 2>&1 || die +} +src_prepare() { + python_setup + + cd "${S}" + if ! use proxy;then + my_proxy="" + else + my_proxy="$http_proxy" + fi + http_proxy="$my_proxy" yarn install || die "Yarn module installation failed" + + #apply electron patches + if declare -p PATCHES | grep -q "^declare -a "; then + [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" + else + [[ -n ${PATCHES} ]] && eapply ${PATCHES} + fi + + #apply electron bundled patches + do_patches "${CHROMIUM_S}" "${S}/patches/chromium" + do_patches "${NODE_S}" "${S}/patches/node" + do_patches "${BORINGSSL_S}/src" "${S}/patches/boringssl" + do_patches "${V8_S}" "${S}/patches/v8" + + #ensure node uses the correct v8 + rm -r "${NODE_S}/deps/v8" || die + ln -s "${CHROMIUM_S}/v8" "${NODE_S}/deps/" || die + + #setup link to node for chromium + mkdir -p "${CHROMIUM_S}/third_party/node/linux/node-linux-x64/bin" || die + ln -s "${EPREFIX}/usr/bin/node" "${CHROMIUM_S}/third_party/node/linux/node-linux-x64/bin/node" || die + + #libs in chromium source tree we need to keep + local keeplibs=( + base/third_party/cityhash + base/third_party/double_conversion + base/third_party/dynamic_annotations + base/third_party/icu + base/third_party/nspr + base/third_party/superfasthash + base/third_party/symbolize + base/third_party/valgrind + base/third_party/xdg_mime + base/third_party/xdg_user_dirs + buildtools/third_party/libc++ + buildtools/third_party/libc++abi + chrome/third_party/mozilla_security_manager + courgette/third_party + net/third_party/mozilla_security_manager + net/third_party/nss + net/third_party/quic + net/third_party/uri_template + third_party/abseil-cpp + third_party/angle + third_party/angle/src/common/third_party/base + third_party/angle/src/common/third_party/smhasher + third_party/angle/src/common/third_party/xxhash + third_party/angle/src/third_party/compiler + third_party/angle/src/third_party/libXNVCtrl + third_party/angle/src/third_party/trace_event + third_party/angle/third_party/glslang + third_party/angle/third_party/spirv-headers + third_party/angle/third_party/spirv-tools + third_party/angle/third_party/vulkan-headers + third_party/angle/third_party/vulkan-loader + third_party/angle/third_party/vulkan-tools + third_party/angle/third_party/vulkan-validation-layers + third_party/apple_apsl + third_party/axe-core + third_party/blink + third_party/boringssl + third_party/boringssl/src/third_party/fiat + third_party/breakpad + third_party/breakpad/breakpad/src/third_party/curl + third_party/brotli + third_party/cacheinvalidation + third_party/catapult + third_party/catapult/common/py_vulcanize/third_party/rcssmin + third_party/catapult/common/py_vulcanize/third_party/rjsmin + third_party/catapult/third_party/beautifulsoup4 + third_party/catapult/third_party/html5lib-python + third_party/catapult/third_party/polymer + third_party/catapult/third_party/six + third_party/catapult/tracing/third_party/d3 + third_party/catapult/tracing/third_party/gl-matrix + third_party/catapult/tracing/third_party/jpeg-js + third_party/catapult/tracing/third_party/jszip + third_party/catapult/tracing/third_party/mannwhitneyu + third_party/catapult/tracing/third_party/oboe + third_party/catapult/tracing/third_party/pako + third_party/ced + third_party/cld_3 + third_party/closure_compiler + third_party/crashpad + third_party/crashpad/crashpad/third_party/lss + third_party/crashpad/crashpad/third_party/zlib + third_party/crc32c + third_party/cros_system_api + third_party/dav1d + third_party/dawn + third_party/depot_tools + third_party/devscripts + third_party/devtools-frontend + third_party/devtools-frontend/src/third_party + third_party/dom_distiller_js + third_party/emoji-segmenter + third_party/flatbuffers + third_party/freetype + third_party/libgifcodec + third_party/glslang + third_party/google_input_tools + third_party/google_input_tools/third_party/closure_library + third_party/google_input_tools/third_party/closure_library/third_party/closure + third_party/googletest + third_party/hunspell + third_party/iccjpeg + third_party/inspector_protocol + third_party/jinja2 + third_party/jsoncpp + third_party/jstemplate + third_party/khronos + third_party/leveldatabase + third_party/libXNVCtrl + third_party/libaddressinput + third_party/libaom + third_party/libaom/source/libaom/third_party/vector + third_party/libaom/source/libaom/third_party/x86inc + third_party/libjingle + third_party/libphonenumber + third_party/libsecret + third_party/libsrtp + third_party/libsync + third_party/libudev + third_party/libwebm + third_party/libxml/chromium + third_party/libyuv + third_party/llvm + third_party/lss + third_party/lzma_sdk + third_party/markupsafe + third_party/mesa + third_party/metrics_proto + third_party/modp_b64 + third_party/nasm + third_party/node + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 + third_party/one_euro_filter + third_party/openscreen + third_party/openscreen/src/third_party/tinycbor/src/src + third_party/ots + third_party/pdfium + third_party/pdfium/third_party/agg23 + third_party/pdfium/third_party/base + third_party/pdfium/third_party/bigint + third_party/pdfium/third_party/freetype + third_party/pdfium/third_party/lcms + third_party/pdfium/third_party/libopenjpeg20 + third_party/pdfium/third_party/libpng16 + third_party/pdfium/third_party/libtiff + third_party/pdfium/third_party/skia_shared + third_party/perfetto + third_party/pffft + third_party/ply + third_party/polymer + third_party/private-join-and-compute + third_party/protobuf + third_party/protobuf/third_party/six + third_party/pyjson5 + third_party/qcms + third_party/rnnoise + third_party/s2cellid + third_party/sfntly + third_party/simplejson + third_party/skia + third_party/skia/include/third_party/skcms + third_party/skia/include/third_party/vulkan + third_party/skia/third_party/skcms + third_party/skia/third_party/vulkan + third_party/smhasher + third_party/spirv-headers + third_party/SPIRV-Tools + third_party/sqlite + third_party/swiftshader + third_party/swiftshader/third_party/llvm-7.0 + third_party/swiftshader/third_party/llvm-subzero + third_party/swiftshader/third_party/marl + third_party/swiftshader/third_party/subzero + third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1 + third_party/unrar + third_party/usrsctp + third_party/vulkan + third_party/web-animations-js + third_party/webdriver + third_party/webrtc + third_party/webrtc/common_audio/third_party/fft4g + third_party/webrtc/common_audio/third_party/spl_sqrt_floor + third_party/webrtc/modules/third_party/fft + third_party/webrtc/modules/third_party/g711 + third_party/webrtc/modules/third_party/g722 + third_party/webrtc/rtc_base/third_party/base64 + third_party/webrtc/rtc_base/third_party/sigslot + third_party/widevine + third_party/woff2 + third_party/wuffs + third_party/zlib/google + tools/grit/third_party/six + url/third_party/mozilla + v8/src/third_party/siphash + v8/src/third_party/valgrind + v8/src/third_party/utf8-decoder + v8/third_party/inspector_protocol + v8/third_party/v8 + + # gyp -> gn leftovers + base/third_party/libevent + third_party/adobe + third_party/speech-dispatcher + third_party/usb_ids + third_party/xdg-utils + third_party/yasm/run_yasm.py + ) + if ! use system-ffmpeg;then + keeplibs+=( third_party/ffmpeg third_party/opus ) + fi + if ! use system-libvpx;then + keeplibs+=( third_party/libvpx ) + keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc ) + fi + if use tcmalloc;then + keeplibs+=( third_party/tcmalloc ) + fi + + cd "${CHROMIUM_S}" || die + + #remove unneeded libraries from chromium tree + ebegin "Unbundling libraries" + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die + eend + + #apply patches to chromium + if [ "${#CHROMIUM_PATCHES[@]}" -ne 0 ];then + eapply "${CHROMIUM_PATCHES[@]}" || die + fi + + sed -i -e "s/python/${EPYTHON}/" "${NODE_S}/deps/npm/node_modules/node-gyp/gyp/gyp" + + ln -s "${NODE_S}" "${CHROMIUM_S}/third_party/electron_node" || die + + cd "${S}" || die + + #Make sure we use python2.7 + python_setup + + eapply_user +} +src_configure() { + python_setup + + #CHROMIUM + cd "${CHROMIUM_S}" || die + + local gn_system_libraries=( + flac + fontconfig + freetype + harfbuzz-ng + icu + libdrm + libjpeg + libpng + libwebp + libxml + libxslt + openh264 + re2 + snappy + yasm + zlib + ) + if use system-ffmpeg;then + gn_system_libraries+=( ffmpeg opus ) + fi + if use system-libvpx;then + gn_system_libraries+=( libvpx ) + fi + local llvm_prefix="$(get_llvm_prefix -b)" + local myconf_gn="import(\"//electron/build/args/$(usex debug debug release).gn\") clang_base_path=\"${llvm_prefix}/bin/\"" + + tc-export AR CC CXX NM + + if ! tc-is-clang;then + einfo "Using ${llvm_prefix}/bin/${CHOST}-clang++ for compilation..." + CC="${CHOST}-clang" + CXX="${CHOST}-clang++" + strip-unsupported-flags + fi + + if tc-is-clang;then + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" + else + ewarn "Using a compiler other than clang is unsupported and will likely result in errors!" + myconf_gn+=" is_clang=false" + fi + + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" + + if tc-is-cross-compiler;then + tc-export BUILD {AR,CC,CXX,NM} + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" + else + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" + fi + + myconf_gn+=" is_debug=$(usex debug true false)" + myconf_gn+=" is_component_build=$(usex component-build true false)" + myconf_gn+=" is_official_build=$(usex component-build false $(usex debug false true))" + + myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)" + myconf_gn+=" use_allocator=\"$(usex tcmalloc tcmalloc none)\"" + myconf_gn+=" enable_nacl=false" + + myconf_gn+=" use_system_harfbuzz=true" + myconf_gn+=" use_cups=$(usex cups true false)" + myconf_gn+=" use_gio=$(usex gconf true false)" + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)" + myconf_gn+=" use_kerberos=$(usex kerberos true false)" + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" + #prevent chromium from generating incompatible shims for pulse + myconf_gn+=" link_pulseaudio=$(usex pulseaudio true false)" + + myconf_gn+=" icu_use_data_file=false" + myconf_gn+=" fieldtrial_testing_like_official_build=true" + myconf_gn+=" use_gold=false use_sysroot=false" + myconf_gn+=" linux_use_bundled_binutils=false use_custom_libcxx=false" + myconf_gn+=" use_lld=false" + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" + myconf_gn+=" ffmpeg_branding=\"$(usex proprietary-codecs Chrome Chromium)\"" + + myconf_gn+=" use_official_google_api_keys=false" + myconf_gn+=" google_api_key=\"\"" + myconf_gn+=" google_default_client_id=\"\"" + myconf_gn+=" google_default_client_secret=\"\"" + + myconf_gn+=" treat_warnings_as_errors=false" + myconf_gn+=" fatal_linker_warnings=false" + myconf_gn+=" is_electron_build=true" + + + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die + + local target_arch=$(_get_target_arch) + local ffmpeg_target_arch="${target_arch}" + + if ! use custom-cflags;then + replace-flags "-Os" "-O2" + append-cxxflags $(test-flags-CXX -Wno-unknown-warning-option) + append-cxxflags $(test-flags-CXX -Wno-invalid-offsetof) + append-cxxflags $(test-flags-CXX -Wno-return-type) + append-cxxflags $(test-flags-CXX -Wno-unused-variable) + strip-flags + + if use x86;then + filter-flags "-g*" + fi + + if [ "${target_arch}" == "x64" ] || [ "${target_arch}" == "ia32" ];then + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 + fi + fi + + if ! use system-ffmpeg;then + local build_ffmpeg_args="" + einfo "Configuring bundled ffmpeg..." + pushd "${CHROMIUM_S}/third_party/ffmpeg" > /dev/null 2>&1 || die + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die + chromium/scripts/copy_config.sh || die + chromium/scripts/generate_gn.py || die + popd > /dev/null 2>&1 || die + fi + + export TMPDIR="${WORKDIR}/temp" + mkdir -p -m 755 "${TMPDIR}" || die + + addpredict /dev/dri/ + + #NODE + einfo "Configuring bundled nodejs..." + pushd "${NODE_S}" > /dev/null 2>&1 || die + ./configure --shared --without-bundled-v8 \ + --shared-openssl --shared-http-parser --shared-zlib \ + --shared-nghttp2 --shared-cares --without-npm --with-intl=system-icu \ + --without-dtrace --dest-cpu=${target_arch} --prefix="" || die + popd > /dev/null 2>&1 || die + + set -- gn gen --args="${myconf_gn} ${EXTRA_GN} ${GN_EXTRA_ARGS}" out/Release + echo "$@" + "$@" || die + sed -i -e "s/python /${EPYTHON} /g" out/Release/toolchain.ninja || die + + #http_proxy="" yarn install || die + + cd "${S}" || die +} + +src_compile() { + python_setup + + cd "${CHROMIUM_S}" || die + eninja -C out/Release electron || die + einfo "Electron built successfully" + + if ! use debug;then + electron/script/strip-binaries.py -d out/Release || die + fi + eninja -C out/Release electron:electron_dist_zip || die +} + +src_install() { + local install_dir="$(_get_install_dir)" + local install_suffix="$(_get_install_suffix)" + + pushd "${CHROMIUM_S}/out/Release/locales" > /dev/null 2>&1 || die + chromium_remove_language_paks + popd > /dev/null 2>&1 || die + + cd "${CHROMIUM_S}/out/Release" || die + + dodir "${install_dir}" + pushd "${ED}/${install_dir}" > /dev/null 2>&1 || die + unpack "${CHROMIUM_S}/out/Release/dist.zip" || die + popd > /dev/null 2>&1 || die + + if [ -e "${ED}/${install_dir}/chrome-sandbox" ];then + use suid && chmod 4755 "${ED}/${install_dir}/chrome-sandbox" + fi + + dodir "/usr/bin" || die + dosym "../$(get_libdir)/electron${install_suffix}/electron" "/usr/bin/electron${install_suffix}" || die + + HEADERS_ONLY=1 \ + "${NODE_S}/tools/install.py" install "${ED}" "/usr" || die + dodir /usr/include/node/deps/{v8,uv} || die + dosym . /usr/include/node/src || die + for var in deps/{uv,v8}/include;do + dosym "../.." "/usr/include/node/${var}" || die + done + + dodir "/usr/include/electron${install_suffix}" || die + mv "${ED}/usr/include/node" "${ED}/usr/include/electron${install_suffix}/node" || die +} +pkg_postinst() { + if [ "$(eselect electron show)" == "(none)" ];then + eselect electron set "${PN}-${VERSION_MAJ}.${VERSION_MIN}" + fi +} +pkg_postrm() { + if [ "$(eselect electron show)" == "(none)" ];then + eselect electron set 1 + fi +} diff --git a/dev-util/electron/files/chromium-80-include.patch b/dev-util/electron/files/chromium-80-include.patch new file mode 100644 index 0000000..dd85de7 --- /dev/null +++ b/dev-util/electron/files/chromium-80-include.patch @@ -0,0 +1,33 @@ +From 8273f4d3130e06fd8b6bef87b07c936304b971d9 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Tue, 10 Dec 2019 20:59:57 +0000 +Subject: [PATCH] [cros search service]: Include for std::pow() + +IWYU. Follow up to commit 2b2ea3c09b ("[cros search service] Move shared +string matching functions to //chrome"), which broke the libstdc++ build: + + ../../chrome/common/string_matching/fuzzy_tokenized_string_match.cc:199:14: error: no member named 'pow' in namespace 'std' + std::pow(partial_match_penalty_rate, long_start - current - 1); + ~~~~~^ + +Bug: 957519 +Change-Id: I66f61cb4f93cfa0bfa3d1b00ba391ddd8f31a7fb +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1960310 +Auto-Submit: Raphael Kubo da Costa +Reviewed-by: Jia Meng +Commit-Queue: Raphael Kubo da Costa +Cr-Commit-Position: refs/heads/master@{#723499} +--- + +diff --git a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc +index 8351fa7..884ef63 100644 +--- a/chrome/common/string_matching/fuzzy_tokenized_string_match.cc ++++ b/chrome/common/string_matching/fuzzy_tokenized_string_match.cc +@@ -5,6 +5,7 @@ + #include "chrome/common/string_matching/fuzzy_tokenized_string_match.h" + + #include ++#include + #include + + #include "base/i18n/case_conversion.h" diff --git a/dev-util/electron/files/chromium-80-unbundle-libxml.patch b/dev-util/electron/files/chromium-80-unbundle-libxml.patch new file mode 100644 index 0000000..0f36905 --- /dev/null +++ b/dev-util/electron/files/chromium-80-unbundle-libxml.patch @@ -0,0 +1,101 @@ +diff --git a/build/linux/unbundle/libxml.gn b/build/linux/unbundle/libxml.gn +index c481bd3..3aaa1a4 100644 +--- a/build/linux/unbundle/libxml.gn ++++ b/build/linux/unbundle/libxml.gn +@@ -8,11 +8,52 @@ pkg_config("system_libxml") { + packages = [ "libxml-2.0" ] + } + +-static_library("libxml") { ++source_set("libxml") { ++ public_configs = [ ":system_libxml" ] ++} ++ ++static_library("libxml_utils") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ ":xml_reader", ++ ":xml_writer", ++ "//base/test:test_support", ++ "//services/data_decoder:xml_parser_fuzzer", ++ ] + sources = [ + "chromium/libxml_utils.cc", + "chromium/libxml_utils.h", + ] +- + public_configs = [ ":system_libxml" ] + } ++ ++static_library("xml_reader") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ "//base/test:test_support", ++ "//components/policy/core/common:unit_tests", ++ "//services/data_decoder:*", ++ "//tools/traffic_annotation/auditor:auditor_sources", ++ ] ++ sources = [ ++ "chromium/xml_reader.cc", ++ "chromium/xml_reader.h", ++ ] ++ deps = [ ++ ":libxml_utils", ++ ] ++} ++ ++static_library("xml_writer") { ++ # The XmlWriter is considered safe to use from any target. ++ visibility = [ "*" ] ++ sources = [ ++ "chromium/xml_writer.cc", ++ "chromium/xml_writer.h", ++ ] ++ deps = [ ++ ":libxml_utils", ++ ] ++} +diff --git a/third_party/libxml/chromium/libxml_utils.h b/third_party/libxml/chromium/libxml_utils.h +index ff969fa..e0f3ecd 100644 +--- a/third_party/libxml/chromium/libxml_utils.h ++++ b/third_party/libxml/chromium/libxml_utils.h +@@ -6,8 +6,7 @@ + #define THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ + + #include +- +-#include "third_party/libxml/src/include/libxml/xmlreader.h" ++#include + + // libxml uses a global error function pointer for reporting errors. + // A ScopedXmlErrorFunc object lets you change the global error pointer +diff --git a/third_party/libxml/chromium/xml_reader.cc b/third_party/libxml/chromium/xml_reader.cc +index 92464f4..4779290 100644 +--- a/third_party/libxml/chromium/xml_reader.cc ++++ b/third_party/libxml/chromium/xml_reader.cc +@@ -7,7 +7,8 @@ + #include + + #include "third_party/libxml/chromium/libxml_utils.h" +-#include "third_party/libxml/src/include/libxml/xmlreader.h" ++ ++#include + + using internal::XmlStringToStdString; + +diff --git a/third_party/libxml/chromium/xml_writer.cc b/third_party/libxml/chromium/xml_writer.cc +index 51fce8e..aa3a34f 100644 +--- a/third_party/libxml/chromium/xml_writer.cc ++++ b/third_party/libxml/chromium/xml_writer.cc +@@ -5,7 +5,8 @@ + #include "third_party/libxml/chromium/xml_writer.h" + + #include "third_party/libxml/chromium/libxml_utils.h" +-#include "third_party/libxml/src/include/libxml/xmlwriter.h" ++ ++#include + + XmlWriter::XmlWriter() : writer_(nullptr), buffer_(nullptr) {} +