aboutsummaryrefslogtreecommitdiffstats
path: root/math/giacxcas/Makefile
blob: 44f3fb6794144e91c4699831eb3d64d3a2d5f206 (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
# New ports collection makefile for:    giacxcas
# Date created:     2010-08-26
# Whom:         Frederic Han <han@math.jussieu.fr>
#
# $FreeBSD$
#

PORTNAME=   giacxcas
PORTVERSION=    0.9.3
CATEGORIES= math
MASTER_SITES=   ftp://ftp-fourier.ujf-grenoble.fr/linux/xcas/freebsd/ \
        http://people.math.jussieu.fr/~han/xcas/sources/
DISTFILES=  fltk-giac.tar.gz CoCoALib.tgz giac-${PORTVERSION}.tar.gz
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= han@math.jussieu.fr
COMMENT=    Computer algebra system by Bernard Parisse

BUILD_DEPENDS=  latex:${PORTSDIR}/print/teTeX-base \
        dvips:${PORTSDIR}/print/dvipsk-tetex \
        ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \
        ${LOCALBASE}/lib/libntl.a:${PORTSDIR}/math/ntl
LIB_DEPENDS=    gmp:${PORTSDIR}/math/gmp \
        pari:${PORTSDIR}/math/pari \
        mpfr:${PORTSDIR}/math/mpfr \
        gsl:${PORTSDIR}/math/gsl
RUN_DEPENDS=    texmacs:${PORTSDIR}/editors/texmacs

NO_CDROM=   The french documentation is for non commercial only use

GNU_CONFIGURE=  yes
USE_GMAKE=  yes
USE_GL=     gl
USE_XORG=   xcursor xft xi
USE_LDCONFIG=   yes
USE_GETTEXT=    yes
MAKE_JOBS_SAFE= yes

CPPFLAGS+=  -I${FLTKDEV-GIAC} -I${COCOALIB-GIAC}/include -I${LOCALBASE}/include
LDFLAGS+=   -L${FLTKDEV-GIAC}/lib -L${COCOALIB-GIAC}/lib -L${LOCALBASE}/lib
CXXFLAGS+=  -I${LOCALBASE}/include

WRKSRC=     ${WRKDIR}/giac-${PORTVERSION}
FLTKDEV-GIAC=   ${WRKDIR}/fltk-1.3.0
COCOALIB-GIAC=  ${WRKDIR}/CoCoALib-0.9937

INFO=       giac_es giac_us

post-patch:
    ${REINPLACE_CMD} -e 's|make |${GMAKE} |g' `${GREP} -Rl 'make ' ${COCOALIB-GIAC}`;
    ${REINPLACE_CMD} -e 's|/bin/bash|${LOCALBASE}/bin/bash|g' `${GREP} -Rl '/bin/bash' ${COCOALIB-GIAC}`;
    ${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|' \
        ${WRKSRC}/xcas.applications ${WRKSRC}/xcas.desktop

pre-configure:
    cd ${COCOALIB-GIAC} && \
    ./configure --with-libgmp=${LOCALBASE}/lib/libgmp.a && \
    ${GMAKE} library && \
    cd ${FLTKDEV-GIAC} && \
    ./configure --prefix=${FLTKDEV-GIAC} \
    && ${MAKE}

.include <bsd.port.mk>