summaryrefslogtreecommitdiff
path: root/devel/libevent/buildlink2.mk
blob: fdb72dc7477b18b404985049eadab9a7885b9d71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $NetBSD: buildlink2.mk,v 1.5 2004/02/05 07:17:15 jlam Exp $
#
# This Makefile fragment is included by packages that use libevent.
#
# This file was created automatically using createbuildlink 2.6.
#

.if !defined(LIBEVENT_BUILDLINK2_MK)
LIBEVENT_BUILDLINK2_MK=	# defined

.include "../../mk/bsd.prefs.mk"

.if exists(/usr/include/event.h)
_NEED_LIBEVENT=		NO
.else
_NEED_LIBEVENT=		YES
.endif

.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
    !empty(PREFER_PKGSRC:Mlibevent)
_NEED_LIBEVENT=	YES
.endif

.if ${_NEED_LIBEVENT} == "YES"
BUILDLINK_PACKAGES+=			libevent
BUILDLINK_DEPENDS.libevent?=		libevent>=0.6
BUILDLINK_PKGSRCDIR.libevent?=		../../devel/libevent

EVAL_PREFIX+=	BUILDLINK_PREFIX.libevent=libevent
BUILDLINK_PREFIX.libevent_DEFAULT=	${LOCALBASE}
.else
BUILDLINK_PREFIX.libevent=		/usr
.endif

BUILDLINK_FILES.libevent+=	include/event.h
BUILDLINK_FILES.libevent+=	lib/libevent.*

BUILDLINK_TARGETS+=	libevent-buildlink

libevent-buildlink: _BUILDLINK_USE

.endif	# LIBEVENT_BUILDLINK2_MK