Skip to content

Commit

Permalink
dev-util/electron: Distribute patches in a tarball.
Browse files Browse the repository at this point in the history
FILESDIR has grown rather large, so move the patches to SRC.

Closes: https://bugs.gentoo.org/640750
Closes: gentoo#6537
Package-Manager: Portage-2.3.13, Repoman-2.3.3
  • Loading branch information
elprans authored and mgorny committed Dec 16, 2017
1 parent 246b544 commit 4eb576c
Show file tree
Hide file tree
Showing 24 changed files with 18 additions and 2,763 deletions.
1 change: 1 addition & 0 deletions dev-util/electron/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ DIST electron-grit-9536fb6429147d27ef1563088341825db0a893cd.tar.gz 378461 BLAKE2
DIST electron-libchromiumcontent-a9b88fab38a8162bb485cc5854973f71ea0bc7a6.tar.gz 427806 BLAKE2B 21274045953499b7656366520d93acb63515995e7d6614afa5bba097e80bf833611fd715f0a8782dbdcb3c7c11ce2c4f5c2789483d4847e5bd73567123022dfd SHA512 da23b6119aa39d2ebc39b20280e2b6c0c26eba3e45271a3b8b196149ae8fb17f7ae63b97821ecdbc74c8d28617e361a3570e89c716d560a3b0caa7fa1f673f09
DIST electron-native-mate-fd0e7dc4ab778f0d1ccda6c9640464ea06ee771e.tar.gz 23926 BLAKE2B 72ec5ee020ac18c5b3a8b6552698ed845cb0c401c0b02a4627479c98c581018658471df95de9d242db85ac9a4588b5f80b488180049271322545d69ecbf01123 SHA512 8715c417473340163ca3db2754ab10619679ac72378ff5c7f63899fe891d5c83e7b3db6832af885de63eb5a732ed54f393bcc3aeb8ddd38569e74023c46f72ac
DIST electron-node-9b1683e7000481ec6214eafa3eef7ac4594eb410.tar.gz 46194500 BLAKE2B 36537f40a597f9ed969abe385de8cf58fd2f48526021461ab5feb0e061a2dc0d4a49109191254e69b685101f6aa79d1c870091f0eae251ba8b3bc0b3e6a975e6 SHA512 f258cf5597154e976e1e4c0b81f6b63e9b344e4a28492137b80d59dc841490d4ad69e6bab2456a6334a42e51dfe2862cc389e837a4baac90a698ff60e5b08ab4
DIST electron-patches-1.6.15.tar.gz 28591 BLAKE2B 98654829e882874f4470d7bdb906f7cebde6c61c28568c06650464ecd8779cafd028b03711c063445387dd158804a7b9bac5aca836f56f2285b50fcaf3ee56b0 SHA512 c18e53bdf86246376fdac505481e4aa364438b703a47fb82b695d874dabf9a945df5381042b1a0cef102142f0482db51017a031647f8f8ffde3e8d1f629e2f9f
DIST electron-pdf-viewer-a050a339cfeabcfb5f07c313161d2ee27b6c3a39.tar.gz 38431 BLAKE2B 962b1eeaa74544d57a5664fc6965b9f43e6d94671a08be024bb3001d7cf7e3ee02b2c63c2074e2ed4d6484dc5db7515cb170bf7432a8d11ccf595716e5c4500e SHA512 a028b67c0644d4ddcfc5aee4e2abb305648eb666082ea2c151cb6b9b3972503093cadb32b102aa19b04c8e863c2ac55bb20cccbf2abbf7832f9cfd3c3618612e
60 changes: 16 additions & 44 deletions dev-util/electron/electron-1.6.15.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ LIBCHROMIUMCONTENT_COMMIT="a9b88fab38a8162bb485cc5854973f71ea0bc7a6"
ASAR_VERSION="0.13.0"
BROWSERIFY_VERSION="14.0.0"

PATCHES_P="gentoo-electron-patches-${P}"
CHROMIUM_P="chromium-${CHROMIUM_VERSION}"
BREAKPAD_P="chromium-breakpad-${BREAKPAD_COMMIT}"
BREAKPAD_SRC_P="breakpad-${BREAKPAD_SRC_COMMIT}"
Expand All @@ -48,7 +49,7 @@ ASAR_P="asar-${ASAR_VERSION}"
BROWSERIFY_P="browserify-${BROWSERIFY_VERSION}"

DESCRIPTION="Cross platform application development framework based on web technologies"
HOMEPAGE="http://electron.atom.io/"
HOMEPAGE="https://electronjs.org/"
SRC_URI="
https://commondatastorage.googleapis.com/chromium-browser-official/${CHROMIUM_P}.tar.xz
https://github.com/electron/electron/archive/v${PV}.tar.gz -> ${P}.tar.gz
Expand All @@ -62,6 +63,7 @@ SRC_URI="
https://github.com/electron/libchromiumcontent/archive/${LIBCHROMIUMCONTENT_COMMIT}.tar.gz -> electron-${LIBCHROMIUMCONTENT_P}.tar.gz
https://github.com/elprans/asar/releases/download/v${ASAR_VERSION}-gentoo/asar-build.tar.gz -> ${ASAR_P}.tar.gz
https://github.com/elprans/node-browserify/releases/download/${BROWSERIFY_VERSION}-gentoo/browserify-build.tar.gz -> ${BROWSERIFY_P}.tar.gz
https://github.com/elprans/gentoo-electron-patches/archive/${P}.tar.gz -> electron-patches-${PV}.tar.gz
"

S="${WORKDIR}/${P}"
Expand Down Expand Up @@ -178,23 +180,6 @@ DEPEND="${COMMON_DEPEND}
')
"

CHROMIUM_PATCHES="
chromium-FORTIFY_SOURCE.patch
chromium-gcc-7-r0.patch
chromium-glibc-2.24.patch
chromium-56-gcc4.patch
chromium-system-ffmpeg-r4.patch
chromium-system-icu-r0.patch
chromium-icu-59-r0.patch
chromium-icu-60-r0.patch
chromium-v8-icu-59-r0.patch
chromium-disable-widevine.patch
chromium-remove-gardiner-mod-font-r1.patch
chromium-shared-v8-r2.patch
chromium-lto-fixes-r3.patch
chromium-python3-compat-r0.patch
"

# Keep this in sync with the python_gen_any_dep call.
python_check_deps() {
has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
Expand Down Expand Up @@ -339,15 +324,8 @@ src_prepare() {
rsync -a "${WORKDIR}/${BROWSERIFY_P}/node_modules/" \
"${S}/node_modules/" || die

# electron patches
cd "${ELECTRON_S}" || die
eapply "${FILESDIR}/${P}.patch"
eapply "${FILESDIR}/${PN}-system-icu-r0.patch"

# node patches
cd "${NODE_S}" || die
eapply "${FILESDIR}/${P}-vendor-node.patch"
eapply "${FILESDIR}/${PN}-vendor-node-external-snapshots-r2.patch"
# make sure node uses the correct version of v8
rm -r deps/v8 || die
ln -s "${CHROMIUM_S}/v8" deps/ || die
Expand All @@ -371,22 +349,9 @@ src_prepare() {
sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die

# brightray patches
cd "${BRIGHTRAY_S}" || die
eapply "${FILESDIR}/${P}-vendor-brightray.patch"

# libchromiumcontent patches
cd "${LIBCC_S}" || die
eapply "${FILESDIR}/${P}-vendor-libchromiumcontent.patch"

# breakpad patches
cd "${BREAKPAD_S}" || die
eapply "${FILESDIR}/${P}-vendor-breakpad.patch"

# chromium patches
cd "${CHROMIUM_S}" || die

# libcc chromium patches
# Apply libcc Chromium patches.
_unnest_patches "${LIBCC_S}/patches"

EPATCH_SOURCE="${LIBCC_S}/patches" \
Expand All @@ -395,11 +360,16 @@ src_prepare() {
EPATCH_MULTI_MSG="Applying libchromiumcontent patches..." \
epatch

# Apply Gentoo-specific Chromium patches
local p
for p in ${CHROMIUM_PATCHES}; do
eapply "${FILESDIR}/${p}"
done
cd "${S}" || die

# Apply Gentoo patches
_unnest_patches "${WORKDIR}/${PATCHES_P}/${PV}"

EPATCH_SOURCE="${WORKDIR}/${PATCHES_P}/${PV}" \
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_MULTI_MSG="Applying Gentoo patches..." \
epatch

# Merge chromiumcontent component into chromium source tree.
mkdir -p "${CHROMIUM_S}/chromiumcontent" || die
Expand Down Expand Up @@ -526,6 +496,8 @@ src_prepare() {
keeplibs+=( third_party/ffmpeg )
fi

cd "${CHROMIUM_S}" || die

# Remove most bundled libraries. Some are still needed.
ebegin "Unbundling libraries"
build/linux/unbundle/remove_bundled_libraries.py \
Expand Down
48 changes: 0 additions & 48 deletions dev-util/electron/files/chromium-56-gcc4.patch

This file was deleted.

27 changes: 0 additions & 27 deletions dev-util/electron/files/chromium-FORTIFY_SOURCE.patch

This file was deleted.

9 changes: 0 additions & 9 deletions dev-util/electron/files/chromium-disable-widevine.patch

This file was deleted.

114 changes: 0 additions & 114 deletions dev-util/electron/files/chromium-gcc-7-r0.patch

This file was deleted.

15 changes: 0 additions & 15 deletions dev-util/electron/files/chromium-glibc-2.24.patch

This file was deleted.

Loading

0 comments on commit 4eb576c

Please sign in to comment.