From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Nov 24 10:40:11 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FFFB1065673 for ; Wed, 24 Nov 2010 10:40:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 16EF08FC15 for ; Wed, 24 Nov 2010 10:40:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAOAeAuW082319 for ; Wed, 24 Nov 2010 10:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oAOAeAWw082318; Wed, 24 Nov 2010 10:40:10 GMT (envelope-from gnats) Resent-Date: Wed, 24 Nov 2010 10:40:10 GMT Resent-Message-Id: <201011241040.oAOAeAWw082318@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrey Zholos Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFA2C1065672 for ; Wed, 24 Nov 2010 10:35:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id CEB728FC08 for ; Wed, 24 Nov 2010 10:35:42 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oAOAZgel086601 for ; Wed, 24 Nov 2010 10:35:42 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id oAOAZgb8086600; Wed, 24 Nov 2010 10:35:42 GMT (envelope-from nobody) Message-Id: <201011241035.oAOAZgb8086600@red.freebsd.org> Date: Wed, 24 Nov 2010 10:35:42 GMT From: Andrey Zholos To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/152539: graphics/megapov fails to build with png 1.4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2010 10:40:11 -0000 >Number: 152539 >Category: ports >Synopsis: graphics/megapov fails to build with png 1.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Nov 24 10:40:10 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Andrey Zholos >Release: 8.1-STABLE >Organization: >Environment: >Description: The POV-Ray port has a patch to allow it to compile with libpng 1.4. MegaPOV requires the same patch. This problem is obscured because sometimes MegaPOV configure can't find the system's libpng and compiles its own libpng 1.2.8 instead (and also its own libjpeg and libtiff). This apparently depends on whether Xorg is installed. >How-To-Repeat: Without Xorg installed, configure says: checking for library containing png_get_libpng_ver... no configure: libpng will be built and statically linked to MegaPOV With Xorg installed, configure says: checking for library containing png_get_libpng_ver... -lpng checking png.h usability... yes checking png.h presence... yes checking for png.h... yes checking for libpng version >= 1.2.5... 1.4.3, ok Later, the build stops with many benign warnings and two errors: png_pov.cpp:1440: error: 'struct png_info_struct' has no member named 'trans' png_pov.cpp:1473: error: 'struct png_info_struct' has no member named 'trans' >Fix: See patch. Patch attached with submission follows: --- Makefile.orig 2010-03-28 07:37:08.000000000 +0100 +++ Makefile 2010-11-24 10:08:44.000000000 +0000 @@ -29,6 +29,8 @@ LDFLAGS+= -L${LOCALBASE}/lib -L${LOCALBASE}/lib CFLAGS+= -I${LOCALBASE}/include CXXFLAGS+= -I${LOCALBASE}/include +CPPFLAGS+= -I${LOCALBASE}/include +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" .include --- files/patch-png_pov.cpp.orig 1970-01-01 01:00:00.000000000 +0100 +++ files/patch-png_pov.cpp 2010-11-24 10:18:19.000000000 +0000 @@ -0,0 +1,20 @@ +--- source/png_pov.cpp.orig 2005-08-23 20:20:33.000000000 +0100 ++++ source/png_pov.cpp 2010-11-24 10:15:11.000000000 +0000 +@@ -1437,7 +1437,7 @@ + if(r_info_ptr->valid & PNG_INFO_tRNS) + { + for (index = 0; index < r_info_ptr->num_trans; index++) +- cmap[index].Transmit = 255 - r_info_ptr->trans[index]; ++ cmap[index].Transmit = 255 - r_info_ptr->trans_alpha[index]; + } + + Image->data.map_lines = (unsigned char **)POV_MALLOC(height * sizeof(unsigned char *), "PNG image"); +@@ -1470,7 +1470,7 @@ + if(r_info_ptr->valid & PNG_INFO_tRNS) + { + for (index = 0; index < r_info_ptr->num_trans; index++) +- cmap[index].Transmit = 255 - r_info_ptr->trans[index]; ++ cmap[index].Transmit = 255 - r_info_ptr->trans_alpha[index]; + } + + Image->data.map_lines = (unsigned char **)POV_MALLOC(height * sizeof(unsigned char *), "PNG image"); >Release-Note: >Audit-Trail: >Unformatted: