freebsd-ports/devel/libevent2/Makefile
Martin Matuska 304b9ef62b - 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]
2011-03-06 20:25:38 +00:00

59 lines
1.3 KiB
Makefile

# New ports collection makefile for: libevent2
# Date created: 22 February 2011
# Whom: Martin Matuska <mm@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= libevent2
DISTVERSION= 2.0.10
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://monkey.org/~provos/
DISTNAME= ${PORTNAME:S/2//}-${DISTVERSION}-stable
MAINTAINER= mm@FreeBSD.org
COMMENT= API for executing callback functions on events or timeouts
USE_GNOME= lthack
GNU_CONFIGURE= yes
USE_LDCONFIG= ${PREFIX}/lib/event2
OPTIONS= OPENSSL "Enable OpenSSL support" on \
THREADS "Enable threads support" on
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/event2
.include <bsd.port.options.mk>
.if !defined(WITH_OPENSSL)
CONFIGURE_ARGS+= --disable-openssl
PLIST_SUB+= OPENSSL="@comment "
.else
USE_OPENSSL= yes
PLIST_SUB+= OPENSSL=""
.endif
.include <bsd.port.pre.mk>
.if !defined(WITH_THREADS)
CONFIGURE_ARGS+= --disable-thread-support
PLIST_SUB+= THREADS="@comment "
.else
CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
PLIST_SUB+= THREADS=""
.endif
post-patch:
@${REINPLACE_CMD} -E \
-e "s,^pkgconfigdir =.*,pkgconfigdir = \$$(prefix)/libdata/pkgconfig,g" \
${WRKSRC}/Makefile.in
post-install:
@${INSTALL_SCRIPT} ${WRKSRC}/event_rpcgen.py ${PREFIX}/bin/event2_rpcgen.py
regression-test: build
@(${SH} ${WRKSRC}/test/regress)
.include <bsd.port.post.mk>