Re: Ports that install binaries
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?
On Apr 13, 2007, at 4:16 AM, Ryan Schmidt wrote:
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:
Unfortunately, you're sort of heading down a bad street here, at the end of which is a small gang of thugs with switchblades and they want your wallet. The problem with using hdiutil is that it really screws with using the port from different scenarios (like ssh'ing into a machine) where DiskArbitration cannot necessarily be contacted, or in doing automated builds. I used to run into AbiWord and at least one other port (I believe it was Chmox) mounting disk images on my build machine and then just leaving them there, so by the time the run was complete I had these extra volumes on my desktop that I couldn't unmount again because the references had gotten spooged by virtue of the fact that they got mounted from within a chroot (which was now gone), confusing all heck out of DiskArb. Unfortunately, I don't know of any true command-line tools for extracting things from disk images as if they were true archives. Sounds like a fine SoC project. :-) - Jordan
participants (2)
-
Jordan K. Hubbard
-
Ryan Schmidt