New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #13249 (closed submission: fixed)

Opened 6 years ago

Last modified 5 years ago

New port: asymptote

Reported by: loshea@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.5.0
Keywords: latex Cc: loshea@…, simon@…
Port: asymptote

Description

A language for producing high quality vector graphics.

Attachments

Portfile (1.2 KB) - added by loshea@… 6 years ago.
Bump version.
Portfile.diff (705 bytes) - added by loshea@… 5 years ago.
Portfile diff that bumps version.

Change History

comment:1 Changed 6 years ago by loshea@…

This port depends on teTeX. However teTeX is dead and nost LaTeX users use MacTeX (or the related TeXLive). Perhaps the port should depnd on the new TeXLive port. Comments welcome.

comment:2 Changed 6 years ago by loshea@…

The link phase generates some warnings, although the application seems to work fine. Here is the command and the errors I get on OSX 10.4.10 on Intel hw.

g++ -Wall -ansi -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC -I/opt/local/include -O2 -o asy camperror.o path.o drawpath.o drawlabel.o picture.o psfile.o texfile.o util.o settings.o guide.o flatguide.o knot.o drawfill.o path3.o runtime.o env.o genv.o main.o stm.o dec.o errormsg.o callable.o name.o symbol.o types.o entry.o exp.o newexp.o stack.o camp.tab.o lex.yy.o access.o absyn.o record.o interact.o fileio.o builtin.o fftw++.o simpson.o coder.o coenv.o locate.o parser.o program.o application.o varinit.o fundec.o refaccess.o Delaunay.o envcompleter.o process.o constructor.o -L/opt/local/lib -lreadline -lm -lncurses gc-7.0/.libs/libgc.a /usr/bin/ld: warning prebinding disabled because dependent library: /opt/local/lib/libreadline.5.2.dylib is not prebound /usr/bin/ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used symbol _PC used from dynamic library /opt/local/lib/libncurses.dylib(lib_tputs.o) not from earlier dynamic library /opt/local/lib/libreadline.5.2.dylib(terminal.so)

comment:3 Changed 6 years ago by master@…

Some remarks

  1. The other libraries asymptopte may use can be added to dependencies list unconditionally or as variants: depends_lib port:fftw-3 port:gsl port:libsigsegv port:ncurses
  1. May be it is better not to install into texmf-dist, but into texmf-local configure.args --with-latex=${prefix}/share/texmf-local/tex/latex --mandir=${prefix}/share/man
  1. In checksums section use name like ${distname}.src.tgz to minimize changes for the next version.

comment:4 Changed 6 years ago by liontooth@…

Thanks for packaging asymptote!

HMUG gives this list of dependencies for OSX 10.4 on ppc and x86:

http://www.hmug.org/pub/MacOS_X/X/Applications/Publishing/asymptote/

My annotations in parentheses -- several packages should probably be made optional; I set g95 optional (won't build on 10.5.1) and also X11 (do we need it? It pulls in a lot of dependencies). I'd be happy if asymptote can generate eps files.

Dependencies:
bzip2 1.0.4 (ok)
fftw 3.1.2 (fftw-3 ok)
fltk 1.1.7 (ok)
freetype 2.3.5 (ok)
g95 20061019 (optional -- macports has 0.90)
gawk 3.1.5 (ok)
gettext 0.17 (ok)
ghostscript 8.60 (8.61)
ghostscript-fonts-std 8.11 (ok, in ghostscript)
gsl 1.9 (1.10)
ImageMagick 6.3.6-2 (6.3.7-1)
jasper 1.900.1 (1.701.0 -- may be worth updating)
jbigkit 1.6 (ok)
jpeg 6b (ok)
lcms 1.16 (ok)
libexif 0.6.16 (0.6.15)
libiconv 1.12 (ok)
libpng 1.2.23 (ok)
libwmf 0.2.8.4 (ok)
libxml2 2.6.30 (ok)
mpeg2vidcodec 1.2 (ok)
openexr 1.4.0 (ok)
pkg-config 0.22 (pkgconfig ok)
Python 2.5.1 (python25 ok)
readline 5.2 (ok)
sed 4.1.5 (gsed ok)
tetex 3.0 (ok)
texinfo 4.11 (ok)
X11 1.1.3 (xorg-libX11 ok -- optional?)
zlib 1.2.3 (ok)

I'm not familiar with the dependency trees, so I don't know the shortest list that will pull in all of these.

When I run the modified portfile, leaving out xorg-libX11, odcctools builds on 10.4.11, but fails on 10.5.1 (both macintel) (Ticket #13289).

Moving g95 to optional (don't know when it's needed) allows some further progress on 10.5.1.

TeTeX fails to build on 10.5.1 -- Ticket #13491.

asymptote builds on 10.4.11 and creates valid eps files! Very cool.

Dave

The revised portfile is likely overkill:

# $Id$
PortSystem      1.0
name            asymptote
version         1.37
categories      graphics
maintainers     loshea@gmail.com
description     a vector graphics language
long_description Asymptote is a powerful descriptive \
                 vector graphics language that provides a natural \
                 coordinate-based framework for technical drawing. \
                 Labels and equations are typeset with LaTeX, for \
                 high-quality PostScript output.

homepage        http://asymptote.sourceforge.net

distfiles       ${distname}.src.tgz:main gc-7.0.tar.gz:gc

master_sites    sourceforge::main \
  http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source:gc

checksums       asymptote-1.37.src.tgz md5 05b6e614f43e2fd163161117c4093f87 \
                gc-7.0.tar.gz          md5 3645ccf5f32ebb27d99b27b0d29e9c38

depends_lib     port:bzip2 \
                port:fftw-3 \
                port:fltk \
                port:freetype \
                port:gawk \
                port:gettext \
                port:ghostscript \
                port:gsl \
                port:ImageMagick \
                port:jasper \
                port:jbigkit \
                port:jpeg \
                port:lcms \
                port:libexif \
                port:libiconv \
                port:libpng \
                port:libwmf \
                port:libxml2 \
                port:mpeg2vidcodec \
                port:openexr \
                port:pkgconfig \
                port:python25 \
                port:readline \
                port:gsed \
                port:teTeX \
                port:texinfo \
                port:zlib

platforms       darwin

configure.args  --with-latex=${prefix}/share/texmf-local/tex/latex \
                --mandir=${prefix}/share/man

extract.only    ${distname}.src.tgz

post-extract {
  file copy ${distpath}/gc-7.0.tar.gz ${worksrcpath}
}

# Optional components

#variant fftw {
#    depends_lib-append port:fftw-3
#    configure.args-append --enable-fftw --with-fftw-prefix=${prefix}
#}

variant g95 {
    depends_lib-append port:g95 
}

variant X11 {
    depends_lib-append port:xorg-libX11
}

comment:5 follow-up: ↓ 7 Changed 6 years ago by loshea@…

master@… and Dave -- thanks for your comments.

How does one determine the full set of dependencies (without using HMUG)? I would like to verify that we have the right list. Does HMUG list the deps of asymptote, or its transitive closure? If the latter, then it would be nice to find what the direct deps of asymptote are (as Dave says).

comment:6 follow-up: ↓ 8 Changed 6 years ago by loshea@…

It would be nice to tease Hans_Boehm/gc out into another port and then list that as another dep. However this might be best left to a later day, since I think some patching will be needed to get this to work.

What do people think?

comment:7 in reply to: ↑ 5 Changed 6 years ago by loshea@…

Replying to loshea@gmail.com:

How does one determine the full set of dependencies (without using HMUG)? I would like to verify that we have the right list. Does HMUG list the deps of asymptote, or its transitive closure? If the latter, then it would be nice to find what the direct deps of asymptote are (as Dave says).

For example, is ImageMagick really a dependency of asymptote? I think (but could be wrong here) that it is only needed if you want to use asymptote to produce (say) JPEGs. (*)

In some ways, ghostscript is similar (again, I'm speculating) in that it is needed only to produce PDF output. However, since asymptote wants to generate PDFs as part of its own documentation, that promotes it to proper dependency.

Any opinions on this, especially (*) ?

comment:8 in reply to: ↑ 6 Changed 6 years ago by master@…

Replying to loshea@gmail.com:

It would be nice to tease Hans_Boehm/gc out into another port

It is already ported. Try

port info boehmgc

However this might be best left to a later day, since I think some patching will be needed to get this to work.

Exactly. As of 1.37 asymptote fails to build with system gc. The bug was reported (by me) to the author and the report has been acted upon. But I have not tested the development version after the fix.

comment:9 follow-up: ↓ 10 Changed 6 years ago by loshea@…

In view of http://lists.macosforge.org/pipermail/macports-users/2007-December/007354.html I propose making the following changes to the portfile (thanks Michail and Dave).

  1. Install into texmf-local
  1. Make use of ${distname}
  1. Alter dependencies to at least:
    depends_lib     port:fftw-3 port:gsl port:teTeX port:readline port:ghostscript
    

I still am unsure about some possible additional dependencies. Michail: how does asymptote use libsigsegv and ncurses? Dave: is it reasonable to not include ImageMagick as a dependency?

As soon as we agree on something reasonable, I'll try to get it committed (I am not a committer).

Thanks!

comment:10 in reply to: ↑ 9 ; follow-up: ↓ 11 Changed 6 years ago by master@…

Replying to loshea@gmail.com:

I still am unsure about some possible additional dependencies. Michail: how does asymptote use libsigsegv and ncurses?

I really do not care. I can see (from configure.ac) that asymptote looks for ncurses and libsegsegv. It can work without libsigsegv, since it is just an optional library to handle page faults. It can be linked to system ncurses, but the current macports policy is to rely on its own libraries. It is linked to ncurses - use "otool -L" on the asy binary.

What I really dislike is port:teTeX, since teTeX is obsolete and TeXLive is already ported. A better way is to change it to something like bin:tex:teTeX (do not install teTeX if we already have tex) or make two variants, teTeX and TeXLive, with port:teTeX and port:texlive respectively.

comment:11 in reply to: ↑ 10 Changed 6 years ago by loshea@…

I have uploaded a new Portfile.

I can see (from configure.ac) that asymptote looks for ncurses and libsegsegv.

I added these as dependencies.

What I really dislike is port:teTeX, since teTeX is obsolete and TeXLive is already ported. A better way is to change it to something like bin:tex:teTeX (do not install teTeX if we already have tex) or make two variants, teTeX and TeXLive, with port:teTeX and port:texlive respectively.

I have added port:texlive as a dependency, since teTeX is dead. If there are no objections I'll request that it be committed.

In the meantime, I'll look into a variant that will allow xasy to work, but I will not delay things further while I look into that.

Changed 6 years ago by loshea@…

Bump version.

comment:12 Changed 6 years ago by simon@…

  • Cc simon@… added
  • Status changed from new to closed
  • Resolution set to fixed

Committed in [32802]. Thanks for your help.

Changed 5 years ago by loshea@…

Portfile diff that bumps version.

comment:13 Changed 5 years ago by blb@…

  • Port set to asymptote

1.51 update applied in r42507.

comment:14 Changed 5 years ago by jmr@…

  • Type changed from enhancement to submission

comment:15 Changed 5 years ago by anonymous

  • Milestone Port Submissions deleted

Milestone Port Submissions deleted

Note: See TracTickets for help on using tickets.