100 lines
3.4 KiB
RPMSpec
100 lines
3.4 KiB
RPMSpec
![]() |
#
|
||
|
# spec file for package perl-Image-Scale
|
||
|
#
|
||
|
# 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 cpan_name Image-Scale
|
||
|
Name: perl-Image-Scale
|
||
|
Version: 0.08
|
||
|
Release: 0
|
||
|
Summary: Fast, high-quality fixed-point image resizing
|
||
|
License: GPL-2.0+
|
||
|
Group: Development/Libraries/Perl
|
||
|
Url: http://search.cpan.org/dist/Image-Scale/
|
||
|
Source: http://www.cpan.org/authors/id/A/AG/AGRUNDMA/%{cpan_name}-%{version}.tar.gz
|
||
|
# see https://rt.cpan.org/Public/Bug/Display.html?id=79728
|
||
|
Patch1: png_memecp_fix.patch
|
||
|
BuildRequires: libjpeg8-devel
|
||
|
BuildRequires: libpng16-compat-devel
|
||
|
#BuildRequires: perl(Audio::Scan) >= 0.84
|
||
|
#BuildRequires: perl(Benchmark::Dumb)
|
||
|
#BuildRequires: perl(GD)
|
||
|
#BuildRequires: perl(Image::Scale)
|
||
|
#BuildRequires: perl(Proc::ProcessTable)
|
||
|
#BuildRequires: perl(Test::Perl::Critic)
|
||
|
BuildRequires: libpng16-devel
|
||
|
BuildRequires: perl
|
||
|
BuildRequires: perl(Test::NoWarnings)
|
||
|
BuildRequires: perl(Test::Pod)
|
||
|
BuildRequires: perl(Test::Pod::Coverage)
|
||
|
BuildRequires: perl-macros
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
# src/gif.c is incompatibe with giflib 5.x
|
||
|
# https://rt.cpan.org/Public/Bug/Display.html?id=101679
|
||
|
#BuildRequires: giflib-devel
|
||
|
%{perl_requires}
|
||
|
|
||
|
%description
|
||
|
This module implements several resizing algorithms with a focus on low
|
||
|
overhead, speed and minimal features. Algorithms available are:
|
||
|
|
||
|
GD's copyResampled (floating-point)
|
||
|
GD's copyResampled fixed-point (useful on embedded devices/NAS devices)
|
||
|
GraphicsMagick's assortment of resize filters (floating-point)
|
||
|
GraphicsMagick's Triangle filter in fixed-point
|
||
|
|
||
|
Supported image formats include JPEG, GIF, PNG, and BMP for input, and JPEG
|
||
|
and PNG for output.
|
||
|
|
||
|
This module came about because we needed to improve the very slow
|
||
|
performance of floating-point resizing algorithms on platforms without a
|
||
|
floating-point unit, such as ARM devices like the SheevaPlug, and the
|
||
|
Sparc-based ReadyNAS Duo. Previously it would take many seconds to resize
|
||
|
using GD on the ReadyNAS but the conversion to fixed-point with a little
|
||
|
assembly code brings this down to the range of well under 1 second.
|
||
|
|
||
|
GD is also incredibly difficult to build on platforms such as Windows so we
|
||
|
needed a replacement.
|
||
|
|
||
|
Normal platforms will also see improvement, by removing all of the GD
|
||
|
overhead this version of copyResampled is around 3 times faster while also
|
||
|
using less memory.
|
||
|
|
||
|
The fixed-point versions have an accuracy to around 4 decimal places so the
|
||
|
quality of floating-point vs. fixed is essentially identical.
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n %{cpan_name}-%{version}
|
||
|
%patch1 -p1
|
||
|
|
||
|
%build
|
||
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||
|
make %{?_smp_mflags}
|
||
|
|
||
|
%check
|
||
|
make %{?_smp_mflags} test
|
||
|
|
||
|
%install
|
||
|
%perl_make_install
|
||
|
%perl_process_packlist
|
||
|
%perl_gen_filelist
|
||
|
|
||
|
%files -f %{name}.files
|
||
|
%defattr(-,root,root,755)
|
||
|
%doc Changes README TODO
|
||
|
|
||
|
%changelog
|