commit: 094772508de6e03f6616b8cf4404d98eed9fa994
Author: Stefan Cristian B. <stefan.cristian+git <AT> rogentos <DOT> ro>
AuthorDate: Mon Feb 17 09:40:31 2025 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Feb 17 18:03:24 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09477250
dev-util/pycharm-community: version bump 2024.3.2 and bugfixes
* On #876295, implemented the solution discussed with @thesamesam to strip
debug symbols and relocate them in ${EPREFIX}/opt/${P}.
JetBrains IDEs have almost identical .build-ids, causing conflicts
To prevent the conflicts, we relocate debug symbols per package.
The preferred method is stripping with objcopy and using debugedit to
point to their new /usr/lib/debug/ location.
* The #804453 SONAME correction was done earlier than 2024.3.1-r1.
* Corrected the ful list of LICESNES as per #694270 bug
* On #842270 port is still exposed
The port can be closed with configuration by upstream.
Referal: https://intellij-support.jetbrains.com
Post name/link: 8125278285586-Internal-Local-ports-63342-6942
* The #907845 does not reproduce anymore.
* The #804456 does not reproduce anymore.
* The #804450 does not reproduce anymore.
* The #804453 does not reproduce anymore.
Bug: https://bugs.gentoo.org/842270
Closes: https://bugs.gentoo.org/907845
Closes: https://bugs.gentoo.org/694270
Closes: https://bugs.gentoo.org/804456
Closes: https://bugs.gentoo.org/804450
Closes: https://bugs.gentoo.org/804453
Closes: https://bugs.gentoo.org/949338
Signed-off-by: Stefan Cristian B. <stefan.cristian+git <AT> rogentos.ro>
Closes: https://github.com/gentoo/gentoo/pull/40450
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
dev-util/pycharm-community/Manifest | 2 +
.../pycharm-community-2024.3.2.ebuild | 203 +++++++++++++++++++++
2 files changed, 205 insertions(+)
diff --git a/dev-util/pycharm-community/Manifest
b/dev-util/pycharm-community/Manifest
index df166a400388..551496c02693 100644
--- a/dev-util/pycharm-community/Manifest
+++ b/dev-util/pycharm-community/Manifest
@@ -4,4 +4,6 @@ DIST pycharm-community-2024.1.4.tar.gz 640191029 BLAKE2B
3d0ebdd8300454c52c50ff5
DIST pycharm-community-2024.2.1-aarch64.tar.gz 650975601 BLAKE2B
0cb3ad78e3ce2e8cf1e4a069b32f1b1604981d51a1ae0b8aecc51893254b3591de67703d2d1b46e18aef97fa60d07db8fbf9f378b42bf2887da6cc3d0e189ea0
SHA512
e8e6d46c00e7384d589b1783bf5b3a44d94f236b0594d5eb9086799521744ed75027901c25d663ade9f7b30ff07220544b5609dfeb5ad947576edceb69601578
DIST pycharm-community-2024.2.1.tar.gz 651275184 BLAKE2B
aded074688b368b5d19ad74ff525377a90a64e10a7b61253029ba272923473028a06956a257e0ce255cf00e247de5217f4d6f51396b05eb39622283c8b6da346
SHA512
5bb6d535ca50b293d039a748ad58c301d38c61c93c10b72fb054a2b511f0608f7aa308f1fd8738dc7102de6eacaadbb8a5ad96edd053c9600bfc6d787b7c13e6
DIST pycharm-community-2024.3-aarch64.tar.gz 716326087 BLAKE2B
6d07052cc985f6aa1ea05a5ebe8ee51aef5b2046b02ee03b6891a76bbd1f5effa57e7258126939addc314fe88685869796cd6e601915a4733c9d218215f5f644
SHA512
0903918a488d90cd85192b476adb17e8610762b68844b81c84cde4e9c3068897318e9216ff6371b74958e0ee43410fcebf4334beb885d0a5ee880f4de96579fc
+DIST pycharm-community-2024.3.2-aarch64.tar.gz 788018356 BLAKE2B
e0a2f4b55308c8e6e7804459e90df32f7c5263ade69572f7047eac90ffff13ceb1aead712b06e992bb0ddd1133d7aa29466245cf4578cb574db814ea4a33f268
SHA512
1e99d8df26cc6bdcfa15e9157ddb7c3f9d33a5e7b8ad5e3949805aa4fac7d79e4cc25c63e6fe7b4007acffd9ccdde2d145b9660ac250c3ede4085f8b58932ef0
+DIST pycharm-community-2024.3.2.tar.gz 787792271 BLAKE2B
55f6c93b7c5c335f08b544241dc1b17d00d099bb20e21898a1f769dcad535976cdc34bcf5b9d6bcca378437df3900cf2dfd4deb7348172a627c6a0045407d3f7
SHA512
2fa0478c5ab0c26438eeb68fde334914d1f0fa51e862a4790a6e0a35517aa28690351d821bfe20defdd34e97e6b6a3364470d63bab5f651f1b48a07beb6a463f
DIST pycharm-community-2024.3.tar.gz 715968487 BLAKE2B
41bcf0ef8ac21b6c0976c08e8c71495a30cc941a50b28bf95175c2edabe00844d3c2f4f11e5b99e479d8ca5f17534154a4dc25c6da8fa99fcea03ec7eae7a3eb
SHA512
68de282c0df1dacfb0767bb9c15eeb2f583dac35d5f3db76b4da3324e47eecd20275aa46a919c58354d1c305d2fb61e305181cefbab64c8f0ef8371d2dac9884
diff --git a/dev-util/pycharm-community/pycharm-community-2024.3.2.ebuild
b/dev-util/pycharm-community/pycharm-community-2024.3.2.ebuild
new file mode 100644
index 000000000000..a1e24468cb96
--- /dev/null
+++ b/dev-util/pycharm-community/pycharm-community-2024.3.2.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop readme.gentoo-r1 wrapper xdg
+
+DESCRIPTION="Intelligent Python IDE with unique code assistance and analysis"
+
+# NOTE upstream release info
+#
https://data.services.jetbrains.com/products?code=PCP,PCC&release.type=release
+#
https://data.services.jetbrains.com/products?code=PCP,PCC&release.type=release&fields=name,releases
+
+HOMEPAGE="https://www.jetbrains.com/pycharm/"
+SRC_URI="
+ amd64? (
+ https://download.jetbrains.com/python/${P}.tar.gz
+ )
+ arm64? (
+ https://download.jetbrains.com/python/${P}-aarch64.tar.gz
+ )
+ x86? (
+ https://download.jetbrains.com/python/${P}.tar.gz
+ )
+"
+
+if [[ ${PN} == *-professional ]]; then
+ S="${WORKDIR}/${PN/%-professional/}-${PV}"
+ LICENSE="|| ( JetBrains-business JetBrains-classroom
JetBrains-educational JetBrains-individual )
+ Apache-2.0 BSD BSD-2 CC0-1.0 CC-BY-2.5 CC-BY-3.0 CC-BY-4.0 CPL-1.0 CDDL
CDDL-1.1 EPL-1.0 EPL-2.0
+ GPL-2 GPL-2-with-classpath-exception ISC JDOM LGPL-2.1 LGPL-3 MIT
MPL-1.1 MPL-2.0 OFL-1.1
+ PYTHON Unicode-DFS-2016 Unlicense UPL-1.0 ZLIB"
+else
+ LICENSE="|| ( JetBrains-business JetBrains-classroom
JetBrains-educational JetBrains-individual )
+ Apache-2.0 BSD BSD-2 CC0-1.0 CC-BY-2.5 CC-BY-3.0 CPL-1.0 CDDL-1.1
EPL-1.0 GPL-2
+ GPL-2-with-classpath-exception ISC JDOM JSON LGPL-2+ LGPL-2.1 LGPL-3
MIT MPL-1.1 MPL-2.0
+ OFL-1.1 UPL-1.0 ZLIB"
+fi
+
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm64 ~x86"
+IUSE="+bundled-jdk"
+
+if [[ ${PN} == *-professional ]]; then
+ IUSE+=" +bundled-xvfb"
+fi
+
+BDEPEND="dev-util/debugedit
+ dev-util/patchelf
+"
+
+# NOTE
+# The remote-dev-server present in pycharm-professional contains most of the
+# libraries need for the bundled jdk. These are not in the RUNPATH of the jdk.
+# So the dependencies are actually needed.
+RDEPEND="
+ !bundled-jdk? (
+ >=virtual/jre-17:*
+ )
+ bundled-jdk? (
+ app-accessibility/at-spi2-core:2
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/wayland
+ media-libs/alsa-lib
+ media-libs/freetype
+ media-libs/mesa
+ net-print/cups
+ sys-apps/dbus
+ sys-libs/zlib
+ x11-libs/cairo
+ 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/libXtst
+ x11-libs/libXxf86vm
+ x11-libs/libdrm
+ x11-libs/libxcb
+ x11-libs/libxkbcommon
+ x11-libs/pango
+ )
+"
+
+if [[ ${PN} == *-professional ]]; then
+RDEPEND+="
+ bundled-xvfb? (
+ dev-libs/libpcre2
+ sys-libs/pam
+ sys-process/audit
+ )
+ !bundled-xvfb? (
+ x11-base/xorg-server[xvfb]
+ )
+"
+fi
+
+QA_PREBUILT="opt/${PN}/*"
+
+src_prepare() {
+ default
+
+ rm -v "${S}"/help/ReferenceCardForMac.pdf || die
+
+ rm -v
"${S}"/plugins/python-ce/helpers/pydev/_pydevd_{bundle,frame_eval}/*{darwin,win32}*
|| die
+
+ if ! use amd64; then
+ rm -v
"${S}"/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so
|| die
+ if [[ -d "${S}"/lib/async-profiler/ ]]; then
+ rm -v
"${S}"/lib/async-profiler/amd64/libasyncProfiler.so || die
+ fi
+ fi
+ if ! use arm64; then
+ rm -v
"${S}"/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_linux_aarch64.so
|| die
+ if [[ -d "${S}"/lib/async-profiler/ ]]; then
+ rm -v
"${S}"/lib/async-profiler/aarch64/libasyncProfiler.so || die
+ fi
+ fi
+ if ! use x86; then
+ rm -v
"${S}"/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_linux_x86.so
|| die
+ fi
+
+ sed -i \
+ -e "\$a\\\\" \
+ -e
"\$a#-----------------------------------------------------------------------" \
+ -e "\$a# Disable automatic updates as these are handled through
Gentoo's" \
+ -e "\$a# package manager. See bug #704494" \
+ -e
"\$a#-----------------------------------------------------------------------" \
+ -e "\$aide.no.platform.update=Gentoo" bin/idea.properties
+
+ # removing debug symbols and relocating debug files as per #876295
+ find . -type f -exec sh -c 'file "{}" | grep -qE "ELF (32|64)-bit" && \
+ objcopy --remove-section .note.gnu.build-id "{}" && \
+ debugedit -b "${EPREFIX}/opt/${PN}" -d "/usr/lib/debug" -i
"{}"' \;
+
+ if use bundled-jdk; then
+ patchelf --set-rpath '$ORIGIN/../lib' "jbr/bin/"* || die
+ patchelf --set-rpath '$ORIGIN'
"jbr/lib/"{libjcef.so,jcef_helper} || die
+ patchelf --set-rpath '$ORIGIN:$ORIGIN/server' jbr/lib/lib*.so*
|| die
+ else
+ rm -r "jbr" || die
+ fi
+
+ if [[ ${PN} == *-professional ]]; then
+ if use bundled-xvfb; then
+ patchelf --set-rpath '$ORIGIN/../lib'
"${S}"/plugins/remote-dev-server/selfcontained/bin/{Xvfb,xkbcomp} || die
+ patchelf --set-rpath '$ORIGIN'
"${S}"/plugins/remote-dev-server/selfcontained/lib/lib*.so* || die
+ else
+ rm -vr "${S}"/plugins/remote-dev-server/selfcontained
|| die
+ sed '/export REMOTE_DEV_SERVER_IS_NATIVE_LAUNCHER/a
export REMOTE_DEV_SERVER_USE_SELF_CONTAINED_LIBS=1' \
+ -i bin/remote-dev-server.sh || die
+ fi
+ fi
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ local DIR="/opt/${PN}"
+ local JRE_DIR="jbr"
+
+ insinto "${DIR}"
+ doins -r ./*
+
+ fperms 755
"${DIR}"/bin/{format.sh,fsnotifier,inspect.sh,jetbrains_client.sh,ltedit.sh,pycharm,pycharm.sh,restarter}
+
+ if use bundled-jdk; then
+ fperms 755
"${DIR}/${JRE_DIR}"/bin/{java,javac,javadoc,jcmd,jdb,jfr,jhsdb,jinfo,jmap,jps,jrunscript,jstack,jstat,jwebserver,keytool,rmiregistry,serialver}
+ fperms 755
"${DIR}"/"${JRE_DIR}"/lib/{cef_server,chrome-sandbox,jcef_helper,jexec,jspawnhelper}
+ fi
+
+ if [[ ${PN} == *-professional ]]; then
+ if use bundled-xvfb; then
+ fperms 755
"${DIR}"/plugins/remote-dev-server/selfcontained/bin/{Xvfb,xkbcomp}
+ fi
+ fperms 755 "${DIR}" "${DIR}"/bin/remote-dev-server{,.sh}
+ fi
+
+ make_wrapper "${PN}" "${DIR}/bin/pycharm"
+ newicon "bin/${PN/%-*/}.png" "${PN}.png"
+ make_desktop_entry "${PN}" "${PN}" "${PN}"
+
+ readme.gentoo_create_doc
+
+ # recommended by:
https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
+ dodir /usr/lib/sysctl.d
+ cat > "${ED}/usr/lib/sysctl.d/30-${PN}-inotify-watches.conf" <<-EOF ||
die
+ fs.inotify.max_user_watches = 524288
+ EOF
+}