blob: b5c91eeb81fbc5de5f52c49003bd982fa5e88e61 (
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
# New ports collection makefile for: ASTK
# Date created: Thu Jul 09 2003
# Whom: thierry@pompo.net
#
# $FreeBSD$
#
PORTNAME= astk
DISTVERSIONPREFIX= full-src-
DISTVERSION= 1.5.5-1
DISTVERSIONSUFFIX= .noarch
CATEGORIES= cad
MASTER_SITES= http://www.code-aster.org/V2/UPLOAD/DOC/Telechargement/
.if !defined(CLIENT_SEUL)
PKGNAMESUFFIX= -serveur
.else
PKGNAMESUFFIX= -client
.endif
DISTNAME= aster-${DISTVERSIONPREFIX}${ASTER_DISTVERSION}${DISTVERSIONSUFFIX}
MAINTAINER= ports@FreeBSD.org
COMMENT?= Graphical interface for Code_Aster (server side)
#-----------------------------------------------------------------------
# You may define these options:
#
# - WITH_ZSH or WITH_BASH or WITH_KSH: select a shell among
# zsh (default), bash or ksh;
# - WITH_ED: select an editor accepting '-display' (e.g. gvim, nedit);
# - WITH_PBS: PBS (batch scheduler) support is experimental.
#
#-----------------------------------------------------------------------
# There exists a "logical" RUN_DEPENDS towards french/aster and french/eficas
# for the server part, but it is not set to avoid circular dependences.
RUN_DEPENDS+= ${SHELL_INSTALL_ASTER}:${PORTSDIR}/shells/${SHIADEP}
USE_PYTHON= yes
NO_BUILD= yes
REINPLACE_ARGS= -i ""
ASTER_DISTVERSION= ${ASTER_VER}-2
EXTRACT_WRKSRC= ${WRKDIR}/aster-${DISTVERSIONPREFIX}${ASTER_DISTVERSION:S/-/./:R}/SRC
PKGMESSAGE= ${WRKDIR}/pkg-message
LINSTDIR= aster/ASTK
inst_dir= ${PREFIX}/${LINSTDIR}
aster_dir= ${LOCALBASE}/aster/${vaster}
S_SCRIPTS= bin/as_exec bin/as_run bin/as_serv bin/as_exec_special lib/sub_script
S_PYLIBS= alamain.py as_config.py as_timer.py as_devtools.py user_filter.py
C_SCRIPTS= bin/astk bin/bsf
tools_dir= ${aster_dir}/outils
conf_dir= ${WRKSRC}/lib/ASTK/astkrc
.include <bsd.port.pre.mk>
.if !defined(CLIENT_SEUL)
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}/ASTK_SERV
PATCHDIR= ${MASTERDIR}/files
PLIST_SUB= ASTKDIR=${LINSTDIR}/ASTK_SERV SERV="" CLIENT="@comment " \
vaster=${vaster}
PATCH2RM= conf/config bin/as_exec bin/as_serv lib/as_config.py \
lib/as_exec.py conf/aster_profile.sh lib/as_system.py
. if exists(${LOCALBASE}/sbin/pbs_server)
WITH_PBS= yes
. endif
. if defined(WITH_PBS)
RUN_DEPENDS+= qsub:${PORTSDIR}/sysutils/torque
. endif
.else
RUN_DEPENDS+= xterm:${PORTSDIR}/x11/xterm \
wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${SHORT_TK_VER}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}/ASTK_CLIENT
PATCHDIR= ${MASTERDIR}/files.client
PLIST_SUB= ASTKDIR=${LINSTDIR}/ASTK_CLIENT SERV="@comment " CLIENT="" vaster="" \
BWidget_DIR=${LINSTDIR}/ASTK_CLIENT/share/BWidget-${BWidget_VER}
PATCH2RM= lib/ASTK/init.tcl lib/ASTK/astkrc/outils share/tkselecteur.tcl
.endif
FILESDIR= ${PATCHDIR}
SLAVEDIRS= cad/astk-client
TK_VER?= 8.4
TCL_VER?= ${TK_VER}
SHORT_TK_VER= ${TK_VER:S/.//}
BWidget_VER= 1.7.0
ASTER_VER= 9.2.0
vaster= STA${ASTER_VER:R}
GIBI= gibi2003
.if defined(WITH_ZSH)
SHIA= zsh
.elif defined(WITH_BASH)
SHIA= bash
.elif defined(WITH_KSH)
SHIA= ksh93
.elif exists(${LOCALBASE}/bin/zsh)
SHIA= zsh
.elif exists(${LOCALBASE}/bin/bash)
SHIA= bash
.elif exists(${LOCALBASE}/bin/ksh93)
SHIA= ksh93
.else
SHIA= zsh
.endif
SHIADEP= ${SHIA}
.if !defined(WITH_ED)
. if exists(${LOCALBASE}/bin/nedit)
WITH_ED= nedit
RUN_DEPENDS+= ${LOCALBASE}/bin/nedit:${PORTSDIR}/editors/nedit
. elif exists(${LOCALBASE}/bin/gvim)
WITH_ED= gvim
RUN_DEPENDS+= ${LOCALBASE}/bin/gvim:${PORTSDIR}/editors/vim
. elif exists(${LOCALBASE}/bin/emacs)
WITH_ED= emacs
RUN_DEPENDS+= ${LOCALBASE}/bin/emacs:${PORTSDIR}/editors/emacs
. elif exists(${LOCALBASE}/bin/xemacs)
WITH_ED= xemacs
RUN_DEPENDS+= ${LOCALBASE}/bin/xemacs:${PORTSDIR}/editors/xemacs
. elif exists(${LOCALBASE}/bin/gedit)
WITH_ED= gedit
RUN_DEPENDS+= ${LOCALBASE}/bin/gedit:${PORTSDIR}/editors/gedit
. elif exists(${LOCALBASE}/bin/kwrite)
WITH_ED= kwrite
RUN_DEPENDS+= ${LOCALBASE}/bin/kwrite:${PORTSDIR}/x11/kdebase3
. elif exists(${LOCALBASE}/bin/xedit)
WITH_ED= xedit
RUN_DEPENDS+= ${LOCALBASE}/bin/xedit:${PORTSDIR}/x11/xedit
. else
WITH_ED= vi
. endif
.endif
unamesm= ${OPSYS} ${ARCH}
v_ifdef= ${OPSYS:U}
SHELL_INSTALL_ASTER= ${LOCALBASE}/bin/${SHIA}
.if !defined(PACKAGE_BUILDING)
SERVER_NAME!= ${UNAME} -n
HOST_NAME!= /bin/hostname -s
DOMAIN_NAME= ${SERVER_NAME:S|${HOST_NAME}.||}
.else
SERVER_NAME= put.your.fdqn
HOST_NAME= this-hostname
DOMAIN_NAME= your.domain-name
.endif
.if defined(LANG) && ${LANG:Mfr*} != ""
ASTK_LANG= FR
.else
ASTK_LANG= ENG
.endif
post-extract:
(cd ${WRKDIR} && \
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_WRKSRC}/${PORTNAME}-${DISTVERSION}${DISTVERSIONSUFFIX}${EXTRACT_SUFX} ${EXTRACT_AFTER_ARGS})
pre-configure:
${RM} ${PATCH2RM:C|^|${WRKSRC}/|:C|$|.orig|}
do-configure:
.if !defined(CLIENT_SEUL)
. if ${SHIA} == "zsh"
${REINPLACE_CMD} -e 's|#set -o SH_WORD_SPLIT|set -o SH_WORD_SPLIT|' \
${WRKSRC}/bin/as_serv
. endif
${REINPLACE_CMD} -e 's#?PYTHON_EXE?#${PYTHON_CMD}#' \
-e 's#?MAXCMDLEN?#16384#' ${WRKSRC}/bin/as_run
. for scripts in ${S_SCRIPTS}
${REINPLACE_CMD} -e "s#?SHELL_EXECUTION?#${SHELL_INSTALL_ASTER}#" \
-e "s#?ASTER_ROOT?#${PREFIX}/aster#;s#?HOME_ASTK?#${inst_dir}#" \
${WRKSRC}/${scripts}
. endfor
${REINPLACE_CMD} -e "s#?IFDEF?#${v_ifdef}#g" \
-e "s#?ASTER_ROOT?#${LOCALBASE}/aster#g" \
-e "s#?EDITOR?#${WITH_ED}#g" \
-e "s#?NODE?#${HOST_NAME}#" \
-e "s#?ASTER_VERSION?#${ASTER_VER}#" \
-e "s#?vaster?#${vaster}#" \
-e "s#LOCALBASE#${LOCALBASE}#" \
-e "s#%%v_ifdef%%#${v_ifdef}#" ${WRKSRC}/conf/config
.for libs in ${S_PYLIBS}
${REINPLACE_CMD} -e "s#/opt/aster/NEW9#${aster_dir}#" \
-e "s#/opt/aster#${aster_dir}#" \
-e "s#/opt/aster/ASTK#${inst_dir}#" ${WRKSRC}/lib/${libs}
. endfor
. if defined(WITH_PBS)
${REINPLACE_CMD} -e "s|batch : non|batch : oui|" \
${WRKSRC}/conf/config
. endif
${REINPLACE_CMD} -e 's|?HOME_PYTHON?|${PYTHONBASE}|' \
-e 's|?ASTER_ROOT?|${aster_dir}|' \
-e 's|?HOME_MED?|${LOCALBASE}|' \
-e 's|?HOME_HDF?|${LOCALBASE}|' ${WRKSRC}/conf/aster_profile.sh
.else
# CLIENT_SEUL
. for scripts in ${C_SCRIPTS}
${REINPLACE_CMD} -e "s#?SHELL_EXECUTION?#${SHELL_INSTALL_ASTER}#" \
-e "s#?HOME_ASTK?#${inst_dir}#;s#?ASTER_ROOT?#${PREFIX}/aster#" \
-e "s#?WISH_EXE?#wish${TK_VER}#" ${WRKSRC}/${scripts}
. endfor
${REINPLACE_CMD} -e "s#GIBI#${GIBI}#" \
-e "s#?vaster?#${vaster}#" \
-e "s#?TOOLS_DIR?#${tools_dir}#" ${conf_dir}/outils
${REINPLACE_CMD} -e "s#?HOME_ASTK?#${inst_dir}#" \
-e "s#?XTERM?#${LOCALBASE}/bin/xterm#" \
-e "s#?FULL_SERVER_NAME?#${SERVER_NAME}#" \
-e "s#?SERVER_NAME?#${HOST_NAME}#" \
-e "s#?ASTER_ROOT?#${PREFIX}/aster#" \
-e "s#?EDITOR?#${WITH_ED}#" ${conf_dir}/config_serveurs
${REINPLACE_CMD} -e "s#?XTERM?#${LOCALBASE}/bin/xterm#" \
-e "s#?ASTER_VERSION?#${ASTER_VER}#" \
-e "s#langue : ENG#langue : ${ASTK_LANG}#" \
-e "s#?DOMAIN_NAME?#${DOMAIN_NAME}#" \
-e "s#?EDITOR?#${WITH_ED}#" ${conf_dir}/prefs
${REINPLACE_CMD} -e "s#%%LOCALBASE%%#${LOCALBASE}#g" \
${WRKSRC}/share/tkselecteur.tcl
${REINPLACE_CMD} -e "s#%%unamesm%%#${unamesm}#" \
${WRKSRC}/lib/ASTK/init.tcl
.endif
do-install:
${MKDIR} ${inst_dir}
${CP} -R ${WRKSRC} ${inst_dir}
@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${inst_dir}/ASTK_SERV/lib
@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${inst_dir}/ASTK_SERV/lib
post-install:
@${ECHO_MSG}
@${SED} -e "s#%%inst_dir%%#${inst_dir}#;s#%%tools_dir%%#${tools_dir}#" \
${FILESDIR}/pkg-message.in > ${PKGMESSAGE}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
.include <bsd.port.post.mk>
|