Date: Tue, 13 Dec 2022 15:33:49 GMT From: "Tobias C. Berner" <tcberner@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 4fecb3275970 - main - devel/jetbrains-clion: define default JAVA_HOME Message-ID: <202212131533.2BDFXnWY019488@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by tcberner: URL: https://cgit.FreeBSD.org/ports/commit/?id=4fecb327597025f0cd4d809c128279f12dacd5b7 commit 4fecb327597025f0cd4d809c128279f12dacd5b7 Author: Dmitry Wagin <dmitry.wagin@ya.ru> AuthorDate: 2022-12-13 15:32:03 +0000 Commit: Tobias C. Berner <tcberner@FreeBSD.org> CommitDate: 2022-12-13 15:32:03 +0000 devel/jetbrains-clion: define default JAVA_HOME bin/clion tries to figure out the proper JAVA_HOME, while giving the user the ability to override it. This can lead to it picking up a too old Java version: > clion java.lang.UnsupportedClassVersionError: com/intellij/util/lang/PathClassLoader has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0 To fix this, make the ports tree fill in its JAVA_HOME into bin/clion. Users can still override it to something specific by overriding CLION_JDK: > env CLION_JDK=/some/other/jdk/installation clion PR: 268358 --- devel/jetbrains-clion/Makefile | 5 +++-- devel/jetbrains-clion/files/clion.desktop.in | 2 +- devel/jetbrains-clion/files/clion.in | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/devel/jetbrains-clion/Makefile b/devel/jetbrains-clion/Makefile index a1b37213d77d..96254501be41 100644 --- a/devel/jetbrains-clion/Makefile +++ b/devel/jetbrains-clion/Makefile @@ -1,5 +1,6 @@ PORTNAME= clion PORTVERSION= 2022.3 +PORTREVISION= 1 CATEGORIES= devel java MASTER_SITES= https://download-cdn.jetbrains.com/cpp/ PKGNAMEPREFIX= jetbrains- @@ -22,11 +23,10 @@ RUN_DEPENDS= intellij-fsnotifier>0:java/intellij-fsnotifier \ USES= cpe python:run shebangfix +CPE_VENDOR= jetbrains USE_JAVA= yes JAVA_VERSION= 17+ -CPE_VENDOR= jetbrains - SHEBANG_FILES= bin/restart.py \ plugins/python-ce/helpers/typeshed/scripts/generate_proto_stubs.sh @@ -34,6 +34,7 @@ NO_ARCH= yes NO_ARCH_IGNORE= libjnidispatch.so NO_BUILD= yes SUB_FILES= ${PORTNAME} ${PORTNAME}.desktop pkg-message +SUB_LIST= JAVA_HOME=${JAVA_HOME} WRKSRC= ${WRKDIR}/clion-${PORTVERSION} diff --git a/devel/jetbrains-clion/files/clion.desktop.in b/devel/jetbrains-clion/files/clion.desktop.in index d160a98109e1..13342d422f55 100644 --- a/devel/jetbrains-clion/files/clion.desktop.in +++ b/devel/jetbrains-clion/files/clion.desktop.in @@ -6,7 +6,7 @@ Name=CLion GenericName=CLion Comment=CLion Integrated Development Environment Icon=%%DATADIR%%/bin/clion.png -Exec=%%DATADIR%%/bin/clion.sh +Exec=%%PREFIX%%/bin/clion Terminal=false StartupNotify=true Categories=Application;Development; diff --git a/devel/jetbrains-clion/files/clion.in b/devel/jetbrains-clion/files/clion.in index ad009afcadec..99e504d2c269 100644 --- a/devel/jetbrains-clion/files/clion.in +++ b/devel/jetbrains-clion/files/clion.in @@ -1,3 +1,6 @@ #!/bin/sh +export CLION_JDK=${CLION_JDK:-"%%JAVA_HOME%%"} +export SHELL="/bin/sh" + exec "%%DATADIR%%/bin/clion.sh" "$@"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212131533.2BDFXnWY019488>