Ticket #21616: Portfile-john.diff

File Portfile-john.diff, 2.9 KB (added by hsivank@…, 15 years ago)
  • Portfile

    old new  
    33PortSystem          1.0
    44name                john
    55version             1.7.0.2
     6revision            1
    67categories          sysutils security
    78maintainers         nomaintainer
    89description         Featureful Unix password cracker
     
    3233checksums           md5 0a87dca1f149493fc087ea8a8b6ae5d5 \
    3334                    sha1 bc6895c986d65f502366cf93c91f88ba865572b6 \
    3435                    rmd160 9e75f5fd5561595ec2f3a1a290e85605234b8c41
     36
    3537worksrcdir          ${distname}/src
    3638
     39use_parallel_build  no
     40
     41patchfiles          patch-src-Makefile.diff \
     42                    patch-src-john.c.diff
     43
     44use_configure       no
     45
    3746post-patch {
    38     if {[variant_isset powerpc]} {
    39     reinplace "s,CFLAGS =,CFLAGS = -DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\",g" ${worksrcpath}/Makefile
    40     reinplace "s,CFLAGS=\",CFLAGS=\"-DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" ,g" ${worksrcpath}/Makefile
    41     } else {
    42         reinplace "s,CFLAGS =,CFLAGS = -DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\"${prefix}/share/john\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\"${prefix}/share/john\\\\\\\",g" ${worksrcpath}/Makefile
    43         reinplace "s,CFLAGS=\",CFLAGS=\"-DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\"${prefix}/share/john\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\"${prefix}/share/john\\\\\\\" ,g" ${worksrcpath}/Makefile
    44     }
     47    reinplace "s,\$JOHN,${prefix}/share/john,g" ${workpath}/${distname}/run/john.conf
     48    reinplace "s,\$JOHN/john.conf,${prefix}/share/john/john.conf,g" ${workpath}/${distname}/src/params.h
     49    reinplace "s,\$JOHN/password.lst,${prefix}/share/john/password.lst,g" ${workpath}/${distname}/src/params.h
     50}
     51
     52if {[variant_isset powerpc]} {
     53    build.args-append   CFLAGS=\"-c -Wall -O2 -fomit-frame-pointer -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" \"
     54} else {
     55    build.args-append   CFLAGS=\"-c -Wall -O2 -fomit-frame-pointer -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\"${prefix}/share/john\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\"${prefix}/share/john\\\\\\\" \"
    4556}
    46 use_configure       no
    4757
    48 platform powerpc {
     58platform powerpc {   
    4959    build.target    "clean macosx-ppc32"
    5060}
    51 platform i386 {
     61
     62variant altivec {
     63    build.target    "clean macosx-ppc32-altivec"
     64}
     65
     66platform darwin 9 {
    5267    build.target    "clean macosx-x86-mmx"
    5368}
    54 variant altivec conflicts i386 {
    55     build.target    "clean macosx-ppc32-altivec"
     69
     70platform darwin 10 {
     71        if {$build_arch == "x86_64"} {
     72                build.target    "clean macosx-x86-64"
     73        } else {
     74                build.target    "clean macosx-x86-mmx"
     75        }
    5676}
    5777
    5878destroot {