Ticket #28276: Portfile-OS-and-hardware-bitness.diff

File Portfile-OS-and-hardware-bitness.diff, 12.2 KB (added by matt.cottrell@…, 13 years ago)

Build 32- or 64-bit (Portfile vs current Portfile in the repository)

  • Portfile

    old new  
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    2 # $Id: Portfile 59128 2009-10-10 03:15:21Z macsforever2000@macports.org $
     2# $Id$
    33
    44PortSystem              1.0
    55
    66name                    arb
    7 version                 5.1
    87epoch                   1
     8version                 5.2
    99categories              science
    1010maintainers             me.com:matt.cottrell
    1111platforms               darwin
     
    1818                        nucleotide and amino acid sequences.  Features include routines for designing fluorescence in situ \
    1919                        hybridization (FISH) probes and PCR and sequencing primers.  Phylogenetic trees can be generated and \
    2020                        sequences can be added to existing trees.  ARB maintains links between the phylogenetic trees and sequences \
    21                         for data base search and query.  The Silva Comprehensive Ribosomal RNA Database (http://www.arb-silva.de/) \
    22                         maintaines up-to-date databases.  64-bit ARB is built on 10.6 in order to work with the largest data bases. \
    23                         32-bit ARB is built on 10.5.  An active community of scientists exchange tips on the ARB Yahoo! discussion group \
     21                        for database search and query.  The Silva Comprehensive Ribosomal RNA Database (http://www.arb-silva.de/) \
     22                        maintains up-to-date databases.  An active community of scientists exchanges tips on the ARB Yahoo! discussion group \
    2423                        (http://tech.groups.yahoo.com/group/arb_users/). Citation: Wolfgang Ludwig, et al. (2004) ARB: a software environment \
    2524                        for sequence data. Nucleic Acids Research. 32:1363-1371.
    2625
    27 fetch.type              svn
    28 svn.url                 http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
    29 svn.revision            6215
    30 svn.method              checkout
    31 #fetch.user             coder             
    32 #fetch.password         gimmeARBsource
    33 #work around until ticket #21232 is resolved
    34 svn.args                --username coder --password gimmeARBsource
     26master_sites            http://download.arb-home.de/release/arb_${version}/
     27distname                arbsrc
     28extract.suffix          .tgz
     29dist_subdir             ${name}/${version}
     30worksrcdir              arbsrc_6779
     31
     32checksums               sha1    4ee493a16ece5231d46ed1071407c06e733d67c8 \
     33                        rmd160  d9d99d0ebadaa293091ff93f6ca588b2321bd8b0
     34
     35depends_build           port:gsed \
     36                        port:imake \
     37                        port:makedepend
    3538
    3639depends_lib             port:openmotif \
    3740                        port:lynx \
    38                         port:gsed \
    39                         port:imake \
    4041                        port:sablotron \
    4142                        port:mesa \
    4243                        port:glw \
    4344                        port:glew \
    44                         port:tiff
     45                        port:tiff \
     46                        port:xfig \
     47                        port:gv
    4548
    4649patchfiles              patch-ARB-config.makefile.diff \
    4750                        patch-ARB-makefile.diff \
    4851                        patch-ARB-RNA3D_GlobalHeader.hxx.diff \
    49                         patch-ARB-DARWIN.pl.diff
     52                        patch-ARB-DARWIN.pl.diff \
     53                        arb_intro.fig.diff \
     54                        patch-ARB-glpng.diff
     55                       
    5056                       
    51 worksrcdir              stable_5.0
     57platform darwin       {
     58                       if {${build_arch} == "ppc" || ${build_arch} == "i386" } {
     59                           set is64bit 0
     60                           if {${os.platform} == "darwin" && ${os.major} >= 9} {
     61                              if {[sysctl hw.cpu64bit_capable] == 1} {
     62                                  ui_msg "64-bit capable hardware: Building 32-bit ARB.  Check the setting of build_arch in ${prefix}/etc/macports/macports.conf"
     63                               } else {
     64                                  ui_msg "not 64-bit capable hardware: Building 32-bit ARB."
     65                               }
     66                            } else {
     67                               ui_msg "unable to determine 64-bit hardware capability: Building 32-bit ARB."
     68                            }
     69                       } else {
     70                          set is64bit 1
     71                          ui_msg "64-bit capable hardware: Building 64-bit ARB."
     72                       }
     73}
     74
     75configure              {
    5276
    53 use_configure           no
    54 configure.env           ARBHOME=${worksrcpath} 
    55 configure.env-append    PATH=${worksrcpath}/bin:$env(PATH)
    56 
    57 configure               {
    58                         reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/PERL2ARB/DARWIN.PL
    59                         reinplace "s| sed | gsed |g" ${worksrcpath}/GDEHELP/MENUS/align.menu
    60                         reinplace "s| sed | gsed |g" ${worksrcpath}/util/arb_check_build_env.pl
    61                         reinplace "s| sed | gsed |g" ${worksrcpath}/arb_install.sh
    62                         reinplace "s| sed | gsed |g" ${worksrcpath}/WINDOW/AW_status.cxx
    63                         reinplace "s| sed | gsed |g" ${worksrcpath}/SH/example_batch_probe_match.sh
    64                         reinplace "s| sed | gsed |g" ${worksrcpath}/GDEHELP/GDEmenus
    65                         reinplace "s| sed | gsed |g" ${worksrcpath}/GDEHELP/genhelp.sh
    66                         reinplace "s| sed | gsed |g" ${worksrcpath}/GDEHELP/genhelptree.sh
    67                         reinplace "s| sed | gsed |g" ${worksrcpath}/SOURCE_TOOLS/make_java_dependencies.sh
    68                         reinplace "s| sed | gsed |g" ${worksrcpath}/HELP_SOURCE/Makefile
    69                         reinplace "s| sed | gsed |g" ${worksrcpath}/AISC_COM/AISC/Makefile
    70                         reinplace "s| sed | gsed |g" ${worksrcpath}/GDEHELP/Makefile
    71                         reinplace "s| sed | gsed |g" ${worksrcpath}/HELP_SOURCE/genhelp/Makefile
    72                         reinplace "s| sed | gsed |g" ${worksrcpath}/GDEHELP/Makefile.helpfiles
     77                        reinplace "s| sed | gsed |g" ${worksrcpath}/GDEHELP/MENUS/align.menu \
     78                                                     ${worksrcpath}/util/arb_check_build_env.pl \
     79                                                     ${worksrcpath}/arb_install.sh \
     80                                                     ${worksrcpath}/WINDOW/AW_status.cxx \
     81                                                     ${worksrcpath}/SH/example_batch_probe_match.sh \
     82                                                     ${worksrcpath}/GDEHELP/GDEmenus \
     83                                                     ${worksrcpath}/GDEHELP/genhelp.sh \
     84                                                     ${worksrcpath}/GDEHELP/genhelptree.sh \
     85                                                     ${worksrcpath}/SOURCE_TOOLS/make_java_dependencies.sh \
     86                                                     ${worksrcpath}/HELP_SOURCE/Makefile \
     87                                                     ${worksrcpath}/AISC_COM/AISC/Makefile \
     88                                                     ${worksrcpath}/GDEHELP/Makefile \
     89                                                     ${worksrcpath}/HELP_SOURCE/genhelp/Makefile \
     90                                                     ${worksrcpath}/GDEHELP/Makefile.helpfiles
    7391                        file copy ${worksrcpath}/config.makefile.template ${worksrcpath}/config.makefile
    74                         reinplace "s|@@PREFIX@@|${prefix}|g" ${filespath}/arb_macsetup
    7592                        file copy ${filespath}/arb_macsetup ${worksrcpath}/bin
    76 }
     93                        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/PERL2ARB/DARWIN.PL \
     94                                                             ${worksrcpath}/bin/arb_macsetup
    7795
    78 platform darwin 9      {
    79 post-configure         {
    80                        reinplace "s|ARB_64 := 1# compile 64bit ARB version|ARB_64 := 0# compile 64bit ARB version|g" ${worksrcpath}/config.makefile
    81 }
     96                        reinplace "s|OSX_SDK:=/Developer/SDKs/MacOSX10.5.sdk|OSX_SDK:=${configure.sdkroot}|g" ${worksrcpath}/Makefile
     97
     98                        reinplace "s|@@64BIT@@|${is64bit}|g" ${worksrcpath}/config.makefile
    8299}
    83100
    84 build.env-append        ${configure.env}
    85 build.env-append        PREFIX=${prefix}
     101build.env-append        PREFIX=${prefix} \
     102                        ARBHOME=${worksrcpath} \
     103                        PATH=${worksrcpath}/bin:$env(PATH)
     104                       
     105build.args              GCC=${configure.cc} \
     106                        GPP=${configure.cxx} \
     107                        CPPreal=${configure.cpp}
    86108
    87109destroot.keepdirs       ${destroot}${prefix}/share/arb/lib/pts
    88110
    89111destroot                {
    90112                        eval xinstall -m 0755 [glob ${worksrcpath}/bin/*] ${destroot}${prefix}/bin
    91                         file mkdir ${destroot}${prefix}/share/arb
    92113                        file mkdir ${destroot}${prefix}/share/arb/bin
    93114                        file copy ${worksrcpath}/lib ${destroot}${prefix}/share/arb/lib
    94115                        file copy ${worksrcpath}/GDEHELP ${destroot}${prefix}/share/arb/GDEHELP
     
    97118                        file copy ${worksrcpath}/PERL_SCRIPTS ${destroot}${prefix}/share/arb/PERL_SCRIPTS
    98119                        file copy ${worksrcpath}/SH ${destroot}${prefix}/share/arb/SH
    99120                        file copy ${worksrcpath}/demo.arb ${destroot}${prefix}/share/arb
    100 }
    101 
    102 post-destroot           {
    103121                        system "chmod a+w ${destroot}${prefix}/share/arb/lib/arb_tcp.dat"
    104122                        system "chmod a+w ${destroot}${prefix}/share/arb/lib/pts"
    105123                        system "chmod a+w ${destroot}${prefix}/share/arb/lib/macros"
    106                         system "ln -s ${prefix}/bin/arb_pt_server ${destroot}${prefix}/share/arb/bin/arb_pt_server"
    107                         system "ln -s ${prefix}/bin/arb_name_server ${destroot}${prefix}/share/arb/bin/arb_name_server"
     124                        ln -s ${prefix}/bin/arb_pt_server ${destroot}${prefix}/share/arb/bin/arb_pt_server
     125                        ln -s ${prefix}/bin/arb_name_server ${destroot}${prefix}/share/arb/bin/arb_name_server
     126                        system "rm -rf `find ${destroot}${prefix}/share/arb -type d -name .svn`"
    108127}
    109                        
    110 post-activate           {
    111                         system "rm -rf `find ${prefix}/share/arb -type d -name .svn`"
    112128
    113 ui_msg "
     129universal_variant       no
     130
     131notes "
    114132****************************************************************
    115133Before running ARB you must set ARBHOME and add ARB to your PATH
    116134****************************************************************
    117135
    118136You have two options (A is easier, B is more difficult):
    119137
    120 A) Open a new terminal window and type arb_macsetup to set up your environment automatically
     138A) Easy - open a new terminal window and type arb_macsetup to set the necessary environment variables automatically.  This script also enables keyboard shortcuts used in the sequence editor.
    121139
    122140or
    123141       
    124 B) Follow the steps below:
     142B) More difficult - follow the steps below:
    125143
    126 1a)
     1441)
    127145bash users add the following lines to your ~/.profile or to your ~/.bashrc
    128146
    129147      ARBHOME=${prefix}/share/arb;export ARBHOME
     
    132150
    133151      enter the following command:
    134152      . ~/.profile
    135 1b)
     1532)
    136154tcsh users add the following lines to your ~/.cshrc
    137155      setenv ARBHOME ${prefix}/share/arb
    138156      setenv PATH ${prefix}/share/arb\:\$PATH
    139157
    140158      enter the following command:
    141159      source ~/.cshrc
    142 2)
     1603)
     161create a text file in your home folder called .xmodmap that contains the text below:
     162
     163clear Mod1
     164clear Mod2
     165keycode 63 = Mode_switch
     166keycode 66 = Meta_L
     167keycode 69 = Meta_R
     168add Mod1 = Meta_L Meta_R
     169add Mod2 = Mode_switch
     170
     171C)
     172to set up ARB for another user on this computer log into their account and type ${prefix}/bin/arb_macsetup
     173
     174D)
    143175type arb to start ARB
    144176
    145177A demo data base is located at ${prefix}/share/arb.demo.arb
    146178
    147179Please cite: Wolfgang Ludwig, et al. (2004) ARB: a software environment for sequence data. Nucleic Acids Research. 32:1363-1371
    148180"
    149 }
    150  No newline at end of file