ports/170184: [patch] devel/libevent2: correct include order in pkg-config

Jan Beich jbeich at tormail.org
Thu Jul 26 06:00:23 UTC 2012


>Number:         170184
>Category:       ports
>Synopsis:       [patch] devel/libevent2: correct include order in pkg-config
>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:   Thu Jul 26 06:00:22 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
freebsd-gecko repo
>Description:
When using cflags from pkg-config /compat directory is placed later.
If devel/libevent is also installed an app using such flags may
accidentally pick up event.h from libevent14. As both libraries
are only API compatible the app may crash due to ABI difference.
>How-To-Repeat:
$ echo '#include <event.h>' |
  env -i gcc -E - $(pkg-config libevent --cflags) |
  fgrep include/event.h
# 1 "/usr/local/include/event.h" 1
# 162 "/usr/local/include/event.h"
[...]
>Fix:
--- include_order.diff begins here ---
Index: devel/libevent2/files/patch-libevent.pc.in
===================================================================
--- devel/libevent2/files/patch-libevent.pc.in	(revision 301267)
+++ devel/libevent2/files/patch-libevent.pc.in	(working copy)
@@ -8,5 +8,5 @@
 +Libs: -L${libdir} -levent-2.0
  Libs.private: @LIBS@
 -Cflags: -I${includedir}
-+Cflags: -I${includedir} -I${includedir}/event2/compat
++Cflags: -I${includedir}/event2/compat -I${includedir}
  
--- include_order.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list