2021-09-29 13:53:13 +02:00
|
|
|
# $NetBSD: Makefile,v 1.21 2021/09/29 11:53:13 adam Exp $
|
2014-10-02 09:23:56 +02:00
|
|
|
|
2021-09-29 13:53:13 +02:00
|
|
|
DISTNAME= leptonica-1.82.0
|
2014-10-02 09:23:56 +02:00
|
|
|
CATEGORIES= graphics
|
2017-06-14 16:26:24 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_GITHUB:=danbloomberg/}
|
leptonica: updated to 1.79.0
1.79.0:
* Clean up auto-generation of files; removed 'register'
* Some fixes for issues identified by fuzzer
* New source files: checkerboard.c
* New programs: replacebytes.c, webpanimio_reg.c, partifytest.c,
rectangle_reg.c, lowsat_reg.c, rotate_it.c, scale_it.c, dewarp_it.c,
pdfio1_reg.c, pdfio2_reg.c, checkerboard_reg.c, underlinetest.c.
* Convert to standard reg test: heap_reg.c, pixa1_reg.c, smallpix_reg.c
* Improve data checking when reading image file headers
(pnm, png, jpeg, tiff)
* Fix some bugs in pnm reading
* Fix inconsistencies with the encoding type flags in pdf writing
* Allow tiff to write images with colormaps
* Fix errors in PS code; made some functions static
* Add code for animated webp (requires webp mux and demux libraries)
* Add "partify" application for separating parts in a musical score
* Enable tif read/write of gray+alpha and rgba; filter out tiff
pixels that are not uint and compression by tile
* Apply consistent formatting of static const variables
* Add programs for scaling, rotation and deskew, named dewkew_it,
rotate_it and scale_it, for useful operations on arbitrary images.
* Convert pdfiotest program to two regression tests: pdfio1_reg
and pdfio2_reg.
* Remove all use of strncat; use stringCat().
* New functions from removing outliers in sequences of boxes.
* Generalize pixAverageInRect(): mask, region and range filters,
and subsampling. New pixAverageInRectRGB().
* Fix int overflow bug in pixMedianCut(); required new heap accessor.
* New pixMultiplyGray() allows pix to be multiplied by an array (or
another pix)
* Better routines for counting color.
* Lossless conversion for RGB to cmap with not more than 256 colors.
* New histo based global thresholding: pixThresholdByHisto().
* Allow most reg tests to run even if external libraries are not
available.
* New one-line gplot functions that return a pix.
* New application to find where corners meet in a checkerboard.
* Add utility functions for painting through mask in cmap pix,
creating a hit-miss sela from a color pix, equality of two pta.
* Proper handling of 1 bpp colormap tiffs: remove when reading,
preserve when writing.
* Deprecate three pixSaveTile*() functions; removed all calls to
these from the library and progs.
* Include auto_config.h explicitly in all src and prog files.
* Improve input data checking for bmp files.
2020-01-02 13:55:07 +01:00
|
|
|
GITHUB_RELEASE= ${PKGVERSION_NOREV}
|
2014-10-02 09:23:56 +02:00
|
|
|
|
|
|
|
MAINTAINER= adam@NetBSD.org
|
|
|
|
HOMEPAGE= http://www.leptonica.org/
|
|
|
|
COMMENT= Software for image processing and image analysis applications
|
|
|
|
LICENSE= 2-clause-bsd
|
|
|
|
|
|
|
|
USE_LANGUAGES= c c++
|
|
|
|
USE_LIBTOOL= yes
|
2018-01-25 12:27:35 +01:00
|
|
|
USE_TOOLS+= pkg-config
|
2014-10-02 09:23:56 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2018-01-25 12:27:35 +01:00
|
|
|
TEST_TARGET= check
|
2014-10-02 15:20:54 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
# The presence of fmemopen() assumes open_memstream() is also available,
|
|
|
|
# which is wrong on platforms other than Linux.
|
|
|
|
.if ${OPSYS} != "Linux"
|
|
|
|
CONFIGURE_ENV+= ac_cv_func_fmemopen=no
|
|
|
|
.endif
|
2014-10-02 09:23:56 +02:00
|
|
|
|
leptonica: updated to 1.77.0
1.77.0:
Here is the current status of CVE issues with leptonica; see
https://security-tracker.debian.org/tracker/source-package/leptonlib
* CVE-2018-7442: potential injection attack because '/' is allowed
in gplot rootdir.
Functions using this command have been disabled by default in the
distribution, starting with 1.76.0. As for the specific issue, it
is impossible to specify a general path without using the standard
directory subdivider '/'.
* CVE-2018-7186: number of characters not limited in fscanf or sscanf,
allowing possible attack with buffer overflow.
This has been fixed in 1.75.3.
* CVE-2018-3836: command injection vulnerability in gplotMakeOutput().
This has been fixed in 1.75.3, using stringCheckForChars() to block
rootnames containing any of: ;&|>"?*$()/<
* CVE-2017-18196: duplicated path components.
This was fixed in 1.75.3.
* CVE-2018-7441: hardcoded /tmp pathnames.
These are all wrapped in special debug functions that are not
enabled by default in the distribution, starting with 1.76.0.
* CVE-2018-7247: input 'rootname' can overflow a buffer.
This was fixed in 1.76.0, using snprintf().
* CVE-2018-7440: command injection in gplotMakeOutput using $(command).
Fixed in 1.75.3, which blocks '$' as well as 11 other characters.
Wrapped the few 'system' calls in an extra layer of debug code.
More coverity scan fixes; defects are about 1 per 10,000 source lines.
New regression tests: numa1_reg, numa2_reg, lowaccess_reg,
pixmem_reg.
New non-regression test programs: histoduptest
Juergen Buchmueller is working on Lua bindings. He typedef'd l_ok
and used it in 1100 functions that return a success/failure status.
He also helped clean up remaining issues in the doxygen-generated
documentation.
Using a packed struct for bmp headers to avoid crash on
some big-endians.
Fixed a bug in the prototype parser for xtractprotos that was
surfaced by a typedef declaration for the bmp headers.
Cleaned up IOS guards to avoid compiling a system(3) call on IOS.
Renamed autobuild --> autogen.sh
Added some basic pixa functions for rotation and translation.
Added an iterative method to find rectangular coverings for
arbitrary connected components.
Converted two tests to reg tests running in alltests_reg:
ptra1_reg, ptra2_reg
Enabled read/write for standard jpeg compressed tiff images.
Enabled reading for the old (deprecated) jpeg-encoded tiffs.
Fix range selectors for pixa, pixaa, boxa, boxaa, pta:
Now, last = -1 goes to the end.
When reading tiff --> pix, insert IMAGEDESCRIPTION into text field.
Converted iotest to reg test iomisc_reg; added to alltests_reg
Converted rasterop_reg into a standard regression test; added
to alltests_reg.
Converted boxa2_reg and fhmtauto_reg into standard regression tests;
added to alltests_reg.
Split boxa sequence functions out of boxfunc4.c, into a new boxfunc5.c.
Simplified bmp header and made reading more clearly endian
agnostic (Juergen Buchmueller)
New boxa3_reg regression test. This tests sequences of boxes
by two new boxfunctions in boxfunc5.c.
New bootnumgen4.c for more digit templates.
Rename prog/recog_bootnum.c --> prog/recog_bootname1.c
New in prog: recog_bootnum2.c, recog_bootnum3.c, recogtest7.c
Fixed uninitialized data in pixCentroid() on 1 bpp pix.
New reg test: bytea_reg.c. (removed byteatest.c)
Fixed bug in non-transcoding pdf generation from 1 bpp png.
Added LGTM to static analyzers that run over the library.
2018-12-16 15:20:22 +01:00
|
|
|
# Silence console messages
|
|
|
|
CPPFLAGS+= -DNO_CONSOLE_IO=1
|
|
|
|
|
2015-02-09 12:11:25 +01:00
|
|
|
# Pass a SunOS that the build relies on
|
|
|
|
CPPFLAGS.SunOS+= -D__SOLARIS__=1
|
|
|
|
|
2014-10-02 09:23:56 +02:00
|
|
|
.include "../../graphics/giflib/buildlink3.mk"
|
|
|
|
.include "../../graphics/libwebp/buildlink3.mk"
|
|
|
|
.include "../../graphics/openjpeg/buildlink3.mk"
|
|
|
|
.include "../../graphics/png/buildlink3.mk"
|
|
|
|
.include "../../graphics/tiff/buildlink3.mk"
|
|
|
|
.include "../../mk/jpeg.buildlink3.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|