From nobody@FreeBSD.org  Sat Jul 12 00:19:37 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 929481065672
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Jul 2008 00:19:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 821248FC1B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Jul 2008 00:19:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6C0JbN2046849
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Jul 2008 00:19:37 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m6C0JauQ046848;
	Sat, 12 Jul 2008 00:19:36 GMT
	(envelope-from nobody)
Message-Id: <200807120019.m6C0JauQ046848@www.freebsd.org>
Date: Sat, 12 Jul 2008 00:19:36 GMT
From: "Scot W. Hetzel" <swhetzel@gmaill.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: editors/koffice-kde3: fails building with both ImageMagic and GraphicsMagic installed
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         125526
>Category:       ports
>Synopsis:       editors/koffice-kde3: fails building with both ImageMagic and GraphicsMagic installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 12 00:20:00 UTC 2008
>Closed-Date:    Fri Aug 15 09:27:43 UTC 2008
>Last-Modified:  Fri Aug 15 09:30:03 UTC 2008
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 8.0-CURRENT
>Organization:
>Environment:
>Description:
When both ImageMagick and GraphicsMagick are installed, koffice-kde3 fails to build due to the configure script has detected both libraries installed on the system.  When it starts building it will fail with:

then mv -f ".deps/karbon.la.Tpo" ".deps/karbon.la.Po"; else
 rm -f ".deps/karbon.la.Tpo"; exit 1; fi
 /bin/sh /usr/local/bin/libtool --silent --tag=CXX --mode=link
 c++  -Wno-long-long -Wundef -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -fno-strict-aliasing -pipe -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DHAVE_KNEWSTUFF   -L/usr/local/lib -o
 karbon -R /usr/local/lib -R /usr/local/lib -R /usr/local/lib -R /usr/local/lib -R /usr/local/lib -no-undefined -L/usr/local/lib   -D_THREAD_SAFE -pthread  -L/usr/local/lib
 karbon.la.o
 libkdeinit_karbon.la -Wl,-export-dynamic -L/usr/local/lib -ljpeg  -L/usr/local/lib
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetViewbox'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawScale'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawSetTextUnderColor'
 /usr/local/lib/libMagickCore.so: undefined reference to `DestroyMagickWand'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawSetStrokeDashArray'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetStrokeWidth'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawColor'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPathStart'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawSetStrokeAntialias'
 /usr/local/lib/libMagickCore.so: undefined reference to `PopDrawingWand'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawAnnotation'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetStrokeLineCap'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawPathEllipticArcAbsolute'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawSetStrokeLineJoin'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPathClose'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPushClipPath'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawSetStrokePatternURL'
 /usr/local/lib/libMagickCore.so: undefined reference to `PixelSetBlueQuantum'
 /usr/local/lib/libMagickCore.so: undefined reference to `NewPixelWand'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawComment'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawSetFillPatternURL'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawComposite'
 /usr/local/lib/libMagickCore.so: undefined reference to `PixelSetRedQuantum'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPushPattern'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPopDefs'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `NewMagickWandFromImage'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawEllipse'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawAllocateWand'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawPathLineToAbsolute'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetClipPath'
 /usr/local/lib/libMagickCore.so: undefined reference to `PushDrawingWand'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPopClipPath'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawRender'
 /usr/local/lib/libMagickCore.so: undefined reference to `PixelSetQuantumColor'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `DrawPathMoveToAbsolute'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetStrokeColor'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawRotate'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPopPattern'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawArc'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawRoundRectangle'
 /usr/local/lib/libMagickCore.so: undefined reference to
 `PixelSetOpacityQuantum'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawTranslate'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawLine'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetFillColor'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetFontSize'
 /usr/local/lib/libMagickCore.so: undefined reference to `PixelSetGreenQuantum'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetFont'
 /usr/local/lib/libMagickCore.so: undefined reference to `DestroyPixelWand'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawSetClipRule'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawRectangle'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPushDefs'
 /usr/local/lib/libMagickCore.so: undefined reference to `PixelSetColor'
 /usr/local/lib/libMagickCore.so: undefined reference to `DrawPathFinish'
 gmake[3]: *** [karbon] Error 1
 gmake[3]: Leaving directory
 `/usr/ports/editors/koffice-kde3/work/koffice-1.6.3/karbon'
 gmake[2]: *** [all-recursive] Error 1
 gmake[2]: Leaving directory
 `/usr/ports/editors/koffice-kde3/work/koffice-1.6.3/karbon'
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory
 `/usr/ports/editors/koffice-kde3/work/koffice-1.6.3'
 gmake: *** [all] Error 2
 *** Error code 2
 
 
 
>How-To-Repeat:
cd /usr/ports/graphics/GraphicsMagick
make install
cd ../ImageMagick
make install
cd /usr/ports/editors/koffice-kde3
make build

The build will fail as shown above.
>Fix:
One solution proposed on the ports mailing list was to uninstall the ImageMagick port, rebuild editors/koffice-kde3 and then reinstall ImageMagick, while this works it is unacceptable to have to uninstall a port to get another port to build.

The correct solution is to patch the source configure script to skip the detection of ImageMagick when GraphicsMagick is installed.  see attached patch:

Patch attached with submission follows:

--- configure.orig	2007-05-30 16:56:35.000000000 -0500
+++ configure	2008-07-10 05:51:45.898085206 -0500
@@ -33900,8 +33900,10 @@
 
 # Check for ImageMagick...
 
 have_imagemagick=no
 
+if test "$have_graphicsmagick" = "no"; then
+
    { echo "$as_me:$LINENO: checking for Magick-config" >&5
 echo $ECHO_N "checking for Magick-config... $ECHO_C" >&6; }
    if test -n "$MAGICK_CONFIG"; then
@@ -34014,7 +34017,7 @@
     LIBMAGICK_RPATH=
 fi
 
-
+fi
 
 
 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->kde 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jul 12 00:20:10 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125526 

From: David Southwell <david@vizion2000.net>
To: bug-followup@freebsd.org,
 swhetzel@gmaill.com
Cc:  
Subject: Re: ports/125526: editors/koffice-kde3: fails building with both ImageMagic and GraphicsMagic installed
Date: Sun, 27 Jul 2008 02:29:31 -0700

 Could this fix  please be implement. It is a pain having to manually  
 deinstall and reinstall a package every time.
 
 Thanks
 david
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Aug 15 09:27:42 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125526 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/125526: commit references a PR
Date: Fri, 15 Aug 2008 09:25:42 +0000 (UTC)

 miwi        2008-08-15 09:25:28 UTC
 
   FreeBSD ports repository
 
   Modified files:
     editors/koffice-kde3 Makefile 
   Added files:
     editors/koffice-kde3/files patch-configure 
   Log:
   - Fix build when ImageMagic and GraphicsMagic installed is.
   
           One solution proposed on the ports mailing list was to uninstall
           the ImageMagick port, rebuild editors/koffice-kde3 and then reinstall
           ImageMagick, while this works it is unacceptable to have to uninstall
           a port to get another port to build. The correct solution is to patch
           the source configure script to skip the detection of ImageMagick when
           GraphicsMagick is installed.
   
   PR:             125526
   Submitted by:   Scot W. Hetzel" <swhetzel@gmaill.com>
   
   Revision  Changes    Path
   1.112     +1 -1      ports/editors/koffice-kde3/Makefile
   1.3       +30 -0     ports/editors/koffice-kde3/files/patch-configure (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
