Accepting request 305241 from home:mnhauke:squeezebox

fix build and specfile cleanup

OBS-URL: https://build.opensuse.org/request/show/305241
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Image-Scale?expand=0&rev=1
This commit is contained in:
Stephan Kulow
2015-05-04 10:23:34 +00:00
committed by Git OBS Bridge
commit a531427aca
6 changed files with 146 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
Image-Scale-0.08.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e2dcc90b9954a43dafc7f61bc6dc472382eb719b1046247da5a93cfdd7c3b3e0
size 1009824

8
perl-Image-Scale.changes Normal file
View File

@@ -0,0 +1,8 @@
-------------------------------------------------------------------
Sun May 3 17:06:40 UTC 2015 - mardnh@gmx.de
- added patch: png_memecp_fix.patch
see: https://rt.cpan.org/Public/Bug/Display.html?id=79728
- ran speccleaner
- added JPG and PNG support
- added missing dependencies

99
perl-Image-Scale.spec Normal file
View File

@@ -0,0 +1,99 @@
#
# 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

12
png_memecp_fix.patch Normal file
View File

@@ -0,0 +1,12 @@
diff -rau Image-Scale-0.08/src/png.c Image-Scale-0.08.patched/src/png.c
--- Image-Scale-0.08/src/png.c 2015-04-14 10:17:18.157964410 +0200
+++ Image-Scale-0.08.patched/src/png.c 2015-04-14 10:25:17.781973165 +0200
@@ -40,7 +40,7 @@
}
}
- png_memcpy(data, buffer_ptr(im->buf), len);
+ memcpy(data, buffer_ptr(im->buf), len);
buffer_consume(im->buf, len);
goto ok;