From nobody Mon Jan 10 21:33:45 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 90681194C1F8; Mon, 10 Jan 2022 21:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JXnBd29KRz4ZRt; Mon, 10 Jan 2022 21:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AADC4E01; Mon, 10 Jan 2022 21:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20ALXjUD044229; Mon, 10 Jan 2022 21:33:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20ALXjhn044228; Mon, 10 Jan 2022 21:33:45 GMT (envelope-from git) Date: Mon, 10 Jan 2022 21:33:45 GMT Message-Id: <202201102133.20ALXjhn044228@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Lo=C3=AFc Bartoletti?= Subject: git: d110fac03fba - main - deskutils/freeplane: Fix Unable to launch freeplane List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lbartoletti X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d110fac03fba6114a8ad47a3ed45d9674afcc50e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641850425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lvabx3p6SRm+GlOf7u/VFA8B5CHa8zULxveKKQR4cxk=; b=poSoOq9I3W9M3x2K/GI8hv5LMNzFp/ZR8Xxeb6fFuKMTiThXbfy/R5o6O07todio2BqlKb JU9Lk0j0KlQpyEVnlp1MU9iLWW1iDfoVQTpyDy0cURH+K3gsD8+LvCFfDdFRiQuGoerdTO GP9qO9UwbxvLo+9NaDWkDgPj19CFQ0xDBYVdGGwejmejW9RAbMnAxaYX1u7+zacMSAb3x4 6sjqsyH3O98lrrbu0Jc/Yd7uzjjyF0nWimEgRwtiksVcsoZS9hhJhoOOmt+1kosnOuEUoV IbnxPZY56101KB3sYR9MywP5qu63osdUE3qWHf6eKhkJZoo8vK6JR5pn9I3MGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641850425; a=rsa-sha256; cv=none; b=Pt7LeP9C/JAS0mxu6vhHc/8qHi6anELarEVkI53uXyYI+cp4xnVw5P7nDaI+o9BtO8KB9y rFz+RGatFfPkLL0svmmmheUU930TA3vs0BPjxhL1qlpLwJb9HcDSQMDjjgvN+XF5FGG5+V mwiVhA8WJmm1pehA4aYtiRgkMhrDzIbKy05BdoCwapnvAkW92mEGwYoo6gvi7RKDrW8T+6 HftO9URgLUHOrmXlECKU1VDes1dHSLZRgQCZvPmD5F8Hh0jwHnMbcnpuHSacEpymPPbrWR TMvm50BXK6iTlKLKT1fF5xfuHqZwYeIbrxYUO3Z2UOcr6neh5cQKoEaR7M+oGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lbartoletti: URL: https://cgit.FreeBSD.org/ports/commit/?id=d110fac03fba6114a8ad47a3ed45d9674afcc50e commit d110fac03fba6114a8ad47a3ed45d9674afcc50e Author: Loïc Bartoletti AuthorDate: 2022-01-05 06:17:59 +0000 Commit: Loïc Bartoletti CommitDate: 2022-01-10 20:32:39 +0000 deskutils/freeplane: Fix Unable to launch freeplane Fix a typo in the launch script and add bash as a dependency. Create a new launch script. PR: 260753 Reported by: chris@crvintel.com --- deskutils/freeplane/Makefile | 15 ++++++----- deskutils/freeplane/files/freeplane.in | 3 +++ deskutils/freeplane/files/patch-freeplane.sh | 39 ++++++++++++++++++---------- 3 files changed, 37 insertions(+), 20 deletions(-) diff --git a/deskutils/freeplane/Makefile b/deskutils/freeplane/Makefile index 9c419e217bc4..5c27da51e00c 100644 --- a/deskutils/freeplane/Makefile +++ b/deskutils/freeplane/Makefile @@ -2,6 +2,7 @@ PORTNAME= freeplane DISTVERSION= 1.9.12 +PORTREVISION= 1 CATEGORIES= deskutils editors java MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20stable/archive/${PORTVERSION} DISTNAME= ${PORTNAME}_bin-${PORTVERSION} @@ -12,8 +13,10 @@ COMMENT= Free mind mapping and knowledge management software LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/license.txt -USES= cpe zip +RUN_DEPENDS= bash:shells/bash +USES= cpe zip shebangfix +SHEBANG_FILES= ${WRKSRC}/freeplane.sh USE_JAVA= yes NO_ARCH= yes NO_BUILD= yes @@ -23,10 +26,10 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} do-install: cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} \ - "! ( -name freeplane\.sh* -or -name license\.txt -or -name *\.bat -or -name *\.exe )" -# Install freeplane.sh with the right permission, link to it to bin/ -# and let it resolve the path to DATADIR automatically. - ${INSTALL_SCRIPT} ${WRKSRC}/freeplane.sh ${STAGEDIR}${DATADIR} - ${RLN} ${STAGEDIR}${DATADIR}/freeplane.sh ${STAGEDIR}${PREFIX}/bin/freeplane + "! ( -name license\.txt -or -name *\.bat -or -name *\.exe )" +# Install freeplane.sh with the right permission + ${SED} -e 's|%%DATADIR%%|${DATADIR}|' < ${FILESDIR}/freeplane.in > \ + ${WRKSRC}/freeplane + ${INSTALL_SCRIPT} ${WRKSRC}/freeplane ${STAGEDIR}${PREFIX}/bin/ .include diff --git a/deskutils/freeplane/files/freeplane.in b/deskutils/freeplane/files/freeplane.in new file mode 100644 index 000000000000..979424a424e4 --- /dev/null +++ b/deskutils/freeplane/files/freeplane.in @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /bin/sh %%DATADIR%%/freeplane.sh diff --git a/deskutils/freeplane/files/patch-freeplane.sh b/deskutils/freeplane/files/patch-freeplane.sh index 481f3fed5aa8..02e1cf4c65a2 100644 --- a/deskutils/freeplane/files/patch-freeplane.sh +++ b/deskutils/freeplane/files/patch-freeplane.sh @@ -1,17 +1,28 @@ ---- freeplane.sh.orig 2018-01-07 18:16:56 UTC +--- freeplane.sh.orig 2022-01-05 06:17:27 UTC +++ freeplane.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh +@@ -57,7 +57,7 @@ findjava() { + fi + fi - # we only want to test the script, not Freeplane itself - if ( echo "${DEBUG}" | grep -qe "script" ); then -@@ -123,7 +123,7 @@ if [ -x $(which readlink) ] && [ "`echo $OSTYPE | cut - # if we have 'readlink' we can use it to get an absolute path - # -m should be faster and link does always resolve, else this script - # wouldn't be called, would it? +- JAVA_VERSION=$(${JAVACMD} -version |& grep -E "[[:alnum:]]+ version" | awk '{print $3}' | tr -d '"') ++ JAVA_VERSION=$(${JAVACMD} -version | grep -E "[[:alnum:]]+ version" | awk '{print $3}' | tr -d '"') + JAVA_MAJOR_VERSION=$(echo $JAVA_VERSION | awk -F. '{print $1}') + if [ $JAVA_MAJOR_VERSION -ge 16 ]; then + if [ -z "${FREEPLANE_USE_UNSUPPORTED_JAVA_VERSION}" ]; then +@@ -142,15 +142,7 @@ fi + + output_debug_info + +-if [ -x $(which readlink) ] && [ "`echo $OSTYPE | cut -b1-6`" != "darwin" ]; then +- # if we have 'readlink' we can use it to get an absolute path +- # -m should be faster and link does always resolve, else this script +- # wouldn't be called, would it? - freefile=$(readlink -mn "$0") -+ freefile=$(readlink -fn "$0") - _debug "Link '$0' resolved to '${freefile}'." - else - freefile="$0" +- _debug "Link '$0' resolved to '${freefile}'." +-else +- freefile="$0" +-fi ++freefile="$0" + + if [ "`echo $OSTYPE | cut -b1-6`" == "darwin" ]; then + xdockname='-Xdock:name=Freeplane'