Portfile for a DMG that displays license before mounting

Andrew Udvare audvare at gmail.com
Mon Jun 3 18:03:18 UTC 2019


> On 2019-06-02, at 11:56, Ryan Schmidt <ryandesign at macports.org> wrote:
> Looks good. Assuming it works for you and you have no other questions, my suggestions are:
> 
> - Add the standard modeline at the top of the Portfile.
> 
> - Set supported_archs to the archs for which the binary was built. Looks like it's just x86_64.
> 
> - Prevent the port from being installed on OS versions on which it will not work. The web site says it will work on 10.6 and later while the readme says it will work on 10.5 and later; I don't know which is correct.
> 
> - Change the license field to indicate the real license. You listed "EULA" which stands for "End-User License Agreement" which is a generic term that does not tell us what specific license it's actually under. If it's not one of the standard open-source licenses for which we have predefined license identifiers, you could use "Permissive" or "Restrictive" depending on the nature of the license.
> 
> - Remove "# $Id$" from attach.exp; that's a remnant from back when we used Subversion as our repository, before we converted to Git in 2016.
> 
> - Rename the variable $msdcm to something else, such as $mountpoint. You changed it from my variable name $my_system_disk_container_mount, but I chose that variable name because the disk image I was extracting contained System 7 installation disk images.
> 
> - You can get rid of the $my_name variable I was using and just use $name.
> 
> - Portfiles are written in Tcl, and Tcl is not Bash, so you don't need quotation marks around strings that don't contain spaces. Unlike in Bash, in Tcl it doesn't matter whether the values of the variables contain spaces or not.

Thanks. I've made these changes.

I got really confused on the use of the `copy` command when it comes to copying a complete directory tree to another place when it involves the DMG contents, with the name of the directory.

If I do these (where x and y are both directories):

copy x y/
copy x y
copy x/ y

Assuming x/file exists and is a file, this creates y/file and not y/x/file.

My workaround is to copy two items even if I do not use all the arguments later. https://github.com/Tatsh/ports/blob/master/multimedia/makemkv/Portfile#L42 note the MakeMKV.url argument. This makes the copy command create MakeMKV.app in ${worksrcpath} instead of skipping it for the content.

The Tcl documentation says file copy is affected by cross-file system transactions, which may explain why the destroot {} copy works as expected.

--
Andrew Udvare


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190603/3e0aa01f/attachment.sig>


More information about the macports-users mailing list