I'll continue this discussion on the dev list, where I probably should have started it in the first place. On Apr 13, 2007, at 01:18, Cédric Luthi wrote:
On 13 avr. 07, at 03:11, Ryan Schmidt wrote:
Are there any ports that install binaries? I mean, any ports that don't compile things themselves, but which download binaries and just install them?
perforce does it, you might want to have a look at it.
True... Thanks... I guess what I should have asked is if there were any ports that download disk images and install their contents, since that's a bit more complicated. I know MacPorts knows how to extract files from .tar.gz and .tar.bz2 archives, but I'm wondering if there's anything in place for .dmg files. Grepping all portfiles for "dmg" I only see one -- abiword -- which lets you choose either to compile from source or install a binary from a disk image. For the latter, it looks like this: variant use_binary conflicts use_source { distname AbiWord-${version}-10.2 extract.suffix .dmg.gz master_sites http://www.abisource.org/downloads/abiword/$ {version}/MacOSX checksums md5 13d249d7f0181a5c44e7342b302b19ae use_bzip2 no extract.post_args > ${workpath}/${distname}.dmg post-extract { file mkdir /tmp/${name}-${version} system "hdiutil attach ${workpath}/${distname}.dmg -private - nobrowse -mountpoint /tmp/${name}-${version}" } patch {} use_configure no build {} destroot { file mkdir ${destroot}/Applications/MacPorts file copy /tmp/${name}-${version}/AbiWord.app ${destroot}/ Applications/MacPorts } post-destroot { system "hdiutil detach /tmp/${name}-${version}" file delete -force /tmp/${name}-${version} } } So it calls hdiutil directly. Is that how I should do it? Or are there any built-in MacPorts commands for dealing with disk image distributions?