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

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

pari: Don't build ppc on intel

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 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 91604 2012-04-06 20:50:47Z 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
63# pari does not build for ppc on intel
64if {${build_arch} == "i686" || ${build_arch} == "x86_64"} {
65    supported_archs i386 x86_64
66} elseif {${build_arch} == "ppc" || ${build_arch} == "ppc64"} {
67    supported_archs ppc ppc64
68}
69set universal_archs_supported ${supported_archs}
70
71pre-configure {
72    if {![variant_isset doc]} {
73        reinplace "s/\\(doc all:\\).*/\\1/" \
74            ${worksrcpath}/config/DOC_Make.SH
75        reinplace "/INSTALL_DATA.*\\.\\(dvi\\|ps\\)/d" \
76            ${worksrcpath}/config/Makefile.SH
77    }
78}
79
80build.target        gp
81
82post-destroot {
83    global os.arch
84    set docdir ${destroot}${prefix}/share/doc/${name}
85    file mkdir ${docdir}
86    xinstall -m 644 -v -W ${worksrcpath} \
87        AUTHORS CHANGES COPYING ${docdir}
88    ln -s ../../${name}/doc ${docdir}/doc
89    if {[variant_isset doc]} {
90        if {[variant_isset universal]} {
91            xinstall -m 644 -v -W ${worksrcpath}-${os.arch}/doc \
92                develop.pdf libpari.pdf refcard.pdf tutorial.pdf users.pdf \
93                ${destroot}${prefix}/share/${name}/doc
94        } else {
95            xinstall -m 644 -v -W ${worksrcpath}/doc \
96                develop.pdf libpari.pdf refcard.pdf tutorial.pdf users.pdf \
97                ${destroot}${prefix}/share/${name}/doc
98        }
99    }
100}
101
102variant doc description {Build DVI/PDF/PS documentation} {
103    depends_build-append path:bin/tex:texlive
104    build.target-append docpdf
105}
106
107# Qt support doesn't work with:
108#   depends_lib-append port:qt4-mac
109#   configure.args-delete --graphic=none
110#   configure.args-append --graphic=Qt --with-qt=${prefix}
111# Configure succeeds, but the build of src/graph/plotQt.c fails because
112# ${prefix}/include/Qt is not in the include search path.
113
114# Plotting works with X11, but the redraw after a window resize is
115# sometimes incorrect.
116variant x11 conflicts fltk description {Build with X11 support for the high-resolution plotting functions} {
117    depends_lib-append port:xorg-libX11
118    configure.args-delete --graphic=none
119    configure.args-append --graphic=X11
120}
121
122# Plotting works with fltk @1.1.10_3, but the GUI part freezes
123# (a Force Quit is needed).
124variant fltk conflicts x11 description {Build with FLTK support for the high-resolution plotting functions} {
125    depends_lib-append port:fltk
126    configure.args-delete --graphic=none
127    configure.args-append --graphic=fltk
128}
129
130livecheck.type      regex
131livecheck.url       [lindex ${master_sites} 0]
132livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)
Note: See TracBrowser for help on using the repository browser.