Sync from SUSE:SLFO:Main jzlib revision 4e83b718eb70e37664850523ae185b94

This commit is contained in:
Adrian Schröter 2024-05-03 14:09:06 +02:00
commit 354baef5cb
6 changed files with 351 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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

BIN
1.1.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

21
jzlib-javadoc-fixes.patch Normal file
View File

@ -0,0 +1,21 @@
--- src/main/java/com/jcraft/jzlib/ZStream.java.orig 2014-05-09 12:35:05.241400959 +0100
+++ src/main/java/com/jcraft/jzlib/ZStream.java 2014-05-09 12:35:35.093886286 +0100
@@ -371,6 +371,7 @@
/**
* Those methods are expected to be override by Inflater and Deflater.
* In the future, they will become abstract methods.
+ * @return an error code
*/
public int end(){ return Z_OK; }
public boolean finished(){ return false; }
--- src/main/java/com/jcraft/jzlib/GZIPHeader.java.orig 2014-05-09 12:37:35.358812069 +0100
+++ src/main/java/com/jcraft/jzlib/GZIPHeader.java 2014-05-09 12:37:40.267727366 +0100
@@ -37,7 +37,7 @@
import java.io.UnsupportedEncodingException;
/**
- * @see "http://www.ietf.org/rfc/rfc1952.txt"
+ * See "http://www.ietf.org/rfc/rfc1952.txt"
*/
public class GZIPHeader implements Cloneable {

89
jzlib.changes Normal file
View File

@ -0,0 +1,89 @@
-------------------------------------------------------------------
Sun Mar 20 12:17:34 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Build with java source and target levels 8
-------------------------------------------------------------------
Mon Sep 23 07:20:13 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Build the jar file as an eclipse bundle
- Build and package the javadoc again
- Added patch:
* jzlib-javadoc-fixes.patch
+ small fixes for javadoc tags
-------------------------------------------------------------------
Sun Nov 25 17:24:33 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Install as maven artifact
-------------------------------------------------------------------
Fri Sep 8 09:23:28 UTC 2017 - fstrba@suse.com
- Specify java source and target level 1.6 in order to allow build
with jdk9
-------------------------------------------------------------------
Fri Jun 9 10:39:43 UTC 2017 - tchvatal@suse.com
- Version update to 1.1.3:
* Various small fixes in from the github project
- Drop javadoc to bootstrap using gcj
-------------------------------------------------------------------
Tue Jul 8 09:27:35 UTC 2014 - tchvatal@suse.com
- Cleanup with spec-cleaner and fix sle build properly
-------------------------------------------------------------------
Wed Apr 30 17:38:15 UTC 2014 - darin@darins.net
- suppress bytecode check on SLE
-------------------------------------------------------------------
Wed Feb 19 10:35:43 UTC 2014 - lchiquitto@suse.com
- Remove old tarball
-------------------------------------------------------------------
Thu Oct 3 11:23:16 UTC 2013 - mvyskocil@suse.com
- Update to 1.1.2
* fixed a bug in DeflaterOutputStream#write() with empty data. 9d4616f
* fixed a bug in processing unwrapped data with InfalterInputStream. d35db2
* fixed bugs reported in https://github.com/ymnk/jzlib/pull/5 e4aa20
+ comments and filename in GZIPHeader must be in ISO-8859-1 encoding
+ fixing a bug in GZIPHeader#setOS(int os)
* some refactoring code. e912088 6900f5 614fdf
* improving the performace of Adler32#update method. 6900f5
* constructors of Alder32 and CRC32 become public. 30c4cf
* added ZStream#end() and ZStream#finished(). 6b55e3
* exposed useful constants for jruby. e17ad1
* updated pom.xml to delete "souceDirectory"
No need to specify sourceDirectory if the project follows maven
standard.
* updated configurations to use sbt 0.11.1
- Don't build for java5 only
-------------------------------------------------------------------
Mon Sep 9 11:06:10 UTC 2013 - tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
-------------------------------------------------------------------
Thu Sep 10 07:35:33 UTC 2009 - mvyskocil@suse.cz
- fixed bnc#536215: remove share/jzlib ghost symlink to allow
smooth transition from older Packman package
-------------------------------------------------------------------
Mon May 4 14:41:54 CEST 2009 - mvyskocil@suse.cz
- fixed bnc#500524:
* removed misc/mindtermsrc-v121-compression.patch in %%prep
-------------------------------------------------------------------
Tue Apr 28 11:11:18 CEST 2009 - mvyskocil@suse.cz
- Initial SUSE packaging (version 1.0.7 from jpp5)

102
jzlib.spec Normal file
View File

@ -0,0 +1,102 @@
#
# spec file for package jzlib
#
# Copyright (c) 2022 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: jzlib
Version: 1.1.3
Release: 0
Summary: Re-implementation of zlib in pure Java
License: BSD-3-Clause
Group: Development/Libraries/Java
URL: http://www.jcraft.com/jzlib/
Source0: https://github.com/ymnk/jzlib/archive/%{version}.tar.gz
Source1: %{name}_build.xml
# This patch is sent upstream: https://github.com/ymnk/jzlib/pull/15
Patch0: jzlib-javadoc-fixes.patch
BuildRequires: ant >= 1.6
BuildRequires: fdupes
BuildRequires: java-devel
BuildRequires: javapackages-local
BuildArch: noarch
%description
The zlib is designed to be a free, general-purpose, legally
unencumbered -- that is, not covered by any patents -- lossless
data-compression library for use on virtually any computer hardware and
operating system. The zlib was written by Jean-loup Gailly
(compression) and Mark Adler (decompression).
%package demo
Summary: Examples for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{version}-%{release}
%description demo
%{summary}.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
%{summary}.
%prep
%setup -q
%patch0
cp %{SOURCE1} build.xml
# bnc#500524
# be sure that we don't distribute GPL derived code marked as BSD
rm misc/mindtermsrc-v121-compression.patch
%build
%{ant} jar javadoc
%install
# jar
install -Dpm 644 target/%{name}-%{version}.jar \
%{buildroot}%{_javadir}/%{name}.jar
# pom
install -Dpm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar
# examples
install -dm 755 %{buildroot}%{_datadir}/%{name}-%{version}
cp -pr example/* %{buildroot}%{_datadir}/%{name}-%{version}
%fdupes -s %{buildroot}%{_datadir}/%{name}-%{version}
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
cp -r target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%defattr(0644,root,root,0755)
%license LICENSE.txt
%files demo
%defattr(0644,root,root,0755)
%doc %{_datadir}/%{name}-%{version}
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.txt
%changelog

113
jzlib_build.xml Normal file
View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jzlib" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="com.jcraft"/>
<property name="project.artifactId" value="jzlib"/>
<property name="project.version" value="1.1.3"/>
<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="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}"
nowarn="false"
debug="true"
optimize="true"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
</javac>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
source="${compiler.source}"
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="Bundle-Description" value="JZlib is a re-implementation of zlib in pure Java"/>
<attribute name="Bundle-DocURL" value="http://www.jcraft.com/"/>
<attribute name="Bundle-License" value="http://www.jcraft.com/jzlib/LICENSE.txt"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="JZlib"/>
<attribute name="Bundle-SymbolicName" value="com.jcraft.jzlib"/>
<attribute name="Bundle-Vendor" value="jcraft"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="com.jcraft.jzlib;version=&quot;${project.version}&quot;"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
</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>