On 12 June 2010 09:34, Georg S. Weber <[email protected]> wrote: >> >> > I mean what will happen on OS X? >> >> I have pkg-config installed automatically via MacPorts, so at least some >> OSX systems will have the program. In the case of matplotlib, it looks >> like it has a fallback (which is taken care of in the patches in the >> update spkg) >> >> Thanks, >> >> Jason > > If one wants to build Sage under Mac OS, currently it is advised to > move MacPorts/Fink "out of the way", e.g. by renaming the paths (/ > opt/... and /sw/...), and for good reason --- there have been too many > problems in the past. So relying on a program from there is not a way > to go at the time being. > > The two "opposite" solutions are either to make sure that no spkg uses > "pkg-config" (they all should have fallback scenarios, which one could > make the default), or else include a version of pkg-config in Sage as > a spkg of its own (this would add less than 1 MB to the Sage tarball. > looking at the latest tarball "pkg-config-0.24.tar.gz"), and make sure > that other spkgs relying on that do use this pkg-config binary > provided by the Sage distribution. I don't think any solution "in > between" could be satisfactory in the end. > > (IMHO, the Sage build system would only profit from having pkg-config > as one "battery included", and relying on its facilities for its own > purposes --- e.g. having a distinction between a "src package" like > the "original" matplotlib and packages like "matplotlib-spkg" where > Sage notes in the corresponding ".pc" file its very own dependencies > on other SagePackages. But I simply don't find the time to even make > plans in that direction.) > > > Cheers, > Georg
That's an interesting idea, though worth noting is FOR 1) About 11 packages in Sage write .pc files for use by pkg-config. All these .pc files exist in Sage bdw-gc.pc gnutls.pc libpng12.pc pynac.pc freetype2.pc gsl.pc libR.pc sqlite3.pc gnutls-extra.pc libpng.pc opencdk.pc 2) At the bare minimum matplotlib makes use of the output from pkg-config, but I suspect others do too. 3) I can't think of a very good workaround, other than we go around hacking matplot lib and any other packages which assume pkg-config exists. AGAINST 1) It adds even more bloat. 2) If a system has pkg-config installed, it will have the location of various system packages. That information will be unavailable to Sage, so some extras like GTK, which would be linked with matplotlib if they existed, will not be found. As such, if pkg-config was added, I think it should only be used on platforms which do not already have it. #!/bin/sh if [ `command -v pkg-config` ] ; then echo "No need to build pkg-config - your system has it" exit 0 fi Note, under no circumstances use 'which' to test if a command exits or not. 'which' is not defined by POSIX and on whilst it exists on Solaris 10, the return code is undefined. In contrast, 'command -v' is defined by POSIX, prints the path like 'which' so is a drop in portable replacement. It wont take too long to create such a package and updated 'deps' to add its dependences if that is what is needed, but I know adding standard packages is not without risks. Dave -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
