From nobody@FreeBSD.org  Sat May 14 20:10:02 2011
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 169971065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 14 May 2011 20:10:02 +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 F18C98FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 14 May 2011 20:10:01 +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 p4EKA1pS005286
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 14 May 2011 20:10:01 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p4EKA1bs005285;
	Sat, 14 May 2011 20:10:01 GMT
	(envelope-from nobody)
Message-Id: <201105142010.p4EKA1bs005285@red.freebsd.org>
Date: Sat, 14 May 2011 20:10:01 GMT
From: "Herbert J. Skuhra" <h.skuhra@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [Patch] graphics/imlib2 - Wrong LIB_DEPENDS if graphics/giflib is installed
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         157047
>Category:       ports
>Synopsis:       [Patch] graphics/imlib2 - Wrong LIB_DEPENDS if graphics/giflib is installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    stas
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 14 20:10:09 UTC 2011
>Closed-Date:    Sat May 14 23:10:09 UTC 2011
>Last-Modified:  Sat May 14 23:10:12 UTC 2011
>Originator:     Herbert J. Skuhra
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
>Environment:
FreeBSD oslo.ath.cx 8.2-STABLE FreeBSD 8.2-STABLE #6 r221585: Sat May  7 12:21:20 CEST 2011     herbert@oslo.ath.cx:/usr/obj/usr/src/sys/PC1  i386
>Description:
If graphics/giflib is installed graphics/imlib2 is linked against libgif.so.5
and not libungif.so.5!

% ls -l /var/db/pkg |grep gif
drwxr-xr-x  2 root  wheel  512 14 mai 21:25 giflib-4.1.6
drwxr-xr-x  2 root  wheel  512 13 mai 16:02 libungif-4.1.4_5

% pwd
/usr/ports/graphics/imlib2

% ldd work/imlib2-1.4.4/src/modules/loaders/.libs/gif.so |grep gif
work/imlib2-1.4.4/src/modules/loaders/.libs/gif.so:
        libgif.so.5 => /usr/local/lib/libgif.so.5 (0x281a4000)

So in this case LIB_DEPENDS is wrong.

Is the attached patch commitable or should we enforce linking against
libungif?

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -u imlib2.bak/Makefile imlib2/Makefile
--- imlib2.bak/Makefile	2011-05-14 21:11:42.000000000 +0200
+++ imlib2/Makefile	2011-05-14 21:47:44.000000000 +0200
@@ -77,11 +77,16 @@
 .endif
 
 .if !defined(WITHOUT_GIF)
-LIB_DEPENDS+=	ungif.5:${PORTSDIR}/graphics/libungif
-PLIST_SUB+=	GIF=""
+. if exists(${LOCALBASE}/lib/libgif.so)
+LIB_DEPENDS+=   gif.5:${PORTSDIR}/graphics/giflib
+PLIST_SUB+=     GIF=""
+. else
+LIB_DEPENDS+=   ungif.5:${PORTSDIR}/graphics/libungif
+PLIST_SUB+=     GIF=""
+. endif
 .else
-CONFIGURE_ARGS+=	--without-gif
-PLIST_SUB+=	GIF="@comment "
+CONFIGURE_ARGS+=        --without-gif
+PLIST_SUB+=     GIF="@comment "
 .endif
 
 .if !defined(WITHOUT_ID3)
Common subdirectories: imlib2.bak/files and imlib2/files


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->stas 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat May 14 20:10:21 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157047 
State-Changed-From-To: open->closed 
State-Changed-By: stas 
State-Changed-When: Sat May 14 23:10:08 UTC 2011 
State-Changed-Why:  
Looks good!  Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157047: commit references a PR
Date: Sat, 14 May 2011 23:09:55 +0000 (UTC)

 stas        2011-05-14 23:09:46 UTC
 
   FreeBSD ports repository
 
   Modified files:
     graphics/imlib2      Makefile 
   Log:
   - Imlib picks up giflib if available instead of libungif.  Account for
     this.
   
   PR:             ports/157047
   Submitted by:   "Herbert J. Skuhra" <h.skuhra@gmail.com>
   
   Revision  Changes    Path
   1.141     +6 -1      ports/graphics/imlib2/Makefile
 _______________________________________________
 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:
