summaryrefslogtreecommitdiff
path: root/x11-toolkits/nucleo/Makefile
blob: 9eb3cdee900d15edf308b55e11dfa16727c5c82e (plain) (blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# New ports collection makefile for:	Nucleo
# Date created:				30 May 2007
# Whom:					Alexey Dokuchaev <danfe@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	nucleo
PORTVERSION=	0.7.6
PORTREVISION=	4
CATEGORIES=	x11-toolkits
MASTER_SITES=	http://insitu.lri.fr/metisse/download/nucleo/

MAINTAINER=	danfe@FreeBSD.org
COMMENT=	Toolkit to explore video and human-computer interaction

LIB_DEPENDS=	freetype.9:${PORTSDIR}/print/freetype2 \
		jpeg.11:${PORTSDIR}/graphics/jpeg \
		png.6:${PORTSDIR}/graphics/png \
		exif.12:${PORTSDIR}/graphics/libexif

USE_BZIP2=	yes
USE_GMAKE=	yes
USE_GL=		glu
USE_QT_VER=	4
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib"
USE_LDCONFIG=	yes

OPTIONS=	GNUTLS	"Build with GnuTLS support"	off \
		DNSSD	"Build with DNS-SD support"	off \
		FFMPEG	"Enable FFmpeg plugin"		off \
		QT4	"Enable Qt4 plugin"		off \
		GD	"Enable GD plugin"		off

.include <bsd.port.pre.mk>

.if defined(WITH_GNUTLS)
LIB_DEPENDS+=	gnutls.47:${PORTSDIR}/security/gnutls
.else
CONFIGURE_ARGS+=	--without-gnutls
.endif

.if defined(WITH_DNSSD)
.  if exists(${LOCALBASE}/include/avahi-compat-libdns_sd/dns_sd.h)
LIB_DEPENDS+=	dns_sd.1:${PORTSDIR}/net/avahi-libdns
.  else
LIB_DEPENDS+=	dns_sd.1:${PORTSDIR}/net/mDNSResponder
.  endif
.else
CONFIGURE_ARGS+=	--without-dns-sd
.endif

.if defined(WITH_FFMPEG)
LIB_DEPENDS+=	avformat.1:${PORTSDIR}/multimedia/ffmpeg
PLIST_SUB+=	FFMPEG=""
.else
CONFIGURE_ARGS+=	--without-ffmpeg
PLIST_SUB+=	FFMPEG="@comment "
.endif

.if defined(WITH_QT4)
QT_COMPONENTS=	moc_build corelib
MAKE_ARGS+=	QT4MOC=${LOCALBASE}/bin/moc-qt4
PLIST_SUB+=	QT4=""
.else
CONFIGURE_ARGS+=	--without-qt
PLIST_SUB+=	QT4="@comment "
.endif

.if defined(WITH_GD)
LIB_DEPENDS+=	gd.4:${PORTSDIR}/graphics/gd
PLIST_SUB+=	GD=""
.else
CONFIGURE_ARGS+=	--without-gd
PLIST_SUB+=	GD="@comment "
.endif

post-patch:
# Fix for libpng 1.4
	@${REINPLACE_CMD} -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
		${WRKSRC}/nucleo/image/encoding/PNGenc.cxx

.include <bsd.port.post.mk>