[33588] trunk/dports/security/cracklib

Ryan Schmidt ryandesign at macports.org
Wed Jan 30 16:42:11 PST 2008


In this diff, it's hard to see what functional changes you made,  
because you also reformatted the whitespace of the file. In the  
future, could you please commit whitespace changes in a separate  
revision from functional changes? Thanks.

It's not necessary to set the extract.suffix to .tar.gz since that's  
the default already.

You shouldn't define a "largedict" variant, then use  
"default_variants +largedict" to enable it always. This makes it  
difficult for the user to disable this functionality, should they  
want to. (The user can "sudo port install cracklib -largedict" but  
next time they want to "sudo port upgrade" the +largedict variant  
will be selected again.) Rather, you should write the port so that  
this is the default functionality, and then define a "no_largedict"  
variant to disable it.

The largedict variant has the path /opt/local hardcoded into the  
portfile. MacPorts might be installed into a different prefix so the  
variable ${prefix} should always be used instead.


On Jan 30, 2008, at 17:21, ecronin at macports.org wrote:

> Revision: 33588
>           http://trac.macosforge.org/projects/macports/changeset/33588
> Author:   ecronin at macports.org
> Date:     2008-01-30 15:21:42 -0800 (Wed, 30 Jan 2008)
>
> Log Message:
> -----------
> Update to 2.8.12 and set new maintainer.  Closes #14100
>
> Modified Paths:
> --------------
>     trunk/dports/security/cracklib/Portfile
>
> Removed Paths:
> -------------
>     trunk/dports/security/cracklib/files/
>
> Modified: trunk/dports/security/cracklib/Portfile
> ===================================================================
> --- trunk/dports/security/cracklib/Portfile	2008-01-30 23:11:30 UTC  
> (rev 33587)
> +++ trunk/dports/security/cracklib/Portfile	2008-01-30 23:21:42 UTC  
> (rev 33588)
> @@ -1,3 +1,5 @@
> +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode:  
> nil; c-basic-offset: 4 -*-
> +# vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
>  # $Id$
>
>  PortSystem 1.0
> @@ -2,42 +4,43 @@
>
> -name			cracklib
> -version			2.7
> -categories		security
> -maintainers		nomaintainer
> -description		A ProActive Password Sanity Library
> -long_description	CrackLib is a library containing a C function  
> (well, \
> -					lots of functions really, but you only need to use \
> -					one of them) which may be used in a passwd-like \
> -					program.  The idea is simple: try to prevent users \
> -					from choosing passwords that could be guessed by \
> -					Crack by filtering them out, at source.
> -homepage		http://www.crypticide.com/users/alecm/
> -master_sites	http://www.crypticide.com/users/alecm/security/
> -distname		${name},${version}
> -checksums		md5 0c84ad7413d9dd3e5c2eaa5f97d53c4a
> -platforms		darwin
> +name             cracklib
> +version          2.8.12
> +categories       security
> +maintainers      theonelab.com:june
> +description      A ProActive Password Sanity Library
> +long_description CrackLib is a library containing a C function  
> (well, \
> +                 lots of functions really, but you only need to  
> use   \
> +                 one of them) which may be used in a passwd- 
> like      \
> +                 program.  The idea is simple: try to prevent  
> users   \
> +                 from choosing passwords that could be guessed  
> by     \
> +                 Crack by filtering them out, at source.
>
> -patchfiles		patch-Makefile.diff \
> -				patch-cracklib-Makefile.diff \
> -				patch-util-Makefile.diff \
> -				patch-util-mkdict.diff
> -post-patch {
> -	file copy ${filespath}/cracklib.3 ${worksrcpath}/cracklib
> -	file copy ${filespath}/mkdict.1 ${worksrcpath}/util
> -	file copy ${filespath}/teststr.1 ${worksrcpath}/util
> -}
> +homepage         http://sourceforge.net/projects/cracklib/
> +platforms        darwin
> +depends_lib      port:gettext
> +default_variants +largedict
>
> -configure {
> -	reinplace "s|@PREFIX@|${prefix}|g" \
> -		${worksrcpath}/util/mkdict.1 \
> -		${worksrcpath}/util/teststr.1
> +master_sites     sourceforge
> +checksums        md5 580346fa1012f9d9769192f49d3801fa \
> +                 sha1 0a77b21366cfbad675e6e44642026c89b87f41ce \
> +                 rmd160 91649e66c3ce491b2ebea6135eaa6ba4705ffb58 \
> +
> +extract.suffix  .tar.gz
> +
> +configure.args-append --without-python
> +
> +variant largedict {
> +    depends_build port:cracklib-words
> +    destroot.target-append dict-local
>  }
>
> -build.args		PREFIX=${prefix} VERSION=${version}
> -destroot.args	PREFIX=${prefix} VERSION=${version}
> -post-destroot {
> -	set docPath "${prefix}/share/doc/${name}"
> -	xinstall -d -m 0755 ${destroot}${docPath}
> -	xinstall -m 0644 ${worksrcpath}/README ${destroot}${docPath}
> +post-build {
> +    if {[variant_isset largedict]} {
> +        file copy /opt/local/share/cracklib/cracklib-words $ 
> {worksrcpath}/dicts
> +    }
> +
> +    file attributes ${worksrcpath}/util/cracklib-format - 
> permissions 0755
>  }
>
> +test.run        yes
> +test.cmd        make
> +test.target     check


More information about the macports-dev mailing list