Name:           potrace
Version:        1.16
Release:        2
Summary:        Utility for Tracing a Bitmap to Scalable Outline Image
License:        GPL-2.0-or-later
URL:            https://potrace.sourceforge.net
Source0:        https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1:        https://potrace.sourceforge.net/potrace.pdf
Source2:        https://potrace.sourceforge.net/potracelib.pdf
BuildRequires:  zlib-devel gcc

%description
Potrace(TM) is a tool for tracing a bitmap, which means, transforming a bitmap into a smooth, scalable image.
The input is a bitmap (PBM, PGM, PPM, or BMP format), and the output is one of several vector file formats.
A typical use is to create SVG or PDF 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.Potrace can currently produce the following output formats: SVG, PDF, EPS, PostScript, DXF,
GeoJSON, PGM (for easy antialiasing of pixel-based images), Gimppath, and XFig. Additional backends might
be added in the future.Mkbitmap is a program distributed with Potrace which can be used to pre-process the
input for better tracing behavior on greyscale and color images.

%package devel
Summary:        Development library and headers for potrace package
Requires:       %{name} = %{version}-%{release}

%description devel
Development library and headers for potrace package.

%package help
Summary:        Help documentation for potrace package
BuildArch:      noarch
Provides:       %{name}-doc = %{version}-%{release}
Obsoletes:      %{name}-doc < %{version}-%{release}

%description help
Help documentation for potrace package.

%prep
%autosetup -n %{name}-%{version} -p1
cp -a %{SOURCE1} .
cp -a %{SOURCE2} .

%build
%configure --enable-shared --disable-static --enable-metric --with-libpotrace --with-pic
%{?disable_rpath}
%make_build

%install
%make_install
%{?delete_la}

rm -fr %{buildroot}%{_datadir}/doc

%files
%license COPYING
%doc AUTHORS
%{_bindir}/{potrace,mkbitmap}
%{_libdir}/libpotrace.so.*

%files devel
%{_libdir}/libpotrace.so
%{_includedir}/potracelib.h

%files help
%doc ChangeLog NEWS README
%doc potrace.pdf potracelib.pdf
%doc doc/placement.pdf
%{_mandir}/man1/potrace.1.*
%{_mandir}/man1/mkbitmap.1.*

%changelog
* Sun Jan 04 2026 Funda Wang <fundawang@yeah.net> - 1.16-2
- force rpath removal

* Fri Aug 05 2022 tianlijing <tianlijing@kylinos.cn> - 1.16-1
- update to 1.16

* Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 1.15-6
- Completing build dependencies

* Thu Dec 12 2019 wutao <wutao61@huawei.com> - 1.15-5
- Package init