# -*- 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 # $Id$ PortSystem 1.0 PortGroup muniversal 1.0 name pari version 2.7.6 categories math platforms darwin license GPL-2+ maintainers gmail.com:watsonbladd openmaintainer description PARI/GP computer algebra system long_description PARI/GP is a widely used computer algebra system designed \ for fast computations in number theory (factorizations, \ algebraic number theory, elliptic curves...) homepage http://pari.math.u-bordeaux.fr/ master_sites ${homepage}pub/pari/unix/ checksums rmd160 55a3adf974de63967ce20e1f8fb5925c38229d0c \ sha256 39a797222e33b8498777d4bca7b0d64acebddecc9f478578ada87d769289b811 depends_lib port:gmp \ port:ncurses \ port:readline platform darwin 8 { build.args-append EXTRADLLDFLAGS="-Wl,-single_module" destroot.args-append EXTRADLLDFLAGS="-Wl,-single_module" } # llvm-gcc produces incorrect code, ticket #33024 compiler.blacklist llvm-gcc-4.2 configure.cmd ./Configure # PARI/GP doesn't use autoconf, and if only *FLAGS environment variables are # used, libreadline is not found. One needs *PATH environment variables. configure.env C_INCLUDE_PATH=${prefix}/include # Always use GMP (forced by --with-gmp), as advised by the PARI developers: # http://www.math.u-bordeaux.fr/~belabas/pari/doc/faq.html#gnump # There are no reasons not to use it. If a no_gmp variant is needed, # one would need --without-gmp, as by default, PARI's Configure will # choose GMP if it can find it. configure.args --mandir=${prefix}/share/man \ --with-gmp \ --with-readline \ --graphic=none configure.universal_args-delete --disable-dependency-tracking set merger_must_run_binaries yes # pari does not build for ppc on intel if {${build_arch} eq "i386" || ${build_arch} eq "x86_64"} { supported_archs i386 x86_64 } elseif {${build_arch} eq "ppc" || ${build_arch} eq "ppc64"} { supported_archs ppc ppc64 } set universal_archs_supported ${supported_archs} post-patch { if {![variant_isset doc]} { reinplace "s/\\(doc all:\\).*/\\1/" \ ${worksrcpath}/config/DOC_Make.SH reinplace "/INSTALL_DATA.*\\.\\(dvi\\|ps\\)/d" \ ${worksrcpath}/config/Makefile.SH } } build.args-append CPLUSPLUS=${configure.cxx} build.target gp post-destroot { set docdir ${destroot}${prefix}/share/doc/${name} file mkdir ${docdir} xinstall -m 644 -v -W ${worksrcpath} \ AUTHORS CHANGES COPYING ${docdir} ln -s ../../${name}/doc ${docdir}/doc } variant doc description {Build DVI/PDF/PS documentation} { depends_build-append path:bin/tex:texlive build.target-append docpdf post-destroot { if {[variant_isset universal]} { set dir ${worksrcpath}-[lindex ${universal_archs_to_use} 0] } else { set dir ${worksrcpath} } xinstall -m 644 -W ${dir}/doc \ develop.pdf libpari.pdf refcard.pdf tutorial.pdf users.pdf \ ${destroot}${prefix}/share/${name}/doc } } # Qt support doesn't work with: # depends_lib-append port:qt4-mac # configure.args-delete --graphic=none # configure.args-append --graphic=Qt --with-qt=${prefix} # Configure succeeds, but the build of src/graph/plotQt.c fails because # ${prefix}/include/Qt is not in the include search path. # Plotting works with X11, but the redraw after a window resize is # sometimes incorrect. variant x11 conflicts fltk description {Build with X11 support for the high-resolution plotting functions} { depends_lib-append port:xorg-libX11 configure.args-delete --graphic=none configure.args-append --graphic=X11 } # Plotting works with fltk @1.1.10_3, but the GUI part freezes # (a Force Quit is needed). variant fltk conflicts x11 description {Build with FLTK support for the high-resolution plotting functions} { depends_lib-append path:lib/libfltk.dylib:fltk configure.args-delete --graphic=none configure.args-append --graphic=fltk } livecheck.type regex livecheck.url [lindex ${master_sites} 0] livecheck.regex ${name}-(\\d+\\.\\d+\\.\\d+)