Index: files/patch-detect_cpu_asm.s.diff
===================================================================
--- files/patch-detect_cpu_asm.s.diff	(revision 0)
+++ files/patch-detect_cpu_asm.s.diff	(revision 0)
@@ -0,0 +1,109 @@
+--- detect_cpu_asm.s.orig	2006-09-13 15:51:20.000000000 -0600
++++ detect_cpu_asm.s	2008-10-21 23:25:59.000000000 -0600
+@@ -52,9 +52,9 @@
+     check if cpuid is available
+ */
+ 
+-    .globl  x86_check_cpuid_flag
++    .globl  _x86_check_cpuid_flag
+ 
+-x86_check_cpuid_flag:
++_x86_check_cpuid_flag:
+ 	/* save ecx register in the stack */
+ 	pushl	%ecx
+ 
+@@ -109,9 +109,9 @@
+     returns: pointer to static buffer
+ */
+ 
+-    .globl x86_exec_cpuid
++    .globl _x86_exec_cpuid
+ 
+-x86_exec_cpuid:
++_x86_exec_cpuid:
+     /* get function number */
+     movl    4(%esp),%eax
+ 
+@@ -122,10 +122,10 @@
+     cpuid
+ 
+     /* copy register values */
+-    movl    %eax,x86_cpu_reg_eax
+-    movl    %ebx,x86_cpu_reg_ebx
+-    movl    %ecx,x86_cpu_reg_ecx
+-    movl    %edx,x86_cpu_reg_edx
++    movl    %eax,_x86_cpu_reg_eax
++    movl    %ebx,_x86_cpu_reg_ebx
++    movl    %ecx,_x86_cpu_reg_ecx
++    movl    %edx,_x86_cpu_reg_edx
+ 
+     popl    %edx
+     popl    %ecx
+@@ -152,9 +152,9 @@
+     check if cpuid is available
+ */
+ 
+-    .globl  x86_check_cpuid_flag
++    .globl  _x86_check_cpuid_flag
+ 
+-x86_check_cpuid_flag:
++_x86_check_cpuid_flag:
+ 	pushq	%rcx        /* save rcx register */
+ 
+ 	pushfq
+@@ -186,9 +186,9 @@
+     returns: pointer to static buffer
+ */
+ 
+-    .globl x86_exec_cpuid
++    .globl _x86_exec_cpuid
+ 
+-x86_exec_cpuid:
++_x86_exec_cpuid:
+     /* get function number (arg0 in rdi register) */
+     movq    %rdi,%rax
+ 
+@@ -199,10 +199,10 @@
+     cpuid
+ 
+     /* copy register values */
+-    movl    %eax,x86_cpu_reg_eax
+-    movl    %ebx,x86_cpu_reg_ebx
+-    movl    %ecx,x86_cpu_reg_ecx
+-    movl    %edx,x86_cpu_reg_edx
++    movl    %eax,_x86_cpu_reg_eax
++    movl    %ebx,_x86_cpu_reg_ebx
++    movl    %ecx,_x86_cpu_reg_ecx
++    movl    %edx,_x86_cpu_reg_edx
+ 
+     popq    %rdx
+     popq    %rcx
+@@ -218,20 +218,20 @@
+ 
+ .data
+ 
+-    .globl x86_cpu_reg_eax
+-x86_cpu_reg_eax:
++    .globl _x86_cpu_reg_eax
++_x86_cpu_reg_eax:
+     .long 0
+ 
+-    .globl x86_cpu_reg_ebx
+-x86_cpu_reg_ebx:
++    .globl _x86_cpu_reg_ebx
++_x86_cpu_reg_ebx:
+     .long 0
+ 
+-    .globl x86_cpu_reg_ecx
+-x86_cpu_reg_ecx:
++    .globl _x86_cpu_reg_ecx
++_x86_cpu_reg_ecx:
+     .long 0
+ 
+-    .globl x86_cpu_reg_edx
+-x86_cpu_reg_edx:
++    .globl _x86_cpu_reg_edx
++_x86_cpu_reg_edx:
+     .long 0
+ 
+ #endif /* ARCH_X86_32 || ARCH_X86_64 */
Index: files/patch-pmkcfg.sh
===================================================================
--- files/patch-pmkcfg.sh	(revision 0)
+++ files/patch-pmkcfg.sh	(revision 0)
@@ -0,0 +1,11 @@
+--- pmkcfg.sh.orig	2007-05-27 04:54:30.000000000 -0600
++++ pmkcfg.sh	2008-10-21 23:31:18.000000000 -0600
+@@ -410,7 +410,7 @@
+ fi
+ 
+ mkf_sed 'BINDIR' '$(PREFIX)/bin'
+-mkf_sed 'MANDIR' '$(PREFIX)/man'
++mkf_sed 'MANDIR' '$(PREFIX)/share/man'
+ mkf_sed 'MAN1DIR' '$(MANDIR)/man1'
+ mkf_sed 'MAN5DIR' '$(MANDIR)/man5'
+ mkf_sed 'MAN8DIR' '$(MANDIR)/man8'
Index: Portfile
===================================================================
--- Portfile	(revision 41059)
+++ Portfile	(working copy)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		pmk
-version		0.10.1
+version		0.10.4
 
 categories	devel
 platforms	darwin 
@@ -16,15 +16,17 @@
 homepage	http://pmk.sourceforge.net/
 
 master_sites	sourceforge
-checksums	md5 98587c97adda6785bb0615a420815dae
+checksums	md5     0a82cca7cb4912eed6eea133ce7b399b \
+		sha1    0c3392226a89aac264afda0252d0e0a719c85564 \
+		rmd160  ea93ac1f71404cf7e42a6659f299d458c54aad6f
 
+patchfiles	patch-detect_cpu_asm.s.diff patch-pmkcfg.sh
+
 configure {
-	system "cd ${worksrcpath} && ./pmkcfg.sh"
+	system "cd ${worksrcpath} && env SYSCONFDIR=${prefix}/etc ./pmkcfg.sh -p ${prefix}"
 }
 
-post-destroot {
-	file rename -force ${destroot}/usr/local/bin ${destroot}${prefix}
-	file rename -force ${destroot}/usr/local/man/man1/ ${destroot}${prefix}/share/man/
-	file rename -force ${destroot}/usr/local/man/man5/ ${destroot}${prefix}/share/man/
-	file rename -force ${destroot}/usr/local/man/man8/ ${destroot}${prefix}/share/man/
-} 
+post-activate {
+	system "${prefix}/bin/pmksetup"
+}
+
