--- Portfile.orig	2012-11-18 13:58:09.000000000 -0500
+++ Portfile	2012-11-18 14:03:34.000000000 -0500
@@ -5,10 +5,9 @@
 
 name                    arb
 epoch                   1
-version                 5.3
-revision                7
+version                 5.5
 categories              science
-maintainers             mac.com:matt.cottrell 
+maintainers             mac.com:matt.cottrell
 platforms               darwin
 
 description             ARB graphical DNA, RNA and amino acid sequence analysis tool
@@ -28,10 +27,10 @@
 distname                arbsrc
 extract.suffix          .tgz
 dist_subdir             ${name}/${version}
-worksrcdir              arbsrc_8210
+worksrcdir              arbsrc_9167
 
-checksums               sha1    535b72bfbf99f498deee17824c1f167228ad2088 \
-                        rmd160  d4b240da693f903d0e8bd59f4b1f1043b6935508
+checksums               sha256    25246355ccaebff2e3350a553732636896f0f9f21eca3bb2bcf75cbeb7ac92a9 \
+                        rmd160  f8b7b12cd9259b1b0f7cbbc29aca4f85585e8b9f
 
 depends_build           port:imake \
                         port:makedepend
@@ -44,22 +43,34 @@
                         port:glew \
                         port:xfig \
                         port:gv \
-                        port:xorg-libXaw
+                        port:xorg-libXaw \
+                        port:gtime
 
 patchfiles              patch-ARB-config.makefile.diff \
-                        patch-ARB-makefile.diff \
-                        patch-ARB-RNA3D_GlobalHeader.hxx.diff \
-                        patch-ARB-DARWIN.pl.diff \
                         patch-ARB-intro.fig.diff \
-                        patch-GDEHELP-Makefile.diff
-                       
+                        patch-ARB-glpng.h.diff \
+                        patch-ARB-glpng.c.diff \
+                        patch-ARB-RNA3D_Textures.cxx.diff
+
 configure               {
+                        if {${build_arch} == "ppc" || ${build_arch} == "i386"} {
+                            set is64bit 0
+                        } else {
+                            set is64bit 1
+                        }
+
+                        file copy ${worksrcpath}/config.makefile.template ${worksrcpath}/config.makefile
+                        reinplace "s|@@64BIT@@|${is64bit}|g" ${worksrcpath}/config.makefile
+                        file copy ${filespath}/arb_macsetup ${worksrcpath}/bin
+                        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/bin/arb_macsetup
+                        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/SH/arb
+                        reinplace "s|@@GPP@@|${configure.cxx}|g" ${worksrcpath}/PERL2ARB/DARWIN.PL
+                        reinplace "s|@@LIBPERLDIR@@|[exec ${prefix}/bin/perl -e "use Config; print \$Config{archlib};"]/CORE|g" ${worksrcpath}/PERL2ARB/DARWIN.PL
                         reinplace -locale C "s| sed | gsed |g" ${worksrcpath}/GDEHELP/MENUS/align.menu \
                                                      ${worksrcpath}/util/arb_check_build_env.pl \
                                                      ${worksrcpath}/arb_install.sh \
                                                      ${worksrcpath}/WINDOW/AW_status.cxx \
                                                      ${worksrcpath}/SH/example_batch_probe_match.sh \
-                                                     ${worksrcpath}/GDEHELP/GDEmenus \
                                                      ${worksrcpath}/GDEHELP/genhelp.sh \
                                                      ${worksrcpath}/GDEHELP/genhelptree.sh \
                                                      ${worksrcpath}/SOURCE_TOOLS/make_java_dependencies.sh \
@@ -67,50 +78,45 @@
                                                      ${worksrcpath}/AISC_COM/AISC/Makefile \
                                                      ${worksrcpath}/GDEHELP/Makefile \
                                                      ${worksrcpath}/HELP_SOURCE/genhelp/Makefile \
-                                                     ${worksrcpath}/GDEHELP/Makefile.helpfiles
-                        file copy ${worksrcpath}/config.makefile.template ${worksrcpath}/config.makefile
-                        file copy ${filespath}/arb_macsetup ${worksrcpath}/bin
-                        reinplace "s|@@LIBPERLDIR@@|[exec ${prefix}/bin/perl -e "use Config; print \$Config{archlib};"]/CORE|g" ${worksrcpath}/PERL2ARB/DARWIN.PL
-                        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/bin/arb_macsetup
-
-                        if {${build_arch} == "ppc" || ${build_arch} == "i386"} {
-                            set is64bit 0
-                        } else {
-                            set is64bit 1
-                        }
-                        reinplace "s|@@64BIT@@|${is64bit}|g" ${worksrcpath}/config.makefile
+                                                     ${worksrcpath}/GDEHELP/Makefile.helpfiles \
 }
 
 build.env-append        PREFIX=${prefix} \
                         ARBHOME=${worksrcpath} \
-                        PATH=${worksrcpath}/bin:$env(PATH)
+                        PATH=${worksrcpath}/bin:${prefix}/libexec/gnubin:$env(PATH)
 
-# https://trac.macports.org/ticket/33756
-if {${configure.compiler} == "clang"} {
-    configure.compiler llvm-gcc-4.2
-}
+                        # https://trac.macports.org/ticket/33756
+                        if {${configure.compiler} == "clang"} {
+                             configure.compiler llvm-gcc-4.2
+                        }
 
 build.args              GCC=${configure.cc} \
                         GPP=${configure.cxx}
-
+                                                
 destroot.keepdirs       ${destroot}${prefix}/share/arb/lib/pts
+
 destroot                {
                         # Give the default settings a recognizable name ending in .default
                         file rename ${worksrcpath}/lib/arb_tcp.dat ${worksrcpath}/lib/arb_tcp.dat.default
                         file rename ${worksrcpath}/lib/macros ${worksrcpath}/lib/macros.default
 
                         eval xinstall -m 0755 [glob ${worksrcpath}/bin/*] ${destroot}${prefix}/bin
+
                         file mkdir ${destroot}${prefix}/share/arb/bin
-                        file copy ${worksrcpath}/lib ${destroot}${prefix}/share/arb/lib
-                        file copy ${worksrcpath}/GDEHELP ${destroot}${prefix}/share/arb/GDEHELP
-                        file mkdir ${destroot}${prefix}/lib/help
-                        file copy ${worksrcpath}/HELP_SOURCE/oldhelp ${destroot}${prefix}/lib/help
                         file copy ${worksrcpath}/PERL_SCRIPTS ${destroot}${prefix}/share/arb/PERL_SCRIPTS
+                        file copy ${worksrcpath}/GDEHELP ${destroot}${prefix}/share/arb/GDEHELP
+                        file copy ${worksrcpath}/lib ${destroot}${prefix}/share/arb/lib
                         file copy ${worksrcpath}/SH ${destroot}${prefix}/share/arb/SH
                         file copy ${worksrcpath}/demo.arb ${destroot}${prefix}/share/arb
+
+                        file mkdir ${destroot}${prefix}/lib/help
+                        file copy ${worksrcpath}/HELP_SOURCE/oldhelp ${destroot}${prefix}/lib/help
+
                         ln -s ${prefix}/bin/arb_pt_server ${destroot}${prefix}/share/arb/bin/arb_pt_server
                         ln -s ${prefix}/bin/arb_name_server ${destroot}${prefix}/share/arb/bin/arb_name_server
+
                         xinstall -m 777 -d ${destroot}${prefix}/share/arb/lib/pts
+
 }
 
 # to be investigated later
@@ -162,8 +168,12 @@
 
       enter the following command:
       source ~/.cshrc
-3)
-create a text file in your home folder called .xmodmap that contains the text below:
+
+C) to set up ARB for another user on this computer log into their account and type ${prefix}/bin/arb_macsetup
+
+************************************************************************************************************************************
+You can set up keyboard shortcuts manually by creating a text file in your home folder called .xmodmap that contains the text below:
+************************************************************************************************************************************
 
 clear Mod1
 clear Mod2
@@ -173,13 +183,15 @@
 add Mod1 = Meta_L Meta_R
 add Mod2 = Mode_switch
 
-C)
-to set up ARB for another user on this computer log into their account and type ${prefix}/bin/arb_macsetup
-
-D)
-type arb to start ARB
+*******************************************************************
+Use keys Control+Command Arrow Key to jump over bases
+Use Keys Option Arrow Key to pull in bases across alignment gaps
+Use the right Command Key plus a letter key to activate a menu item
+*******************************************************************
 
-***********************************************************
+*****************************
+Type 'arb' to start using ARB
+*****************************
 
 A demo data base is located at ${prefix}/share/arb/demo.arb
 
@@ -195,10 +207,6 @@
 ${prefix}/share/arb/lib/macros.default/
 ${prefix}/share/arb/lib/arb_tcp.dat.default
 
-Use keys Control+Command Arrow Key to jump over bases
-Use Keys Option Arrow Key to pull in bases across alignment gaps
-Use the right Command Key plus a letter key to activate a menu item
-
 These notes can be viewed at any time by typing 'port notes arb'
 
 Please cite: Wolfgang Ludwig, et al. (2004) ARB: a software environment for sequence data. Nucleic Acids Research. 32:1363-1371
