From owner-svn-ports-head@FreeBSD.ORG Wed Dec 24 13:02:37 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6368A1E; Wed, 24 Dec 2014 13:02:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96B3B25C6; Wed, 24 Dec 2014 13:02:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOD2b0P019428; Wed, 24 Dec 2014 13:02:37 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOD2bIe019426; Wed, 24 Dec 2014 13:02:37 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201412241302.sBOD2bIe019426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Wed, 24 Dec 2014 13:02:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375453 - in head/x11/bbdock: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 13:02:37 -0000 Author: antoine Date: Wed Dec 24 13:02:36 2014 New Revision: 375453 URL: https://svnweb.freebsd.org/changeset/ports/375453 QAT: https://qat.redports.org/buildarchive/r375453/ Log: Properly support png 1.5 Obtained from: upstream, markusfisch/bbdock on github Modified: head/x11/bbdock/Makefile head/x11/bbdock/files/patch-Slot.cc Modified: head/x11/bbdock/Makefile ============================================================================== --- head/x11/bbdock/Makefile Wed Dec 24 12:39:41 2014 (r375452) +++ head/x11/bbdock/Makefile Wed Dec 24 13:02:36 2014 (r375453) @@ -12,11 +12,10 @@ COMMENT= Application launcher for Blackb LICENSE= BSD3CLAUSE -LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png +LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png GNU_CONFIGURE= yes USE_XORG= x11 -CPPFLAGS+= -I${LOCALBASE}/include/libpng15 PORTDOCS= README PLIST_FILES= bin/bbdock Modified: head/x11/bbdock/files/patch-Slot.cc ============================================================================== --- head/x11/bbdock/files/patch-Slot.cc Wed Dec 24 12:39:41 2014 (r375452) +++ head/x11/bbdock/files/patch-Slot.cc Wed Dec 24 13:02:36 2014 (r375453) @@ -1,10 +1,55 @@ ---- src/Slot.cc.orig 2011-03-29 21:48:36.000000000 +0200 -+++ src/Slot.cc 2012-05-06 10:01:10.000000000 +0200 -@@ -38,6 +38,7 @@ - #include +--- src/Slot.cc.orig 2011-03-29 19:48:36 UTC ++++ src/Slot.cc +@@ -420,6 +420,8 @@ const bool Slot::hasFocus() + */ + void Slot::loadIcon() + { ++ png_bytep *rowPointers; ++ + destroyIcon(); + width = height = 0; - #include "Slot.hh" -+#include "pngpriv.h" +@@ -446,27 +448,29 @@ void Slot::loadIcon() + PNG_TRANSFORM_BGR, + 0 ); - extern char **environ; +- if( !(info->valid & PNG_INFO_IDAT) || +- !(normalicon = new int[info->width*info->height]) ) ++ width = png_get_image_width( png, info ); ++ height = png_get_image_height( png, info ); ++ ++ if( !png_get_valid( png, info, PNG_INFO_IDAT ) || ++ !(normalicon = new int[width*height]) ) + throw 0; +- for( int y = 0, *src, *dest = normalicon; +- y < info->height && (src = (int *) info->row_pointers[y]); +- y++, dest += info->width ) +- memcpy( dest, src, info->width<<2 ); ++ rowPointers = png_get_rows( png, info ); + +- width = info->width; +- height = info->height; ++ for( int y = 0, *src, *dest = normalicon; ++ y < height && (src = (int *) rowPointers[y]); ++ y++, dest += width ) ++ memcpy( dest, src, width<<2 ); + + // convert grayscale image to rgb +- if( info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) +- for( int y = info->height, *line = normalicon; +- --y; line += info->width ) ++ if( png_get_color_type(png, info) == PNG_COLOR_TYPE_GRAY_ALPHA ) ++ for( int y = height, *line = normalicon; ++ --y; line += width ) + { +- unsigned char *dest = (unsigned char *) line+(info->width<<2); +- unsigned char *src = (unsigned char *) line+(info->width<<1); ++ unsigned char *dest = (unsigned char *) line+(width<<2); ++ unsigned char *src = (unsigned char *) line+(width<<1); + +- for( int x = info->width; --x; ) ++ for( int x = width; --x; ) + { + *(--dest) = *(--src); + *(--dest) = *(--src);