# # spec file for package leptonica # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %define major 5 Name: leptonica Version: 1.74.1 Release: 1.1 Summary: Library for image processing and image analysis applications License: BSD-2-Clause Group: System/Libraries Url: http://leptonica.org/ Source0: http://leptonica.org/source/%{name}-%{version}.tar.gz Source1: baselibs.conf BuildRequires: giflib-devel BuildRequires: libjpeg-devel BuildRequires: libtool %if 0%{?suse_version} > 1310 BuildRequires: pkgconfig(libopenjp2) %endif BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(libwebp) >= 0.2.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Library for efficient image processing and image analysis operations. %package -n liblept%{major} Summary: Library for image processing and image analysis applications Group: System/Libraries %description -n liblept%{major} Library for efficient image processing and image analysis operations. %package devel Summary: Leptonica Development Files Group: Development/Libraries/C and C++ Requires: liblept%{major} = %{version} Provides: liblept-devel = %{version} Obsoletes: liblept-devel < 1.70 %description devel Development files for the Leptonica library. %package tools Summary: Leptonica tools Group: Productivity/Graphics/Other %description tools Programs for manipulating images. %prep %setup -q %build %configure \ --disable-static \ --program-prefix=lept- make %{?_smp_mflags} %install make install DESTDIR="%buildroot" rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_bindir}/{*gen,*reg,*test*} %check make check %post -n liblept%{major} -p /sbin/ldconfig %postun -n liblept%{major} -p /sbin/ldconfig %files -n liblept%{major} %defattr(-,root,root) %{_libdir}/liblept.so.* %files devel %defattr(-,root,root) %doc leptonica-license.txt README.html version-notes.html moller52.jpg %{_includedir}/leptonica/ %{_libdir}/liblept.so %{_libdir}/pkgconfig/* %files -n leptonica-tools %defattr(-,root,root) %doc leptonica-license.txt %{_bindir}/lept-* %changelog * Fri Feb 17 2017 idonmez@suse.com - Update to version 1.74.1 Version 1.74.1 4 Jan 17 * Configuration changes to support the patch number in the version (major.minor.patch). * Removed all remaining pixDisplayWrite() calls in prog/. * Cleaned up and/or promoted about 15 programs to full regression tests. There are now 95 tests in the regression set. * Over half the initial coverity scan warnings have been removed. Version 1.74.0 10 Dec 16 * Leptonica development was moved to github. The master is at: github.com/danbloomberg/leptonica * New modes for RGB --> gray conversion. * New functions added for displaying a pix from a pixa. * Split out sort/hash/set/map functions for dna, sarray and pta. * More robust horizontal deskew on multi-column page images. * Improve webpio_reg test. * Remove X11 display for gplot; it is no longer supported. * Remove most sleep calls, which were put in for gplot; no longer needed. * Removed use of gthumb in library. * Removed use of pixDisplayWrite() in the library; still in some progs. * Improved test for endianness in makefile.static; no longer requires any local files or building and running a program. * Modified all files for doxygen output (spearheaded by Jurgen Buchmuller) * Improved plotting of the boxes in a boxa. * Replaced the slow point hash function with a simple fast one. * Added pam (4 component) format writing to pnmio.c (Jurgen Buchmuller) * Improved rendering of pixa in side/by/sides. * Better utilities for pixa and pixacomp. * Add read/write serialization functions from/to memory for all the major data structures that do not already have them. * More serialized boot recognizers stored as self-generating code. * Cleaned up generating an adapted recognizer from the boot recognizer. * Simplified temp file naming; removed most instances of named temp files from non-debug code; use tmpfile() and a wrapper l_makeTempFilename(). * Simplify and streamline multipage tiff reading (Jeff Breidenbach). * Improvement of Otsu thresholding. * Recognize outstanding contributors to leptonica over the years. * New gif mem read/write interface that avoids writing a temp file, contributed by Tobias Peirick. * Use double arrays (dna) instead of float (numa) for set ops. * Cleanup of gray quantization functions and tests. * Refactored connectivity-conserving operations, to make them more useful. * Provided methods for measuring and regularizing the width of strokes. * Removed viewfiles.c from library; code is now in prog htmlviewer.c. * Better debugging in page segmentation (pageseg.c) * Deprecated the pixDisplayWrite*() debugging methods. * Added about 15 regression tests to the framework in alltests_reg.c * Final mods for compatibility with tesseract 4.00. * Tue Feb 2 2016 lazy.kent@opensuse.org - Update to 1.73. * All lept_* functions have been rewritten to avoid path rewrites for output to temp files, which were introduced in 1.72. * Added grayscale histogram functions that can be used to compare images. * Added functions to determine if an image region has horizontal text lines. * Added functions to compare photo regions of images to determine if they're essentially the same. * Added red-black tree utility functions to implement maps and sets. * Improved security of tiff and gif reading, to prevent memory corruption when reading bad data. - Change major library version to 5. - Change programs prefix from "leptonica" to "lept" (make the names simpler to use). * Sun Sep 27 2015 asterios.dramis@gmail.com - Update to 1.72: * Better handling of 1 bpp colormap read/write with png so that they are losseless. The colormap is always removed on read and the conversion is to the simplest non-cmapped pix that can fully represent the input -- both with and without alpha. * Fixed overflow bug in pixCorrelationBinary(). * Fixed orientation flags and handling of 16 bit RGB in tiff. * Also new wrappers to TIFFClientOpen(), so we no longer go through the file descriptor for memory operations. * Improvements in the dewarp functions. * New box sequence smoothings. * New antialiased painting through mask; previously it was only implemented for connected components in a mask. * Better error handling and debug output with jpeg2000 read/write. * Implemented base64 encoding. This allows binary data to be represented as a C string that can be compiled. Used this in bmf utility. * Implemented automatic code generation for deserialization from compiled strings (stringcode.*) * Regression tests write to leptonica subdir of in windows; in unix it is optional. This avoids spamming the directory. * Added new colorspace conversions (XYZ, LAB). * New source files: encoding.c, bmfdata.h, stringcode.c, stringcode.h, bootnumgen.c. * Removed source files: convolvelow.c, graymorphlow.c * New programs: genfonts_reg, colorize_reg, texturefill_reg, autogentest1, autogentest2. * alltests_reg now has 66 tests. - Added new build requirement openjpeg2-devel for openSUSE > 13.1. * Sat Sep 27 2014 lazy.kent@opensuse.org - Update to 1.71. * This version supports tesseract 3.0.4. In particular, 3.0.4 has automatic conversion of a set of scanned images, either in a directory or coming directly from a scanner, into pdf with injected text. This is something we've wanted to do for several years! * Improved jp2k header reading, including resolution. * Removed src files: rotateorthlow.c, pdfio.c, pdfiostub.c. * Renamed jp2kio.c, jp2kiostub.c ==> jp2kheader.c, jp2kheaderstub.c. These header reading functions parse the jp2k files, and don't require a jpeg2000 library. * New jp2kio.c, jp2kiostub.c, that uses openjpeg-2.X to read and write jp2k. We now support I/O from these formats: png, tiff, jpeg, bmp, pnm, webp, gif and jp2k as well as writing to PostScript and pdf. * New pdfio1.c, pdfio1stub.c, pdfio2.c pdfio2stub.c, where we've split functions into high and low level. * Fixed memory bug in bilateral.c. * Improved reading/write of binary data from file. For example, l_binaryReadStream() can now be used to capture data piped in via stdin. * Font directory now arg passed in everywhere (not hardcoded). * Don't write temporary files to /tmp; only to a small number of subdirectories, to avoid spamming the /tmp directory. E.g., for regression tests, the current output is now to /tmp/regout/. * For jpeg reading modify pixReadJpeg() to take as a hint a bit flag that allows extraction of only the luminance channel. * Allow wrapping of pdf objects from png images without transcoding. * Better support for alpha on read/write with png, including 1 bpp with colormap, alpha (supported in png with transparency array). * Sun Jan 26 2014 lazy.kent@opensuse.org - Update to 1.70. * New bilateral filtering. * New simple character recognition utility. * Improved dewarping functionality, in model building and rendering. More flexible use of ref models. * Better and more consistent handling of alpha layer in RGBA, though use of the spp field. Ability to handle more png files with alpha, including palette with alpha. * New fast converters from jpeg and jpeg2000 to pdf, without transcoding. * Made bmp reader (and pix reading in general) more robust; avoid size overflow errors. * New text labelling operations; depth conversion of a set of images. - Major version changed to 4. - Rename liblept-devel to leptonica-devel. - Drop liblept-1.69-no_return and leptonica-1.69-giflib5 patches (fixed upstream). - BuildRequires: pkgconfig(libwebp) >= 0.2.0 - Correct URL and a source URL. * Tue Mar 12 2013 seife+obs@b1-systems.com - fix build with giflib-5.x, leptonica-1.69-giflib5.patch * Sat Aug 25 2012 lazy.kent@opensuse.org - Add liblept3-1.69-no_return.patch: fix no-return-in-nonvoid-function error. The bug reported upstream: http://code.google.com/p/leptonica/issues/detail?id=69. * Mon Aug 6 2012 lazy.kent@opensuse.org - Update to 1.69. * Major version changed to 3. * New copyright (BSD, 2 clause) on src files. * Fixed bug in PDF generation for large files, using a new double array (dnabasic.c). Added several new modes for PDF generation from sets of images. * Dewarp based on image content now aligns to left and right margins; works at book level; is more robust to bad disparity models; version 2 serialization. * Improved sorting efficiency of numas in cases where binning, which is order N, makes sense. * Fixed fpix serialization (now version 2). * New version (5) of xtractprotos, allows putting prototypes in-line in allheaders.h. Having them separately in leptprotos.h still an option. * New src files: boxfunc4.c coloring.c, dnabasic.c. - Build requires libjpeg-devel. * Fri Jun 22 2012 lazy.kent@opensuse.org - Add "leptonica-" prefix to tools. - Don't install test programs. - Correct leptonica-tools summary and description. * Tue May 22 2012 lazy.kent@opensuse.org - Add libtool as buildrequire to avoid implicit dependency. - Use make_install macro. * Wed Sep 14 2011 lazy.kent@opensuse.org - Dropped libgif patch (no need). - Build against libwebp in openSUSE >= 12.1. - Removed useless provides liblept-devel (no need anymore). - Added license file to leptonica-tools package. * Sun Jul 10 2011 lazy.kent@opensuse.org - Don't build versioned devel and tools packages. - Use full URL for Source. - Corrected License tag. * Thu Apr 14 2011 lazy.kent@opensuse.org - Fix dependencies. - Run autoreconf before configure. * Tue Mar 15 2011 lazy.kent@opensuse.org - Devel package renamed to liblept2. * Tue Mar 15 2011 lazy.kent@opensuse.org - Update to 1.68. - Library major version changed to 2. - Dropped no_return patch (fixed upstream). - Added baselibs.conf as a source. - libgif patch refresh. * Fri Nov 12 2010 lazy.kent.suse@gmail.com - Don't build static library. * Fri Nov 12 2010 lazy.kent.suse@gmail.com - Update to 1.67. * build shared library. - Dropped optflags.patch. - Patch to compile with gif support. - Patch to fix no-return-in-nonvoid-function errors. * Thu Oct 21 2010 lazy.kent.suse@gmail.com - Build with RPM_OPT_FLAGS. * Sun Aug 22 2010 lazy.kent.suse@gmail.com - Initial package created - 1.66.