[66272] trunk/dports/sysutils/john

ryandesign at macports.org ryandesign at macports.org
Wed Apr 7 23:03:52 PDT 2010


Revision: 66272
          http://trac.macports.org/changeset/66272
Author:   ryandesign at macports.org
Date:     2010-04-07 23:03:51 -0700 (Wed, 07 Apr 2010)
Log Message:
-----------
john:

 * update to 1.7.3.4
 * turn off parallel build which fails and causes errors like #21616
 * use a patchfile to patch params.h instead of complicated CFLAGS reinplaces
 * overhaul how the build.target is selected, now based on build_arch
 * simplify destroot phase by using worksrcpath variable

Modified Paths:
--------------
    trunk/dports/sysutils/john/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/john/files/
    trunk/dports/sysutils/john/files/patch-src-Makefile.diff
    trunk/dports/sysutils/john/files/patch-src-params.h.diff

Modified: trunk/dports/sysutils/john/Portfile
===================================================================
--- trunk/dports/sysutils/john/Portfile	2010-04-08 05:11:15 UTC (rev 66271)
+++ trunk/dports/sysutils/john/Portfile	2010-04-08 06:03:51 UTC (rev 66272)
@@ -2,7 +2,7 @@
 
 PortSystem          1.0
 name                john
-version             1.7.0.2
+version             1.7.3.4
 categories          sysutils security
 maintainers         nomaintainer
 description         Featureful Unix password cracker
@@ -29,39 +29,56 @@
                     ftp://ftp.ua.openwall.com/pub/projects/john/${version}/ \
                     ftp://ftp.cz.openwall.com/pub/projects/john/${version}/
 use_bzip2           yes
-checksums           md5 0a87dca1f149493fc087ea8a8b6ae5d5 \
-                    sha1 bc6895c986d65f502366cf93c91f88ba865572b6 \
-                    rmd160 9e75f5fd5561595ec2f3a1a290e85605234b8c41
-worksrcdir          ${distname}/src
 
+checksums           md5     2f2310c49961c3edea6f92b8dcd45ff4 \
+                    sha1    3919cac037360512e6d72d04d72d492ee9673ded \
+                    rmd160  a3a27c24eb71af8797bc02621ed02a8c9edd6b1d
+
+patchfiles          patch-src-Makefile.diff \
+                    patch-src-params.h.diff
 post-patch {
-    if {[variant_isset powerpc]} {
-    reinplace "s,CFLAGS =,CFLAGS = -DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\",g" ${worksrcpath}/Makefile
-    reinplace "s,CFLAGS=\",CFLAGS=\"-DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\\\\\\\"${prefix}/share/john\\\\\\\\\\\\\" ,g" ${worksrcpath}/Makefile
-    } else {
-        reinplace "s,CFLAGS =,CFLAGS = -DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\"${prefix}/share/john\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\"${prefix}/share/john\\\\\\\",g" ${worksrcpath}/Makefile
-        reinplace "s,CFLAGS=\",CFLAGS=\"-DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\\\\\"${prefix}/share/john\\\\\\\" -DJOHN_SYSTEMWIDE_HOME=\\\\\\\"${prefix}/share/john\\\\\\\" ,g" ${worksrcpath}/Makefile
-    }
+    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/params.h
 }
+
 use_configure       no
 
-platform powerpc {
-    build.target    "clean macosx-ppc32"
+use_parallel_build  no
+
+build.dir           ${worksrcpath}/src
+build.args          CC=${configure.cc}
+build.target        clean
+switch ${configure.build_arch} {
+    i386 {
+        build.target-append macosx-x86-sse2
+    }
+    x86_64 {
+        # x86_64 is only supported on Leopard and up
+        if {${os.major} >= 9} {
+            build.target-append macosx-x86-64
+        } else {
+            configure.build_arch i386
+            build.target-append macosx-x86-sse2
+        }
+    }
+    ppc {
+        # Use altivec if available
+        if {[exec sysctl -n hw.vectorunit] == 1} {
+            build.target-append macosx-ppc32-altivec
+        } else {
+            build.target-append macosx-ppc32
+        }
+    }
+    ppc64 {
+        build.target-append macosx-ppc64
+    }
 }
-platform i386 {
-    build.target    "clean macosx-x86-mmx"
-}
-variant altivec conflicts i386 {
-    build.target    "clean macosx-ppc32-altivec"
-}
 
 destroot {
-    xinstall -d ${destroot}${prefix}/bin
-    file copy ${workpath}/${distname}/run ${destroot}${prefix}/share/john
+    file copy ${worksrcpath}/run ${destroot}${prefix}/share/john
     system "chmod -R a+rx ${destroot}${prefix}/share/john"
     system "ln -s ${prefix}/share/john/john ${destroot}${prefix}/bin/john"
     xinstall -d ${destroot}${prefix}/share/doc
-    file copy ${workpath}/${distname}/doc ${destroot}${prefix}/share/doc/john
+    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/john
     system "chmod -R a+rx ${destroot}${prefix}/share/doc/john"
 }
 

Added: trunk/dports/sysutils/john/files/patch-src-Makefile.diff
===================================================================
--- trunk/dports/sysutils/john/files/patch-src-Makefile.diff	                        (rev 0)
+++ trunk/dports/sysutils/john/files/patch-src-Makefile.diff	2010-04-08 06:03:51 UTC (rev 66272)
@@ -0,0 +1,30 @@
+--- src/Makefile.orig	2009-09-08 23:17:35.000000000 -0500
++++ src/Makefile	2010-04-08 00:58:32.000000000 -0500
+@@ -580,13 +580,17 @@
+ 	$(LN) x86-sse.h arch.h
+ 	$(MAKE) $(PROJ) \
+ 		JOHN_OBJS="$(JOHN_OBJS) x86.o x86-sse.o" \
+-		ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DBSD -DALIGN_LOG"
++		ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES -DBSD -DALIGN_LOG" \
++		CFLAGS="$(CFLAGS) -m32" \
++		LDFLAGS="$(LDFLAGS) -m32"
+ 
+ macosx-x86-mmx:
+ 	$(LN) x86-mmx.h arch.h
+ 	$(MAKE) $(PROJ) \
+ 		JOHN_OBJS="$(JOHN_OBJS) x86.o x86-mmx.o" \
+-		ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DBSD -DALIGN_LOG"
++		ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES -DBSD -DALIGN_LOG" \
++		CFLAGS="$(CFLAGS) -m32" \
++		LDFLAGS="$(LDFLAGS) -m32"
+ 
+ macosx-ppc32-altivec:
+ 	$(LN) ppc32alt.h arch.h
+@@ -602,7 +606,6 @@
+ macosx-ppc32:
+ 	$(LN) ppc32.h arch.h
+ 	$(MAKE) $(PROJ) \
+-		CC=cc \
+ 		CFLAGS="-c -traditional-cpp" \
+ 		OPT_NORMAL="-O2" \
+ 		OPT_INLINE="-O3"

Added: trunk/dports/sysutils/john/files/patch-src-params.h.diff
===================================================================
--- trunk/dports/sysutils/john/files/patch-src-params.h.diff	                        (rev 0)
+++ trunk/dports/sysutils/john/files/patch-src-params.h.diff	2010-04-08 06:03:51 UTC (rev 66272)
@@ -0,0 +1,21 @@
+--- src/params.h.orig	2009-09-13 20:13:01.000000000 -0500
++++ src/params.h	2010-04-08 00:42:24.000000000 -0500
+@@ -49,15 +49,15 @@
+  * notes above.
+  */
+ #ifndef JOHN_SYSTEMWIDE
+-#define JOHN_SYSTEMWIDE			0
++#define JOHN_SYSTEMWIDE			1
+ #endif
+ 
+ #if JOHN_SYSTEMWIDE
+ #ifndef JOHN_SYSTEMWIDE_EXEC /* please refer to the notes above */
+-#define JOHN_SYSTEMWIDE_EXEC		"/usr/libexec/john"
++#define JOHN_SYSTEMWIDE_EXEC		"@PREFIX@/share/john"
+ #endif
+ #ifndef JOHN_SYSTEMWIDE_HOME
+-#define JOHN_SYSTEMWIDE_HOME		"/usr/share/john"
++#define JOHN_SYSTEMWIDE_HOME		"@PREFIX@/share/john"
+ #endif
+ #define JOHN_PRIVATE_HOME		"~/.john"
+ #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100407/8df2ddb4/attachment.html>


More information about the macports-changes mailing list