--- b/deskutils/ganttproject/Makefile +++ b/deskutils/ganttproject/Makefile @@ -1,5 +1,6 @@ PORTNAME= ganttproject DISTVERSION= 3.1.3100 +PORTREVISION= 1 CATEGORIES= deskutils java MASTER_SITES= https://github.com/bardsoftware/ganttproject/releases/download/ganttproject-${DISTVERSION}/ \ https://dl.ganttproject.biz/ganttproject-3.1.3100/ --- /dev/null +++ b/deskutils/ganttproject/files/patch-ganttproject @@ -0,0 +1,103 @@ +--- ganttproject.orig 2021-07-20 16:57:15 UTC ++++ ganttproject +@@ -31,17 +31,15 @@ fi + # Parse the command line arguments. In this script we parse only those arguments which + # are related to the Java VM launching. The remaining application-specific arguments + # are passed as-is to the Java process. +-PARSED_ARGS=$(getopt -o d::j:: --long debug:: --long java-home:: -- "$@") +-eval set -- "$PARSED_ARGS" + +-USE_BUNDLED_RUNTIME=1 ++USE_BUNDLED_RUNTIME=0 + DEBUG_ARGS="" +-while true; do +- case "$1" in ++while getopts "d:j:" opt; do ++ case "$opt" in + # Debug will switch on some debugging output and will allow for connecting to Java + # process with a debugger +- -d|--debug) +- case "$2" in ++ d) ++ case "$OPTARG" in + "") + DEBUG_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n" + shift 2 +@@ -53,11 +51,10 @@ while true; do + esac + ;; + # This allows for specifying the path to Java Runtime instead of the default bundled Java Runtime +- -j|--java-home) ++ j) + USE_BUNDLED_RUNTIME=0 +- case "$2" in ++ case "$OPTARG" in + "") +- shift 2 + ;; + *) + JAVA_HOME="$2" +@@ -65,7 +62,7 @@ while true; do + ;; + esac + ;; +- --) ++ -) + shift + break + ;; +@@ -128,12 +125,30 @@ check_java() { + + VERSION="$( $JAVA_COMMAND -version 2>&1 | grep version | head -n 1)" + log "...found $VERSION" +- [[ "$VERSION" =~ "11." ]] && return 0; +- [[ "$VERSION" =~ "12." ]] && return 0; +- [[ "$VERSION" =~ "13." ]] && return 0; +- [[ "$VERSION" =~ "14." ]] && return 0; +- [[ "$VERSION" =~ "15." ]] && return 0; +- [[ "$VERSION" =~ "16." ]] && return 0; ++ echo $VERSION | grep "11." ++ if [ "0" == "$?" ]; then ++ return 0 ++ fi ++ echo $VERSION | grep "12." ++ if [ "0" == "$?" ]; then ++ return 0 ++ fi ++ echo $VERSION | grep "13." ++ if [ "0" == "$?" ]; then ++ return 0 ++ fi ++ echo $VERSION | grep "14." ++ if [ "0" == "$?" ]; then ++ return 0 ++ fi ++ echo $VERSION | grep "15." ++ if [ "0" == "$?" ]; then ++ return 0 ++ fi ++ echo $VERSION | grep "16." ++ if [ "0" == "$?" ]; then ++ return 0 ++ fi + log "...this seems to be an old Java Runtime"; + JAVA_COMMAND="" + return 1 +@@ -166,7 +181,7 @@ find_java() { + report_java_not_found() { + log "JavaVM executable not found. + You may want to set the path to the root of your Java Runtime installation +- in JAVA_HOME environment variable or pass it to ganttproject in --java-home argument"; ++ in JAVA_HOME environment variable or pass it to ganttproject in -j argument"; + if [ -z "$LOG_TEXT" ]; then + LOG_TEXT="$(cat /tmp/ganttproject-launcher.log)" + fi +@@ -191,7 +206,7 @@ export CLASSPATH + ECLIPSITO_ARGS="--verbosity 1 --version-dirs $GP_HOME/plugins:~/.ganttproject.d/updates --app net.sourceforge.ganttproject.GanttProject" + BOOT_CLASS=com.bardsoftware.eclipsito.Launch + +-JAVA_ARGS="-Xmx1024m -Duser.dir=$(pwd) $DEBUG_ARGS $BOOT_CLASS $ECLIPSITO_ARGS -log true -log_file $LOG_FILE" ++JAVA_ARGS="--module-path=/usr/local/openjfx14/lib --add-modules=javafx.swing,javafx.web -Xmx1024m -Duser.dir=$(pwd) $DEBUG_ARGS $BOOT_CLASS $ECLIPSITO_ARGS -log true -log_file $LOG_FILE" + if [ -n "$(echo \"$*\" | sed -n '/\(^\|\s\)-/{p;}')" ]; then + "$JAVA_COMMAND" $JAVA_ARGS "$@" + else