dev-util/pycharm-professional: 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 #923766 SONAME correction was done earlier than 2024.3.1-r1.
* Corrected the full list of LICENSES as per #694272 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 #804450 does not reproduce anymore.
* The #914286 does not reproduce anymore.
* The #914287 does not reproduce anymore.
* The #914285 does not reproduce anymore.

Bug: https://bugs.gentoo.org/842270
Bug: https://bugs.gentoo.org/876295
Closes: https://bugs.gentoo.org/923766
Closes: https://bugs.gentoo.org/914286
Closes: https://bugs.gentoo.org/914287
Closes: https://bugs.gentoo.org/914285
Closes: https://bugs.gentoo.org/949389
Signed-off-by: Stefan Cristian B. <stefan.cristian+git@rogentos.ro>
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
This commit is contained in:
Stefan Cristian B.
2025-02-17 11:34:34 +02:00
committed by Viorel Munteanu
parent 6eecc3547c
commit 028156b32a
2 changed files with 205 additions and 0 deletions

View File

@@ -2,4 +2,6 @@ DIST pycharm-professional-2023.2.tar.gz 752661880 BLAKE2B a808ea29be18a5d4da603c
DIST pycharm-professional-2023.3.3-aarch64.tar.gz 817002751 BLAKE2B 75e43700d727bc7cabb2d87ea353cc6644ce66fdb669e52a17a64522f1e883d725ba8671ef664c7d7fb87508083656f42f937d9d7fbb30bacb11c0f7f7074d35 SHA512 a006dc281fb66c92ca2bee5b83f0deb85ca49eff8390a74b3f9869c0767931c83040136118d24b5acde24d30e9de1d3c7a7ff552c4e82331015e5325f3550817
DIST pycharm-professional-2023.3.3.tar.gz 816045880 BLAKE2B 2f967d6aad4ff837da1ed08e74a625c4f59ec9a867f47c112858e7d9d9fb1dcf538da82a4970b7cb0d2e35dfd7f30743ee14aaf2cfadf18fb3db05e5a10f35f8 SHA512 f7c32f8608e235f111ffd83573fb60e7efdac5107ec50564d33885b3c5c0ccc37f951c8df139ac8a23fffe92e51a3b487a37648daa4b801f49529f7d761cda2b
DIST pycharm-professional-2024.3-aarch64.tar.gz 1141292960 BLAKE2B 7199429f44b7b8b3d4721dafc5cb43afd3a941404f1b55352c18acaf0236351f7414a985d6a632814547e6b092b90dc77e886efd9a5377375a5086cd903b6a3c SHA512 148397f478b15e33f1355d27ec007b347ccba669d6e0141ed39f7065be3857c27b382ef1a7a78c11fc04d12514b724129219af0e3b77403f507a06fc6422b640
DIST pycharm-professional-2024.3.2-aarch64.tar.gz 1163550105 BLAKE2B 6e4cad835433d99d12c16c8f6e261b9471721b524690c92df6428bd36fa841da99ac941777130d84bf30ce778d945b783fa59a7d8c17d26c2419ef2146e35901 SHA512 27af643e78e17a58108a927607d839bc436c83eaa95846b461ac1cc47623e567a9714312cec9b4b6212074601f7c91ecb133de2122bec2cf109c8275fe221e9c
DIST pycharm-professional-2024.3.2.tar.gz 1163857060 BLAKE2B b30ea1e7467f5fa58ef77df234d62dd5916ab2400faac486deeb8940b6ffb43986e56cb1ba85e3bcff6bdcff25f6ee2b8ccdbe4429f04e45b1e099fc02063b06 SHA512 70dbaf542e2c6dd788c1c673449ae238ddf21790dafdb14e38aa42247d5f0f030352bcd4be9e5817a7fdf0941f0d11f4a1247b43257d469d3b783752eb8856f1
DIST pycharm-professional-2024.3.tar.gz 1141442187 BLAKE2B 463856c3de11867714fd77413597508c15c7aa2cf75039efbbe3b2530cf345c4c9aa161f16d48e5d9301bf04288fdd1a1687f31c5549929e5865387f8aab527b SHA512 5b6c6d1599a337891650fee143ccfb8ff6614c2023c9004adfeed747e7c0d703fe75bfa6982a7b8154a09e0e072e0c98c0d7f47b2ceac88f5dfca6a3d455e277

View File

@@ -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
}