21 Commits

Author SHA256 Message Date
889f26631a Accepting request 1287888 from Java:packages
3.30.4

OBS-URL: https://build.opensuse.org/request/show/1287888
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=7
2025-06-24 18:47:09 +00:00
a536a22bcd OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=26 2025-06-23 09:50:22 +00:00
32c583a762 3.30.4
OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=25
2025-06-23 06:24:30 +00:00
0af3fd31b5 Accepting request 1264935 from Java:packages
Rewrite for Ant == build cycles prevention

OBS-URL: https://build.opensuse.org/request/show/1264935
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=6
2025-03-31 09:38:27 +00:00
91f3305293 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=23 2025-03-28 06:02:57 +00:00
94679695c5 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=22 2025-03-21 19:40:56 +00:00
67856df9cb OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=21 2025-03-21 19:25:57 +00:00
2cb091842b OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=20 2025-03-21 13:35:45 +00:00
922d5b696f Accepting request 1253153 from Java:packages
3.29.0

OBS-URL: https://build.opensuse.org/request/show/1253153
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=5
2025-03-15 15:16:18 +00:00
2c2297eda1 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=18 2025-03-14 18:03:29 +00:00
65cd315110 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=17 2025-03-14 04:50:38 +00:00
cddfe3a6d6 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=16 2025-03-14 04:44:56 +00:00
ccb4288469 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=15 2025-03-14 04:28:34 +00:00
61c4253e45 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=14 2025-03-14 04:13:23 +00:00
737e7233ea OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=13 2025-03-13 20:45:04 +00:00
6f1f061dfc Accepting request 1207101 from Java:packages
Build the bundle module too

OBS-URL: https://build.opensuse.org/request/show/1207101
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=4
2024-10-11 15:03:21 +00:00
4674834981 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=11 2024-10-11 08:42:31 +00:00
f0cb8482b4 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=10 2024-10-11 07:42:01 +00:00
bcf6ad9f67 Accepting request 1202882 from Java:packages
Simplify dependencies

OBS-URL: https://build.opensuse.org/request/show/1202882
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=3
2024-09-24 15:34:23 +00:00
5183e47091 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=8 2024-09-24 09:45:35 +00:00
0702dcf6da OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=7 2024-09-24 07:13:00 +00:00
7 changed files with 666 additions and 52 deletions

View File

@@ -0,0 +1,42 @@
From f3eda0bf4fa1b9efb0562224fa3c090ba59f0253 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Wed, 26 Feb 2025 16:26:49 +0100
Subject: [PATCH] Remove optional dependency on universalchardet
---
builtins/src/main/java/org/jline/builtins/Nano.java | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/builtins/src/main/java/org/jline/builtins/Nano.java b/builtins/src/main/java/org/jline/builtins/Nano.java
index 491d0bc3..be5748c1 100644
--- a/builtins/src/main/java/org/jline/builtins/Nano.java
+++ b/builtins/src/main/java/org/jline/builtins/Nano.java
@@ -51,7 +51,6 @@ import org.jline.terminal.impl.MouseSupport;
import org.jline.utils.*;
import org.jline.utils.InfoCmp.Capability;
import org.jline.utils.Status;
-import org.mozilla.universalchardet.UniversalDetector;
import static org.jline.builtins.SyntaxHighlighter.*;
import static org.jline.keymap.KeyMap.KEYMAP_LENGTH;
@@ -380,17 +379,6 @@ public class Nano implements Editor {
}
byte[] bytes = bos.toByteArray();
- try {
- UniversalDetector detector = new UniversalDetector(null);
- detector.handleData(bytes, 0, bytes.length);
- detector.dataEnd();
- if (detector.getDetectedCharset() != null) {
- charset = Charset.forName(detector.getDetectedCharset());
- }
- } catch (Throwable t) {
- // Ignore
- }
-
// TODO: detect format, do not eat last newline
try (BufferedReader reader =
new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes), charset))) {
--
2.49.0

View File

@@ -0,0 +1,10 @@
--- a/native/src/main/java/org/jline/nativ/JLineNativeLoader.java
+++ b/native/src/main/java/org/jline/nativ/JLineNativeLoader.java
@@ -499,6 +499,7 @@ public class JLineNativeLoader {
// As a last resort try from java.library.path
String javaLibraryPath = System.getProperty("java.library.path", "");
+ javaLibraryPath = "@SYSTEMLIBRARYPATH@" + File.pathSeparator + javaLibraryPath;
for (String ldPath : javaLibraryPath.split(File.pathSeparator)) {
if (ldPath.isEmpty()) {
continue;

3
jline-3.30.4.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7f764fe6d67fdab5e3a0db32a94a61b8404260b5fbebe3c15c18da7d3d6aa81e
size 2798985

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:610ff2fca902f006d230d05be4eb6d62f345bb64371a279d521373c7b61a6279
size 1850621

3
jline3-build.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:692c016b23ef23767b0b4fb8d8a31742d993fdd426dfca916214b67a2cdeabae
size 5188

View File

@@ -1,3 +1,286 @@
-------------------------------------------------------------------
Mon Jun 23 09:32:33 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Update to upstream version 3.30.4
* New features and improvements
+ add pluggable completion to Nano editor (fixes #1194)
+ enhanced MouseSupport to handle multiple mouse event formats
(SGR, URXVT, SGR-Pixels)
+ add getCurrentMouseTracking to Terminal interface
+ add ability to get terminal default foreground and background
colors
+ add password masking support for dumb terminals (fixes #1172)
+ add line numbers and current line marker to secondary prompt
(fix for #1151)
+ Add support for separate encodings for stdin, stdout, and
stderr
+ Make prompts work in non-fullscreen mode
* Bug Fixes
+ use a fallback classloader suitable for java Modules or OSGi
environments (fixes #1185)
+ NPE in Status#resize when supported is false (fixes #1191)
+ nano editor exiting when pressing Ctrl+Space (fixes #1200)
+ parse error of system default /usr/share/nano/*.nanorc
+ Terminal.trackMouse(MouseTracking.Off) (fixes #1189)
+ Make command execution order consistent in SystemRegistryImpl
+ handle invalid entries in history files gracefully
+ Properly fill screen lines with spaces when width is increased
in ScreenTerminal
+ cursor position after Status.update()
+ improve script file detection and execution in Groovy REPL,
fixes #1139
+ ensure proper cleanup of pump threads in terminal
implementations
+ add history line width check in ScreenTerminal.setSize()
(fixes #1206)
+ console-ui example: catch UserInterruptException in place of
IOError
+ Ctrl+Space handling on Windows terminals
+ Update LineReaderImpl to use new readMouseEvent signature with
lastBinding parameter
+ enhance nanorc loading and introduce a ClasspathResourceUtil
utility
+ missing close in PosixSysTerminal.
+ Jansi AnsiConsole broken color detection in uber jars
+ SyntaxHighlighter glob pattern handling for non-default file
systems
* Documentation
+ Integrate website into main repository
+ improve JLineNativeLoader documentation and references
+ fix readme
+ Add comprehensive Javadoc to jline-builtins module
+ improve Javadoc in console module
+ add comprehensive Javadoc to org.jline.style package
+ add comprehensive Javadoc to JLine Terminal and Reader
+ Add missing DISABLE_EVENT_EXPANSION JavaDoc (fixes #1218)
+ Make sure snippets compile
+ Corrected the maven central link
+ correct PicocliJLineExample snippet name in
library-integration.md
+ validate code snippets during build time instead of runtime
+ add missing @SInCE 3.30.0 annotations to new methods in
Terminal
+ integrate GitHub wiki content into website documentation
+ Improve website build system and documentation management
+ fix javadoc redirect URL issue
+ Add picocli links to library integration
+ Mention InputRC on Builtins
+ doc: update version to 3.30.0 and add Javadoc integration
+ integrate ConsoleUI documentation into website
+ add syntax highlighting example classes for documentation
+ Expand DISABLE_EVENT_EXPANSION JavaDoc (re. #1238)
+ Link to documentation website earlier in README (see #1240)
+ Link to Pty4j on Terminal
-------------------------------------------------------------------
Fri Mar 28 06:02:04 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Rewrite to use Ant to build. This prevents potential cycles with
upcoming Maven 4
-------------------------------------------------------------------
Fri Mar 14 14:06:15 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Update to upstream version 3.29.0
* Breaking changes
+ Undeprecate ConsolePrompt methods et al
* New features and improvements
+ Add text-only prompt element for console-ui
+ Dynamic console-ui prompt improvements, see #1051
* Bug Fixes
+ AnsiConsole should always obey the terminal
+ Add overloaded no-arg compile method
+ Move catch to proper place
- Update to upstream version 3.28.0
* New features and improvements
+ Dynamic console-ui prompts
+ Add a AbstractTerminal#toString() method
+ Let CommandRegistry create Candidate for completion
+ Be more specific about which command is missing when throwing
an exception
+ Add style for command description in completer
+ Enhance DefaultHighlighter to support command styling
+ Provide a simple RegistryImpl that can provide options from
LineReader
* Bug Fixes
+ InputValue prompt with mask doesn't work correctly
+ JLine exec provider should reject terminal creation on a
redirected output stream
+ Fix ConsolePrompt.prompt() throwing IOError instead of
UserInterruptedException
+ Fix possible NPE in TailTipWidgets
- Update to upstream version 3.27.1
* Bug fixes (relative)
+ Hexadecimal triple support in Jansi
+ Fix ExecPty parsing on some Alpine linux
+ Clean ShellFactoryImpl logging, add a test
+ Fix GraalVM warning
* Tasks
+ Configure central-publishing-maven-plugin manually
- Update to upstream version 3.27.0
* Changes
+ Fix tag name format for release
+ Console UI ListChoice's (relative)pageSize is never used
+ Added possibility of cancelling prompts
+ [consoleui] Make it easier to extend ConsolePrompt
+ fix typo: inMode -> outMode in ffm
- Update to upstream version 3.26.3
* Bug fixes
+ The Diag tool should display the full stack trace
+ Correcting invocation of ScrollConsoleScreenBufferW - using
pointers instead of values.
+ Fix windows-arm64 DLL name
+ IndexOutOfBoundsException in console-ui when header exceeds
size of the terminal
- Update to upstream version 3.26.2
* Bug fixes
+ Add some doc for boolean provider methods in TerminalBuider
+ INVALID_HANDLE_VALUE is a long
+ Restore the use of Integer.MAX_VALUE for display colums when
size is zero
+ Cursor badly positioned after creating Status bar
+ Build with Cmd on Windows
- Update to upstream version 3.26.1
* Changes
+ Fix interrupt signal killing application
+ Fix OutOfMemoryError when using TailTipWidget
- Update to upstream version 3.26.0
* Changes
+ Update GitHub Actions
+ In maven-wrapper.properties, sync maven version with pom.xml
+ Update maven to 3.9.6
+ Fixing the FfmTerminal to run on JDK 22 and on Linux.
+ Provide jdk8 jar by excluding the FFM support
+ Exclude directories when locating tty, test etc
+ Return early from LineReaderImpl.doList if no possibilities
or rows
+ Fix native image compilation
+ Use default sort order when custom sort order is identical
+ Disable Quick Edit Mode with mouse support
+ Don't change keybindings to emacs for dumb terminals
+ Merge ConsoleUI project into JLine
+ Don't attempt line break at last line
+ Fix remote terminal on linux/bsd
+ Warn when using a deprecated provider
+ Improve status bar drawing mechanism
+ Upgrade maven wrapper
+ Switch the nativeSignals boolean to true by default
+ Simplify graal demo
- Update to upstream version 3.25.1
* Changes
+ Fix source jars required for bundles
+ Native libraries are not embedded in JLine bundle
+ Fix NPE on windows with missing jna/jansi
+ Fix native image metadata
- Update to upstream version 3.25.0
* Changes
+ Merge Jansi library into JLine
+ Fix missing native libraries in JLine bundle
+ Avoid JDK warning when checking the exec provider
+ Improve the message when a provider cannot be used by doing
an early check and restore compatibility with Jansi 1.17
+ Provide a new Terminal InputFlag INORMEOL to normalize end of
lines
+ Add the ability to clear internal buffers
+ Use logger instead of writing to stderr
+ Fix FFM provider loading of openpty on linux
+ Add some doc about Signal.QUIT which cannot be caught by the
JVM
- Update to upstream version 3.24.1
* Changes
+ Fix broken javadoc generation
+ Restore JDK 8 runtime compatibility
+ Restore partial failure handling with stty
+ Fix git line endings
- Update to upstream version 3.24.0
* New features and enhancements
+ Add forced-out and forcer-err to force the system console to
use the output / error stream
+ Add a field / setter for the forced provider
+ Support providing default values for line reader variables
using system properties
+ Support automatic parsing of an inputrc file in jline reader
+ Add a property to customize the tab width
+ Force creation of a dumb terminal if TERM starts with dumb
+ New JNI provider
+ Switch to junit 5
+ Require JDK 11 and support JDK 21 at build time
+ Enable spotless on JDK 21
+ Support building on JDK 21
* Bug fixes
+ Make sure the thread is not in an interrupted state when
cleanup up
+ Fix cr/lf support in dumb terminals
+ AIX issue with non english locales
+ Add a property to force a given provider
+ org.jline.util.PumpReader signed byte problem
+ Fix possible OOM caused by huge repetitions of inserts
+ Improve toString() terminal rendering
+ Use simplified keymap for dumb terminal
+ Improve robustness of initial cleanup
+ Add missing space in SunOS-sparcv9_CCFLAGS
+ Fix history trim for non-timestamped files
+ Fix build on linux arm64 and add riscv64
+ Fix eol
+ Clean a bit TerminalBuilder
+ Add TerminalExt interface
+ FFM support
+ Break dependency between org.jline.terminal.impl and
org.jline.terminal.impl.exec package
+ Close Files streams using try-with-resources
+ Fix illegal reflective access in exec provider
+ Make sure libraries are binaries
+ Simplify CI
+ Builtin Less has an IndexOutOfBoundsException when seeking to
the end of the file
+ LineReader Bug
+ Add a warning when using the ExecTerminalProvider on recent
JDKs
+ Fix detection of utilities
+ Fix shell output going to stderr rather than stdout
+ Fix TerminalProvider sorting
+ Use Objects.hashCode instead of Objects.hash to avoid vararg
array creation
+ spotless: set the line endings to
- Update to upstream version 3.23.0
* Changes
+ Optimize Styles.isStylePattern() to avoid StackOverflowError
+ Use a native library to create FileDescriptors if reflection
does not allow access
+ Allow custom sort of providers, and prefer jansi by default
+ Fix restoration of Terminal at close
+ Decode alternate charset in/out sequences when building
AttributedString
+ Fix AltGr+Shift characters
+ Add missing ConEmu capabilities
+ Ioctl improvements
+ Refine color support in various environments
+ Fix signal processing on windows
+ Add autoformat using spotless
- Do not build by default the jline3-remote-ssh to avoid hard
dependency on apache-sshd. The build is still possible by
specifying --with ssh
- Do not build by default the jline3-terminal-ffm, since it
requires java >= 22. The build is still possible by specifying
--with ffm
- Added patch:
* 0001-Remove-optional-dependency-on-universalchardet.patch
+ Do not depend on the optional juniversalchardet
- Added template patch:
* Load-native-library-system-wide-place.patch.in
+ Load the native library from system-wide place
-------------------------------------------------------------------
Fri Oct 11 07:41:55 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Enable building of the module jline too
-------------------------------------------------------------------
Tue Sep 24 09:44:50 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Do not build/distribute the source jars
- Do not build the jline uber-jar that we don't use
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 26 05:36:04 UTC 2023 - Fridrich Strba <fstrba@suse.com> Thu Oct 26 05:36:04 UTC 2023 - Fridrich Strba <fstrba@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package jline3 # spec file for package jline3
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -23,29 +23,36 @@ readline/editline capabilities for modern shells (such as bash and tcsh) will\
find most of the command editing features of JLine to be familiar.\ find most of the command editing features of JLine to be familiar.\
\ \
JLine 3.x is an evolution of JLine 2.x. JLine 3.x is an evolution of JLine 2.x.
%bcond_with ssh
%bcond_with ffm
Name: jline3 Name: jline3
Version: 3.22.0 Version: 3.30.4
Release: 0 Release: 0
Summary: Java library for handling console input Summary: Java library for handling console input
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/Java Group: Development/Libraries/Java
URL: https://github.com/jline/jline3 URL: https://github.com/jline/jline3
Source0: %{url}/archive/refs/tags/jline-parent-%{version}.tar.gz Source0: %{url}/archive/refs/tags/jline-%{version}.tar.gz
Source1: %{name}-build.tar.xz
Source100: Load-native-library-system-wide-place.patch.in
Patch0: 0001-Remove-optional-dependency-on-universalchardet.patch
BuildRequires: ant
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: maven-local BuildRequires: jansi
BuildRequires: mvn(com.google.code.findbugs:jsr305) BuildRequires: java-devel >= 1.8
BuildRequires: mvn(com.googlecode.juniversalchardet:juniversalchardet) BuildRequires: javapackages-local >= 6
BuildRequires: mvn(net.java.dev.jna:jna) BuildRequires: jna
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: jsr-305
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) %if %{with ssh}
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) BuildRequires: apache-sshd
BuildRequires: mvn(org.apache.sshd:sshd-core) BuildRequires: slf4j
BuildRequires: mvn(org.apache.sshd:sshd-scp) %endif
BuildRequires: mvn(org.apache.sshd:sshd-sftp) %if %{with ffm}
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: java-devel >= 22
BuildRequires: mvn(org.fusesource.jansi:jansi) BuildConflicts: java <= 21
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildConflicts: java-devel <= 21
BuildArch: noarch BuildConflicts: java-headless <= 21
%endif
%description %description
JLine is a Java library for handling console input. It is similar in JLine is a Java library for handling console input. It is similar in
@@ -56,14 +63,9 @@ find most of the command editing features of JLine to be familiar.
JLine 3.x is an evolution of JLine 2.x. JLine 3.x is an evolution of JLine 2.x.
%package parent
Summary: JLine Parent
%description parent
%{desc}
%package builtins %package builtins
Summary: JLine Builtins Summary: JLine Builtins
BuildArch: noarch
%description builtins %description builtins
%{desc} %{desc}
@@ -73,6 +75,7 @@ multiplexer, etc…
%package console %package console
Summary: JLine Console Summary: JLine Console
BuildArch: noarch
%description console %description console
%{desc} %{desc}
@@ -80,8 +83,47 @@ Summary: JLine Console
This package contains the command registry, object printer and widget This package contains the command registry, object printer and widget
implementations. implementations.
%package console-ui
Summary: JLine Console UI
BuildArch: noarch
%description console-ui
%{desc}
This package contains the command registry, object printer and widget
implementations.
%package curses
Summary: JLine Curses
BuildArch: noarch
%description curses
%{desc}
%package jansi
Summary: Jansi Bundle
%description jansi
%{desc}
%package jansi-core
Summary: Jansi Core
BuildArch: noarch
%description jansi-core
%{desc}
%package native
Summary: JLine Native Library
%description native
%{desc}
This package contains the native library.
%package reader %package reader
Summary: JLine Reader Summary: JLine Reader
BuildArch: noarch
%description reader %description reader
%{desc} %{desc}
@@ -90,6 +132,7 @@ This package contains the line reader (including completion, history, etc…).
%package remote-telnet %package remote-telnet
Summary: JLine Remote Telnet Summary: JLine Remote Telnet
BuildArch: noarch
%description remote-telnet %description remote-telnet
%{desc} %{desc}
@@ -97,19 +140,32 @@ Summary: JLine Remote Telnet
This package contains the helpers for using jline over telnet (including This package contains the helpers for using jline over telnet (including
a telnet server implementation). a telnet server implementation).
%if %{with ssh}
%package remote-ssh %package remote-ssh
Summary: JLine Remote SSH Summary: JLine Remote SSH
Recommends: mvn(org.apache.sshd:scp-core) Recommends: mvn(org.apache.sshd:scp-core)
Recommends: mvn(org.apache.sshd:sftp-core) Recommends: mvn(org.apache.sshd:sftp-core)
Recommends: mvn(org.apache.sshd:sshd-core) Recommends: mvn(org.apache.sshd:sshd-core)
BuildArch: noarch
%description remote-ssh %description remote-ssh
%{desc} %{desc}
This package contains the helpers for using jline with Mina SSHD. This package contains the helpers for using jline with Mina SSHD.
%endif
%if %{with ffm}
%package terminal-ffm
Summary: JLine FFM Terminal
BuildArch: noarch
%description terminal-ffm
%{desc}
%endif
%package style %package style
Summary: JLine Style Summary: JLine Style
BuildArch: noarch
%description style %description style
%{desc} %{desc}
@@ -118,14 +174,25 @@ This package contains the styling api.
%package terminal-jna %package terminal-jna
Summary: JLine JNA Terminal Summary: JLine JNA Terminal
BuildArch: noarch
%description terminal-jna %description terminal-jna
%{desc} %{desc}
This package contains terminal implementations leveraging the JNA library. This package contains terminal implementations leveraging the JNA library.
%package terminal-jni
Summary: JLine JNI Terminal
BuildArch: noarch
%description terminal-jni
%{desc}
This package contains terminal implementations leveraging the JNI library.
%package terminal %package terminal
Summary: JLine Terminal Summary: JLine Terminal
BuildArch: noarch
%description terminal %description terminal
%{desc} %{desc}
@@ -134,6 +201,7 @@ This package contains the Terminal api and implementations.
%package terminal-jansi %package terminal-jansi
Summary: JLine JANSI Terminal Summary: JLine JANSI Terminal
BuildArch: noarch
%description terminal-jansi %description terminal-jansi
%{desc} %{desc}
@@ -142,78 +210,286 @@ This package contains terminal implementations leveraging the Jansi library.
%package javadoc %package javadoc
Summary: API documentation for %{name} Summary: API documentation for %{name}
BuildArch: noarch
%description javadoc %description javadoc
API documentation for %{name}. API documentation for %{name}.
%prep %prep
%autosetup -n %{name}-jline-parent-%{version} %autosetup -n %{name}-jline-%{version} -p1 -a1
%pom_disable_module demo
sed "s;@SYSTEMLIBRARYPATH@;%{_libdir}/%{name}/;g" < %{SOURCE100} | patch -p1
cp -p console-ui/LICENSE.txt LICENSE-APACHE.txt
# Remove prebuilt native objects
rm -r native/src/main/resources/org/jline/nativ/*/
# -Werror is considered harmful for downstream packaging
sed -i /-Werror/d $(find -name pom.xml)
# Optional dependency on juniversalchardet was removed via a patch
%pom_remove_dep -r :juniversalchardet . jline
%if %{without ffm}
%pom_disable_module terminal-ffm
%pom_remove_dep :jline-terminal-ffm jline
%pom_xpath_remove "pom:executions/pom:execution[pom:id='jdk22']" jline
%endif
# Disable unwanted modules
%pom_disable_module groovy %pom_disable_module groovy
%pom_disable_module demo
%pom_disable_module graal %pom_disable_module graal
%if %{without ssh}
%pom_disable_module remote-ssh
%endif
%pom_remove_plugin org.graalvm.nativeimage:native-image-maven-plugin # Unnecessary plugins for an rpm build
%pom_remove_plugin :maven-release-plugin
%pom_remove_plugin :maven-enforcer-plugin %pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin :spotless-maven-plugin
%pom_remove_plugin :maven-release-plugin
%pom_remove_plugin :maven-deploy-plugin
%pom_remove_plugin :native-image-maven-plugin
%pom_remove_plugin :maven-source-plugin
%pom_xpath_remove -r "pom:arg[text()='-Werror']" . jline # There is no need to re-generate jni-config.json for GraalVM
# as is already present under native/src/main/resources/
%pom_remove_plugin :exec-maven-plugin native
%pom_remove_dep :picocli-codegen native
%pom_xpath_remove -r 'pom:profile[pom:id="javadoc"]' # Superfluos dependency
%pom_remove_dep org.apache.sshd: remote-telnet
%if %{without ssh}
%pom_remove_dep org.apache.sshd: jline
%endif
%{mvn_package} ":jline-{*}" @1 %pom_remove_plugin :maven-dependency-plugin console-ui jansi jline
%pom_remove_plugin :build-helper-maven-plugin jansi jline
# This replaces the action of the two removed plugins
mkdir -p jline/src/main/java
mkdir -p jline/src/main/resources
for module in \
jansi-core \
builtins \
console \
native \
reader \
%if %{with ssh}
remote-ssh \
%endif
remote-telnet \
style \
terminal \
%if %{with ffm}
terminal-ffm \
%endif
terminal-jansi \
terminal-jna \
terminal-jni; do
if [ -d ${module}/src/main/java ]; then
cp -r ${module}/src/main/java/* jline/src/main/java/
fi
if [ -d ${module}/src/main/resources ]; then
cp -r ${module}/src/main/resources/* jline/src/main/resources/
fi
done
mkdir -p jansi/src/main/java
mkdir -p jansi/src/main/resources
for module in \
jansi-core \
native \
terminal \
terminal-jni; do
if [ -d ${module}/src/main/java ]; then
cp -r ${module}/src/main/java/* jansi/src/main/java/
fi
if [ -d ${module}/src/main/resources ]; then
cp -r ${module}/src/main/resources/* jansi/src/main/resources/
fi
done
%build %build
%{mvn_build} -f mkdir -p lib
build-jar-repository -s lib \
jansi/jansi \
jna/jna \
jsr-305
%if %{with ssh}
build-jar-repository -s lib \
apache-sshd/sshd-common \
apache-sshd/sshd-core \
apache-sshd/sshd-scp \
apache-sshd/sshd-sftp \
slf4j/api
%endif
# Build a native object
gcc -Wall %{?build_cflags} %{?optflags} -fPIC -fvisibility=hidden -shared \
-I native/src/main/native -I %{_jvmdir}/java/include \
-I %{_jvmdir}/java/include/linux %{?build_ldflags} \
-o libjlinenative.so native/src/main/native/{jlinenative,clibrary}.c
ant package javadoc
%if %{with ssh}
ant -f remote-ssh package javadoc
%endif
%if %{with ffm}
ant -f terminal-ffm package javadoc
%endif
%install %install
%mvn_install # jars
install -dm 0755 %{buildroot}%{_jnidir}/%{name}
install -pm 0644 jansi/target/jansi-%{version}.jar %{buildroot}%{_jnidir}/%{name}/jansi.jar
install -pm 0644 jline/target/jline-%{version}.jar %{buildroot}%{_jnidir}/%{name}/jline.jar
install -pm 0644 native/target/jline-native-%{version}.jar %{buildroot}%{_jnidir}/%{name}/jline-native.jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 jansi-core/target/jansi-core-%{version}.jar %{buildroot}%{_javadir}/%{name}/jansi-core.jar
for i in \
builtins \
console \
console-ui \
curses reader \
%if %{with ssh}
remote-ssh \
%endif
remote-telnet \
style \
terminal \
%if %{with ffm}
terminal-ffm \
%endif
terminal-jansi \
terminal-jna \
terminal-jni; do
install -pm 0644 ${i}/target/jline-${i}-%{version}.jar %{buildroot}%{_javadir}/%{name}/jline-${i}.jar
done
# poms
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
for i in \
jansi \
jansi-core \
jline; do
%{mvn_install_pom} ${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${i}.pom
%add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar -f ${i}
done
for i in \
builtins \
console \
console-ui \
curses reader \
native \
%if %{with ssh}
remote-ssh \
%endif
remote-telnet \
style \
terminal \
%if %{with ffm}
terminal-ffm \
%endif
terminal-jansi \
terminal-jna \
terminal-jni; do
%{mvn_install_pom} ${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/jline-${i}.pom
%add_maven_depmap %{name}/jline-${i}.pom %{name}/jline-${i}.jar -f ${i}
done
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
for i in \
builtins \
console \
console-ui \
curses reader \
jansi \
jansi-core \
jline \
native \
%if %{with ssh}
remote-ssh \
%endif
remote-telnet \
style \
terminal \
%if %{with ffm}
terminal-ffm \
%endif
terminal-jansi \
terminal-jna \
terminal-jni; do
cp -r ${i}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/${i}
done
%fdupes %{buildroot}%{_javadocdir}/%{name} %fdupes %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles # native library
install -d -m 755 %{buildroot}%{_libdir}/%{name}/
install -p -m 755 libjlinenative.so %{buildroot}%{_libdir}/%{name}/
%files -f .mfiles-jline
%doc README.md %doc README.md
%license LICENSE.txt %license LICENSE.txt
%files jansi -f .mfiles-jansi
%license LICENSE.txt
%files jansi-core -f .mfiles-jansi-core
%license LICENSE.txt
%files builtins -f .mfiles-builtins %files builtins -f .mfiles-builtins
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%files console -f .mfiles-console %files console -f .mfiles-console
%doc README.md %license LICENSE.txt
%files console-ui -f .mfiles-console-ui
%license LICENSE.txt
%files curses -f .mfiles-curses
%license LICENSE.txt
%files native -f .mfiles-native
%{_libdir}/%{name}
%license LICENSE.txt %license LICENSE.txt
%files reader -f .mfiles-reader %files reader -f .mfiles-reader
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%if %{with ssh}
%files remote-ssh -f .mfiles-remote-ssh
%license LICENSE.txt
%endif
%if %{with ffm}
%files terminal-ffm -f .mfiles-terminal-ffm
%license LICENSE.txt
%endif
%files remote-telnet -f .mfiles-remote-telnet %files remote-telnet -f .mfiles-remote-telnet
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%files style -f .mfiles-style %files style -f .mfiles-style
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%files terminal -f .mfiles-terminal %files terminal -f .mfiles-terminal
%doc README.md
%license LICENSE.txt
%files terminal-jna -f .mfiles-terminal-jna
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%files terminal-jansi -f .mfiles-terminal-jansi %files terminal-jansi -f .mfiles-terminal-jansi
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%files remote-ssh -f .mfiles-remote-ssh %files terminal-jna -f .mfiles-terminal-jna
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%files parent -f .mfiles-parent %files terminal-jni -f .mfiles-terminal-jni
%doc README.md
%license LICENSE.txt %license LICENSE.txt
%files javadoc -f .mfiles-javadoc %files javadoc
%{_javadocdir}/%{name}
%license LICENSE.txt %license LICENSE.txt
%changelog %changelog