[120125] trunk/dports/graphics/asymptote

mojca at macports.org mojca at macports.org
Fri May 16 11:27:54 PDT 2014


Revision: 120125
          https://trac.macports.org/changeset/120125
Author:   mojca at macports.org
Date:     2014-05-16 11:27:54 -0700 (Fri, 16 May 2014)
Log Message:
-----------
asymptote: upgrade to 2.29, less dependencies, use libstdc++ (#40979, #43691, maint. timeout)

  * upgrade to version 2.29
  * don't depend on the whole TeX Live, only some packages (#43691)
  * temporary workaround for 10.9: use -std=libstdc++ (#40979)
  * some patches to make the binary compile with libc++ (but binary doesn't work yet)

Modified Paths:
--------------
    trunk/dports/graphics/asymptote/Portfile

Added Paths:
-----------
    trunk/dports/graphics/asymptote/files/patch-upstream.diff

Removed Paths:
-------------
    trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff

Modified: trunk/dports/graphics/asymptote/Portfile
===================================================================
--- trunk/dports/graphics/asymptote/Portfile	2014-05-16 17:11:24 UTC (rev 120124)
+++ trunk/dports/graphics/asymptote/Portfile	2014-05-16 18:27:54 UTC (rev 120125)
@@ -5,7 +5,7 @@
 PortGroup           texlive 1.0
 
 name                asymptote
-version             2.28
+version             2.29
 categories          graphics
 maintainers         gmail.com:loshea
 description         a vector graphics language
@@ -23,18 +23,50 @@
                     --disable-offscreen
 master_sites        sourceforge
 extract.suffix      .src.tgz
-checksums           rmd160  c028df3174018877ca2a3db274de1328f5f1011e \
-                    sha256  d6d4be0f37da3eec241f52c4b1427eeb22785deaf33e2dd4bb7a9305a6cfb47e
-depends_build       port:texinfo
+checksums           rmd160  e1a46654e0a3f1c65b63afc69a46a476d40fd911 \
+                    sha256  6c5cf29beefad40414f47223b12d438493bee64db24b4c30ac785e8db801c9c3
+
+# texlive-latex-recommended and texinfo are only used for building the docs
+# other relevant packages are:
+# - texlive-common
+# - texlive-bin
+# - texlive-basic
+# - texlive-latex
+# but they are already a dependency of latex-recommended
+#
+# one day we could split that into a separate +docs variant
+# or fetch the PDF from somewhere
+depends_build       port:ghostscript \
+                    port:texinfo \
+                    port:texlive-latex-recommended
+
 depends_lib         port:readline \
-                    port:texlive \
-                    port:ghostscript \
                     port:fftw-3 \
                     port:gsl \
                     port:libsigsegv \
                     port:ncurses \
                     path:lib/libgc.dylib:boehmgc
 
+# Runtime dependencies really depend on user preferences.
+# Asy can draw graphics without any TeX or without LaTeX,
+# so one might just as well remove all deps (or add more)
+#
+# The hierarchy of dependencies goes as:
+# - texlive-latex-recommended [common, bin, basic, latex]
+# - texlive-latex             [common, bin, basic]
+# - texlive-basic             [common, bin]
+#
+# But then asy also supports luatex, context, etc.
+depends_run         port:ghostscript \
+                    port:texlive-basic
+
+patchfiles          patch-upstream.diff
+
+# temporary workaround to avoid asymptote from hanging forever
+if {${os.major} >= 11} {
+    configure.env   CFLAGS="-stdlib=libstdc++" CXXFLAGS="-stdlib=libstdc++"
+}
+
 post-destroot {
     set python.bin ""
     if {[variant_isset python27]} {
@@ -50,8 +82,6 @@
     }
 }
 
-patchfiles          patch-prc-writePRC.h.diff
-
 post-activate {
   # run `mktexlsr` to make sure the asymptote files are found:
   system "mktexlsr"

Deleted: trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff
===================================================================
--- trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff	2014-05-16 17:11:24 UTC (rev 120124)
+++ trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff	2014-05-16 18:27:54 UTC (rev 120125)
@@ -1,35 +0,0 @@
-# https://sourceforge.net/p/asymptote/code/5634/
-#
---- prc/writePRC.h.orig
-+++ prc/writePRC.h
-@@ -25,9 +25,15 @@
- #include <vector>
- #include <deque>
- #include <list>
-+
- #ifdef __GNUC__
-+#if __cplusplus >= 201103L
-+#include <forward_list>
-+#else
- #include <ext/slist>
- #endif
-+#endif
-+
- #include <map>
- #include <iostream>
- #include "PRCbitStream.h"
-@@ -225,7 +231,13 @@
-   std::deque<PRCSingleAttribute> attribute_keys;
- };
- #ifdef __GNUC__
-+
-+#if __cplusplus >= 201103L
-+typedef forward_list<PRCAttribute> PRCAttributeList;
-+#else
- typedef __gnu_cxx::slist<PRCAttribute> PRCAttributeList;
-+#endif
-+
- #else
- typedef std::list<PRCAttribute> PRCAttributeList;
- #endif
-

Added: trunk/dports/graphics/asymptote/files/patch-upstream.diff
===================================================================
--- trunk/dports/graphics/asymptote/files/patch-upstream.diff	                        (rev 0)
+++ trunk/dports/graphics/asymptote/files/patch-upstream.diff	2014-05-16 18:27:54 UTC (rev 120125)
@@ -0,0 +1,90 @@
+https://sourceforge.net/p/asymptote/code/5651
+--- genv.cc.orig
++++ genv.cc
+@@ -15,7 +15,7 @@
+ 
+ #include <sstream>
+ #include <unistd.h>
+-#include <bits/stl_algo.h>
++#include <algorithm>
+ 
+ #include "genv.h"
+ #include "env.h"
+https://sourceforge.net/p/asymptote/code/5652
+--- configure.orig
++++ configure
+@@ -5737,7 +5737,7 @@
+ ac_fn_cxx_check_header_mongrel "$LINENO" "unordered_map" "ac_cv_header_unordered_map" "$ac_includes_default"
+ if test "x$ac_cv_header_unordered_map" = xyes; then :
+ 
+-$as_echo "#define HAVE_UNORDERDED_MAP 1" >>confdefs.h
++$as_echo "#define HAVE_UNORDERED_MAP 1" >>confdefs.h
+ 
+ else
+   ac_fn_cxx_check_header_mongrel "$LINENO" "tr1/unordered_map" "ac_cv_header_tr1_unordered_map" "$ac_includes_default"
+--- config.h.in.orig
++++ config.h.in
+@@ -160,7 +160,7 @@
+ #undef HAVE_UNISTD_H
+ 
+ /* Define to 1 if you have unordered_map */
+-#undef HAVE_UNORDERDED_MAP
++#undef HAVE_UNORDERED_MAP
+ 
+ /* Define to 1 if you have the `vfork' function. */
+ #undef HAVE_VFORK
+https://sourceforge.net/p/asymptote/code/5653/
+--- gsl.cc.orig
++++ gsl.cc
+@@ -850,7 +850,7 @@ void GSLrng_dir2d(stack *s)
+ {
+   string method = pop<string>(s,string("neumann"));
+   checkGSLrng();
+-  double x,y;
++  double x=0, y=0;
+   if(method == "neumann") gsl_ran_dir_2d(GSLrng,&x,&y);
+   else if(method == "trig") gsl_ran_dir_2d_trig_method(GSLrng,&x,&y);
+   else error(GSLinvalid);
+--- runfile.in.orig
++++ runfile.in
+@@ -43,7 +43,7 @@ file* :nullFile()
+ file* input(string name=emptystring, bool check=true,
+             string comment=commentchar, string mode=emptystring)
+ {
+-  file *f;
++  file *f=NULL;
+   if(mode == "binary") {
+     f=new ibfile(name,check);
+   } else if(mode == "xdr") {
+@@ -71,7 +71,7 @@ file* input(string name=emptystring, bool check=true,
+ file* output(string name=emptystring, bool update=false,
+              string comment=commentchar, string mode=emptystring)
+ {
+-  file *f;
++  file *f=NULL;
+   if(mode == "pipe") {
+     f=new opipe(name);
+   } else if(mode == "binary") {
+https://sourceforge.net/p/asymptote/code/5654/
+--- drawlabel.cc.orig
++++ drawlabel.cc
+@@ -75,11 +75,15 @@
+   bool Latex=latex(texengine);
+   
+   if(Latex) {
+-    if(setlatexfont(tex,pentype,drawElement::lastpen))
+-      tex.wait("\n*");
++    if(setlatexfont(tex,pentype,drawElement::lastpen)) {
++      tex << "\n";
++      tex.wait(texready.c_str());
++    }
+   }
+-  if(settexfont(tex,pentype,drawElement::lastpen,Latex))
+-    tex.wait("\n*");
++  if(settexfont(tex,pentype,drawElement::lastpen,Latex)) {
++    tex << "\n";
++    tex.wait(texready.c_str());
++  }
+   
+   drawElement::lastpen=pentype;
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140516/1ee3be4d/attachment.html>


More information about the macports-changes mailing list