commit 9b10c52f41ba19fa3007f23159bb98472871b5a86362fad630939ccd5110d052 Author: Adrian Schröter Date: Fri May 3 19:34:26 2024 +0200 Sync from SUSE:SLFO:Main potrace revision ea58ee6cb4f1be475ac1092bb4f0669e diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/potrace-1.16.tar.gz b/potrace-1.16.tar.gz new file mode 100644 index 0000000..69229c1 --- /dev/null +++ b/potrace-1.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be8248a17dedd6ccbaab2fcc45835bb0502d062e40fbded3bc56028ce5eb7acc +size 657314 diff --git a/potrace.changes b/potrace.changes new file mode 100644 index 0000000..1ef5030 --- /dev/null +++ b/potrace.changes @@ -0,0 +1,200 @@ +------------------------------------------------------------------- +Wed Apr 15 14:36:16 UTC 2020 - Martin Pluskal + +- Update to version 1.16: + * This release consists of bugfixes and minor portability + improvements. + * A potential arithmetic overflow was fixed. Rotation angles are + now normalized to between -180 and 180. + * The test suite tolerances were adjusted. + * The configuration option --enable-local-getopt was renamed as + --with-included-getopt. + * Some build system improvements. +- Modernise spec file with spec-cleaner +- Run testsuite during build + +------------------------------------------------------------------- +Fri Aug 16 12:41:48 UTC 2019 - Michel Normand + +- Add potrace_configure_chg_for_lto.patch + to avoid PowerPC and ARM build failure when LTO enabled. + +------------------------------------------------------------------- +Wed Dec 13 09:48:27 UTC 2017 - dimstar@opensuse.org + +- Do not use clang to build: even though it is the preferred + compiler, it moves potrace behind an 8h-long build of llvm/clang, + which in turn holds up building of the entire Distribion, as + potrace is used by texlive which in turn provides many modules to + be used for documentation building across the board. + +------------------------------------------------------------------- +Mon Aug 28 10:06:44 UTC 2017 - meissner@suse.com + +- clang currently does not support -fstack-clash-protector. + +------------------------------------------------------------------- +Mon Aug 7 17:28:41 CEST 2017 - sbrabec@suse.com + +- Update to version 1.15: + * Fix potential buffer overflows and arithmetic overflows + (bsc#1051634, CVE-2017-12067). + * Fix bug triggered by very large bitmaps. + * Other bugfixes. +- Build position independent binaries. +- Process with spec-cleaner. +- Work around failure of -fstack-protector on s390x. + +------------------------------------------------------------------- +Tue Feb 28 14:18:04 CET 2017 - sbrabec@suse.com + +- Update to version 1.14: + * Bugs triggered by malformed BMP files have been fixed, + including CVE-2016-8685 (bsc#1005026) and CVE-2016-8686. + * Error reporting has been improved. + * The image size is now truncated when the bitmap data ends + prematurely. + * It is now possible to use negative dy in bitmap data. +- Upstream prefers clang to compile potrace. Use clang if possible. + +------------------------------------------------------------------- +Fri Oct 23 14:26:39 CEST 2015 - sbrabec@suse.com + +- Update to version 1.13: + * Some critical bugs in the processing of BMP files were fixed + (bsc#951760). + * Portability was improved for C99 and for MSVC++. + +------------------------------------------------------------------- +Thu Apr 2 19:41:08 CEST 2015 - sbrabec@suse.cz + +- Update to version 1.12: + * fix memory overflow bug triggered by very large bitmaps + (bsc#924904, CVE-2013-7437) + * minor fixes + +------------------------------------------------------------------- +Wed Feb 20 16:34:36 CET 2013 - sbrabec@suse.cz + +- Update to version 1.11: + * A GeoJSON backend was added. + * Support for bitfields in the BMP format was added. + * A minor change was made to the behavior of the alphamax + parameter; a value of 0 now gives a true polygon. +- Build shared libpotrace. + +------------------------------------------------------------------- +Sun Nov 27 06:45:03 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Sat Aug 20 16:38:22 UTC 2011 - mrdocs@opensuse.org +- update to 1.10 + + added --tight option + + backends: simplified dimension calculations + + eps backend: prevent integer overflow in bounding box. + + disallow resolution of 0 dpi. + + man page: added BACKEND TYPES section + + fixed default scaling at 72dpi for variable-sized backends + + new gimppath backend produces SVG output + + suitable for current versions of Gimp. + + added a --flat option for the SVG backend. + + test suite: renamed *.out files to prevent make's + + built-in implicit rules from accidentally overwriting them. + + added DXF backend. Thanks to Jonas Benedett Dorr for testing. + + use high resolution bounding box in EPS, PDF, and SVG backends + + autoconf: CADD can now be given at compile time + +------------------------------------------------------------------- +Mon Mar 21 16:48:05 UTC 2011 - coolo@novell.com + +- licenses package is about to die + +------------------------------------------------------------------- +Tue Jan 11 23:16:21 UTC 2011 - mrdocs@opensuse.org + +-Update to 1.9 + +the XFig and EPS backends were improved, and a fixed pagesize PDF backend was added; + + support for BMP version 4 and version 5 files, as well as top-down BMP files, was added; + + you'll see minor speed improvements to Potrace and major speed improvements to mkbitmap; + + a Gaussian blur option was added to mkbitmap; + + a change in the build sustem: libtool is now used to build and optionally install the Potrace library; + + an optional simplified progress bar was added for dumb terminals; + + this release also contains some portability improvements, cross-compilation improvements, and minor bug fixes. + +- run spec cleaner on the spec file and remove redundant changes from spec +- drop xfig-patch as it is upstream now + + +------------------------------------------------------------------- +Thu Jul 26 18:46:12 CEST 2007 - sbrabec@suse.cz + +- Updated to version 1.8: + * minor bugfixes and portability improvements + * rotation is now implemented in the PDF backend + +------------------------------------------------------------------- +Thu Mar 29 17:12:49 CEST 2007 - rguenther@suse.de + +- add zlib-devel BuildRequires. + +------------------------------------------------------------------- +Wed Nov 15 15:27:29 CET 2006 - jw@suse.de + +- replaced wrong_allocation.patch by official + io.patch -- more bugs fixed. + +------------------------------------------------------------------- +Wed Jul 19 11:19:25 CEST 2006 - pnemec@suse.cz + +- fixed wrong memory allocation in potracelib.c + (added potrace-wrong_allocation.patch) + +------------------------------------------------------------------- +Wed Jan 25 21:40:32 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Mar 9 14:20:18 CET 2005 - nadvornik@suse.cz + +- Updated to version 1.7: + * A bug in the progress bar code, which caused arithmetic + exceptions on some 64-bit architectures, has been fixed. + +------------------------------------------------------------------- +Mon Feb 28 12:26:42 CET 2005 - sbrabec@suse.cz + +- Updated to version 1.6. + +------------------------------------------------------------------- +Thu Jan 06 15:58:58 CET 2005 - sbrabec@suse.cz + +- Provide bitmap_tracing virtual. + +------------------------------------------------------------------- +Fri Aug 27 14:32:28 CEST 2004 - sbrabec@suse.cz + +- Updated to version 1.5 (with LZW support). + +------------------------------------------------------------------- +Mon Mar 08 11:41:28 CET 2004 - sbrabec@suse.cz + +- Updated to version 1.4. + +------------------------------------------------------------------- +Thu Feb 05 14:13:02 CET 2004 - sbrabec@suse.cz + +- Added speed optimization patch from author. + +------------------------------------------------------------------- +Thu Jan 15 12:16:52 CET 2004 - sbrabec@suse.cz + +- Updated to version 1.3. + +------------------------------------------------------------------- +Wed Aug 13 11:19:30 CEST 2003 - sbrabec@suse.cz + +- Initial version 1.0. + diff --git a/potrace.spec b/potrace.spec new file mode 100644 index 0000000..3a45dd1 --- /dev/null +++ b/potrace.spec @@ -0,0 +1,117 @@ +# +# spec file for package potrace +# +# Copyright (c) 2020 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: potrace +Version: 1.16 +Release: 0 +Summary: Utility for Tracing a Bitmap to Scalable Outline Image +License: GPL-2.0-or-later +Group: Productivity/Graphics/Convertors +URL: http://potrace.sourceforge.net/ +Source: http://potrace.sourceforge.net/download/%{version}/%{name}-%{version}.tar.gz +Patch1: potrace_configure_chg_for_lto.patch +BuildRequires: libtool +BuildRequires: zlib-devel +Provides: bitmap_tracing + +%description +Potrace is a utility for tracing a bitmap, which means, transforming a +bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, +PPM, or BMP), and the default output is one of several vector file +formats. A typical use is to create EPS files from scanned data, such +as company or university logos, handwritten notes, etc. The resulting +image is not "jaggy" like a bitmap, but smooth. It can then be rendered +at any resolution. + +%package -n libpotrace0 +Summary: Library for Tracing a Bitmap to Scalable Outline Image +Group: System/Libraries + +%description -n libpotrace0 +Potrace is a utility for tracing a bitmap, which means, transforming a +bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, +PPM, or BMP), and the default output is one of several vector file +formats. A typical use is to create EPS files from scanned data, such +as company or university logos, handwritten notes, etc. The resulting +image is not "jaggy" like a bitmap, but smooth. It can then be rendered +at any resolution. + +%package devel +Summary: Library Development Files for Tracing a Bitmap to Scalable Outline Image +Group: Development/Languages/C and C++ +Requires: %{name} = %{version} + +%description devel +Potrace is a utility for tracing a bitmap, which means, transforming a +bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, +PPM, or BMP), and the default output is one of several vector file +formats. A typical use is to create EPS files from scanned data, such +as company or university logos, handwritten notes, etc. The resulting +image is not "jaggy" like a bitmap, but smooth. It can then be rendered +at any resolution. + +%prep +%setup -q +%patch1 -p1 + +%build +%define warn_flags -Wall -Wstrict-prototypes -Wpointer-arith -Wformat-security +export CFLAGS="%{optflags} %{warn_flags} -fPIE" +export LDFLAGS="-pie" +%ifarch s390x +# clang on s390x does not support -fstack-protector from the default optflags +# (undefined reference to `__stack_chk_guard') +export CFLAGS="${CFLAGS/-fstack-protector /}" +%endif +# clang does not support that yet... +export CFLAGS="${CFLAGS/-fstack-clash-protection /}" +autoreconf -fvi +%configure\ + --docdir=%{_docdir}/%{name}\ + --with-libpotrace\ + --disable-static +%make_build + +%install +%if 0%{?suse_version} > 1110 +%make_install +%else +%make_install +%endif +cp -a AUTHORS ChangeLog COPYING NEWS README %{buildroot}%{_docdir}/%{name}/ +rm %{buildroot}%{_libdir}/*.*a + +%check +%make_build check + +%post -n libpotrace0 -p /sbin/ldconfig +%postun -n libpotrace0 -p /sbin/ldconfig + +%files +%{_bindir}/* +%doc %{_docdir}/%{name} +%{_mandir}/man?/*%{ext_man} + +%files -n libpotrace0 +%{_libdir}/*.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/*.so + +%changelog diff --git a/potrace_configure_chg_for_lto.patch b/potrace_configure_chg_for_lto.patch new file mode 100644 index 0000000..fa43fca --- /dev/null +++ b/potrace_configure_chg_for_lto.patch @@ -0,0 +1,26 @@ +From: Michel Normand +Subject: potrace configure chg for lto +Date: Fri, 16 Aug 2019 14:39:23 +0200 + +potrace configure chg for lto + +For asm inline checking. + +Signed-off-by: Michel Normand +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: potrace-1.15/configure.ac +=================================================================== +--- potrace-1.15.orig/configure.ac ++++ potrace-1.15/configure.ac +@@ -250,7 +250,7 @@ AC_CHECK_FUNC(strncasecmp, , + dnl ---------------------------------------------------------------------- + dnl Check whether we have i386 features + AC_MSG_CHECKING([for Intel 386]) +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int x; ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int x; + asm("bsf %1,%0\njnz 0f\nmovl $32,%0\n0:":"=r"(x):"r"(x)); + return x; /* need this so that -O2 does not optimize the asm away */ + ]])],[AC_MSG_RESULT(yes)