termux / x11-packages

A set of packages using X11 Windows System.
Other
548 stars 145 forks source link

[Package]: openjfx #726

Closed PiprTuff closed 2 years ago

PiprTuff commented 2 years ago

Package description

“Rich client application platform for Java”

OpenJFX or JavaFX is the latest GUI application development toolkit for the Java platform. JavaFX was included in the Java SE till JDK 8. Afterwards, to speed up its development, it was excluded from Java SE and open sourced as a standalone project: OpenJFX. Since then, it is developed separately but still under the management of Oracle.

Java's other GUI toolkits, such as AWT and Swing are very old. Those have many limitations like not having support for modern UI/UX APIs, heavy memory footprint plus excessive resource usage. Here JavaFX comes as a replacement for those old toolkits. JavaFX provides many rich APIs which includes hardware acceleration, advanced 2D and 3D graphics, media and web support and so on.

Now, as OpenJDK 17 is available on Termux as the openjdk-17 package, it is right time to add OpenJFX as a package also. OpenJDK 17 can run OpenJFX 17 & 18 versions (OpenJDK N is compatible with OpenJFX N & N+1). It will be better to add OpenJFX 18 to Termux, if possible. Otherwise OpenJFX 17 will also be OK. Ubuntu and other popular Linux distributions provides OpenJFX by the nameopenjfx.

Home page URL

https://openjfx.io

Source code URL

https://github.com/openjdk/jfx

Building instructions

https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX

Packaging policy acknowledgement

Additional information

The ‘linux’ SDK needs to be built, with all the modules included in it: base, graphics, control, media, swing and web. It provides the APIs for developing Desktop applications using JavaFX.

The android SDK needs not to be built, because it only provides the Android specific APIs for developing Android applications using JavaFX.

Building with gradle on my arm architecture device shows Unknown and unsupported build architecture: arm error. This is because OpenJFX should be built (or cross-compiled) from a 64 bit architecture machine only. However, this can be fixed on my device by a simple workaround: editing or removing the if block in this line: https://github.com/openjdk/jfx/blob/b0f2521219efc1b0d0c45088736d5105712bc2c9/build.gradle#L311.

Then it shows ld.lld: unable to find library: -lc++shared because the linker needs to link the static stdc++ library by the flag: -static-stdc++. Termux doesn't provide a static stdc++ library. So I can't proceed anymore.

xtkoba commented 2 years ago

Duplicate of #727 (transferred from termux-packages).

PiprTuff commented 2 years ago

Duplicate of #727 (transferred from termux-packages).

Please close that issue and reopen this issue, because the package is related to (and should be included into) the X11 packages.