Here is a patch to build the current version:
diff --git a/PKGBUILD b/PKGBUILD
index 2911d42..672a618 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,14 @@
# Contributor: scrawler@gmail.com
pkgname=freeplane-git
-_NEXT_VERSION=1.11.x
-pkgver=1.11.x.6dbb149f9
+_NEXT_VERSION=1.13.x
+pkgver=1.13.x.7932847860
pkgrel=1
pkgdesc="A Java mindmapping tool"
arch=('any')
url="https://github.com/freeplane/freeplane.git"
license=('GPL')
-makedepends=('git' 'gradle' 'ttf-opensans' 'fontconfig' 'jdk17-openjdk')
+makedepends=('git' 'gradle' 'ttf-opensans' 'fontconfig' 'jdk21-openjdk')
conflicts=('freeplane')
provides=('freeplane')
depends=('java-environment' 'desktop-file-utils')
@@ -27,9 +27,17 @@ pkgver() {
printf "%s" "${_NEXT_VERSION}.${commit}"
}
+prepare() {
+ # Pin runtime Java to 21 (latest LTS with Security Manager intact). Freeplane's sandbox protects
+ # user-provided Groovy scripts and formulas from filesystem/network access; Java 24+ removed the
+ # Security Manager (JEP 486) and upstream has no replacement planned.
+ # See https://github.com/freeplane/freeplane/discussions/2124
+ sed -i '/^#!\/bin\/sh$/a export FREEPLANE_JAVA_HOME=/usr/lib/jvm/java-21-openjdk' freeplane.run
+}
+
build() {
cd "${pkgname%-*}"
- export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
+ export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
export PATH="${JAVA_HOME}/bin:${PATH}"
gradle -Dorg.gradle.daemon=false build
}
Pinned Comments
jose1711 commented on 2019-06-07 21:33 (UTC)
it would be nice if it says somewhere that
archlinux-javashould be set to openjdk (won't compile with oracle java)