From mezz@FreeBSD.org  Sun Mar  6 16:47:30 2011
Return-Path: <mezz@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 24A01106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  6 Mar 2011 16:47:30 +0000 (UTC)
	(envelope-from mezz@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id ED3788FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  6 Mar 2011 16:47:29 +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 p26GlT4N019403
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 6 Mar 2011 16:47:29 GMT
	(envelope-from mezz@freefall.freebsd.org)
Received: (from mezz@localhost)
	by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p26GlTKY019402;
	Sun, 6 Mar 2011 16:47:29 GMT
	(envelope-from mezz)
Message-Id: <201103061647.p26GlTKY019402@freefall.freebsd.org>
Date: Sun, 6 Mar 2011 16:47:29 GMT
From: Jeremy Messenger <mezz@freebsd.org>
Reply-To: Jeremy Messenger <mezz@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: devel/libevent2: Bug in libevent*.pc on Libs part
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         155315
>Category:       ports
>Synopsis:       devel/libevent2: Bug in libevent*.pc on Libs part
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 06 16:50:00 UTC 2011
>Closed-Date:    Sun Mar 06 20:31:38 UTC 2011
>Last-Modified:  Sun Mar 06 20:31:38 UTC 2011
>Originator:     Jeremy Messenger
>Release:        FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
n/a

>Description:
When you have libevent and libevent2 installed then try to build
transmission* and other ports that depend on libevent2. Those ports will
get build failure because of incorrect in the libevent*.pc when build
ran like this:

# pkg-config --libs libevent
-L/usr/local/lib/event2 -levent
# pkg-config --libs libevent_openssl
-L/usr/local/lib/event2 -levent_openssl -levent
# pkg-config --libs libevent_pthreads
-L/usr/local/lib/event2 -levent_pthreads -levent

It will pick up libevent-1.4 library instead of libevent-2.0.

>How-To-Repeat:
	
>Fix:
The fix is to patch in those libevent*.pc by add '-2.0' in the front of those
libevent*.

# ldconfig -r | grep libevent
	606:-levent-2.0.5 => /usr/local/lib/event2/libevent-2.0.so.5
	607:-levent_core-2.0.5 => /usr/local/lib/event2/libevent_core-2.0.so.5
	608:-levent_extra-2.0.5 => /usr/local/lib/event2/libevent_extra-2.0.so.5
	609:-levent_pthreads-2.0.5 => /usr/local/lib/event2/libevent_pthreads-2.0.so.5

# pkg-config --libs libevent
-L/usr/local/lib/event2 -levent-2.0
# pkg-config --libs libevent_openssl
-L/usr/local/lib/event2 -levent_openssl-2.0 -levent-2.0
 pkg-config --libs libevent_pthreads
-L/usr/local/lib/event2 -levent_pthreads-2.0 -levent-2.0

With that, those ports are able to build while have devel/libevent and
devel/libevent2 installed in the system with no problem. Oh yeah, here's
patch:

http://people.freebsd.org/~mezz/diff/libevent2.diff
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mm 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Mar 6 16:50:13 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/155315: commit references a PR
Date: Sun,  6 Mar 2011 20:25:52 +0000 (UTC)

 mm          2011-03-06 20:25:39 UTC
 
   FreeBSD ports repository
 
   Modified files:
     devel/libevent2      Makefile 
   Added files:
     devel/libevent2/files patch-libevent.pc.in 
                           patch-libevent_openssl.pc.in 
                           patch-libevent_pthreads.pc.in 
   Log:
   - Fix library linking in libevent.pc [1]
   - Add compatibility include to libevent.pc [2]
   
   PR:             ports/155315 [1], ports/155293 [2]
   Submitted by:   Jeremy Messenger <mezz@FreeBSD.org> [1]
   Suggested by:   swell.k@gmail.com [2]
   
   Revision  Changes    Path
   1.3       +1 -0      ports/devel/libevent2/Makefile
   1.1       +12 -0     ports/devel/libevent2/files/patch-libevent.pc.in (new)
   1.1       +12 -0     ports/devel/libevent2/files/patch-libevent_openssl.pc.in (new)
   1.1       +12 -0     ports/devel/libevent2/files/patch-libevent_pthreads.pc.in (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"
 
State-Changed-From-To: open->closed 
State-Changed-By: mm 
State-Changed-When: Sun Mar 6 20:31:36 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155315 
>Unformatted:
