Makefile 11.5 KB
Newer Older
1 2 3
# New ports collection makefile for: emulab-boss
# Date created:         28 January 2003
# Whom:                 ricci@cs.utah.edu
4
# Updated:              1 October 2009 jwalsh@atl.lmco.com
5

6
.include "../emulab-boss/Makefile.emulab"
7

8
PORTNAME=	emulab-boss
9
PORTVERSION=	${EMULAB_PORTVERSION}
10 11 12 13
CATEGORIES=	misc
MASTER_SITES=	#none
DISTFILES=	#none
EXTRACT_ONLY=	#none
14
COMMENT=	"Meta-port for an Emulab boss node"
15

16
MAINTAINER=	testbed-ops@flux.utah.edu
17

18 19 20
#
# We set this so that the mysql server port doesn't do name resolution
#
21
.MAKEFLAGS+=	-DSKIP_DNS_CHECK
22

23
#
24
# We must make sure PERL is built with this.
25
#
26
.MAKEFLAGS+=	ENABLE_SUIDPERL=yes
27 28 29
.if ${PORTVERSION} == "6.0"
.MAKEFLAGS+=	PERL_VERSION=5.14.4 PERL_VER=5.14 PERL_ARCH=mach
.elif ${PORTVERSION} == "5.1"
30 31
.MAKEFLAGS+=	PERL_VERSION=5.12.5 PERL_VER=5.12 PERL_ARCH=mach
.elif ${PORTVERSION} == "5.0"
32 33
.MAKEFLAGS+=	PERL_VERSION=5.12.4 PERL_VER=5.12.4 PERL_ARCH=mach
.elif (${PORTVERSION} == "3.1" || ${PORTVERSION} == "4.0")
Mike Hibler's avatar
Mike Hibler committed
34
.MAKEFLAGS+=	PERL_VERSION=5.10.1 PERL_VER=5.10.1 PERL_ARCH=mach
35
.elif ${PORTVERSION} == "3.0"
36
.MAKEFLAGS+=	PERL_VERSION=5.10.0 PERL_VER=5.10.0 PERL_ARCH=mach
37
.endif
38 39 40

#
# For SWIG, so that it doesn't feel the need to suck in php and apache
41
# XXX Something is broken on FreeBSD 6.X and SWIG_LANGUAGES='x y z' breaks.
42
#
43 44
.MAKEFLAGS+=	SWIG_LANGUAGES= 
.MAKEFLAGS+=    WANT_SWIG_PERL=yes WANT_SWIG_PYTHON=yes WANT_SWIG_TCL=yes
45

46
#
Mike Hibler's avatar
Mike Hibler committed
47 48
# For PHP, specify the version and that we want the Apache module
# Version is specified via PHP_VER above.
49
#
Mike Hibler's avatar
Mike Hibler committed
50
.MAKEFLAGS+=	WANT_PHP_MOD=yes
51

52
#
53
# Various ports need to agree on what version of apache. Make sure this
Mike Hibler's avatar
Mike Hibler committed
54
# agrees with what is in the emulab-ops and emulab-php* metaports.
55
#
56
.MAKEFLAGS+=	-DWITH_APACHE
57
.if (${PORTVERSION} == "4.0" || ${PORTVERSION} == "5.0" || ${PORTVERSION} == "5.1" || ${PORTVERSION} == "6.0")
58 59 60
.MAKEFLAGS+=	APACHE_PORT=www/apache22
.MAKEFLAGS+=	WITH_SUEXEC=yes
.else
61
.MAKEFLAGS+=	APACHE_PORT=www/apache13-modssl
62
.endif
63

Mike Hibler's avatar
Mike Hibler committed
64 65 66 67 68
#
# Use the base version of openssl
#
.MAKEFLAGS+=	WITH_OPENSSL_BASE=yes

69 70 71 72 73
#
# This prevents any ports from trying to run interactively - some, like the
# net-snmp port, ask silly questions without this option.
#
.MAKEFLAGS+=	-DBATCH
74

75 76 77 78 79
#
# Specifically for rpm4 so it won't drag in tetex just to format the doc!
#
.MAKEFLAGS+=	WITHOUT_LATEX=yes

80
#
81 82
# XXX not really build dependencies, but these Emulab-specific ports need
# to get installed before any attempt to install the standard versions.
83
#
84
.if (${PORTVERSION} == "1.7" || ${PORTVERSION} == "2.0")
85
BUILD_DEPENDS=	\
86 87
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql${MYSQL_VER}
.elif (${PORTVERSION} == "4.0" || ${PORTVERSION} == "5.0" || \
88
       ${PORTVERSION} == "5.1" || ${PORTVERSION} == "6.0")
89
# back to a standard p5-DBD-mysql5x install
90
BUILD_DEPENDS=	\
91
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql${MYSQL_VER} \
92
	${LOCALBASE}/libexec/apache22/libphp${PHP_VER}.so:${PORTSDIR}/misc/emulab-php${PHP_VER}
93 94
.else
BUILD_DEPENDS=	\
95 96
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/misc/p5-DBD-mysql50-old \
	${LOCALBASE}/libexec/apache/libphp${PHP_VER}.so:${PORTSDIR}/misc/emulab-php${PHP_VER}
97 98
.endif

99 100 101
# XXX force our version of tcl early to prevent installing a newer version
BUILD_DEPENDS+=	tclsh8.4:${PORTSDIR}/lang/tcl84

102
LIB_DEPENDS= libgd.so:${PORTSDIR}/graphics/gd \
103
	mhash.2:${PORTSDIR}/security/mhash \
104
	mysqlclient:${PORTSDIR}/databases/mysql${MYSQL_VER}-client \
105
	snmp.4:${PORTSDIR}/misc/net-snmp4
106

107 108 109
.if ${OSMAJOR} >= 6
LIB_DEPENDS+= xerces-c.27:${PORTSDIR}/textproc/xerces-c2
.endif
Mike Hibler's avatar
Mike Hibler committed
110
.if ${OSMAJOR} >= 7
111
LIB_DEPENDS+= xmlrpc:${PORTSDIR}/net/xmlrpc-c
Mike Hibler's avatar
Mike Hibler committed
112
.endif
113

114 115 116 117 118 119 120 121 122
# no linuxthreads on amd64
# old libtool in ulsshxmlrpcpp causes shlibs to be whacked
.if ${OSARCH} == "i386"
.if ${OSMAJOR} < 8
LIB_DEPENDS+= lthread.[236]:${PORTSDIR}/devel/linuxthreads
.endif
LIB_DEPENDS+= ulsshxmlrpcpp.0:${PORTSDIR}/misc/ulsshxmlrpcpp
.endif

123 124 125 126 127 128 129 130 131 132 133 134 135
#
# Until/unless the pubsub Makefile is changed, we must include libelvin.
# This is because the pubsub libraries have to be built with ELVIN_COMPAT
# to talk to pubsub on ops, and building with compat means that the gateway
# will be built.  Building that requires elvin libraries...
#
.if defined(ELVIN_COMPAT)
LIB_DEPENDS+= vin4.2:${PORTSDIR}/misc/libelvin \
	pubsub.1:${PORTSDIR}/misc/emulab-pubsub-elvincompat
.else
LIB_DEPENDS+= pubsub.1:${PORTSDIR}/misc/emulab-pubsub
.endif

136 137 138 139
# We need the BUILD_DEPENDS above to wind up in the dependency list
RUN_DEPENDS:= ${BUILD_DEPENDS}

RUN_DEPENDS+=	\
140
	fping:${PORTSDIR}/net/fping \
141
	rsync:${PORTSDIR}/net/rsync \
142
	neato:${PORTSDIR}/graphics/graphviz \
143
        swish-e:${PORTSDIR}/www/swish-e \
144
	${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server \
145
	anytopnm:${PORTSDIR}/graphics/netpbm \
146
	otclsh:${PORTSDIR}/lang/otcl \
Mike Hibler's avatar
Mike Hibler committed
147
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/SNMP.pm:${PORTSDIR}/${P5SNMP_PORT} \
148
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/SNMP_Session.pm:${PORTSDIR}/net-mgmt/p5-SNMP_Session \
149
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/Telnet.pm:${PORTSDIR}/net/p5-Net-Telnet \
Mike Hibler's avatar
Mike Hibler committed
150
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/IP.pm:${PORTSDIR}/net-mgmt/p5-Net-IP \
151
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Math/BigInt.pm:${PORTSDIR}/math/p5-Math-BigInt \
152
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/BSD/Resource.pm:${PORTSDIR}/devel/p5-BSD-Resource \
153
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
154
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/MD5.pm:${PORTSDIR}/security/p5-MD5 \
Mike Hibler's avatar
Mike Hibler committed
155
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 \
156
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Expect.pm:${PORTSDIR}/lang/p5-Expect \
Mike Hibler's avatar
Mike Hibler committed
157
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/IO/Pty.pm:${PORTSDIR}/devel/p5-IO-Tty \
158
	rpm:${PORTSDIR}/archivers/rpm4 \
159
	xvcg:${PORTSDIR}/graphics/vcg \
160
	${LOCALBASE}/libexec/tftpd:${PORTSDIR}/misc/emulab-tftp-hpa \
161
	sudo:${PORTSDIR}/security/sudo \
162
	wget:${PORTSDIR}/ftp/wget \
163
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/Parser:${PORTSDIR}/textproc/p5-XML-Parser \
164
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/RPC/XML.pm:${PORTSDIR}/net/p5-RPC-XML \
Mike Hibler's avatar
Mike Hibler committed
165
	${LOCALBASE}/include/boost:${PORTSDIR}/${BOOST_PORT} \
166
	gmake:${PORTSDIR}/devel/gmake \
167
	git:${PORTSDIR}/devel/git \
168
        curl:${PORTSDIR}/ftp/curl \
169
	${PYTHON_PKGNAMEPREFIX}MySQLdb>0:${PORTSDIR}/databases/py-MySQLdb \
Leigh B Stoller's avatar
Leigh B Stoller committed
170
	mysqlhotcopy:${PORTSDIR}/databases/mysql${MYSQL_VER}-scripts \
171
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/JSON.pm:${PORTSDIR}/converters/p5-JSON
172

173
.if (${PORTVERSION} == "5.1" || ${PORTVERSION} == "6.0")
174 175 176 177 178 179
RUN_DEPENDS+=	\
	kmetis:${PORTSDIR}/math/metis4
.else
RUN_DEPENDS+=	\
	kmetis:${PORTSDIR}/math/metis
.endif
180

181
# apache related ports
182
.if (${PORTVERSION} == "4.0" || ${PORTVERSION} == "5.0" || \
183
     ${PORTVERSION} == "5.1" || ${PORTVERSION} == "6.0")
184 185 186 187 188 189 190 191 192 193
RUN_DEPENDS+=	\
	${LOCALBASE}/libexec/apache22/mod_ssl.so:${PORTSDIR}/${APACHE_PORT} \
	${LOCALBASE}/libexec/apache22/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi
.else
RUN_DEPENDS+=	\
	${LOCALBASE}/etc/apache/ssl.crl:${PORTSDIR}/${APACHE_PORT} \
	mod_auth_mysql>1:${PORTSDIR}/www/mod_auth_mysql
.endif

# m2crypto port
194 195 196 197 198
.if ${PORTVERSION} == "6.0"
# the egg is dead, long live the egg!
RUN_DEPENDS+=	\
	${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/misc/emulab-py-m2crypto-noegg
.elif (${PORTVERSION} == "3.0" || ${PORTVERSION} == "3.1" || \
199 200
     ${PORTVERSION} == "4.0" || ${PORTVERSION} == "5.0" || \
     ${PORTVERSION} == "5.1")
201 202 203 204 205 206 207 208 209
# must handle patching of m2crypto when the port is built
RUN_DEPENDS+=	\
	${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/misc/emulab-py-m2crypto
.else
# for older version we can patch the standard m2crypto once installed
RUN_DEPENDS+=	\
	${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/security/py-m2crypto
.endif

210
# dhcpd port
211
.if (${PORTVERSION} == "4.0" || ${PORTVERSION} == "5.0" || \
212
     ${PORTVERSION} == "5.1" || ${PORTVERSION} == "6.0")
213 214 215
RUN_DEPENDS+=	\
	dhcpd:${PORTSDIR}/net/isc-dhcp42-server
.elif (${PORTVERSION} == "3.1" || ${PORTVERSION} == "3.0")
216
RUN_DEPENDS+=	\
217
	dhcpd:${PORTSDIR}/net/isc-dhcp30-server
218
.elif ${PORTVERSION} == "2.1"
219
RUN_DEPENDS+=	\
220
	dhcpd:${PORTSDIR}/net/isc-dhcp3-server
221
.endif
222 223

# misc. old vs. new port stuff
224
.if (${PORTVERSION} == "4.0" || ${PORTVERSION} == "5.0" || \
225
     ${PORTVERSION} == "5.1" || ${PORTVERSION} == "6.0")
226 227 228 229 230 231 232 233 234 235 236 237
RUN_DEPENDS+=	\
	autoconf:${PORTSDIR}/devel/autoconf \
	libtool:${PORTSDIR}/devel/libtool
.else
RUN_DEPENDS+=	\
	autoconf-2.13:${PORTSDIR}/devel/autoconf213
.endif
.if (${PORTVERSION} == "1.7" || ${PORTVERSION} == "2.0")
# for old versions there used to be a problem with newer GD + older perl 
RUN_DEPENDS+=	\
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/GD.pm:${PORTSDIR}/misc/p5-GD-old
.else
Mike Hibler's avatar
Mike Hibler committed
238
RUN_DEPENDS+=	\
239
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/GD.pm:${PORTSDIR}/graphics/p5-GD \
240 241 242 243 244
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/RPC/Async.pm:${PORTSDIR}/misc/p5-RPC-Async \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Privileges/Drop.pm:${PORTSDIR}/misc/p5-Privileges-Drop \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/IO/EventMux.pm:${PORTSDIR}/misc/p5-IO-EventMux \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/IO/EventMux/Socket/MsgHdr.pm:${PORTSDIR}/misc/p5-IO-EventMux-Socket-MsgHdr
245
.if (${PORTVERSION} == "5.0" || ${PORTVERSION} == "5.1" || ${PORTVERSION} == "6.0")
246 247 248 249
# perl 5.12 and beyond wants this
RUN_DEPENDS+= \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Class/ISA.pm:${PORTSDIR}/devel/p5-Class-ISA
.endif
250 251
.endif

252 253 254 255 256 257 258 259 260
.if ${OSMAJOR} >= 10
# bind is no longer part of the base system
RUN_DEPENDS+= \
	${LOCALBASE}/sbin/rndc:${PORTSDIR}/dns/bind99
# include GCC for now to build Emulab SW (assign)
RUN_DEPENDS+= \
	${LOCALBASE}/bin/gcc46:${PORTSDIR}/lang/gcc46
.endif

Kirk Webb's avatar
 
Kirk Webb committed
261
.if ${OSMAJOR} >= 6
262
RUN_DEPENDS+= \
263
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI \
Kirk Webb's avatar
 
Kirk Webb committed
264
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/XML/Simple.pm:${PORTSDIR}/textproc/p5-XML-Simple \
265
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/XML/LibXML.pm:${PORTSDIR}/textproc/p5-XML-LibXML \
Leigh B. Stoller's avatar
Leigh B. Stoller committed
266 267
	swig:${PORTSDIR}/devel/swig13 \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Date/Parse.pm:${PORTSDIR}/devel/p5-TimeDate
268 269
.else
RUN_DEPENDS+= cvsup:${PORTSDIR}/net/cvsup-without-gui \
Mike Hibler's avatar
Mike Hibler committed
270 271
	${LOCALBASE}/libexec/apache/libphp${PHP_VER}.so:${PORTSDIR}/www/mod_php${PHP_VER} \
	${LOCALBASE}/include/php/ext/openssl/php_openssl.h:${PORTSDIR}/lang/php${PHP_VER}-extensions \
272 273
	${LOCALBASE}/lib/tcl8.4/sql1.0/libTclMySQL.so.1:${PORTSDIR}/databases/tcl-Mysql \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI-137 \
Kirk Webb's avatar
 
Kirk Webb committed
274 275
	swig1.1:${PORTSDIR}/devel/swig11 \
	${LOCALBASE}/sbin/named:${PORTSDIR}/dns/bind9
276
.endif
277

278 279 280 281 282
.if ${OSMAJOR} >= 8
RUN_DEPENDS+= \
	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/LWP/Protocol/https.pm:${PORTSDIR}/www/p5-LWP-Protocol-https
.endif

283 284
# make sure these get installed
RUN_DEPENDS+=	\
285
	${LOCALBASE}/libdata/xorg/libraries:${PORTSDIR}/x11/xorg-libraries \
286
        ${LOCALBASE}/bin/xauth:${PORTSDIR}/x11/xauth
287

288
USE_PERL5=	yes
289
USE_PYTHON=	yes
290 291 292 293 294

NO_BUILD=	yes

do-install:	# empty

295
NO_STAGE=	yes
296
.include <bsd.port.mk>
297 298 299 300 301 302 303

vars:
	@echo "PORTVERSION=$(PORTVERSION)"
	@echo ".MAKEFLAGS=$(.MAKEFLAGS)"
	@echo "BUILD_DEPENDS=$(BUILD_DEPENDS)"
	@echo "LIB_DEPENDS=$(LIB_DEPENDS)"
	@echo "RUN_DEPENDS=$(RUN_DEPENDS)"
304
	@echo "PERL_VER/ARCH=${PERL_VER}/${PERL_ARCH}"
305
	@echo "PYTHON_PKGNAMEPREFIX=${PYTHON_PKGNAMEPREFIX}"