Sync from SUSE:SLFO:Main jbigkit revision 7801aa92ab17d8c7ea88f48aa27bebbe

This commit is contained in:
Adrian Schröter 2024-05-03 13:59:26 +02:00
commit c0690b27ab
6 changed files with 376 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

5
baselibs.conf Normal file
View File

@ -0,0 +1,5 @@
libjbig2
libjbig-devel
requires -libjbig-<targettype>
requires "libjbig2-<targettype> = <version>"

181
jbigkit-2.1-shlib.patch Normal file
View File

@ -0,0 +1,181 @@
diff -ruN jbigkit-2.1/libjbig/Makefile jbigkit-2.1-shlib/libjbig/Makefile
--- jbigkit-2.1/libjbig/Makefile 2014-03-27 14:47:15.000000000 -0400
+++ jbigkit-2.1-shlib/libjbig/Makefile 2014-04-14 19:54:00.000000000 -0400
@@ -1,28 +1,33 @@
# Unix makefile for the JBIG-KIT library
# Select an ANSI/ISO C compiler here, GNU gcc is recommended
-CC = gcc
+CC ?= gcc
# Options for the compiler: A high optimization level is suggested
-CFLAGS = -g -O -W -Wall -ansi -pedantic # --coverage
+CFLAGS ?= -g -O -W -Wall -ansi -pedantic # --coverage
+PICFLAGS := -fPIC -DPIC
-all: libjbig.a libjbig85.a tstcodec tstcodec85
+all: libjbig.so.$(SOVERSION) libjbig85.so.$(SOVERSION) tstcodec tstcodec85
-tstcodec: tstcodec.o jbig.o jbig_ar.o
- $(CC) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o
+tstcodec: tstcodec.o libjbig.so
+ $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig
-tstcodec85: tstcodec85.o jbig85.o jbig_ar.o
- $(CC) $(CFLAGS) -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o
+tstcodec85: tstcodec85.o libjbig85.so
+ $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig
-libjbig.a: jbig.o jbig_ar.o
- rm -f libjbig.a
- ar rc libjbig.a jbig.o jbig_ar.o
- -ranlib libjbig.a
+%.so: %.so.$(VERSION)
+ ln -sf $< $@
-libjbig85.a: jbig85.o jbig_ar.o
- rm -f libjbig85.a
- ar rc libjbig85.a jbig85.o jbig_ar.o
- -ranlib libjbig85.a
+%.so.$(SOVERSION): %.so.$(VERSION)
+ ln -sf $< $@
+
+libjbig.so.$(VERSION): jbig.o jbig_ar.o
+ $(CC) $(CFLAGS) -shared -Wl,-soname,libjbig.so.$(SOVERSION) -o $@ $^
+
+libjbig85.so.$(VERSION): jbig85.o jbig_ar.o
+ $(CC) $(CFLAGS) -shared -Wl,-soname,libjbig85.so.$(SOVERSION) -o $@ $^
+
+jbig.o jbig85.o jbig_ar.o: CFLAGS += $(PICFLAGS)
jbig.o: jbig.c jbig.h jbig_ar.h
jbig85.o: jbig85.c jbig85.h jbig_ar.h
@@ -43,13 +48,13 @@
clang --analyze *.c
test: tstcodec tstcodec85
- ./tstcodec
- ./tstcodec85
+ LD_LIBRARY_PATH=`pwd` ./tstcodec
+ LD_LIBRARY_PATH=`pwd` ./tstcodec85
t82test.pbm: tstcodec
- ./tstcodec $@
+ LD_LIBRARY_PATH=`pwd` ./tstcodec $@
clean:
rm -f *.o *.gcda *.gcno *.gcov *.plist *~ core gmon.out dbg_d\=??.pbm
rm -f t82test.pbm
- rm -f tstcodec tstcodec85
+ rm -f tstcodec tstcodec85 libjbig*.so libjbig*.so.$(SOVERSION) libjbig*.so.$(VERSION)
diff -ruN jbigkit-2.1/Makefile jbigkit-2.1-shlib/Makefile
--- jbigkit-2.1/Makefile 2014-03-27 14:47:15.000000000 -0400
+++ jbigkit-2.1-shlib/Makefile 2014-04-14 20:59:40.000000000 -0400
@@ -1,37 +1,39 @@
# Unix makefile for JBIG-KIT
# Select an ANSI/ISO C compiler here, GNU gcc is recommended
-CC = gcc
+CC ?= gcc
# Options for the compiler: A high optimization level is suggested
-CFLAGS = -O2 -W -Wno-unused-result
+CFLAGS ?= -O2 -W -Wno-unused-result
# CFLAGS = -O -g -W -Wall -Wno-unused-result -ansi -pedantic # -DDEBUG
export CC CFLAGS
VERSION=2.1
+SOVERSION = $(basename $(VERSION))
+export VERSION SOVERSION
all: lib pbm
@echo "Enter 'make test' in order to start some automatic tests."
lib:
- cd libjbig && $(MAKE) -e
+ make -C libjbig
pbm: lib
- cd pbmtools && $(MAKE) -e
+ make -C pbmtools
test: lib pbm
- cd libjbig && $(MAKE) test
- cd pbmtools && $(MAKE) test
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C libjbig test
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C pbmtools test
analyze:
- cd libjbig && $(MAKE) analyze
- cd pbmtools && $(MAKE) analyze
+ make -C libjbig analyze
+ make -C pbmtools analyze
clean:
rm -f *~ core
- cd libjbig && $(MAKE) clean
- cd pbmtools && $(MAKE) clean
+ make -C libjbig clean
+ make -C pbmtools clean
distribution:
rm -rf jbigkit-$(VERSION)
diff -ruN jbigkit-2.1/pbmtools/Makefile jbigkit-2.1-shlib/pbmtools/Makefile
--- jbigkit-2.1/pbmtools/Makefile 2014-03-27 14:47:15.000000000 -0400
+++ jbigkit-2.1-shlib/pbmtools/Makefile 2014-04-14 21:04:14.000000000 -0400
@@ -1,29 +1,29 @@
# Unix makefile for the JBIG-KIT PBM tools
# Select an ANSI/ISO C compiler here, e.g. GNU gcc is recommended
-CC = gcc
+CC ?= gcc
# Options for the compiler
-CFLAGS = -g -O -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
+CFLAGS ?= -g -O -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
CPPFLAGS = -I../libjbig
.SUFFIXES: .1 .5 .txt $(SUFFIXES)
.PHONY: txt test test82 test85 clean
-all: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 txt
+all: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 # txt
txt: pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt
-pbmtojbg: pbmtojbg.o ../libjbig/libjbig.a
+pbmtojbg: pbmtojbg.o ../libjbig/libjbig.so
$(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
-jbgtopbm: jbgtopbm.o ../libjbig/libjbig.a
+jbgtopbm: jbgtopbm.o ../libjbig/libjbig.so
$(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
-pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.a
+pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.so
$(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
-jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.a
+jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.so
$(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h
@@ -31,13 +31,13 @@
jbgtopbm85.o: jbgtopbm85.c ../libjbig/jbig85.h
pbmtojbg85.o: pbmtojbg85.c ../libjbig/jbig85.h
-../libjbig/libjbig.a: ../libjbig/jbig.c ../libjbig/jbig.h \
+../libjbig/libjbig.so: ../libjbig/jbig.c ../libjbig/jbig.h \
../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
- make -C ../libjbig libjbig.a
+ make -C ../libjbig libjbig.so
-../libjbig/libjbig85.a: ../libjbig/jbig85.c ../libjbig/jbig85.h \
+../libjbig/libjbig85.so: ../libjbig/jbig85.c ../libjbig/jbig85.h \
../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
- make -C ../libjbig libjbig85.a
+ make -C ../libjbig libjbig85.so
analyze:
clang $(CPPFLAGS) --analyze *.c

BIN
jbigkit-2.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

38
jbigkit.changes Normal file
View File

@ -0,0 +1,38 @@
-------------------------------------------------------------------
Wed Aug 24 10:46:45 UTC 2022 - Andreas Schwab <schwab@suse.de>
- Makefile is not parallel-safe
-------------------------------------------------------------------
Tue Apr 15 01:11:00 UTC 2014 - brian@aljex.com
- v2.1
-Fixes bnc#870855
-Fixes CVE-2013-6369
-------------------------------------------------------------------
Fri Jul 19 09:20:49 UTC 2013 - schwab@linux-m68k.org
- Don't strip binaries
-------------------------------------------------------------------
Thu Mar 28 12:49:05 UTC 2013 - mmeister@suse.com
- Added url as source.
Please see http://en.opensuse.org/SourceUrls
-------------------------------------------------------------------
Wed Jun 13 14:33:07 UTC 2012 - coolo@suse.com
- fix baselibs.conf
-------------------------------------------------------------------
Fri Jun 8 12:02:54 UTC 2012 - seife+obs@b1-systems.com
- build -32bit packages to make libtiff5-32bit installable
-------------------------------------------------------------------
Tue Apr 10 17:00:40 UTC 2012 - brian@aljex.com
- Initial SUSE package.

126
jbigkit.spec Normal file
View File

@ -0,0 +1,126 @@
#
# spec file for package jbigkit
#
# 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: jbigkit
%define ver_maj 2
%define ver_min 1
Version: %{ver_maj}.%{ver_min}
Release: 0
Summary: JBIG1 lossless image compression tools
License: GPL-2.0-or-later
Group: Productivity/Graphics/Convertors
URL: http://www.cl.cam.ac.uk/~mgk25/jbigkit/
Source0: http://www.cl.cam.ac.uk/~mgk25/download/%{name}-%{version}.tar.gz
Source42: baselibs.conf
Patch0: %{name}-%{version}-shlib.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define libname libjbig
%define soversion %ver_maj
%define libpkg %{libname}%soversion
%define devpkg %{libname}-devel
%package -n %libpkg
Summary: JBIG1 lossless image compression library
Group: System/Libraries
Provides: %libname = %version
%package -n %devpkg
Summary: JBIG1 lossless image compression library -- development files
Group: Development/Libraries/C and C++
Requires: %libpkg = %version
%description -n %libpkg
JBIG-KIT provides a portable library of compression and decompression
functions with a documented interface that you can include very easily
into your image or document processing software. In addition, JBIG-KIT
provides ready-to-use compression and decompression programs with a
simple command line interface (similar to the converters found in
netpbm).
JBIG-KIT implements the specification:
ISO/IEC 11544:1993 and ITU-T Recommendation T.82(1993):
Information technology Coded representation of picture and audio
information Progressive bi-level image compression
which is commonly referred to as the “JBIG1 standard”
%description -n %devpkg
The libjbig-devel package contains files needed for development using
the JBIG-KIT image compression library.
%description
The jbigkit package contains tools for converting between PBM and JBIG1
formats.
%prep
%setup
%patch0 -p1
%build
export CFLAGS="%optflags -I../libjbig" CXXFLAGS="%optflags"
# Makefile is not parallel-safe
%__make
%check
%__make test
%install
%__install -d %{buildroot}/%_libdir
%__install -m 0755 libjbig/libjbig.so.%version %{buildroot}/%_libdir
%__install -m 0755 libjbig/libjbig85.so.%version %{buildroot}/%_libdir
%__ln_s -f libjbig.so.%version %{buildroot}/%{_libdir}/libjbig.so.%soversion
%__ln_s -f libjbig85.so.%version %{buildroot}/%{_libdir}/libjbig85.so.%soversion
%__ln_s -f libjbig.so.%version %{buildroot}/%{_libdir}/libjbig.so
%__ln_s -f libjbig85.so.%version %{buildroot}/%{_libdir}/libjbig85.so
%__install -d %{buildroot}%_includedir
%__install -m 0644 libjbig/jbig*.h %{buildroot}%_includedir
%__install -d %{buildroot}%_bindir
%__install -m 0755 pbmtools/pbmtojbg %{buildroot}%_bindir
%__install -m 0755 pbmtools/jbgtopbm %{buildroot}%_bindir
%__install -m 0755 pbmtools/pbmtojbg85 %{buildroot}%_bindir
%__install -m 0755 pbmtools/jbgtopbm85 %{buildroot}%_bindir
%__install -d %{buildroot}%{_mandir}/man1
%__install -m 0644 pbmtools/*.1 %{buildroot}%{_mandir}/man1
%__ln_s -f pbmtojbg.1 %{buildroot}%{_mandir}/man1/pbmtojbg85.1
%__ln_s -f jbgtopbm.1 %{buildroot}%{_mandir}/man1/jbgtopbm85.1
%post -n %libpkg -p /sbin/ldconfig
%postun -n %libpkg -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/*
%doc %{_mandir}/man1/*
%doc COPYING ANNOUNCE TODO CHANGES pbmtools/*.txt
%files -n %libpkg
%defattr(-,root,root)
%{_libdir}/%{libname}*.so.*
%files -n %devpkg
%defattr(-,root,root)
%{_libdir}/%{libname}*.so
%{_includedir}/jbig*.h
%doc COPYING ANNOUNCE TODO CHANGES libjbig/*.txt
%changelog