aboutsummaryrefslogtreecommitdiff
path: root/french/homard/Makefile
blob: 63c64456299674f61c63b382229950906bbb5499 (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
PORTNAME=	homard
DISTVERSION=	11.12-aster2
PORTREVISION=	4
CATEGORIES=	french cad linux

MAINTAINER=	thierry@FreeBSD.org
COMMENT=	Refinement and de-refinement mesh tool
WWW=		https://www.code-aster.org/outils/homard

# Converted from RESTRICTED
LICENSE=	homard
LICENSE_NAME=	homard
LICENSE_TEXT=	The free downloading of HOMARD software is only allowed for coupling\
		with Code_Aster. For any other use, a license agreement is requested.\
		Please contact HOMARD project: <homard@edf.fr>.
LICENSE_PERMS=	auto-accept

ONLY_FOR_ARCHS=	amd64 i386

BUILD_DEPENDS=	${LOCALBASE}/aster/${VER}/bin/aster:french/aster
RUN_DEPENDS=	${LOCALBASE}/bin/bash:shells/bash		\
		${LOCALBASE}/aster/${VER}/bin/aster:french/aster

USES=		linux python shebangfix

SHEBANG_FILES=	${WRKSRC}/ASTER_HOMARD/homard	\
		${WRKSRC}/homard_base ${WRKSRC}/setup_homard.py
REINPLACE_ARGS=	-i ""

WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:R}

LHOMARDDIR?=	apps/${PORTNAME}
VER=		${ASTER_VER:R}
ASTER_TOOLS=	${LOCALBASE}/aster/outils
HOMARDDIR=	${PREFIX}/${LHOMARDDIR}
AHPY=		aster_homard_py
HOMARDSCRIPT=	${PORTNAME}_base
# This name is requested to run aster's make test
#HOMARDPG=	${PORTNAME:tu}_V${PORTVERSION:R}.out
HOMARDPG=	${PORTNAME:tu}_V11.10.out

DOCS=		A_Lire.txt Readme.txt

PLIST_SUB=	HOMARDDIR=${LHOMARDDIR} AHPY=${LHOMARDDIR}/${AHPY}			\
		UNAMES=${OPSYS} HOMARDPG=${HOMARDPG} ASTER_TOOLS=${ASTER_TOOLS}

OPTIONS_DEFINE=	DOCS

pre-configure:
.for sc in ${HOMARDSCRIPT}
	${REINPLACE_CMD} -e "s|%%HOMARDDIR%%|${PREFIX}/apps/${OPSYS}|"	\
		${WRKSRC}/${sc}
.endfor

do-build:
	${BRANDELF} -t Linux ${WRKSRC}/Linux/${HOMARDPG}

do-install:
	${MKDIR} ${STAGEDIR}${HOMARDDIR} ${STAGEDIR}${PREFIX}/apps/${OPSYS}
	${INSTALL_PROGRAM} ${WRKSRC}/Linux/${HOMARDPG}	\
		${STAGEDIR}${PREFIX}/apps/${OPSYS}
	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}_base	\
		${STAGEDIR}${HOMARDDIR}/${PORTNAME}
	${CP} -R ${WRKSRC}/ASTER_HOMARD/${AHPY} ${STAGEDIR}${HOMARDDIR}
	(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py	\
		-d ${PREFIX} -f ${HOMARDDIR:S|${PREFIX}/||})
	(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py	\
		-d ${PREFIX} -f ${HOMARDDIR:S|${PREFIX}/||})
	${MKDIR} ${STAGEDIR}${ASTER_TOOLS}/
	${LN} -fs ${HOMARDDIR}/homard ${STAGEDIR}${ASTER_TOOLS}/
	${LN} -fs ${HOMARDDIR}/aster_homard_py ${STAGEDIR}${ASTER_TOOLS}/
	${MKDIR} ${STAGEDIR}${DOCSDIR}
.for doc in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
.endfor

.include "${.CURDIR}/../../french/aster/bsd.aster.mk"
.include <bsd.port.mk>