checksums for multiple distfiles?

Jack Howarth howarth at bromo.med.uc.edu
Sat Sep 12 06:46:50 PDT 2009


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.
> My first attempt so far at a new port looks like...
> 
> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
> # $Id$
> PortSystem          1.0
> name                molmol
> version             2k.2.0
> categories          science
> maintainers         howarth at bromo.med.uc.edu
> description         Molecular graphics display program
> long_description    MOLMOL is a molecular graphics program for displaying, analyzing, \
>                     and manipulating the three-dimensional structure of biological \
>                     macromolecules, with special emphasis on the study of protein \
>                     or DNA structures determined by NMR. The program runs on UNIX \
>                     and Windows NT/95/98/2000 and is freely available. It does not work \
>                     properly with RNA.
> homepage            http://www.mol.biol.ethz.ch/wuthrich/software/molmol/
> platforms           darwin
> master_sites        ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip
> distfiles           molmol-2k.2.0-src.tar.gz \
>                     molmol-2k.2.0-doc.tar.gz
> checksums           md5 e1f4416d8041a67fa08cadb03ed91c7c \
>                     sha1 09482a1dea601563ca64e773dc0ec47019e22c63 \
>                     rmd160 b1de89953631dd9b11928751d7853cb511bf45f0 \
>                     md5 517545b60b0179ab691a679ed29903a7 \
>                     sha1 b47551283fa19f57f4d5edcbd52f725055d80b7f \
>                     rmd160 08b3e21ab6eb7c9044e59373334181ff91ca8a53
> depends_lib         port:openmotif \
>                     port:glut \
>                     port:tiff \
>                     port:jpeg \
>                     port:libpng
> patchfiles          molmol-build.diff
> destroot {
>     # Install example files not installed by the Makefile
>     file mkdir ${destroot}${prefix}/share/${name}
>     file copy ${worksrcpath} \
>         ${destroot}${prefix}/share/${name}
>     file mkdir ${destroot}${prefix}/bin
>     ln -s ${prefix}/share/${name}/${name} ${destroot}${prefix}/bin/${name}
>     file mkdir ${destroot}${prefix}/share/doc/${name}
>     ln -s ${prefix}/share/${name}/COPYING ${destroot}${prefix}/share/doc/${name}/COPYING
>     ln -s ${prefix}/share/${name}/man ${destroot}${prefix}/share/doc/${name}/man
> }
> 
> which produces...
> 
> --->  Computing dependencies for molmol
> --->  Fetching molmol
> --->  Attempting to fetch molmol-2k.2.0-src.tar.gz from http://distfiles.macports.org/molmol
> --->  Attempting to fetch molmol-2k.2.0-src.tar.gz from http://arn.se.distfiles.macports.org/molmol
> --->  Attempting to fetch molmol-2k.2.0-src.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/molmol
> --->  Attempting to fetch molmol-2k.2.0-src.tar.gz from ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip
> --->  Attempting to fetch molmol-2k.2.0-doc.tar.gz from http://distfiles.macports.org/molmol
> --->  Attempting to fetch molmol-2k.2.0-doc.tar.gz from http://arn.se.distfiles.macports.org/molmol
> --->  Attempting to fetch molmol-2k.2.0-doc.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/molmol
> --->  Attempting to fetch molmol-2k.2.0-doc.tar.gz from ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip
> --->  Verifying checksum(s) for molmol
> Error: No checksum set for molmol-2k.2.0-src.tar.gz
> Error: No checksum set for molmol-2k.2.0-doc.tar.gz
> Error: Target org.macports.checksum returned: Unable to verify file checksums
> Error: Status 1 encountered during processing.
> 
> 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.
>            Jack
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

  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. 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?
               Jack


More information about the macports-dev mailing list