Hi,

What do you think about this?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/tor/Makefile,v
retrieving revision 1.59
diff -u -p -r1.59 Makefile
--- Makefile    13 Aug 2012 16:39:35 -0000      1.59
+++ Makefile    27 Aug 2012 08:30:25 -0000
@@ -3,6 +3,7 @@
 COMMENT=       anonymity service using onion routing
 
 DISTNAME=      tor-0.2.2.38
+REVISION=      0
 CATEGORIES=    net
 HOMEPAGE=      http://www.torproject.org/
 
@@ -14,12 +15,15 @@ PERMIT_PACKAGE_FTP= Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB += c crypto event m pthread ssl z
+WANTLIB += c crypto event_core event_extra m pthread ssl z
 
 MASTER_SITES=  ${HOMEPAGE}dist/
 
+LIB_DEPENDS =  devel/libevent2
+
 CONFIGURE_STYLE=gnu
-CONFIGURE_ARGS=        --with-ssl-dir=/usr
+CONFIGURE_ARGS=        --with-libevent-dir=${LOCALBASE} \
+               --with-ssl-dir=/usr
 
 DB_DIR=                /var/tor
 SUBST_VARS+=   DB_DIR
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/net/tor/patches/patch-configure,v
retrieving revision 1.16
diff -u -p -r1.16 patch-configure
--- patches/patch-configure     26 May 2012 11:08:44 -0000      1.16
+++ patches/patch-configure     27 Aug 2012 08:30:25 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-configure,v 1.16 2012/05/26 11:08:44 pascal Exp $
---- configure.orig     Thu May 24 09:34:53 2012
-+++ configure  Sat May 26 12:20:11 2012
+--- configure.orig     Sun Aug 12 19:30:41 2012
++++ configure  Mon Aug 27 09:48:48 2012
 @@ -5557,8 +5557,8 @@ for ac_lib in '' nsl; do
    if test -z "$ac_lib"; then
      ac_res="none required"
@@ -23,3 +23,39 @@ $OpenBSD: patch-configure,v 1.16 2012/05
    fi
    if ac_fn_c_try_link "$LINENO"; then :
    ac_cv_search_dlopen=$ac_res
+@@ -6047,7 +6047,7 @@ else
+ 
+   for tor_trydir in "$trylibeventdir" "(system)" "$prefix" /usr/local 
/usr/pkg /opt/libevent; do
+     LDFLAGS="$tor_saved_LDFLAGS"
+-    LIBS="$tor_saved_LIBS -levent $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32"
++    LIBS="$tor_saved_LIBS -levent_core -levent_extra $STATIC_LIBEVENT_FLAGS 
$TOR_LIB_WS32"
+     CPPFLAGS="$tor_saved_CPPFLAGS"
+ 
+     if test -z "$tor_trydir" ; then
+@@ -6227,7 +6227,7 @@ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$tor_cv_library_libevent_dir" >&5
+ $as_echo "$tor_cv_library_libevent_dir" >&6; }
+-LIBS="$LIBS -levent $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32"
++LIBS="$LIBS -levent_core -levent_extra $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32"
+ if test "$tor_cv_library_libevent_dir" != "(system)"; then
+ 
+   if test -d "$tor_cv_library_libevent_dir/lib"; then
+@@ -6350,7 +6350,7 @@ CPPFLAGS="$tor_saved_CPPFLAGS"
+ save_LIBS="$LIBS"
+ save_LDFLAGS="$LDFLAGS"
+ save_CPPFLAGS="$CPPFLAGS"
+-LIBS="-levent $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $LIBS"
++LIBS="-levent_core -levent_extra $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $LIBS"
+ LDFLAGS="$TOR_LDFLAGS_libevent $LDFLAGS"
+ CPPFLAGS="$TOR_CPPFLAGS_libevent $CPPFLAGS"
+ for ac_func in event_get_version event_get_version_number event_get_method 
event_set_log_callback evdns_set_outgoing_bind_address event_base_loopexit
+@@ -6413,7 +6413,7 @@ if test "$enable_static_libevent" = "yes"; then
+      TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a 
$STATIC_LIBEVENT_FLAGS"
+    fi
+ else
+-     TOR_LIBEVENT_LIBS="-levent"
++     TOR_LIBEVENT_LIBS="-levent_core -levent_extra"
+ fi
+ 
+ 

Reply via email to