summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-perl/Image-Scale')
-rw-r--r--dev-perl/Image-Scale/Image-Scale-0.80.0-r1.ebuild50
-rw-r--r--dev-perl/Image-Scale/Manifest1
-rw-r--r--dev-perl/Image-Scale/files/0.80.0-disable_autodetect.patch44
-rw-r--r--dev-perl/Image-Scale/files/libpng-1.5-memcpy.patch11
-rw-r--r--dev-perl/Image-Scale/metadata.xml9
5 files changed, 115 insertions, 0 deletions
diff --git a/dev-perl/Image-Scale/Image-Scale-0.80.0-r1.ebuild b/dev-perl/Image-Scale/Image-Scale-0.80.0-r1.ebuild
new file mode 100644
index 000000000000..f8966f57a9dc
--- /dev/null
+++ b/dev-perl/Image-Scale/Image-Scale-0.80.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MODULE_AUTHOR=AGRUNDMA
+MODULE_VERSION=0.08
+inherit perl-module
+
+DESCRIPTION="Fast, high-quality fixed-point image resizing"
+
+LICENSE="|| ( GPL-2 GPL-3 )" # GPL2+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+gif jpeg +png test"
+
+REQUIRED_USE="|| ( jpeg png )"
+
+RDEPEND="
+ png? (
+ media-libs/libpng:0
+ )
+ jpeg? (
+ virtual/jpeg
+ )
+ gif? (
+ media-libs/giflib
+ )
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-perl/Test-NoWarnings
+ )
+ virtual/perl-ExtUtils-MakeMaker
+"
+
+SRC_TEST=do
+PATCHES=(
+ "${FILESDIR}"/libpng-1.5-memcpy.patch
+ "${FILESDIR}"/0.80.0-disable_autodetect.patch
+)
+
+src_configure() {
+ local myconf
+ for useflag in png jpeg gif; do
+ myconf+=( $(usex $useflag "" --disable-${useflag}) )
+ done
+ perl-module_src_configure
+}
diff --git a/dev-perl/Image-Scale/Manifest b/dev-perl/Image-Scale/Manifest
new file mode 100644
index 000000000000..2bda6b4b537a
--- /dev/null
+++ b/dev-perl/Image-Scale/Manifest
@@ -0,0 +1 @@
+DIST Image-Scale-0.08.tar.gz 1009824 SHA256 e2dcc90b9954a43dafc7f61bc6dc472382eb719b1046247da5a93cfdd7c3b3e0 SHA512 4f79c6accea63fd4a641d9d6acaa6cb68f3d495c660e839b8ac394cb2445b126bc683c351c37c74d8654ce78875bb4f4a777928463774bc15fe6a4c038959212 WHIRLPOOL c6adf31d02dcd50eaa9ec13a384ce0dbbb4ed1e6e77759402f27b78f0a5e3c09f6d3665352940e01040195ed094a0a5b603192b578e9e6ec9ed1768498b3f164
diff --git a/dev-perl/Image-Scale/files/0.80.0-disable_autodetect.patch b/dev-perl/Image-Scale/files/0.80.0-disable_autodetect.patch
new file mode 100644
index 000000000000..3611479a812b
--- /dev/null
+++ b/dev-perl/Image-Scale/files/0.80.0-disable_autodetect.patch
@@ -0,0 +1,44 @@
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -13,6 +13,7 @@
+
+ my ($help, $jpeg_inc, $jpeg_lib, $png_inc, $png_lib, $gif_inc, $gif_lib, $gif_lib_name);
+ my ($jpeg_static, $png_static, $gif_static);
++my ($disable_jpeg, $disable_png, $disable_gif);
+
+ my $DEFINES = '-O2';
+ $DEFINES .= ' -Wall' unless $^O =~ /sun|solaris/i;
+@@ -29,6 +30,9 @@
+
+ my $result = GetOptions(
+ "help|h" => \$help,
++ "disable-jpeg" => \$disable_jpeg,
++ "disable-png" => \$disable_png,
++ "disable-gif" => \$disable_gif,
+ "with-jpeg-includes=s" => \$jpeg_inc,
+ "with-jpeg-libs=s" => \$jpeg_lib,
+ "with-jpeg-static" => \$jpeg_static,
+@@ -75,6 +79,7 @@
+
+ # Look for libjpeg
+ for my $incdir ( $jpeg_inc, @check ) {
++ last if $disable_jpeg;
+ if ( $incdir && -e catfile($incdir, 'jpeglib.h') ) {
+ $JPEG = 1;
+ $jpeg_inc = $incdir;
+@@ -111,6 +116,7 @@
+
+ # Look for libpng
+ for my $incdir ( $png_inc, @check ) {
++ last if $disable_png;
+ if ( $incdir && -e catfile($incdir, 'png.h') ) {
+ $PNG = 1;
+ $png_inc = $incdir;
+@@ -144,6 +150,7 @@
+
+ # Look for libgif
+ for my $incdir ( $gif_inc, @check ) {
++ last if $disable_gif;
+ if ( $incdir && -e catfile($incdir, 'gif_lib.h') ) {
+ $GIF = 1;
+ $gif_inc = $incdir;
diff --git a/dev-perl/Image-Scale/files/libpng-1.5-memcpy.patch b/dev-perl/Image-Scale/files/libpng-1.5-memcpy.patch
new file mode 100644
index 000000000000..fa9ad60cbc4e
--- /dev/null
+++ b/dev-perl/Image-Scale/files/libpng-1.5-memcpy.patch
@@ -0,0 +1,11 @@
+--- a/src/png.c
++++ b/src/png.c
+@@ -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;
diff --git a/dev-perl/Image-Scale/metadata.xml b/dev-perl/Image-Scale/metadata.xml
new file mode 100644
index 000000000000..71d60d822491
--- /dev/null
+++ b/dev-perl/Image-Scale/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>perl</herd>
+ <upstream>
+ <remote-id type="cpan">Image-Scale</remote-id>
+ <remote-id type="cpan-module">Image::Scale</remote-id>
+ </upstream>
+</pkgmetadata>