Index: files/patch-makefile.in
===================================================================
--- files/patch-makefile.in	(revision 26495)
+++ files/patch-makefile.in	(working copy)
@@ -1,11 +1,26 @@
---- gnu/makefile.in-orig	Sat Apr 17 15:28:06 2004
-+++ gnu/makefile.in	Tue Aug  3 03:02:13 2004
-@@ -84,7 +84,7 @@
+--- gnu/makefile.in	2004-04-17 11:28:06.000000000 +0000
++++ gnu/makefile.in.new	2007-06-26 00:37:06.000000000 +0000
+@@ -80,7 +80,9 @@
+ # Definitions for compiling submodules
+ 
+ LDFLAGS = @LDFLAGS@ $(ADD_LDFLAGS)
+-DLL_FLAGS = @DLL_FLAGS@ $(ADD_LDFLAGS)
++# Can't strip symbols from dynamic libraries, at least on Darwin
++#DLL_FLAGS = @DLL_FLAGS@ $(ADD_LDFLAGS)
++DLL_FLAGS = @DLL_FLAGS@
  DLL_CFLAGS = @DLL_CFLAGS@
  REQUIRES_DEF = @REQUIRES_DEF@
  
--COPT = -c -I@OUT_DIR@ -I$(BASEDIR) -I$(SRC_DIR) @CFLAGS@ $(ALL_CFLAGS)
-+COPT = -c -I$(BASEDIR) -I$(SRC_DIR) @CFLAGS@ $(ALL_CFLAGS)
- STD_COPT = -DARJUTIL $(COPT)
- ARJ_COPT = -DSFL=4 $(COPT)
- ARJSFXV_COPT = -DSFL=3 $(COPT)
+@@ -253,7 +255,11 @@
+ 
+ $(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_OBJS) $(TOOLS_DIR)/postproc$x
+ 	$(CC) $(ALL_CFLAGS) $(DLL_FLAGS) -o $@ $(ARJCRYPT_OBJS) $(ARJCRYPT_DEF) $(LIBS)
+-	$(TOOLS_DIR)/postproc $@
++# Skip postproc step since it doesn't currently work.  We aren't producing an
++# EXE here, and postproc.c says that postproc is for storing the CRC of ARJ.EXE
++# in a file so that "ARJ i" can locate it, so I'm not sure that it's necessary
++# to postproc this anyway.
++#	$(TOOLS_DIR)/postproc $@
+ 
+ $(BASEDIR)/nmsg_crp.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+ 	$(TOOLS_DIR)/msgbind $(RESFILE) msg_crp $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
Index: files/patch-conifgure.in
===================================================================
--- files/patch-conifgure.in	(revision 26495)
+++ files/patch-conifgure.in	(working copy)
@@ -1,27 +1,13 @@
---- gnu/configure.in-orig	Sat Apr 17 15:28:06 2004
-+++ gnu/configure.in	Tue Aug  3 03:11:54 2004
-@@ -15,7 +15,7 @@
- AC_CONFIG_HEADER([../c_defs.h:config.h.in])
- 
- dnl Checks for the canonical system name
--AC_CANONICAL_HOST
-+dnl AC_CANONICAL_HOST
- 
- dnl Checks for programs.
- AC_PROG_CC
-@@ -39,12 +39,12 @@
- 
- dnl Platform-specific tuning
- PROG_EXT=
--DLL_EXT=".so"
--DLL_FLAGS="-shared"
-+DLL_EXT=".dylib"
-+dnl DLL_FLAGS="-shared"
- REQUIRES_DEF=
- OS_ID="UNIX"
- OS_DEF="-D_UNIX"
--DLL_CFLAGS="-fPIC"
-+dnl DLL_CFLAGS="-fPIC"
- 
- case $host_os in
- linux*)
+--- gnu/configure.in	2005-06-21 18:27:20.000000000 +0000
++++ gnu/configure.in.new	2007-06-25 23:15:00.000000000 +0000
+@@ -62,6 +62,10 @@
+         DLL_FLAGS="-shared -export-dynamic"
+         LD_STRIP="gnu/stripgcc.lnk"
+ 	;;
++darwin*)
++	DLL_EXT=".dylib"
++	DLL_FLAGS="-dynamiclib"
++	;;
+ interix3*)
+ 	# not ELF
+ 	DLL_FLAGS="-shared"
Index: files/patch-postproc.c
===================================================================
--- files/patch-postproc.c	(revision 0)
+++ files/patch-postproc.c	(revision 0)
@@ -0,0 +1,11 @@
+--- postproc.c	2003-06-22 11:12:28.000000000 +0000
++++ postproc.c.new	2007-06-25 21:00:52.000000000 +0000
+@@ -29,7 +29,7 @@
+                                0x04, 0xB0, 0x05, 0};
+ static unsigned char encryption_pattern[]={0xB0, 0x02, 0xB0, 0x02, 0xB0, 0x03, 0xB0,
+                                  0x04, 0xB0, 0x05, 0};
+-static unsigned char integrity_pattern[]={0xB0, 0x03, 0xB0, 0x02, 0xB0, 0x03, 0xB0,
++static unsigned char integrity_pattern[]={0xB1, 0x03, 0xB0, 0x02, 0xB0, 0x03, 0xB0,
+                                  0x04, 0xB0, 0x05, 0};
+ static unsigned short self_check[]={0x9090, 0x9090, 0x138, 0x9090, 0x9090};
+ 

Property changes on: files/patch-postproc.c
___________________________________________________________________
Name: svn:eol-style
   + native

Index: files/patch-arjcrypt.c
===================================================================
--- files/patch-arjcrypt.c	(revision 26495)
+++ files/patch-arjcrypt.c	(working copy)
@@ -1,16 +0,0 @@
---- arjcrypt.c-orig	Sun Jun 22 15:12:28 2003
-+++ arjcrypt.c	Tue Aug  3 12:51:15 2004
-@@ -321,13 +321,10 @@
- 
- /* Main routine - just a stub. Don't even need it in an OS/2 DLL. */
- 
--#if TARGET==DOS
- int main()
- {
-- out_str(M_ARJCRYPT_BANNER);
-  return(0);
- }
--#endif
- 
- /* External entry */
- 
Index: Portfile
===================================================================
--- Portfile	(revision 26495)
+++ Portfile	(working copy)
@@ -2,38 +2,26 @@
 
 PortSystem 1.0
 name		arj
-version		3.10.21
+version		3.10.22
 categories	archivers sysutils
 description	create and extract files from dos .arj archives
 maintainers	jc@crazic.ru
 long_description ${description}
 homepage	http://arj.sourceforge.net/
 master_sites	sourceforge:arj
-checksums	md5 887d400ca6048516d4d447e1649af396
-depends_build	bin:gmake:gmake bin:autoconf:autoconf
+checksums	md5 f263bf3cf6d42a8b7e85b4fb514336d3
+depends_build	port:autoconf
+use_autoconf    yes
+autoconf.dir    gnu
+configure.dir   ${autoconf.dir}
 
-patchfiles	patch-arjcrypt.c patch-conifgure.in patch-environ.c patch-makefile.in patch-uxspec.c
-
-pre-configure {
-	system "cd ${build.dir}/gnu; autoconf"
+# Hack: copy XCode-provided config.guess and config.sub into source tree so that
+# it can properly guess the system type
+post-extract {
+    copy -force /usr/share/libtool/config.guess ${worksrcpath}/${autoconf.dir}
+    copy -force /usr/share/libtool/config.sub ${worksrcpath}/${autoconf.dir}
 }
 
-configure {
-	system "cd ${build.dir}/gnu; ./configure --prefix=${prefix}"
-}
+patchfiles	patch-conifgure.in patch-environ.c patch-makefile.in patch-postproc.c patch-uxspec.c
 
-pre-build {
-	system "gmake prepare"
-}
-
-destroot	{
-	xinstall -m 755 -d ${destroot}/${prefix}/bin
-	xinstall -m 755 -d ${destroot}/${prefix}/share/man/man1
-	xinstall -m 755 -d ${destroot}/${prefix}/share/doc/arj
-
-	file copy ${build.dir}/en/rs/arj/arj ${build.dir}/en/rs/arjdisp/arjdisp ${build.dir}/en/rs/arjsfx/arjsfx ${build.dir}/en/rs/arjsfxjr/arjsfxjr ${build.dir}/en/rs/arjsfxv/arjsfxv ${build.dir}/en/rs/rearj/rearj ${build.dir}/en/rs/register/arj-register ${build.dir}/en/rs/sfxstub/sfxstub ${destroot}/${prefix}/bin
-
-	file copy ${build.dir}/resource/en/arj-register.1 ${build.dir}/resource/en/arj.1 ${build.dir}/resource/en/arjdisp.1 ${build.dir}/resource/en/rearj.1 ${destroot}/${prefix}/share/man/man1
-	file copy ${build.dir}/resource/en/arjl.txt ${build.dir}/resource/en/arjs.txt ${build.dir}/resource/en/file_id.diz ${build.dir}/resource/en/history.txt ${build.dir}/resource/en/readme.txt ${build.dir}/resource/en/unix.txt ${destroot}/${prefix}/share/doc/arj
-
-}
+build.target    prepare all
