Summary: | dev-java/rxtx patches to build on ppc64 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Stephen Lewis <lewis+gentoo> |
Component: | [OLD] Java | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | matoro_gentoo, ppc64 |
Priority: | Normal | Keywords: | PATCH, PullRequest |
Version: | unspecified | ||
Hardware: | PPC64 | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/25356 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ebuild patch
sys/io.h patch ttyPZ0 patch |
Description
Stephen Lewis
2013-01-30 02:45:53 UTC
Created attachment 337280 [details, diff]
ebuild patch
add epatch lines
Created attachment 337282 [details]
sys/io.h patch
There is no sys/io.h on ppc/ppc64 linux
Created attachment 337284 [details, diff]
ttyPZ0 patch
adds Zilog serial ports found on Apple G4 G5 hardware
as /dev/ttyPZ{0,1}
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f6f16ac7353a21dbd8a526fd2b1fc1dac13f15f commit 5f6f16ac7353a21dbd8a526fd2b1fc1dac13f15f Author: matoro <matoro@users.noreply.github.com> AuthorDate: 2022-05-06 20:23:28 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-30 21:46:40 +0000 dev-java/rxtx: keyword 2.2_pre2-r2 for ~ppc64 This not only builds but works on ppc64. I tested this on my system with serial ports in use using the below program: $ cat Main.java import gnu.io.*; import java.util.*; public class Main { /** * @return A HashSet containing the CommPortIdentifier for all serial ports that are not currently being used. */ public static HashSet<CommPortIdentifier> getAvailableSerialPorts() { HashSet<CommPortIdentifier> h = new HashSet<CommPortIdentifier>(); Enumeration thePorts = CommPortIdentifier.getPortIdentifiers(); while (thePorts.hasMoreElements()) { CommPortIdentifier com = (CommPortIdentifier) thePorts.nextElement(); switch (com.getPortType()) { case CommPortIdentifier.PORT_SERIAL: try { CommPort thePort = com.open("CommUtil", 50); thePort.close(); h.add(com); } catch (PortInUseException e) { System.out.println("Port, " + com.getName() + ", is in use."); } catch (Exception e) { System.err.println("Failed to open port " + com.getName()); e.printStackTrace(); } } } return h; } public static void main(String[] args) { for (CommPortIdentifier element : getAvailableSerialPorts()) { System.out.println(element.getName()); } } } $ javac -cp /usr/share/rxtx-2/lib/RXTXcomm.jar Main.java $ java -Djava.library.path=/usr/lib64/rxtx-2 -cp .:/usr/share/rxtx-2/lib/RXTXcomm.jar Main /dev/ttyUSB0 /dev/ttyUSB1 Closes: https://bugs.gentoo.org/454608 Signed-off-by: matoro <matoro@users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/25356 Signed-off-by: Sam James <sam@gentoo.org> dev-java/rxtx/files/rxtx-2.1-7r2-ppcioh.diff | 16 ++++++++++++++++ dev-java/rxtx/files/rxtx-2.1-7r2-ttyPZ.diff | 20 ++++++++++++++++++++ dev-java/rxtx/rxtx-2.2_pre2-r2.ebuild | 4 +++- 3 files changed, 39 insertions(+), 1 deletion(-) |