From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Nov 13 19:30:00 2012 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5A35DC2 for ; Tue, 13 Nov 2012 19:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 991D68FC12 for ; Tue, 13 Nov 2012 19:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qADJU0bG031112 for ; Tue, 13 Nov 2012 19:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qADJU0cZ031111; Tue, 13 Nov 2012 19:30:00 GMT (envelope-from gnats) Resent-Date: Tue, 13 Nov 2012 19:30:00 GMT Resent-Message-Id: <201211131930.qADJU0cZ031111@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, Nikolai Lifanov Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 917F2BE6 for ; Tue, 13 Nov 2012 19:22:40 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 76E758FC08 for ; Tue, 13 Nov 2012 19:22:40 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qADJMeOc069542 for ; Tue, 13 Nov 2012 19:22:40 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qADJMesR069541; Tue, 13 Nov 2012 19:22:40 GMT (envelope-from nobody) Message-Id: <201211131922.qADJMesR069541@red.freebsd.org> Date: Tue, 13 Nov 2012 19:22:40 GMT From: Nikolai Lifanov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/173612: [patch] graphics/libfpx X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 19:30:00 -0000 >Number: 173612 >Category: ports >Synopsis: [patch] graphics/libfpx >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 13 19:30:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Nikolai Lifanov >Release: 10.0-CURRENT >Organization: >Environment: 10.0-CURRENT FreeBSD 10.0-CURRENT #27 r242979: Tue Nov 13 12:23:54 EST 2012 >Description: graphics/libfpx doesn't build with clang as cc on HEAD shortly after r242707 This breaks some x11 and xfce4, possibly related to linking clang to CC. >How-To-Repeat: Broken: Update a CURRENT system to r242707 or later and attempt to build graphics/libfpx Fixed: Add USE_GCC=any to Makefile and attempt to build graphics/libfpx >Fix: This hasn't been tested on redports, but I tested it on several revisions in a clean environment myself. It might be possible to fix the build with clang, but for now the workaround would fix many other ports. Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # libfpx # libfpx/files # libfpx/files/patch-unused-privates # libfpx/files/patch-aa # libfpx/files/patch-fpxlib # libfpx/files/Makefile.bsd # libfpx/files/patch-ph_image # libfpx/pkg-descr # libfpx/distinfo # libfpx/Makefile # echo c - libfpx mkdir -p libfpx > /dev/null 2>&1 echo c - libfpx/files mkdir -p libfpx/files > /dev/null 2>&1 echo x - libfpx/files/patch-unused-privates sed 's/^X//' >libfpx/files/patch-unused-privates << '04f19cf0a8b63cd4e4165b9237284062' XThese fields have been unused for many years, but it is only now, Xthat some compilers (clang-3.2) complain about it... X X -mi X X--- fpx/fpximgvw.h 2007-11-02 03:10:05.000000000 -0400 X+++ fpx/fpximgvw.h 2012-10-12 12:28:39.000000000 -0400 X@@ -300,6 +300,4 @@ X X PFileFlashPixView* filePtr; // The image file descriptor X- OLEStorage* sourceStorage; // Source FPX Image storage X- OLEStorage* resultStorage; // Result FPX Image storage X X // Geometric parameters 04f19cf0a8b63cd4e4165b9237284062 echo x - libfpx/files/patch-aa sed 's/^X//' >libfpx/files/patch-aa << 'f5dc098c5ecd5b60d944beed8df65d0c' X--- fpx/f_fpxvw.cpp 2005-02-25 21:23:05.000000000 -0500 X+++ fpx/f_fpxvw.cpp 2012-01-19 19:44:34.425688599 +0200 X@@ -613,6 +613,7 @@ HRESULT OleRegGetUserType(REFCLSID clsid X const OLECHAR *src=OLESTR("Flashpix Toolkit Application"); X OLECHAR *dest=*pszUserType; X while(*src) *dest++=*src++; X+ *dest=(OLECHAR)0; X X return S_OK; X } f5dc098c5ecd5b60d944beed8df65d0c echo x - libfpx/files/patch-fpxlib sed 's/^X//' >libfpx/files/patch-fpxlib << '3a6f3cd8c3e50732fb4e59cf8d35f290' XReadPage() must've been returning int at some point. It is returning XFPXStatus for, at least, 5 years now, but gcc never warned about us Xchecking invalid values. Thanks to clang for finding this redundancy. X--- fpx/fpxlib.cpp 2007-11-02 03:10:05.000000000 -0400 X+++ fpx/fpxlib.cpp 2012-10-04 22:49:40.000000000 -0400 X@@ -825,5 +825,5 @@ X FPXImageDesc* renderingBuffer) X { X- FPXStatus status = FPX_OK; X+ FPXStatus status; X if (!thePage) X status = FPX_INVALID_FPX_HANDLE; X@@ -839,18 +839,7 @@ X else { X GtheSystemToolkit->SetUsedColorSpace(image.GetBaselineColorSpace()); X- switch (thePage->ReadPage (image.Get32BitsBuffer())) { X- case -2 : X- status = FPX_FILE_READ_ERROR; X- break; X- case -3 : X- status = FPX_LOW_MEMORY_ERROR; X- break; X- case 0: X- image.UpdateDescriptor(); X- break; X- default: X- { X- } X- } X+ status = thePage->ReadPage(image.Get32BitsBuffer()); X+ if (status == FPX_OK) X+ image.UpdateDescriptor(); X } X } X@@ -863,5 +852,5 @@ X FPXImageDesc* renderingBuffer) X { X- FPXStatus status = FPX_OK; X+ FPXStatus status; X if (!thePage) X status = FPX_INVALID_FPX_HANDLE; X@@ -877,18 +866,7 @@ X else { X GtheSystemToolkit->SetUsedColorSpace(line.GetBaselineColorSpace()); X- switch (thePage->ReadPageLine (lineNumber, line.Get32BitsBuffer())) { X- case -2 : X- status = FPX_FILE_READ_ERROR; X- break; X- case -3 : X- status = FPX_LOW_MEMORY_ERROR; X- break; X- case 0: X- line.UpdateDescriptor(); X- break; X- default: X- { X- } X- } X+ status = thePage->ReadPageLine (lineNumber, line.Get32BitsBuffer()); X+ if (status == FPX_OK) X+ line.UpdateDescriptor(); X } X } 3a6f3cd8c3e50732fb4e59cf8d35f290 echo x - libfpx/files/Makefile.bsd sed 's/^X//' >libfpx/files/Makefile.bsd << '7e11de29d3afc2743ae945774b44c25c' XLIB = fpx XINCS = fpxlib.h XSHLIB_MAJOR= 2 XSHLIB_MINOR= 7 XWARNS= 3 X XLIBDIR = ${LOCALBASE}/lib XINCSDIR = ${LOCALBASE}/include XINCDIR = ${INCSDIR} # for pre-bsd.incs.mk API X XNO_PROFILE= Don't want it XNOPROFILE= ${NO_PROFILE} XHAVES= -DHAVE_WCHAR_H -DHAVE_DLFCN_H \ X -DHAVE_SYS_TIME_H \ X -DHAVE_SYS_PARAM_H -DHAVE_SYS_MOUNT_H XCFLAGS+= ${HAVES} X XCPPS != find ${.CURDIR} -name \*.cpp -print X# Some of the .cxx files are #include-ed into others, so can't use `find' here: XOLESS := ascii.cxx cdocfile.cxx chinst.cxx dffuncs.cxx dfiter.cxx \ X dfstream.cxx difat.cxx dir.cxx dirp.cxx docfile.cxx entry.cxx \ X expdf.cxx expiter.cxx expst.cxx fat.cxx funcs.cxx header.cxx \ X iter.cxx mem.cxx msf.cxx msfiter.cxx mstream.cxx page.cxx \ X refilb.cxx rexpdf.cxx sstream.cxx storage.cxx time.cxx \ X vect.cxx wchar.c XJPGS != find ${.CURDIR}/jpeg -name \*.c X XCPPS += ${OLESS:S/^/${.CURDIR}\/oless\//} ${JPGS} X XSRCS = ${CPPS:T:Nejpeg.c} X XCXXFLAGS+= -fno-rtti -fno-exceptions -fno-strict-aliasing ${HAVES} XLDADD += -L${LOCALBASE}/lib -lm -lstdc++ X X.PATH: ${CPPS:H} X X.for d in oless/h jpeg ole basics ri_image oless fpx . XCXXFLAGS+= -I${.CURDIR}/$d X.endfor X XCXXFLAGS+= -I${LOCALBASE}/include -D_UNIX X X.include X X# Work-around the bug in g++4.2's system header: X# /usr/include/c++/4.2/bits/basic_ios.h:156: warning: empty body in an if-statement XCXXFLAGS:= ${CXXFLAGS:N-Wsystem-headers} 7e11de29d3afc2743ae945774b44c25c echo x - libfpx/files/patch-ph_image sed 's/^X//' >libfpx/files/patch-ph_image << '8470f12abb903006c862bfa784c362c7' X--- ri_image/ph_image.h 2007-11-02 03:10:05.000000000 -0400 X+++ ri_image/ph_image.h 2012-10-04 22:38:52.000000000 -0400 X@@ -173,5 +173,5 @@ X virtual FPXStatus CreateInitResolutionLevelList(); // Make a sub image list in read or write mode X virtual FPXStatus CreateEmptyResolutionLevelList(); // Make a sub image list in create mode X- virtual PResolutionLevel* CreateEmptyResolutionLevel(int width, int height, long* quelImage); // Make a sub image in create mode X+ virtual PResolutionLevel* CreateEmptyResolutionLevel(int width, int height, int* quelImage); // Make a sub image in create mode X virtual PResolutionLevel* CreateInitResolutionLevel(int* offset, long id); // Make a sub image in read or write mode X X--- ri_image/ph_image.cpp 2007-11-02 03:10:05.000000000 -0400 X+++ ri_image/ph_image.cpp 2012-10-04 22:38:31.000000000 -0400 X@@ -1127,5 +1127,5 @@ X // ---------------------------------------------------------------------------- X // Make a sub resolution level in create mode X-PResolutionLevel* PHierarchicalImage::CreateEmptyResolutionLevel(int , int , long int*) X+PResolutionLevel* PHierarchicalImage::CreateEmptyResolutionLevel(int , int , int*) X { X return NULL; 8470f12abb903006c862bfa784c362c7 echo x - libfpx/pkg-descr sed 's/^X//' >libfpx/pkg-descr << 'b178139dc42f1483ed2058d5d684e93c' XThis package is the Flashpix OpenSource Toolkit and is based Xon source code obtained from the Digital Imaging Group Inc. X(currently known as International Imaging Industry Association or i3a). X XSee the file AUTHORS for the origin of this package, the file XCOPYING for usage limitations, the file INSTALL for Unix installation Xinstructions, and the file README.gcc for GNU make based build Xinstructions. X XWWW: http://www.i3a.org/ b178139dc42f1483ed2058d5d684e93c echo x - libfpx/distinfo sed 's/^X//' >libfpx/distinfo << '08482c00e1f531ded15342e6cda6e834' XSHA256 (libfpx-1.3.1-1.tar.xz) = d27700c9215ed0fda0878bda098ed5f19ecb436f76f4a1895cca5e4835c253a1 XSIZE (libfpx-1.3.1-1.tar.xz) = 1899164 08482c00e1f531ded15342e6cda6e834 echo x - libfpx/Makefile sed 's/^X//' >libfpx/Makefile << '602b94751a2333db1cf0b996acf966db' X# New ports collection makefile for: fpx X# Date created: Jan 10 2001 X# Whom: Mikhail Teterin X# X# $FreeBSD: head/graphics/libfpx/Makefile 305294 2012-10-05 04:14:40Z mi $ X# X XPORTNAME= libfpx XPORTREVISION= 1 XDISTVERSION= 1.3.1-1 XCATEGORIES= graphics XMASTER_SITES= http://imagemagick.mirrorcatalogs.com/delegates/ \ X http://www.imagemagick.org/download/delegates/ \ X ftp://mirror.aarnet.edu.au/pub/imagemagick/delegates/ \ X ftp://gd.tuwien.ac.at/pub/graphics/ImageMagick/delegates/ \ X http://servingzone.com/mirrors/ImageMagick/delegates/ \ X http://mirror.checkdomain.de/imagemagick/delegates/ \ X ftp://mirror.checkdomain.de/imagemagick/delegates/ \ X http://image_magick.veidrodis.com/image_magick/delegates/ X XMAINTAINER= mi@aldan.algebra.com XCOMMENT= Library routines for working with Flashpix images X XUSE_XZ= yes XUSE_GCC= any X XPLIST_FILES= lib/libfpx.so.2 lib/libfpx.so lib/libfpx.a include/fpxlib.h XUSE_LDCONFIG= yes XMAKEFILE= ${FILESDIR}/Makefile.bsd XMAKE_JOBS_SAFE= yes X Xpost-patch: X ${SED} -i '' -e '/^#include "fpxlib-config.h"/d' \ X ${WRKSRC}/basics/filename.cpp \ X ${WRKSRC}/oless/h/owchar.h \ X ${WRKSRC}/ole/gen_guid.cpp \ X ${WRKSRC}/fpxlib.h X X.include X X# We want the port's Makefile to build compiler-flags from scratch X# (based on WARNS= in particular) instead of being influenced by X# the environment... There is no obvious way to prevent bsd.port.mk X# from adding CFLAGS and CXXFLAGS to the build environment, so we X# remove them here. XMAKE_ENV:= ${MAKE_ENV:NCFLAGS=*:NCXXFLAGS=*} 602b94751a2333db1cf0b996acf966db exit >Release-Note: >Audit-Trail: >Unformatted: