aboutsummaryrefslogtreecommitdiffstats
path: root/math/kash3/Makefile
blob: 5b24daa7a3cd760c259493811dc89c3722b8a155 (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
# New ports collection makefile for:    kash3
# Date created:     2006-02-26
# Whom:         Nicola Vitale   <nivit@email.it>
#
# $FreeBSD$
#

PORTNAME=   kash3
PORTVERSION=    2008.07.31
CATEGORIES= math
MASTER_SITES=   ftp://ftp.math.tu-berlin.de/pub/algebra/Kant/Kash_3/ \
        http://nivi.interfree.it/distfiles/${PORTNAME}/
DISTFILES=  ${PORTNAME:U}-${ELFTYPE}-i686-${PORTVERSION:S|.|-|g}.tar.bz2

MAINTAINER= nivit@FreeBSD.org
COMMENT=    A computer algebra system for computing in algebraic number fields

RUN_DEPENDS=    curl:${PORTSDIR}/ftp/curl

NO_CDROM=   not for commercial distribution or use
NO_BUILD=   yes

OPTIONS=    OPTLIB  "Install optional functions library" on

PLIST_SUB=  OPTLIB=${OPTLIB}

USE_BZIP2=  yes
USE_LINUX=  yes

SUB_FILES=  ${PORTNAME}
WRKSRC= ${WRKDIR}/${PORTNAME:U}-${ELFTYPE}-i686-${PORTVERSION:S|.|-|g}


FIND_DATA=  -type f -mindepth 1 -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
FIND_DIRS=  -type d -exec ${MKDIR} ${DATADIR}/{} \;
FIND_HERE=  data gap lib

.if !defined(NOPORTDOCS)
FIND_HERE+= html pdf
.endif

LN_OPTS=    -sf
ELFTYPE=    Linux

.include <bsd.port.pre.mk>

.if defined(WITH_OPTLIB)
DISTFILES+= ${PORTNAME:U}-lib-archindep-${PORTVERSION:S|.|-|g}.tar.bz2
OPTLIB=
.else
OPTLIB= "@comment "
.endif

do-install:
    ${MKDIR} ${DATADIR};
.if defined(WITH_OPTLIB)
    cd ${WRKDIR}/${PORTNAME:U}-lib-archindep-${PORTVERSION:S|.|-|g}; \
    ${COPYTREE_SHARE} . ${DATADIR}
.endif
    cd ${WRKSRC}; \
    ${FIND} ${FIND_HERE} ${FIND_DIRS}; \
    ${FIND} ${FIND_HERE} ${FIND_DATA}; \
    ${BRANDELF} -t ${ELFTYPE} ${PORTNAME}; \
    ${INSTALL_PROGRAM} ${PORTNAME} ${DATADIR}/${PORTNAME};
    ${INSTALL_SCRIPT} ${WRKDIR}/${SUB_FILES} ${PREFIX}/bin/${PORTNAME}
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}; \
    ${MV} ${DATADIR}/html ${DATADIR}/pdf ${DOCSDIR}
.endif

.include <bsd.port.post.mk>