git: 127451b6c3ed - main - devel/pycharm-pro: Set JAVA_VERSION in bin/pycharm-pro

From: Emanuel Haupt <ehaupt_at_FreeBSD.org>
Date: Thu, 02 Mar 2023 08:04:15 UTC
The branch main has been updated by ehaupt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=127451b6c3ed80d6ecb05bf6b4877aaf83675bc7

commit 127451b6c3ed80d6ecb05bf6b4877aaf83675bc7
Author:     Steve Wills <swills@FreeBSD.org>
AuthorDate: 2023-03-02 08:02:53 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2023-03-02 08:02:53 +0000

    devel/pycharm-pro: Set JAVA_VERSION in bin/pycharm-pro
    
    PR:             265719
    Approved by:    guido@kollerie.com (maintainer)
---
 devel/pycharm-pro/Makefile         | 1 +
 devel/pycharm-pro/files/pycharm.in | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/devel/pycharm-pro/Makefile b/devel/pycharm-pro/Makefile
index 008a68564c4a..291e138b1540 100644
--- a/devel/pycharm-pro/Makefile
+++ b/devel/pycharm-pro/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	pycharm-pro
 PORTVERSION=	2022.2.2
+PORTREVISION=	1
 CATEGORIES=	devel java python
 MASTER_SITES=	https://download.jetbrains.com/python/ \
 		http://download.jetbrains.com/python/
diff --git a/devel/pycharm-pro/files/pycharm.in b/devel/pycharm-pro/files/pycharm.in
index d0f462e88036..b06aa05a1f7d 100644
--- a/devel/pycharm-pro/files/pycharm.in
+++ b/devel/pycharm-pro/files/pycharm.in
@@ -1,3 +1,7 @@
 #!/bin/sh
 
+if [ -z "${JAVA_VERSION}" ]; then
+	export JAVA_VERSION=11
+fi
+
 exec "%%DATADIR%%/bin/pycharm.sh" "$@"