From 2c1a12b8c8bec9b0bc4b00e468a0b6da3f55662c Mon Sep 17 00:00:00 2001 From: Mikle Kolyada Date: Wed, 13 May 2020 13:10:15 +0300 Subject: [PATCH] dev-util/pycharm-community: allow bundled jdk on demand Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Mikle Kolyada --- dev-util/pycharm-community/metadata.xml | 3 +++ .../pycharm-community-2020.1.ebuild | 15 ++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dev-util/pycharm-community/metadata.xml b/dev-util/pycharm-community/metadata.xml index d21de2d9f07b..c405595aa1a2 100644 --- a/dev-util/pycharm-community/metadata.xml +++ b/dev-util/pycharm-community/metadata.xml @@ -5,4 +5,7 @@ Mikle Kolyada zlogene@gentoo.org + + Use bundled jdk + diff --git a/dev-util/pycharm-community/pycharm-community-2020.1.ebuild b/dev-util/pycharm-community/pycharm-community-2020.1.ebuild index 0600c9803a8d..f8be402a51b3 100644 --- a/dev-util/pycharm-community/pycharm-community-2020.1.ebuild +++ b/dev-util/pycharm-community/pycharm-community-2020.1.ebuild @@ -12,8 +12,9 @@ SRC_URI="http://download.jetbrains.com/python/${P}.tar.gz" LICENSE="Apache-2.0 BSD CDDL MIT-with-advertising" SLOT="0" KEYWORDS="~amd64 ~x86" +IUSE="+bundled-jdk" -RDEPEND=">=virtual/jre-1.8 +RDEPEND="!bundled-jdk? ( >=virtual/jre-1.8 ) dev-libs/libdbusmenu dev-python/pip" @@ -25,16 +26,16 @@ QA_PREBUILT="opt/${PN}/bin/fsnotifier MY_PN=${PN/-community/} -src_prepare() { - default - - rm -rf jre || die -} - src_install() { insinto /opt/${PN} doins -r * + if use bundled-jdk; then + fperms -R a+x /opt/pycharm-community/jbr/bin/ + else + rm -r "${D}"/opt/pycharm-community/jbr/ || die + fi + fperms a+x /opt/${PN}/bin/{pycharm.sh,fsnotifier{,64},inspect.sh} dosym ../../opt/${PN}/bin/pycharm.sh /usr/bin/${PN} -- 2.26.2