summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorben2021-10-14 22:05:09 +0200
committerTorben2021-10-17 21:48:48 +0200
commitc704e3c01e41d5c61a1fdd5951b57d6fd984b332 (patch)
treecdedfeab1acbe3c2241a921573797bf47f13766f
parent3803aca5fb9b2cd0e05573b4bd09749378824117 (diff)
downloadaur-c704e3c01e41d5c61a1fdd5951b57d6fd984b332.tar.gz
Use system's JDK and JFX again
Squashed commit of the following: commit f7d64a33e7c880ae63638bcb4a46ee6370cc7fa8 Author: Torben <git@letorbi.com> Date: Thu Oct 14 21:48:33 2021 +0200 Use system's JFX and other fixes commit 10c005c6da73ae1dbb7400a6e879ae64bc262d4b Author: Torben <git@letorbi.com> Date: Thu Oct 14 21:29:16 2021 +0200 Add .zst files to ignore file commit 6a736e5b50d462165be8042b1b069fafaa343365 Author: Torben <git@letorbi.com> Date: Tue Oct 12 00:32:35 2021 +0200 Disable native file dialog commit 1f26bc8e1e4f6b8f7967be804a2286a72cad507c Author: Torben <git@letorbi.com> Date: Tue Oct 12 00:12:15 2021 +0200 Associate processing sketch files with application commit a1458bb96c2b08fd30b3312d067c2ddc727bd0b1 Author: Torben <git@letorbi.com> Date: Thu Oct 14 15:34:58 2021 +0200 Fix patch files to work with Java 17 commit 0ce2901087b481e73ff8114427041c4f99b7637c Author: Torben <git@letorbi.com> Date: Tue Oct 12 00:09:57 2021 +0200 Require and use java-openjdk-17 commit 5f9cb148df94cc56558fa915112e02c48df467e8 Author: Torben <git@letorbi.com> Date: Tue Oct 12 00:09:08 2021 +0200 Use processing instead of processing4 as command name commit 993af15aa871e52ed81423e88b98c476ee6d6fc3 Author: Torben <git@letorbi.com> Date: Sat Jul 17 19:52:20 2021 +0200 Use official versioning scheme for VCS packages; Update .SRCINFO
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD40
-rw-r--r--fix_theme_engine.patch20
-rw-r--r--no_jdk_download.patch66
-rw-r--r--no_jfx_download.patch11
-rw-r--r--use_system_jdk.patch20
-rw-r--r--use_system_libraries.patch26
8 files changed, 193 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ab207e2f0ecd..d045a3d2d13c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,35 @@
pkgbase = processing4-git
pkgdesc = Programming environment for creating images, animations and interactions
- pkgver = 4.0b2.r23.g272801f95
- pkgrel = 2
+ pkgver = 4.0b2.r27.gc9b8a00e7
+ pkgrel = 1
url = https://github.com/processing/processing4
arch = x86_64
license = GPL
license = LGPL
- makedepends = java-environment=17
makedepends = ant
makedepends = gendesk
makedepends = unzip
- depends = libgl
+ depends = jdk-openjdk
+ depends = java11-openjfx
provides = processing
provides = processing4
conflicts = processing
options = !strip
source = https://download.processing.org/reference.zip
- source = disable_update_check.patch
source = disable_native_dialogs.patch
+ source = disable_update_check.patch
+ source = fix_theme_engine.patch
+ source = no_jdk_download.patch
+ source = no_jfx_download.patch
+ source = use_system_jdk.patch
+ source = use_system_libraries.patch
sha256sums = fabe7420a714f450a6b1430f13fc46f14ba52db57af360365c6a7fd96d0b642f
- sha256sums = 35c4538e6e57c0ea296c6cea590cabeb2b0772f9a431838df270dcc581321e30
sha256sums = 500d00811031c0445416b6112972aa1f7a377092dd3b8565d79ead3fdfc62451
+ sha256sums = 35c4538e6e57c0ea296c6cea590cabeb2b0772f9a431838df270dcc581321e30
+ sha256sums = 24b8a3e18b6e3a0de9422e4dbde46cceb91385f7ad6bdc89ec0a9614e082c977
+ sha256sums = 0ef5266575db0fe6bde436e5a3205ca848440b3006bccb4c20fe8d7b98951ee9
+ sha256sums = dc733c1cb5a41cb06ef0f9ea01d701fd9ac7713b5817b4fe79d7076a505a7c44
+ sha256sums = aa77c001eb5de9e211bb38d06c17483d81450fa0667748c44fba6d04fa329732
+ sha256sums = 15119264b6ae7b154f033261ba93535c2d1b5e2b9d849f3999dd7881cc9e49cb
pkgname = processing4-git
diff --git a/.gitignore b/.gitignore
index 819b71006ebb..5c3b3669e3c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/*.pkg.tar.xz
+/*.pkg.tar.zst
/*.tar.gz
/*.zip
/src
diff --git a/PKGBUILD b/PKGBUILD
index fdf800d45797..1b021192d3d9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,33 @@
# Maintainer: Torben <git at letorbi dot com>
pkgname=processing4-git
-pkgver=4.0b2.r23.g272801f95
-pkgrel=2
+pkgver=4.0b2.r27.gc9b8a00e7
+pkgrel=1
arch=(x86_64)
pkgdesc='Programming environment for creating images, animations and interactions'
url='https://github.com/processing/processing4'
license=(GPL LGPL)
provides=('processing' 'processing4')
conflicts=('processing')
-depends=('libgl')
-makedepends=('java-environment=17' 'ant' 'gendesk' 'unzip')
+depends=( 'jdk-openjdk' 'java11-openjfx')
+makedepends=('ant' 'gendesk' 'unzip')
options=(!strip)
source=('https://download.processing.org/reference.zip'
+ disable_native_dialogs.patch
disable_update_check.patch
- disable_native_dialogs.patch)
+ fix_theme_engine.patch
+ no_jdk_download.patch
+ no_jfx_download.patch
+ use_system_jdk.patch
+ use_system_libraries.patch)
sha256sums=('fabe7420a714f450a6b1430f13fc46f14ba52db57af360365c6a7fd96d0b642f'
+ '500d00811031c0445416b6112972aa1f7a377092dd3b8565d79ead3fdfc62451'
'35c4538e6e57c0ea296c6cea590cabeb2b0772f9a431838df270dcc581321e30'
- '500d00811031c0445416b6112972aa1f7a377092dd3b8565d79ead3fdfc62451')
+ '24b8a3e18b6e3a0de9422e4dbde46cceb91385f7ad6bdc89ec0a9614e082c977'
+ '0ef5266575db0fe6bde436e5a3205ca848440b3006bccb4c20fe8d7b98951ee9'
+ 'dc733c1cb5a41cb06ef0f9ea01d701fd9ac7713b5817b4fe79d7076a505a7c44'
+ 'aa77c001eb5de9e211bb38d06c17483d81450fa0667748c44fba6d04fa329732'
+ '15119264b6ae7b154f033261ba93535c2d1b5e2b9d849f3999dd7881cc9e49cb')
pkgver() {
cd "$srcdir/$pkgname"
@@ -38,6 +48,17 @@ prepare() {
mkdir -p $pkgname/java
cp reference.zip $pkgname/java/
+ # Don't download JDK and JFX files during Ant's build process
+ patch $pkgname/build/build.xml < no_jdk_download.patch
+ patch $pkgname/java/libraries/javafx/build.xml < no_jfx_download.patch
+
+ # Use system libraries during build process
+ patch $pkgname/core/build.xml < use_system_libraries.patch
+ patch $pkgname/build/shared/tools/ThemeEngine/build.xml < fix_theme_engine.patch
+
+ # Use system JDK to start processing
+ patch $pkgname/build/linux/processing < use_system_jdk.patch
+
# Disable update check in default preferences
patch $pkgname/build/shared/lib/defaults.txt < disable_update_check.patch
@@ -48,7 +69,7 @@ prepare() {
build() {
cd "$pkgname/build"
- PATH="/usr/lib/jvm/java-17-openjdk/bin/:$PATH" ant build
+ JAVA_HOME="/usr/lib/jvm/java-17-openjdk" ant build
}
package() {
@@ -68,4 +89,9 @@ package() {
# Symbolic links in /usr/bin
ln -s "/usr/share/processing/processing" "$pkgdir/usr/bin/processing"
ln -s "/usr/share/processing/processing-java" "$pkgdir/usr/bin/processing-java"
+
+ # Redirect processing's internal java-command to the system's one
+ mkdir -p "$pkgdir/usr/share/processing/java/bin/"
+ echo -e '#!/bin/sh\n/usr/lib/jvm/java-17-openjdk/bin/java "$@"' > "$pkgdir/usr/share/processing/java/bin/java"
+ chmod a+x "$pkgdir/usr/share/processing/java/bin/java"
}
diff --git a/fix_theme_engine.patch b/fix_theme_engine.patch
new file mode 100644
index 000000000000..231d12d5ffc0
--- /dev/null
+++ b/fix_theme_engine.patch
@@ -0,0 +1,20 @@
+--- a/build/shared/tools/ThemeEngine/build.xml
++++ b/build/shared/tools/ThemeEngine/build.xml
+@@ -6,7 +6,7 @@
+ <property name="core.bin.path" location="../../../../core/bin" />
+
+ <property name="javafx.path"
+- location="../../../../java/libraries/javafx/library/macosx" />
++ location="/usr/lib/jvm/java-17-openjdk/lib/" />
+
+ <target name="clean" description="Clean the build directories">
+ <delete dir="bin" />
+@@ -26,7 +26,7 @@
+ <pathelement location="${app.bin.path}" />
+ <pathelement location="${core.bin.path}" />
+
+- <fileset dir="${javafx.path}/modules">
++ <fileset dir="${javafx.path}">
+ <include name="**/*.jar" />
+ </fileset>
+ </classpath>
diff --git a/no_jdk_download.patch b/no_jdk_download.patch
new file mode 100644
index 000000000000..550c37374d96
--- /dev/null
+++ b/no_jdk_download.patch
@@ -0,0 +1,66 @@
+--- a/build/build.xml
++++ b/build/build.xml
+@@ -1008,7 +1008,7 @@
+ </if>
+ </target>
+
+- <target name="linux-build" depends="ignore-tools, check-linux-arm32, check-linux-arm64, revision-check, linux-check-os, jdk-download, subprojects-build, subprojects-build-linux-arm32, subprojects-build-linux-arm64" description="Build Linux version">
++ <target name="linux-build" depends="ignore-tools, check-linux-arm32, check-linux-arm64, revision-check, linux-check-os, subprojects-build, subprojects-build-linux-arm32, subprojects-build-linux-arm64" description="Build Linux version">
+ <mkdir dir="linux/work" />
+
+ <copy todir="linux/work" preservelastmodified="true">
+@@ -1098,54 +1098,6 @@
+ <copy file="linux/processing-pde.xml" todir="linux/work/lib" />
+ <copy file="linux/appdata.xml" todir="linux/work/lib" />
+ <copy file="linux/desktop.template" todir="linux/work/lib" />
+-
+-<!--
+- Cannot use ant version of tar because it doesn't preserve properties.
+- <untar compression="gzip"
+- dest="linux/work"
+- src="linux/jdk.tgz"
+- overwrite="false"/>
+--->
+-
+-<!--
+- http://www.gnu.org/software/tar/manual/html_section/transform.html
+--->
+- <exec executable="tar" dir="linux">
+- <!-- Change directory -->
+- <!--
+- <arg value="-C" />
+- <arg value="linux/work" />
+- <arg value="-xzpf" />
+- -->
+- <arg value="xfz" />
+- <arg value="../${jdk.tgz.path}"/>
+- </exec>
+-
+- <property name="jdk.dir" value="jdk-${jdk.detail}+${jdk.build}/" />
+-
+- <exec executable="rsync" dir="linux">
+- <arg value="-a" />
+- <arg value="--delete" />
+- <arg value="${jdk.dir}" />
+- <arg value="work/java/" />
+- </exec>
+-
+- <!-- Remove unused JRE bloat. -->
+- <delete failonerror="true">
+- <fileset refid="jdk-optional-linux" />
+- </delete>
+-
+- <exec executable="rm">
+- <arg value="-r"/>
+- <arg line="linux/jdk-${jdk.detail}+${jdk.build}"/>
+- </exec>
+-
+- <!--
+- <exec executable="rm">
+- <arg value="-r"/>
+- <arg line="${jfx.path.dist}"/>
+- </exec>
+- -->
+ </target>
+
+ <target name="linux-run" depends="linux-build"
diff --git a/no_jfx_download.patch b/no_jfx_download.patch
new file mode 100644
index 000000000000..d000da10b992
--- /dev/null
+++ b/no_jfx_download.patch
@@ -0,0 +1,11 @@
+--- a/java/libraries/javafx/build.xml
++++ b/java/libraries/javafx/build.xml
+@@ -167,7 +167,6 @@
+ nowarn="true" />
+ </target>
+
+- <target name="build" depends="compile" description="Build JavaFX renderer">
+- <jar basedir="bin" destfile="library/javafx.jar" />
++ <target name="build" description="Build JavaFX renderer">
+ </target>
+ </project>
diff --git a/use_system_jdk.patch b/use_system_jdk.patch
new file mode 100644
index 000000000000..468aa005938b
--- /dev/null
+++ b/use_system_jdk.patch
@@ -0,0 +1,20 @@
+--- a/build/linux/processing
++++ b/build/linux/processing
+@@ -66,7 +66,7 @@ APPDIR=`dirname "$APPDIR"`
+ log APPDIR
+
+ # Try using a local JDK from the same directory as this script
+-JDKDIR=`readlink -f "$APPDIR/java"`
++JDKDIR=`readlink -f /usr/lib/jvm/java-17-openjdk`
+ make_jdkcp "$JDKDIR"
+ log SUCCESS
+
+@@ -113,6 +113,6 @@ else
+ fi
+ cd "$APPDIR"
+
+- #java -splash:lib/about-1x.png -Djna.nosys=true -Djava.library.path=lib:modes/java/libraries/javafx/library/linux64 --module-path=modes/java/libraries/javafx/library/linux64/modules --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -Xmx512m processing.app.Base "$SKETCH" &
+- java -Djna.nosys=true -Dpython.console.encoding=UTF-8 -Djava.library.path=lib:modes/java/libraries/javafx/library/linux64 --module-path=modes/java/libraries/javafx/library/linux64/modules --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -Xmx512m processing.app.ui.Splash "$SKETCH" &
++ #java -splash:lib/about-1x.png -Djna.nosys=true -Djava.library.path=lib:/usr/lib/jvm/java-17-openjdk/lib --module-path=/usr/lib/jvm/java-17-openjdk/lib --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -Xmx512m processing.app.Base "$SKETCH" &
++ java -Djna.nosys=true -Dpython.console.encoding=UTF-8 -Djava.library.path=lib:/usr/lib/jvm/java-11-openjfx/lib --module-path=/usr/lib/jvm/java-11-openjfx/lib --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -Xmx512m processing.app.ui.Splash "$SKETCH" &
+ fi
diff --git a/use_system_libraries.patch b/use_system_libraries.patch
new file mode 100644
index 000000000000..67d2871b301b
--- /dev/null
+++ b/use_system_libraries.patch
@@ -0,0 +1,26 @@
+diff --git a/core/build.xml b/core/build.xml
+index db633fff9..f984ae71c 100644
+--- a/core/build.xml
++++ b/core/build.xml
+@@ -66,14 +66,14 @@
+ <pathelement location="library/gluegen-rt.jar" />
+
+ <!-- <pathelement location="library/javafx-swt.jar" /> -->
+- <pathelement location="library/javafx.base.jar" />
+- <pathelement location="library/javafx.controls.jar" />
+- <pathelement location="library/javafx.fxml.jar" />
+- <pathelement location="library/javafx.graphics.jar" />
+- <pathelement location="library/javafx.media.jar" />
++ <pathelement location="/usr/lib/jvm/java-17-openjdk/lib/javafx.base.jar" />
++ <pathelement location="/usr/lib/jvm/java-17-openjdk/lib/javafx.controls.jar" />
++ <pathelement location="/usr/lib/jvm/java-17-openjdk/lib/javafx.fxml.jar" />
++ <pathelement location="/usr/lib/jvm/java-17-openjdk/lib/javafx.graphics.jar" />
++ <pathelement location="/usr/lib/jvm/java-17-openjdk/lib/javafx.media.jar" />
+ <!-- error? it's not a .jar, but is this how config is handled? [fry 210619] -->
+- <pathelement location="library/javafx.properties" />
+- <pathelement location="library/javafx.swing.jar" />
++ <pathelement location="/usr/lib/jvm/java-17-openjdk/lib/javafx.properties" />
++ <pathelement location="/usr/lib/jvm/java-17-openjdk/lib/javafx.swing.jar" />
+ <!-- <pathelement location="library/javafx.web.jar" /> -->
+ </path>
+