# # spec file for package leptonica # # Copyright (c) 2015 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 4 Name: leptonica Version: 1.72 Release: 1.3 Summary: Leptonica Library 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: libtiff-devel BuildRequires: libtool BuildRequires: pkgconfig(libopenjp2) BuildRequires: pkgconfig(libpng) BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} >= 1210 BuildRequires: pkgconfig(libwebp) >= 0.2.0 %endif %description Library for efficient image processing and image analysis operations. %package -n liblept%{major} Summary: Leptonica Library 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 \ --enable-static \ --program-prefix=lept- make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} find %{buildroot} -type f -name "*.la" -delete -print rm -f %{buildroot}%{_bindir}/{*gen,*reg,*test*} %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}/liblept.a %{_libdir}/pkgconfig/* %files -n leptonica-tools %defattr(-,root,root) %doc leptonica-license.txt %{_bindir}/lept-* %changelog * Fri Jun 5 2015 lazy.kent@opensuse.org - 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. - Add BuildRequires: pkgconfig(libopenjp2). - Change programs prefix from "leptonica" to "lept" (make the names simpler to use). * 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.