blob: aa90c800ff4bc034372aa352dc1524a70d9ad918 (
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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
# Created by: John Marino <marino@FreeBSD.org>
# $FreeBSD$
PORTNAME= aws
PORTVERSION= 17.1.0
CATEGORIES= www
MAINTAINER= freebsd.contact@marino.st
COMMENT= Adacore Ada Web Server and framework
LICENSE= GPLv3 GPLv3RLE
LICENSE_COMB= multi
BUILD_DEPENDS= gprbuild:devel/gprbuild \
xmlada>=4.4:textproc/xmlada \
asis>=2013:lang/asis \
gnatpython>=20101207:devel/gnatpython
RUN_DEPENDS= xmlada>=4.4:textproc/xmlada
USES= ada:run gmake python shebangfix tar:bzip2
USE_GITHUB= yes
GH_ACCOUNT= AdaCore
GH_TAGNAME= ${PORTVERSION:R}
GH_TUPLE= AdaCore:templates-parser:${PORTVERSION:R}:tp/templates_parser
GNU_CONFIGURE= yes
NO_MTREE= yes
DOTBUILD= release
LINK_SSL= --
LINK_TLS= --
LINK_LDP= --
NAME_IP6= --
NAME_STD= --
BUILD_TYPE= release
ADDL_RPATH= ${LOCALBASE}/lib:${LOCALBASE}/lib/aws/native/relocatable
SHEBANG_FILES= tools/awsascb
OPTIONS_SINGLE= Secure-Socket-Layer
OPTIONS_DEFINE= IP6 DEBUG LDAP SHARED DOCS
OPTIONS_DEFAULT= SSL SHARED
OPTIONS_SUB= yes
NO_OPTIONS_SORT= yes
DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
OPTIONS_SINGLE_Secure-Socket-Layer= SSL GNUTLS
SHARED_DESC= Build shared libraries in addition to static ones
IP6_DESC= Support IPv6 instead of IPv4
SSL_USES= ssl
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
LDAP_USE= OPENLDAP=yes
CONF_ARGS= PROCESSORS=${MAKE_JOBS_NUMBER}
CONF_ARGS+= GCC=ada
CONF_ARGS+= PYTHON=python${PYTHON_VER}
CONF_ARGS+= XMLADA=true
CONF_ARGS+= PRJ_BUILD=${DOTBUILD}
CONF_ARGS+= prefix=${PREFIX}
CONF_ARGS+= ZPATH=/usr/lib
CONF_ARGS+= ZLIB=true
CONF_ARGS+= ASIS=true
CONF_ARGS+= DEFAULT_LIBRARY_TYPE=static
.include <bsd.port.options.mk>
###################
## SSL Support ##
###################
.if ${PORT_OPTIONS:MSSL}
CONF_ARGS+= SOCKET=openssl
CONF_ARGS+= LPATH=${OPENSSLLIB}
LINK_SSL=
.else
# it's not SSL so it must be GNUTLS
CONF_ARGS+= LPATH=${PREFIX}/lib
CONF_ARGS+= SOCKET=gnutls
LINK_TLS=
.endif
####################
## LDAP Support ##
####################
.if ${PORT_OPTIONS:MLDAP}
CONF_ARGS+= LDAP=true
LINK_LDP=
.endif
####################
## IPv6 Support ##
####################
.if ${PORT_OPTIONS:MIP6}
CONF_ARGS+= IPv6=true
NAME_IP4= --
NAME_IP6=
.endif
#####################
## Debug Support ##
#####################
.if ${PORT_OPTIONS:MDEBUG}
CONF_ARGS+= DEBUG=true
BUILD_TYPE= debug
.endif
##############################
## Shared Runtime Library ##
##############################
.if ${PORT_OPTIONS:MSHARED}
CONF_ARGS+= ENABLE_SHARED=true
.else
CONF_ARGS+= ENABLE_SHARED=false
.endif
post-patch:
@${REINPLACE_CMD} \
-e 's|@ADDITIONAL_RPATH@|${ADDL_RPATH}|' \
-e 's|@PREFIX@|${LOCALBASE}|g' \
${WRKSRC}/aws.gpr \
${WRKSRC}/src/src.gpr \
${WRKSRC}/include/include.gpr
@${REINPLACE_CMD} -e 's|latexpdf||' ${WRKSRC}/Makefile
do-configure:
(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
${MAKE_CMD} setup ${CONF_ARGS})
do-build:
# We cannot use a redefined ALL_TARGET because MAKE_JOBS_SAFE is set
# for PROCESSORS, but that also sets -j for gmake which breaks build
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MAKE_CMD} ${MAKE_ARGS} build
do-build-DOCS-on:
cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} \
${MAKE_CMD} ${MAKE_ARGS} html
test:
.if exists(${LOCALBASE}/bin/awsres)
@cd ${WRKSRC}/regtests && ${SETENV} ${MAKE_ENV} TIMEOUT=75 \
python${PYTHON_VER} testsuite.py
.else
@${ECHO} "AWS has to be installed before testing"
.endif
post-install:
${RM} -r ${STAGEDIR}${PREFIX}/share/gpr/manifests
${RM} ${STAGEDIR}${PREFIX}/include/aws.relocatable/Makefile
${RM} ${STAGEDIR}${PREFIX}/include/aws/Makefile
${MKDIR} ${STAGEDIR}${PREFIX}/lib/gnat \
${STAGEDIR}${PREFIX}/share/gps/plug-ins
${CAT} ${FILESDIR}/aws.gpr.in | ${SED} -e 's|@PREFIX@|${PREFIX}|g' \
-e 's|@SSL@|${LINK_SSL}|g' -e 's|@TLS@|${LINK_TLS}|g' \
-e 's|@LDP@|${LINK_LDP}|g' -e 's|@IP4@|${NAME_IP4}|g' \
-e 's|@IP6@|${NAME_IP6}|g' -e 's|@STD@|${NAME_STD}|g' \
> ${STAGEDIR}${PREFIX}/lib/gnat/aws.gpr
cd ${WRKSRC}/gps && ${INSTALL_DATA} *.xml aws.py \
${STAGEDIR}${PREFIX}/share/gps/plug-ins
.include <bsd.port.mk>
|