checksums for multiple distfiles?

Ryan Schmidt ryandesign at macports.org
Sat Sep 12 13:42:09 PDT 2009


On Sep 12, 2009, at 08:46, Jack Howarth wrote:

> On Sat, Sep 12, 2009 at 09:14:34AM -0400, Jack Howarth wrote:
>>  I am having problems with the correct syntax for
>> adding checksums for multiple distfiles in a Portfile.
>>

[snip]

>> I am having trouble finding an existing Portfile which uses multiple
>> distfiles to discover the correct syntax in this case. Thanks in  
>> advance
>> for any advice.

You can check out the examples of curl-ca-bundle, freetype, minivmac,  
mysql5-devel (see the +innodb_plugin variant), among others. I located  
these examples by grepping the Portfiles for those that define the  
"distfiles" keyword -- not all of these specify multiple distfiles,  
but that is I think the primary reason why one would use that keyword.


>  I puzzled out that...
>
> checksums           molmol-2k.2.0-src.tar.gz md5  
> e1f4416d8041a67fa08cadb03ed91c7c \
>                    molmol-2k.2.0-src.tar.gz sha1  
> 09482a1dea601563ca64e773dc0ec47019e22c63 \
>                    molmol-2k.2.0-src.tar.gz rmd160  
> b1de89953631dd9b11928751d7853cb511bf45f0 \
>                    molmol-2k.2.0-doc.tar.gz md5  
> 517545b60b0179ab691a679ed29903a7 \
>                    molmol-2k.2.0-doc.tar.gz sha1  
> b47551283fa19f57f4d5edcbd52f725055d80b7f \
>                    molmol-2k.2.0-doc.tar.gz rmd160  
> 08b3e21ab6eb7c9044e59373334181ff91ca8a53
>
> works.

It's simpler if you only specify the distfiles' names once each:

checksums           molmol-2k.2.0-src.tar.gz \
                     md5     e1f4416d8041a67fa08cadb03ed91c7c \
                     sha1    09482a1dea601563ca64e773dc0ec47019e22c63 \
                     rmd160  b1de89953631dd9b11928751d7853cb511bf45f0 \
                     molmol-2k.2.0-doc.tar.gz \
                     md5     517545b60b0179ab691a679ed29903a7 \
                     sha1    b47551283fa19f57f4d5edcbd52f725055d80b7f \
                     rmd160  08b3e21ab6eb7c9044e59373334181ff91ca8a53


> I've run to another issue though. The molmol-2k.2.0-src.tar.gz and  
> molmol-2k.2.0-doc.tar.gz
> tarballs extract out their files without creating an enclosing  
> source directory so that...
>
> COPYING			auxil			makedef.aix.mesa	makedef.lnx.mesa	makedef.sun		src
> HISTORY			data			makedef.aix.opengl	makedef.sgi4		makedep			tiff-v3.4
> INSTALL			help			makedef.dec		makedef.sgi5		makedep.devel		tips
> Makefile		include			makedef.dec.mesa	makedef.sgi6		man			tools
> README			lib			makedef.gen		makedef.sol		molmol
> README.UNIX		macros			makedef.hp		makedef.sol.mesa	setup
> README.WIN		makedef.aix		makedef.lnx		makedef.sol.opengl	sg
>
> are directly splattered into /Users/howarth/ports/science/molmol/ 
> work. In fink, this didn't matter but MacPorts shares the work
> subdirectory with the source and destroot subdirectories. What is  
> best practices here for this case. Do we have
> a Portfile option to modify how the distfiles are extracted?

Typically that would be

extract.mkdir yes





More information about the macports-dev mailing list