aboutsummaryrefslogtreecommitdiffstats
path: root/science/medit/Makefile
blob: 54ff0cf3addc79728ba282c08aeb172badff4db6 (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
# New ports collection makefile for:    Medit
# Date created:         Sep 24, 2006
# Whom:             Thierry Thomas <thierry@pompo.net>
#
# $FreeBSD$

PORTNAME=   medit
PORTVERSION=    2011.03.06
CATEGORIES= science graphics
MASTER_SITES=   http://www.ann.jussieu.fr/~frey/ftp/archives/
EXTRACT_SUFX=   .tgz
DISTFILES=  ${SOURCETARB} ${LIBTARBALL}
EXTRACT_ONLY=   ${SOURCETARB}

MAINTAINER= thierry@FreeBSD.org
COMMENT=    Interactive meshes visualization

USE_XORG=   x11 xmu xext
USE_GL=     glut
USE_GMAKE=  yes
MAKEFILE=   makefile
ALL_TARGET= ${OPSYS}
MAKE_ENV=   WRKSRC="${WRKSRC}" ARCHI=${OPSYS} ARCH=${ARCH} OSREL=${OSREL}
NO_WRKSUBDIR=   yes

# medit-2011.03.06 does not compile with library.2011.03.06
#LIBVERSION=    ${PORTVERSION}
LIBVERSION= 2010.05.20
SOURCETARB= ${PORTNAME}.${PORTVERSION}${EXTRACT_SUFX}
LIBTARBALL= library.${LIBVERSION}${EXTRACT_SUFX}

PLIST_FILES=    bin/${PORTNAME}

. if !defined(NOPORTEXAMPLES)
DISTFILES+= meshes.tar.gz
EXTRACT_ONLY+=  meshes.tar.gz
MESHES=     DEFAULT.medit ozark.gis part.bb part.mesh thepart.mesh
PLIST_FILES+=   ${MESHES:S|^|%%EXAMPLESDIR%%/|}
PLIST_DIRS= %%EXAMPLESDIR%%
. endif

post-extract:
    cd ${WRKDIR} && \
    ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${LIBTARBALL} ${EXTRACT_AFTER_ARGS} --exclude ${MAKEFILE}

pre-build:
    ${MKDIR} ${WRKSRC}/bin/${ARCH}/${OSREL}

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${PREFIX}/bin
.if !defined(NOPORTEXAMPLES)
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${MESHES:S|^|${WRKSRC}/INRIA.dir/|} ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>