git: 762a8c90b5a7 - main - devel/jetbrains-phpstorm: Add default JDK runtime

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Thu, 15 Dec 2022 17:26:30 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=762a8c90b5a71ca649aa5c5195a21b470b42c098

commit 762a8c90b5a71ca649aa5c5195a21b470b42c098
Author:     Dmitry Wagin <dmitry.wagin@ya.ru>
AuthorDate: 2022-12-15 07:38:03 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2022-12-15 17:22:28 +0000

    devel/jetbrains-phpstorm: Add default JDK runtime
    
    PR:             268371
    Reported by:    dmitry.wagin@ya.ru (maintainer)
---
 devel/jetbrains-phpstorm/Makefile                  | 2 ++
 devel/jetbrains-phpstorm/files/phpstorm.desktop.in | 2 +-
 devel/jetbrains-phpstorm/files/phpstorm.in         | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/devel/jetbrains-phpstorm/Makefile b/devel/jetbrains-phpstorm/Makefile
index a16b62d715fa..c95d1ffc741d 100644
--- a/devel/jetbrains-phpstorm/Makefile
+++ b/devel/jetbrains-phpstorm/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	phpstorm
 PORTVERSION=	2022.3
+PORTREVISION=	1
 CATEGORIES=	devel java
 MASTER_SITES=	https://download-cdn.jetbrains.com/webide/
 PKGNAMEPREFIX=	jetbrains-
@@ -32,6 +33,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}/PhpStorm-223.7571.212
 
diff --git a/devel/jetbrains-phpstorm/files/phpstorm.desktop.in b/devel/jetbrains-phpstorm/files/phpstorm.desktop.in
index a4c345aa1879..10712fce79a5 100644
--- a/devel/jetbrains-phpstorm/files/phpstorm.desktop.in
+++ b/devel/jetbrains-phpstorm/files/phpstorm.desktop.in
@@ -6,7 +6,7 @@ Name=PhpStorm
 GenericName=PhpStorm
 Comment=PhpStorm Integrated Development Environment
 Icon=%%DATADIR%%/bin/phpstorm.png
-Exec=%%DATADIR%%/bin/phpstorm.sh
+Exec=%%PREFIX%%/bin/phpstorm
 Terminal=false
 StartupNotify=true
 Categories=Application;Development;
diff --git a/devel/jetbrains-phpstorm/files/phpstorm.in b/devel/jetbrains-phpstorm/files/phpstorm.in
index 4184f8aab914..a685957065e5 100644
--- a/devel/jetbrains-phpstorm/files/phpstorm.in
+++ b/devel/jetbrains-phpstorm/files/phpstorm.in
@@ -1,3 +1,6 @@
 #!/bin/sh
 
+export PHPSTORM_JDK=${PHPSTORM_JDK:-"%%JAVA_HOME%%"}
+export SHELL="/bin/sh"
+
 exec "%%DATADIR%%/bin/phpstorm.sh" "$@"