Opened 15 years ago

Closed 15 years ago

#23798 closed enhancement (fixed)

pari-2.3.5 Portfile enhancement, reduced dependencies

Reported by: tobsimon@… Owned by: vinc17@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: haspatch Cc:
Port: pari

Description

I worked over the portfile to get rid of two quiet large dependencies.

  • deleted dependency: xorg-libX11

Not needed. The pari website only lists an optional colour-capable xterm. The OS X Terminal suffices.

  • deleted build dependency: texlive

Only needed to build the pdf documentation, but quiet large.

  • new variant: docpdf

For those who wish to build the pdf documentation. Depends on texlive. My first idea to use the natively installed TexShop didn't work out, but would be favorable. I think the (untypical) exclusion of the documentation presents the next best solution since the pdfs are also available on the pari website.

Attachments (1)

Portfile.diff (1.8 KB) - added by tobsimon@… 15 years ago.
Patch for the Portfile

Download all attachments as: .zip

Change History (9)

Changed 15 years ago by tobsimon@…

Attachment: Portfile.diff added

Patch for the Portfile

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Cc: vinc17 removed
Keywords: haspatch added; dependency texlive xorg-libX11 removed
Owner: changed from macports-tickets@… to vinc17@…

comment:2 in reply to:  description Changed 15 years ago by vinc17@…

Replying to tobsimon@…:

  • deleted dependency: xorg-libX11

Not needed. The pari website only lists an optional colour-capable xterm. The OS X Terminal suffices.

Here it is needed:

$ otool -L =gp
/opt/local/bin/gp:
        /opt/local/lib/libreadline.6.1.dylib (compatibility version 6.0.0, current version 6.1.0)
        /opt/local/lib/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0)
        /opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
        /opt/local/lib/libgmp.3.dylib (compatibility version 9.0.0, current version 9.2.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)

and /opt/local/lib/libX11.6.dylib is provided by xorg-libX11. AFAIK, it is used for hi-res graphics (ploth function). From the Configure file:

if test "$optimization" != profiling; then
  . ./get_X11  # X11, X11_INC, X11_LIBS
  . ./get_graphic_lib # which_graphic_lib
  . ./get_fltk # FLTKDIR, FLTK_LIBS
  . ./get_Qt   # QTDIR, QTLIB
  echo "Hi-Res Graphics: $which_graphic_lib"
  . ./get_readline # $_readline_list (includes 'readline')
else
  which_graphic_lib=none  
fi

If xorg-libX11 is really a problem, one could add a variant to disable the above checks and force which_graphic_lib=none (but since ploth may be seen as an important feature, I think it should be enabled by default).

Concerning the docpdf variant, the patch was incorrect: there is textual documentation too (AUTHORS, CHANGES, COPYING), and I think that one should disable the doc target explicitly (texlive is also used to generate the dvi files).

comment:3 Changed 15 years ago by vinc17@…

If I understand correctly, with

build.target gp

the documentation is not built at build time, but the "install" target still includes "install-doc", so that the documentation (e.g. dvi files, which need texlive) ends up by being built anyway. For instance, with the patch,

sudo port -v destroot +gmp

shows:

[...]
--->  Staging pari into destroot
[...]
Making install in Odarwin-ppc
[...]
mkdir -p "/opt/local/var/macports/build/_Users_vinc17_wd_macosx_macports_math_pari/work/destroot/opt/local/bin" "/opt/local/var/macports/build/_Users_vinc17_wd_macosx_macports_math_pari/work/destroot/opt/local/share/pari"/doc
cd ../doc; /usr/bin/make all

and the documentation is built.

comment:4 Changed 15 years ago by vinc17@…

I've added a doc variant in r64109.

comment:5 Changed 15 years ago by tobsimon@…

Right. I'm happy about the doc variant. Thanks a lot.

About libX11. I wasn't aware of the ploth function (since I use pari as a library) and had to try it. The good news is, pari has no problem using the libX11 shipped with OS X.

$ otool -L /opt/local/bin/gp
/opt/local/bin/gp:
	/opt/local/lib/libreadline.6.1.dylib (compatibility version 6.0.0, current version 6.1.0)
	/opt/local/lib/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0)
	/usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0)
	/opt/local/lib/libgmp.10.dylib (compatibility version 11.0.0, current version 11.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)

Since the MacPorts Guide recommends to install X11, I think it is safe to assume, that there is an libX11 present and thus the dependency on xorg-libX11 can still be dropped.

To solve such ambiguities there really should be some sort of representation in MacPorts (like a dummy package) for available libraries and binaries such as texlive, X11, perl, java.

comment:6 Changed 15 years ago by vinc17@…

The dependency is not just there to make sure that X11 libs are installed, but also to link against the right library. For most libraries (including libX11, AFAIK), it was decided to link against only those provided by MacPorts. If you think this should be changed, you can start a discussion on one of the mailing-lists, but ports should be consistent and follow the same requirements. For instance, the xrender port also depends on port:xorg-libX11.

comment:7 Changed 15 years ago by tobsimon@…

All right. Thats OK with me.

As far as I'm concerned this ticked is completed and may be closed now.

Lastly, I wanna thank you for this was a very satisfactory process.

comment:8 Changed 15 years ago by vinc17@…

Resolution: fixed
Status: newclosed

Closing. What needed to be fixed was done in r64109.

Note: See TracTickets for help on using tickets.