[arch-commits] Commit in sweethome3d/trunk (PKGBUILD sweethome3d.sh)
Fabio Castelli
muflone at gemini.archlinux.org
Sun Nov 28 23:40:29 UTC 2021
Date: Sunday, November 28, 2021 @ 23:40:29
Author: muflone
Revision: 1055866
upgpkg: sweethome3d 6.6-3
Modified:
sweethome3d/trunk/PKGBUILD
sweethome3d/trunk/sweethome3d.sh
----------------+
PKGBUILD | 6 +++---
sweethome3d.sh | 19 +++++++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-11-28 23:40:11 UTC (rev 1055865)
+++ PKGBUILD 2021-11-28 23:40:29 UTC (rev 1055866)
@@ -7,12 +7,12 @@
pkgname=sweethome3d
pkgver=6.6
-pkgrel=2
+pkgrel=3
pkgdesc="An interior design application to draw the plan of your house in a 3D environment"
arch=('x86_64')
url="http://www.sweethome3d.com/"
license=('GPL' 'custom')
-depends=('java-runtime>=8' 'shared-mime-info' 'desktop-file-utils' 'libxext' 'libgl' 'libxrender' 'libnsl')
+depends=('java-runtime<17' 'shared-mime-info' 'desktop-file-utils' 'libxext' 'libgl' 'libxrender' 'libnsl')
makedepends=('ant' 'strip-nondeterminism')
source=("SweetHome3D-${pkgver}-src.zip"::"https://downloads.sourceforge.net/${pkgname}/SweetHome3D-${pkgver}-src.zip"
"${pkgname}.sh"
@@ -19,7 +19,7 @@
"${pkgname}.desktop"
"${pkgname}.xml")
sha256sums=('0a7557a66a1d9b2a1976a9adece811cb3b8b7838643e1ac04bf0a574533c490b'
- '71abd705684d373a19bc434ca5dc42072faf6e1716b9f0a6005bae122326bfa9'
+ '6b3ef93a004d05ea083953d651e151af5491f5ca91e00dfd4ec3f0e4e1c87782'
'5eea3337d956d773b05ddef69fe9d34b940ff550370dc92bf307f1b9a3957f9e'
'ec0ad1a0671f708af68ced46bec1f4ab377e24ca1a0a9984867ee5fe484f57c5')
install="${pkgname}.install"
Modified: sweethome3d.sh
===================================================================
--- sweethome3d.sh 2021-11-28 23:40:11 UTC (rev 1055865)
+++ sweethome3d.sh 2021-11-28 23:40:29 UTC (rev 1055866)
@@ -24,6 +24,25 @@
# Find Java version
JAVA_VERSION="$(${JAVA_EXEC} -version 2>&1 | head -1 | cut -d' ' -f 3 | tr -d '"')"
+# Skip Java versions higher than 16 as Sweethome3D actually is not yet compatible
+# Fallback to any previous version available
+# https://bugs.archlinux.org/task/72623
+if [ $(vercmp "${JAVA_VERSION}" "17") -gt 0 ]
+then
+ echo "Warning: Sweethome 3D actually is not compatible with Java version > 16"
+ _PREVIOUS_JAVA_VERSION="$(archlinux-java status | tail -n +2 | sort | cut -d ' ' -f 3 | sort -nr -k 2 -t '-' | grep -vE '17-' -m 1)"
+ if [ -z "${_PREVIOUS_JAVA_VERSION}" ]
+ then
+ echo "No others Java version are available, please install a Java version < 17"
+ exit 1
+ else
+ echo "Falling back to ${_PREVIOUS_JAVA_VERSION}"
+ export JAVA_HOME="/usr/lib/jvm/${_PREVIOUS_JAVA_VERSION}"
+ export JAVA_EXEC="${JAVA_HOME}/bin/java"
+ export JAVA_VERSION="$(${JAVA_EXEC} -version 2>&1 | head -1 | cut -d' ' -f 3 | tr -d '"')"
+ fi
+fi
+
# Fix for Java 16 compatibility
# https://bugs.archlinux.org/task/71255
# https://sourceforge.net/p/sweethome3d/bugs/1021/
More information about the arch-commits
mailing list