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

Last change on this file since 148512 was 148512, checked in by ryandesign@…, 4 years ago

pari: update to 2.7.5 (#51342; maintainer)

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