source: trunk/dports/math/pari/Portfile @ 91371

Last change on this file since 91371 was 91371, checked in by jeremyhu@…, 8 years ago

pari: Tiger build fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 91371 2012-03-30 23:42:30Z jeremyhu@macports.org $
3
4PortSystem          1.0
5PortGroup           muniversal 1.0
6
7name                pari
8version             2.5.0
9categories          math
10platforms           darwin
11maintainers         nomaintainer
12
13description         PARI/GP computer algebra system
14
15long_description    PARI/GP is a widely used computer algebra system designed \
16                    for fast  computations in number theory (factorizations, \
17                    algebraic number theory,  elliptic curves...)
18
19homepage            http://pari.math.u-bordeaux.fr/
20master_sites        ${homepage}pub/pari/unix/
21
22checksums           md5     0b595a1345679ff482785a686c863e9f \
23                    sha1    d96250cd8b3e426f548a832f2f44fdfd30fd32b6 \
24                    rmd160  f9b5375da10bfc5672fbe8b4ab4ac1eb0772b572
25
26depends_lib         port:gmp \
27                    port:ncurses \
28                    port:readline
29
30patchfiles          patch-Makefile.SH.diff
31
32post-patch {
33    reinplace "s|-dylib_|-|g" \
34        ${worksrcpath}/config/Makefile.SH \
35        ${worksrcpath}/config/get_dlld
36}
37
38platform darwin 8 {
39    build.args-append EXTRADLLDFLAGS="-Wl,-single_module"
40    destroot.args-append EXTRADLLDFLAGS="-Wl,-single_module"
41}
42
43configure.cmd       ./Configure
44
45# PARI/GP doesn't use autoconf, and if only *FLAGS environment variables are
46# used, libreadline is not found. One needs *PATH environment variables.
47configure.env       C_INCLUDE_PATH=${prefix}/include \
48                    LIBRARY_PATH=${prefix}/lib
49
50# Always use GMP (forced by --with-gmp), as advised by the PARI developers:
51#   http://www.math.u-bordeaux.fr/~belabas/pari/doc/faq.html#gnump
52# There are no reasons not to use it. If a no_gmp variant is needed,
53# one would need --without-gmp, as by default, PARI's Configure will
54# choose GMP if it can find it.
55configure.args      --mandir=${prefix}/share/man \
56                    --with-gmp \
57                    --with-readline \
58                    --graphic=none
59configure.universal_args-delete --disable-dependency-tracking
60
61set merger_must_run_binaries yes
62
63pre-configure {
64    if {![variant_isset doc]} {
65        reinplace "s/\\(doc all:\\).*/\\1/" \
66            ${worksrcpath}/config/DOC_Make.SH
67        reinplace "/INSTALL_DATA.*\\.\\(dvi\\|ps\\)/d" \
68            ${worksrcpath}/config/Makefile.SH
69    }
70}
71
72build.target        gp
73
74post-destroot {
75    global os.arch
76    set docdir ${destroot}${prefix}/share/doc/${name}
77    file mkdir ${docdir}
78    xinstall -m 644 -v -W ${worksrcpath} \
79        AUTHORS CHANGES COPYING ${docdir}
80    ln -s ../../${name}/doc ${docdir}/doc
81    if {[variant_isset doc]} {
82        if {[variant_isset universal]} {
83            xinstall -m 644 -v -W ${worksrcpath}-${os.arch}/doc \
84                develop.pdf libpari.pdf refcard.pdf tutorial.pdf users.pdf \
85                ${destroot}${prefix}/share/${name}/doc
86        } else {
87            xinstall -m 644 -v -W ${worksrcpath}/doc \
88                develop.pdf libpari.pdf refcard.pdf tutorial.pdf users.pdf \
89                ${destroot}${prefix}/share/${name}/doc
90        }
91    }
92}
93
94variant doc description {Build DVI/PDF/PS documentation} {
95    depends_build-append path:bin/tex:texlive
96    build.target-append docpdf
97}
98
99# Qt support doesn't work with:
100#   depends_lib-append port:qt4-mac
101#   configure.args-delete --graphic=none
102#   configure.args-append --graphic=Qt --with-qt=${prefix}
103# Configure succeeds, but the build of src/graph/plotQt.c fails because
104# ${prefix}/include/Qt is not in the include search path.
105
106# Plotting works with X11, but the redraw after a window resize is
107# sometimes incorrect.
108variant x11 conflicts fltk description {Build with X11 support for the high-resolution plotting functions} {
109    depends_lib-append port:xorg-libX11
110    configure.args-delete --graphic=none
111    configure.args-append --graphic=X11
112}
113
114# Plotting works with fltk @1.1.10_3, but the GUI part freezes
115# (a Force Quit is needed).
116variant fltk conflicts x11 description {Build with FLTK support for the high-resolution plotting functions} {
117    depends_lib-append port:fltk
118    configure.args-delete --graphic=none
119    configure.args-append --graphic=fltk
120}
121
122livecheck.type      regex
123livecheck.url       [lindex ${master_sites} 0]
124livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)
Note: See TracBrowser for help on using the repository browser.