[79965] trunk/dports/math/pari

vinc17 at macports.org vinc17 at macports.org
Thu Jun 30 18:10:43 PDT 2011


Revision: 79965
          http://trac.macports.org/changeset/79965
Author:   vinc17 at macports.org
Date:     2011-06-30 18:10:42 -0700 (Thu, 30 Jun 2011)
Log Message:
-----------
pari:
  * bump to 2.5.0;
  * removed the gmp variant (now always use GMP, as recommended by the
    developers);
  * changed how high-resolution plotting functions are supported: use
    --graphic=none by default to avoid huge dependencies (no support
    for these functions), and added variants x11 and fltk to choose
    which library to use for the support of these functions (currently
    on my machine, x11 seems much less buggy than fltk).

Modified Paths:
--------------
    trunk/dports/math/pari/Portfile

Added Paths:
-----------
    trunk/dports/math/pari/files/
    trunk/dports/math/pari/files/patch-Makefile.SH.diff

Modified: trunk/dports/math/pari/Portfile
===================================================================
--- trunk/dports/math/pari/Portfile	2011-07-01 00:13:03 UTC (rev 79964)
+++ trunk/dports/math/pari/Portfile	2011-07-01 01:10:42 UTC (rev 79965)
@@ -4,8 +4,7 @@
 PortGroup  muniversal 1.0
 
 name                pari
-version             2.3.5
-revision            1
+version             2.5.0
 categories          math
 platforms           darwin
 maintainers         vinc17 openmaintainer
@@ -15,10 +14,10 @@
                     algebraic number theory,  elliptic curves...)
 homepage            http://pari.math.u-bordeaux.fr/
 master_sites        ${homepage}/pub/pari/unix/
-checksums           md5     6077c6db56fdd32e39a06a9bf320e1f7 \
-                    sha1    f211ccfe42a4b18dbcde832dfd1ece6f477f4966 \
-                    rmd160  488adf3af5398d0ab5390eb86b65cd79bd1044c5
-depends_lib         port:xorg-libX11 port:ncurses port:readline
+checksums           md5     0b595a1345679ff482785a686c863e9f \
+                    sha1    d96250cd8b3e426f548a832f2f44fdfd30fd32b6 \
+                    rmd160  f9b5375da10bfc5672fbe8b4ab4ac1eb0772b572
+depends_lib         port:gmp port:ncurses port:readline
 
 build.target        gp
 
@@ -27,9 +26,23 @@
 configure.env       C_INCLUDE_PATH=${prefix}/include \
                     LIBRARY_PATH=${prefix}/lib
 
-configure.args      --mandir=${prefix}/share/man --with-readline
+# 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
 
+patchfiles patch-Makefile.SH.diff
+
+post-patch {
+    reinplace "s|-dylib_|-|g" \
+      ${worksrcpath}/config/Makefile.SH \
+      ${worksrcpath}/config/get_dlld
+}
+
 pre-configure {
     file rename -force ${worksrcpath}/Configure ${worksrcpath}/configure
     if {![variant_isset doc]} {
@@ -45,11 +58,29 @@
     build.target-append docpdf
 }
 
-variant gmp description {GNU MP support} {
-    depends_lib-append port:gmp
-    configure.args-append --with-gmp
+# 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 port:fltk
+    configure.args-delete --graphic=none
+    configure.args-append --graphic=fltk
+}
+
 post-destroot {
     global os.arch
     set docdir ${destroot}${prefix}/share/doc/${name}

Added: trunk/dports/math/pari/files/patch-Makefile.SH.diff
===================================================================
--- trunk/dports/math/pari/files/patch-Makefile.SH.diff	                        (rev 0)
+++ trunk/dports/math/pari/files/patch-Makefile.SH.diff	2011-07-01 01:10:42 UTC (rev 79965)
@@ -0,0 +1,76 @@
+--- config/Makefile.SH~	2011-05-30 11:28:34.000000000 +0200
++++ config/Makefile.SH	2011-06-30 13:12:19.000000000 +0200
+@@ -291,16 +291,16 @@
+ 	-$ranlib \$@
+ 
+ kerntest\$(_O): $src/test/kerntest.c
+-	\$(CC) -c \$(CFLAGS) -I$src/language \$(CPPFLAGS) -o \$@ $src/test/kerntest.c
++	\$(CC) -c -I$src/language \$(CPPFLAGS) \$(CFLAGS) -o \$@ $src/test/kerntest.c
+ 
+ dummy\$(_O): $src/test/dummy.c
+-	\$(CC) -c \$(CFLAGS) \$(CPPFLAGS) -o \$@ $src/test/dummy.c
++	\$(CC) -c \$(CPPFLAGS) \$(CFLAGS) -o \$@ $src/test/dummy.c
+ 
+ kerntest: $KERNOBJS dummy\$(_O) kerntest\$(_O)
+-	\$(CC) \$(CFLAGS) \$(CPPFLAGS) -o \$@ $KERNOBJS dummy\$(_O) kerntest\$(_O) \$(STA_LIBS)
++	\$(CC) \$(CPPFLAGS) \$(CFLAGS) -o \$@ $KERNOBJS dummy\$(_O) kerntest\$(_O) \$(STA_LIBS)
+ 
+ mpinl\$(_O): .headers parilvl0.h parilvl1.h $knone/mpinl.c
+-	\$(CC) -c \$(CFLAGS) \$(CPPFLAGS) \$(DLCFLAGS) -o mpinl\$(_O) $knone/mpinl.c
++	\$(CC) -c \$(CPPFLAGS) \$(CFLAGS) \$(DLCFLAGS) -o mpinl\$(_O) $knone/mpinl.c
+ 
+ test-kernel:: kerntest
+ 	@./kerntest > gp.out;\
+@@ -308,7 +308,7 @@
+ 	if test -s kern.dif; then echo "KERNEL BUG"; else echo OK; fi
+ 
+ tune.o: $src/test/tune.c
+-	\$(CC) \$(CFLAGS) \$(GMPFLAGS) \$(CPPFLAGS) -o \$@ \$< -c
++	\$(CC) \$(GMPFLAGS) \$(CPPFLAGS) \$(CFLAGS) -o \$@ \$< -c
+ 
+ tune: mpinl.h tune-sta
+ 	-\$(RM) tune ../tune
+@@ -316,7 +316,7 @@
+ 	-\$(LN) $ln_objdir/tune ../tune
+ 
+ tune-dyn: tune.o \$(LIBPARI_DYN)
+-	\$(LD) \$(LDFLAGS) \$(RUNPTH) -o \$@ \$< \$(GMPOBJS) -L. \$(LDDYN) \$(STA_LIBS)
++	\$(LD) -L. \$(LDFLAGS) \$(RUNPTH) -o \$@ \$< \$(GMPOBJS) \$(LDDYN) \$(STA_LIBS)
+ tune-sta: tune.o \$(LIBPARI_STA)
+ 	\$(LD) \$(LDFLAGS) \$(RUNPTH) -o \$@ \$< \$(GMPOBJS) ./\$(LIBPARI_STA) \$(STA_LIBS)
+ 
+@@ -360,7 +360,7 @@
+ install-bin-dyn: gp-dyn install-lib-dyn
+ 	-mkdir -p \$(BINDIR)
+ 	-\$(RM) \$(BINDIR)/gp-$version$exe_suff \$(BINDIR)/gp$exe_suff
+-	\$(LD) -o \$(BINDIR)/gp-$version$exe_suff \$(LDFLAGS) \$(OBJSGP) \$(RUNPTH_FINAL) -L\$(LIBDIR) \$(LDDYN) \$(RLLIBS) \$(PLOTLIBS) \$(LIBS) \$(DL_LIBS)
++	\$(LD) -o \$(BINDIR)/gp-$version$exe_suff -L\$(LIBDIR) \$(LDFLAGS) \$(OBJSGP) \$(RUNPTH_FINAL) \$(LDDYN) \$(RLLIBS) \$(PLOTLIBS) \$(LIBS) \$(DL_LIBS)
+ 	-\$(STRIP) \$(STRIPFLAGS) \$(BINDIR)/gp-$version$exe_suff
+ 	$postconfig \$(BINDIR)/gp-$version$exe_suff
+ 	-\$(LN) gp-$version$exe_suff \$(BINDIR)/gp$exe_suff
+@@ -540,7 +540,7 @@
+ 
+ gp-dyn: $add_funclist \$(OBJSGP) \$(LIBPARI_DYN) \$(EXPORT_LIB)
+ 	\$(RM) \$@
+-	\$(LD) -o \$@ \$(LDFLAGS) \$(OBJSGP) \$(RUNPTH) -L\$(TOPLDDYN) \$(RLLIBS) \$(LDDYN) \$(PLOTLIBS) \$(LIBS) \$(DL_LIBS)
++	\$(LD) -o \$@ -L\$(TOPLDDYN) \$(LDFLAGS) \$(OBJSGP) \$(RUNPTH) \$(RLLIBS) \$(LDDYN) \$(PLOTLIBS) \$(LIBS) \$(DL_LIBS)
+ 	$postconfig gp-dyn
+ 
+ \$(LIBPARI_DYN): $add_funclist \$(OBJS) \$(EXPORT_FILE)
+@@ -658,7 +658,7 @@
+   source="$SRC/$f.c"
+   f=`basename $f`
+   depend=
+-  cflags="\$(CFLAGS) \$(CPPFLAGS)"
++  cflags="\$(CPPFLAGS)"
+   compile='$(CC)'
+   case "$f" in
+   gp)
+@@ -738,6 +738,7 @@
+     cflags="$cflags \$(DLCFLAGS)"
+     ;;
+   esac
++cflags="$cflags \$(CFLAGS)"
+ HUGELINE="$HUGELINE
+ $f\$(_O): .headers $depend $source
+ 	$compile -c $cflags -o $f\$(_O) $source"


Property changes on: trunk/dports/math/pari/files/patch-Makefile.SH.diff
___________________________________________________________________
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110630/23f2821b/attachment.html>


More information about the macports-changes mailing list