aboutsummaryrefslogtreecommitdiff
path: root/www/cas/Makefile
blob: 93943f51cf7a2c448e166192eecd6f994e3f8806 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Created by: Alexander Lunkov <lunkov@gmail.com>
# $FreeBSD$

PORTNAME=	cas
PORTVERSION=	3.5.6
PORTREVISION=	3
CATEGORIES=	www devel
MASTER_SITES=	http://cas.havoc.ru/download/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	C++ Application Server, version 2

BROKEN=		Fails to build

LIB_DEPENDS=	libexpat.so:${PORTSDIR}/textproc/expat2 \
		libpcre.so:${PORTSDIR}/devel/pcre       \
		libctpp2.so:${PORTSDIR}/textproc/ctpp2

USES=		cmake iconv
USE_LDCONFIG=	yes

OPTIONS_DEFINE=	DEBUG_MODE               \
		ENABLE_OPTIMIZATION      \
		BUILD_APACHE2X_MODULE    \
		BUILD_CURL_XMLRPC_CLIENT \
		INSTALL_EXAMPLE_MODULES  \
		INSTALL_CAS_LIBRARY      \
		INSTALL_CAS_MODULES      \
		INSTALL_CAS_HEADERS      \
		INSTALL_CAS_CONFIGS      \
		INSTALL_CAS_BINARIES     \
		INSTALL_CAS_DATA

OPTIONS_DEFAULT=ENABLE_OPTIMIZATION      \
		BUILD_APACHE2X_MODULE    \
		BUILD_CURL_XMLRPC_CLIENT \
		INSTALL_CAS_LIBRARY      \
		INSTALL_CAS_MODULES      \
		INSTALL_CAS_HEADERS      \
		INSTALL_CAS_CONFIGS      \
		INSTALL_CAS_BINARIES     \
		INSTALL_CAS_DATA

DEBUG_MODE_DESC=		Enable debug output
ENABLE_OPTIMIZATION_DESC=	Enable optimization
BUILD_APACHE2X_MODULE_DESC=	Build Apache 2.x module
BUILD_CURL_XMLRPC_CLIENT_DESC=	Build cURL-based XMLRPC client
INSTALL_EXAMPLE_MODULES_DESC= 	Install example modules
INSTALL_CAS_LIBRARY_DESC=	Install CAS library (libcas)
INSTALL_CAS_MODULES_DESC=	Install CAS modules
INSTALL_CAS_HEADERS_DESC=	Install CAS headers
INSTALL_CAS_CONFIGS_DESC=	Install CAS configuration files
INSTALL_CAS_BINARIES_DESC=	Install CAS binaries
INSTALL_CAS_DATA_DESC=		Install CAS data files

PLIST_SUB+=	PORTVERSION=${PORTVERSION}

NO_STAGE=	yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDEBUG_MODE}
CMAKE_ARGS+=	-DDEBUG_MODE=ON
.else
CMAKE_ARGS+=	-DDEBUG_MODE=OFF
.endif

.if ${PORT_OPTIONS:MENABLE_OPTIMIZATION}
CMAKE_ARGS+=	-DENABLE_OPTIMIZATION=ON
.else
CMAKE_ARGS+=	-DENABLE_OPTIMIZATION=OFF
.endif

CMAKE_ARGS+=	-DBUILD_APACHE13_MODULE=OFF

.if ${PORT_OPTIONS:MBUILD_APACHE2X_MODULE}
USE_APACHE=	22
CMAKE_ARGS+=	-DBUILD_APACHE2X_MODULE=ON
PLIST_SUB+=	APACHE2X_MODULE=""
.else
CMAKE_ARGS+=	-DBUILD_APACHE2X_MODULE=OFF
PLIST_SUB+=	APACHE2X_MODULE="@comment "
.endif

.if ${PORT_OPTIONS:MBUILD_CURL_XMLRPC_CLIENT}
LIB_DEPENDS+=	libcurl.so:${PORTSDIR}/ftp/curl
CMAKE_ARGS+=	-DBUILD_CURL_XMLRPC_CLIENT=ON
PLIST_SUB+=	CURL_XMLRPC_CLIENT=""
.else
CMAKE_ARGS+=	-DBUILD_CURL_XMLRPC_CLIENT=OFF
PLIST_SUB+=	CURL_XMLRPC_CLIENT="@comment "
.endif

.if ${PORT_OPTIONS:MINSTALL_EXAMPLE_MODULES}
CMAKE_ARGS+=	-DINSTALL_EXAMPLE_MODULES=ON
PLIST_SUB+=	EXAMPLE_MODULES=""
.else
CMAKE_ARGS+=	-DINSTALL_EXAMPLE_MODULES=OFF
PLIST_SUB+=	EXAMPLE_MODULES="@comment "
.endif

.if ${PORT_OPTIONS:MINSTALL_CAS_LIBRARY}
CMAKE_ARGS+=	-DINSTALL_CAS_LIBRARY=ON
PLIST_SUB+=	CAS_LIBRARY=""
.else
CMAKE_ARGS+=	-DINSTALL_CAS_LIBRARY=OFF
PLIST_SUB+=	CAS_LIBRARY="@comment "
.endif

.if ${PORT_OPTIONS:MINSTALL_CAS_MODULES}
CMAKE_ARGS+=	-DINSTALL_CAS_MODULES=ON
PLIST_SUB+=	CAS_MODULES=""
.else
CMAKE_ARGS+=	-DINSTALL_CAS_MODULES=OFF
PLIST_SUB+=	CAS_MODULES="@comment "
.endif

.if ${PORT_OPTIONS:MINSTALL_CAS_HEADERS}
CMAKE_ARGS+=	-DINSTALL_CAS_HEADERS=ON
PLIST_SUB+=	CAS_HEADERS=""
.else
CMAKE_ARGS+=	-DINSTALL_CAS_HEADERS=OFF
PLIST_SUB+=	CAS_HEADERS="@comment "
.endif

.if ${PORT_OPTIONS:MINSTALL_CAS_CONFIGS}
CMAKE_ARGS+=	-DINSTALL_CAS_CONFIGS=ON
PLIST_SUB+=	CAS_CONFIGS=""
.else
CMAKE_ARGS+=	-DINSTALL_CAS_CONFIGS=OFF
PLIST_SUB+=	CAS_CONFIGS="@comment "
.endif

.if ${PORT_OPTIONS:MINSTALL_CAS_BINARIES}
CMAKE_ARGS+=	-DINSTALL_CAS_BINARIES=ON
PLIST_SUB+=	CAS_BINARIES=""
.else
CMAKE_ARGS+=	-DINSTALL_CAS_BINARIES=OFF
PLIST_SUB+=	CAS_BINARIES="@comment "
.endif

.if ${PORT_OPTIONS:MINSTALL_CAS_DATA}
CMAKE_ARGS+=	-DINSTALL_CAS_DATA=ON
PLIST_SUB+=	CAS_DATA=""
.else
CMAKE_ARGS+=	-DINSTALL_CAS_DATA=OFF
PLIST_SUB+=	CAS_DATA="@comment "
.endif

.include <bsd.port.mk>