From owner-svn-ports-head@FreeBSD.ORG Wed Dec 24 12:39:42 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 B3BE34BC; Wed, 24 Dec 2014 12:39:42 +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 95D792126; Wed, 24 Dec 2014 12:39:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOCdgkQ006120; Wed, 24 Dec 2014 12:39:42 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOCdg18006118; Wed, 24 Dec 2014 12:39:42 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201412241239.sBOCdg18006118@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 12:39:42 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375452 - in head/x11/fbdesk: . 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 12:39:42 -0000 Author: antoine Date: Wed Dec 24 12:39:41 2014 New Revision: 375452 URL: https://svnweb.freebsd.org/changeset/ports/375452 QAT: https://qat.redports.org/buildarchive/r375452/ Log: Properly support png 1.5 Obtained from: pkgsrc Modified: head/x11/fbdesk/Makefile head/x11/fbdesk/files/patch-ImagePNG.cc Modified: head/x11/fbdesk/Makefile ============================================================================== --- head/x11/fbdesk/Makefile Wed Dec 24 12:35:11 2014 (r375451) +++ head/x11/fbdesk/Makefile Wed Dec 24 12:39:41 2014 (r375452) @@ -13,7 +13,7 @@ COMMENT= Fluxbox utility to create and m LICENSE= MIT -LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png +LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png OPTIONS_DEFINE= IMLIB2 DOCS OPTIONS_DEFAULT= IMLIB2 Modified: head/x11/fbdesk/files/patch-ImagePNG.cc ============================================================================== --- head/x11/fbdesk/files/patch-ImagePNG.cc Wed Dec 24 12:35:11 2014 (r375451) +++ head/x11/fbdesk/files/patch-ImagePNG.cc Wed Dec 24 12:39:41 2014 (r375452) @@ -1,23 +1,27 @@ ---- src/FbTk/ImagePNG.cc.orig 2004-09-20 16:04:11.000000000 +0200 -+++ src/FbTk/ImagePNG.cc 2012-05-06 09:59:07.000000000 +0200 +$NetBSD: patch-ac,v 1.2 2013/02/26 10:19:28 joerg Exp $ + +Fix build with png-1.5. + +--- src/FbTk/ImagePNG.cc.orig 2004-09-20 14:04:11.000000000 +0000 ++++ src/FbTk/ImagePNG.cc @@ -28,6 +28,7 @@ #include "PixmapWithMask.hh" #include -+#include ++#include #include #include using namespace std; -@@ -88,7 +89,7 @@ - // check header - unsigned char tag[4]; - fread(tag, 1, 4, fp); -- if (!png_check_sig(tag, 4)) { -+ if (png_sig_cmp(tag, 0, 4)) { - fclose(fp); +@@ -76,6 +77,8 @@ ImagePNG::~ImagePNG() { + } + + PixmapWithMask *ImagePNG::load(const std::string &filename, int screen_num) const { ++ int pixel_depth; ++ int rowbytes; + if (filename.empty()) return 0; - } -@@ -102,7 +103,7 @@ + #ifdef DEBUG +@@ -102,7 +105,7 @@ PixmapWithMask *ImagePNG::load(const std return 0; } @@ -26,3 +30,124 @@ fclose(fp); return 0; } +@@ -115,12 +118,14 @@ PixmapWithMask *ImagePNG::load(const std + png_get_IHDR(png.png(), png.info(), &w, &h, + &bit_depth, &color_type, + &interlace_type, 0, 0); ++ pixel_depth = bit_depth * png_get_channels(png.png(), png.info()); ++ rowbytes = png_get_rowbytes(png.png(), png.info()); + #ifdef DEBUG +- cerr<width<<", "<height<pixel_depth<<" to 32bpp."<channels != 4) ? 0xFF000000 : 0); ++ int alphacolor = ((png_get_channels(png.png(), png.info()) != 4) ? 0xFF000000 : 0); + if (big_endian) { +- int shift = ((png.info()->channels == 4) ? 0 : 8); ++ int shift = ((png_get_channels(png.png(), png.info()) == 4) ? 0 : 8); + alphacolor = (0xFF >> shift); + } + screen_surf.setColorKey(alphacolor, true);