Sync from SUSE:SLFO:Main jansi revision cd94c34d39e542ede7d2d4b01dae8e78
This commit is contained in:
commit
83c23b9adc
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
19
_service
Normal file
19
_service
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="url">https://github.com/fusesource/jansi.git</param>
|
||||||
|
<param name="revision">jansi-2.4.0</param>
|
||||||
|
<param name="match-tag">jansi-*</param>
|
||||||
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
|
<param name="versionrewrite-pattern">jansi-(.*)</param>
|
||||||
|
<param name="exclude">src/main/native/inc_mac</param>
|
||||||
|
<param name="exclude">src/main/native/inc_win</param>
|
||||||
|
<param name="exclude">src/main/native/inc_linux/*</param>
|
||||||
|
<param name="exclude">src/main/resources/org/fusesource/jansi/internal</param>
|
||||||
|
</service>
|
||||||
|
<service name="recompress" mode="disabled">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="disabled"/>
|
||||||
|
</services>
|
BIN
jansi-2.4.0.tar.xz
(Stored with Git LFS)
Normal file
BIN
jansi-2.4.0.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
126
jansi-build.xml
Normal file
126
jansi-build.xml
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project name="jansi" default="package" basedir=".">
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Build environment properties -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<property name="project.version" value="2.4.0"/>
|
||||||
|
<property name="project.groupId" value="org.fusesource.jansi"/>
|
||||||
|
<property name="project.artifactId" value="jansi"/>
|
||||||
|
|
||||||
|
<property name="spec.version" value="2.4"/>
|
||||||
|
|
||||||
|
<property name="compiler.source" value="1.8"/>
|
||||||
|
<property name="compiler.target" value="${compiler.source}"/>
|
||||||
|
|
||||||
|
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||||
|
<property name="build.dir" value="target"/>
|
||||||
|
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||||
|
<property name="build.srcDir" value="src/main/java"/>
|
||||||
|
<property name="build.resourceDir" value="src/main/resources"/>
|
||||||
|
|
||||||
|
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Cleaning up target -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="clean" description="Clean the output directory">
|
||||||
|
<delete dir="${build.dir}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Compilation target -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="compile" description="Compile the code">
|
||||||
|
<mkdir dir="${build.outputDir}"/>
|
||||||
|
<javac destdir="${build.outputDir}"
|
||||||
|
encoding="UTF-8"
|
||||||
|
nowarn="false"
|
||||||
|
debug="true"
|
||||||
|
optimize="false"
|
||||||
|
deprecation="true"
|
||||||
|
target="${compiler.target}"
|
||||||
|
verbose="false"
|
||||||
|
fork="false"
|
||||||
|
source="${compiler.source}">
|
||||||
|
<src>
|
||||||
|
<pathelement location="${build.srcDir}"/>
|
||||||
|
</src>
|
||||||
|
</javac>
|
||||||
|
<copy todir="${build.outputDir}">
|
||||||
|
<fileset dir="${build.resourceDir}"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Javadoc target -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||||
|
<javadoc sourcepath="${build.srcDir}"
|
||||||
|
packagenames="*"
|
||||||
|
destdir="${reporting.outputDirectory}/apidocs"
|
||||||
|
access="protected"
|
||||||
|
source="${compiler.source}"
|
||||||
|
verbose="false"
|
||||||
|
version="true"
|
||||||
|
use="true"
|
||||||
|
author="true"
|
||||||
|
splitindex="false"
|
||||||
|
nodeprecated="false"
|
||||||
|
nodeprecatedlist="false"
|
||||||
|
notree="false"
|
||||||
|
noindex="false"
|
||||||
|
nohelp="false"
|
||||||
|
nonavbar="false"
|
||||||
|
serialwarn="false"
|
||||||
|
encoding="UTF-8"
|
||||||
|
docencoding="UTF-8"
|
||||||
|
linksource="false"
|
||||||
|
breakiterator="false"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- Package target -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="package" depends="compile" description="Package the application">
|
||||||
|
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||||
|
compress="true"
|
||||||
|
index="false"
|
||||||
|
basedir="${build.outputDir}"
|
||||||
|
excludes="**/package.html">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Automatic-Module-Name" value="${project.groupId}"/>
|
||||||
|
<attribute name="Bundle-Description" value="Jansi is a java library for generating and interpreting ANSI escape sequences."/>
|
||||||
|
<attribute name="Bundle-DocURL" value="http://fusesource.com/"/>
|
||||||
|
<attribute name="Bundle-License" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
|
||||||
|
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||||
|
<attribute name="Bundle-Name" value="${project.artifactId}"/>
|
||||||
|
<attribute name="Bundle-SymbolicName" value="${project.groupId}"/>
|
||||||
|
<attribute name="Bundle-Vendor" value="FuseSource, Corp."/>
|
||||||
|
<attribute name="Bundle-Version" value="${project.version}"/>
|
||||||
|
<attribute name="Export-Package" value="org.fusesource.jansi.internal;version="${project.version}",org.fusesource.jansi.io;version="${project.version}";uses:="org.fusesource.jansi",org.fusesource.jansi;version="${project.version}";uses:="org.fusesource.jansi.io""/>
|
||||||
|
<attribute name="Implementation-Title" value="${project.artifactId}"/>
|
||||||
|
<attribute name="Implementation-Vendor" value="FuseSource, Corp."/>
|
||||||
|
<attribute name="Implementation-Version" value="${project.version}"/>
|
||||||
|
<attribute name="Main-Class" value="org.fusesource.jansi.AnsiMain"/>
|
||||||
|
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||||
|
<attribute name="Specification-Title" value="${project.artifactId}"/>
|
||||||
|
<attribute name="Specification-Vendor" value="FuseSource, Corp."/>
|
||||||
|
<attribute name="Specification-Version" value="${spec.version}"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
<!-- A dummy target for the package named after the type it creates -->
|
||||||
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
|
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
||||||
|
|
||||||
|
</project>
|
14
jansi-jni.patch
Normal file
14
jansi-jni.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
--- a/src/main/java/org/fusesource/jansi/internal/JansiLoader.java 2020-12-15 03:03:00.000000000 -0700
|
||||||
|
+++ b/src/main/java/org/fusesource/jansi/internal/JansiLoader.java 2020-12-15 07:57:30.238720226 -0700
|
||||||
|
@@ -295,6 +295,11 @@ public class JansiLoader {
|
||||||
|
} else {
|
||||||
|
triedPaths.add(jansiNativeLibraryPath);
|
||||||
|
}
|
||||||
|
+ } else {
|
||||||
|
+ if (loadNativeLibrary(new File("@LIBDIR@/jansi", jansiNativeLibraryName))) {
|
||||||
|
+ loaded = true;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load the os-dependent library from the jar file
|
49
jansi.changes
Normal file
49
jansi.changes
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 26 15:53:32 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Fetch sources using source_service and don't distribute legally
|
||||||
|
spurious files (bsc#1210877)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 16 11:00:15 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Upgrade the latest upstream release 2.4.0
|
||||||
|
* Integrates jansi-native libraries
|
||||||
|
* Does not depend on jansi-native and hawtjni-runtime
|
||||||
|
- Make the jansi package archful since it installs a native
|
||||||
|
library and jni jar
|
||||||
|
- Added patch:
|
||||||
|
* jansi-jni.patch
|
||||||
|
+ Give a possibility to load the native libjansi.so from
|
||||||
|
system
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 23 23:34:23 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Build with java source and target levels 8
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 27 07:34:53 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Remove the reference to jansi-project parent from jansi pom
|
||||||
|
- Resolve manually jansi-native-version variable so that ivy
|
||||||
|
understands it
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 9 15:44:56 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Remove reference to the parent pom since we are not building
|
||||||
|
using Maven.
|
||||||
|
- Make tests conditional and switched off by default
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 7 10:39:14 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Fix double-shipping of documentation
|
||||||
|
- Avoid name repetition in summary (potential rpmlint warning
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 4 12:33:24 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Initial package of jansi 1.17.1
|
||||||
|
- Add build.xml file for building with ant
|
121
jansi.spec
Normal file
121
jansi.spec
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
#
|
||||||
|
# spec file for package jansi
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: jansi
|
||||||
|
Version: 2.4.0
|
||||||
|
Release: 0
|
||||||
|
Summary: Java library for generating and interpreting ANSI escape sequences
|
||||||
|
License: Apache-2.0
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
URL: https://fusesource.github.io/jansi/
|
||||||
|
Source0: %{name}-%{version}.tar.xz
|
||||||
|
Source1: %{name}-build.xml
|
||||||
|
Patch0: %{name}-jni.patch
|
||||||
|
BuildRequires: ant
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: javapackages-local
|
||||||
|
|
||||||
|
%description
|
||||||
|
Jansi is a java library that allows you to use ANSI escape sequences
|
||||||
|
in your Java console applications. It implements ANSI support on platforms
|
||||||
|
which don't support it, like Windows, and provides graceful degradation for
|
||||||
|
when output is being sent to output devices which cannot support ANSI sequences.
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: Javadocs for %{name}
|
||||||
|
Group: Documentation/HTML
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
This package contains the API documentation for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
cp %{SOURCE1} build.xml
|
||||||
|
|
||||||
|
%pom_remove_parent
|
||||||
|
|
||||||
|
# We don't need the Fuse JXR skin
|
||||||
|
%pom_xpath_remove "pom:build/pom:extensions"
|
||||||
|
|
||||||
|
# Plugins not needed for an RPM build
|
||||||
|
%pom_remove_plugin :maven-gpg-plugin
|
||||||
|
%pom_remove_plugin :maven-javadoc-plugin
|
||||||
|
%pom_remove_plugin :nexus-staging-maven-plugin
|
||||||
|
|
||||||
|
# We don't want GraalVM support in Fedora
|
||||||
|
%pom_remove_plugin :exec-maven-plugin
|
||||||
|
%pom_remove_dep :picocli-codegen
|
||||||
|
|
||||||
|
# Build for JDK 1.8 at a minimum
|
||||||
|
%pom_xpath_set "//pom:properties/pom:jdkTarget" 1.8
|
||||||
|
|
||||||
|
# Link the JNI headers
|
||||||
|
ln -s %{java_home}/include/jni.h src/main/native/inc_linux
|
||||||
|
ln -s %{java_home}/include/linux/jni_md.h src/main/native/inc_linux
|
||||||
|
|
||||||
|
# Set the JNI path
|
||||||
|
sed -i 's,@LIBDIR@,%{_libdir},' \
|
||||||
|
src/main/java/org/fusesource/jansi/internal/JansiLoader.java
|
||||||
|
# Filtering complicated with ant
|
||||||
|
sed -i 's,\${project.version},%{version},' \
|
||||||
|
src/main/resources/org/fusesource/jansi/jansi.properties
|
||||||
|
|
||||||
|
%build
|
||||||
|
# Build the native artifact
|
||||||
|
CFLAGS="$CFLAGS -I. -I%{java_home}/include -I%{java_home}/include/linux -fPIC -fvisibility=hidden"
|
||||||
|
pushd src/main/native
|
||||||
|
%__cc $CFLAGS -c jansi.c
|
||||||
|
%__cc $CFLAGS -c jansi_isatty.c
|
||||||
|
%__cc $CFLAGS -c jansi_structs.c
|
||||||
|
%__cc $CFLAGS -c jansi_ttyname.c
|
||||||
|
%__cc $CFLAGS $LDFLAGS -shared -o libjansi.so *.o -lutil
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Build the Java artifacts
|
||||||
|
%{ant} jar javadoc
|
||||||
|
|
||||||
|
%install
|
||||||
|
# Install the native artifact
|
||||||
|
install -dm 0755 %{buildroot}%{_libdir}/%{name}
|
||||||
|
install -pm 0755 src/main/native/libjansi.so %{buildroot}%{_libdir}/%{name}
|
||||||
|
|
||||||
|
# jar
|
||||||
|
install -dm 0755 %{buildroot}%{_jnidir}/%{name}
|
||||||
|
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_jnidir}/%{name}/%{name}.jar
|
||||||
|
# pom
|
||||||
|
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
||||||
|
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
|
||||||
|
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
|
||||||
|
# javadoc
|
||||||
|
%fdupes -s %{buildroot}%{_javadocdir}
|
||||||
|
# javadoc
|
||||||
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
%fdupes -s %{buildroot}%{_javadocdir}
|
||||||
|
|
||||||
|
%files -f .mfiles
|
||||||
|
%license license.txt
|
||||||
|
%doc readme.md changelog.md
|
||||||
|
%{_libdir}/%{name}
|
||||||
|
|
||||||
|
%files javadoc
|
||||||
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user