Bug 172377 - Fix for graphics/p5-Image-Scale (fails to load with png-1.5.x)
Summary: Fix for graphics/p5-Image-Scale (fails to load with png-1.5.x)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-perl (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-06 03:20 UTC by Michael Curtis
Modified: 2013-06-16 18:10 UTC (History)
0 users

See Also:


Attachments
file.diff (338 bytes, patch)
2012-10-06 03:20 UTC, Michael Curtis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Curtis 2012-10-06 03:20:05 UTC
p5-Image-Scale uses png_memcpy, which is now a private API in PNG and not exposed to external clients.  This causes a compile warning and the .so fails to load when Perl tries to load it, due to an unresolved symbol.

Fix: The attached patch (to be placed in files dir of port) changes the png_memcpy to an ordinary memcpy.  This appears to be safe, and png_memcpy is #define'd to memcpy inside libpng these days.

Patch attached with submission follows:
How-To-Repeat: Compile p5-Image-Scale against a recent libpng, load the module in Perl.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-06 03:55:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

perl@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-06 03:55:24 UTC
Maintainer of graphics/p5-Image-Scale,

Please note that PR ports/172377 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/172377

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-06 03:55:26 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 atkin901 2012-10-06 04:35:46 UTC
Approved!  Thanks for noticing (and fixing) this problem.
Comment 5 azverev 2013-05-25 20:41:46 UTC
Is this still actual?
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-06-16 18:08:49 UTC
Author: az
Date: Sun Jun 16 17:08:41 2013
New Revision: 321061
URL: http://svnweb.freebsd.org/changeset/ports/321061

Log:
  - png_memcpy is now part of libpng private API,
    replace it with memcpy.
  - Pet portlint (trim Makefile header, remove ABI version on LIB_DEPENDS).
  
  PR:		ports/172377
  Submitted by:	Michael Curtis <michael@moltenmercury.org>
  Approved by:	Mark Atkinson <atkin901@gmail.com> (maintainer)

Added:
  head/graphics/p5-Image-Scale/files/
  head/graphics/p5-Image-Scale/files/patch-src-png.c   (contents, props changed)
Modified:
  head/graphics/p5-Image-Scale/Makefile   (contents, props changed)

Modified: head/graphics/p5-Image-Scale/Makefile
==============================================================================
--- head/graphics/p5-Image-Scale/Makefile	Sun Jun 16 17:05:55 2013	(r321060)
+++ head/graphics/p5-Image-Scale/Makefile	Sun Jun 16 17:08:41 2013	(r321061)
@@ -1,13 +1,9 @@
-# New ports collection makefile for:    p5-Image-Scale
-# Date created:                         11 November 2011
-# Whom:                                 Mark Atkinson <atkin901@gmail.com>
-#
+# Created by: Mark Atkinson <atkin901@gmail.com>
 # $FreeBSD$
-#
 
 PORTNAME=	Image-Scale
 PORTVERSION=	0.08
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
@@ -19,8 +15,7 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	jpeg:${PORTSDIR}/graphics/jpeg \
 		png15:${PORTSDIR}/graphics/png \
-		gif.5:${PORTSDIR}/graphics/giflib
-
+		gif:${PORTSDIR}/graphics/giflib
 TEST_DEPENDS=	p5-Test-NoWarnings>=0:${PORTSDIR}/devel/p5-Test-NoWarnings
 
 MAN3=		Image::Scale.3

Added: head/graphics/p5-Image-Scale/files/patch-src-png.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/p5-Image-Scale/files/patch-src-png.c	Sun Jun 16 17:08:41 2013	(r321061)
@@ -0,0 +1,14 @@
+--- src/png.c	2011-07-12 01:03:28.000000000 +1000
++++ src/png.c	2012-10-04 01:53:55.000000000 +1000
+@@ -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;
+
+
+
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Andrej Zverev freebsd_committer freebsd_triage 2013-06-16 18:10:24 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!