Changeset 14446 for trunk/dports


Ignore:
Timestamp:
Oct 6, 2005, 7:33:53 PM (19 years ago)
Author:
mww
Message:

Bug: #5261
Submitted by: joe@…
Reviewed by: mww@

some spring cleaning, inc. revision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/www/phpmyadmin/Portfile

    r14347 r14446  
    1 # $Id: Portfile,v 1.5 2005/09/30 18:05:16 toby Exp $
    2 PortSystem              1.0
     1# $Id: Portfile,v 1.6 2005/10/06 19:33:53 mww Exp $
     2PortSystem 1.0
    33
    44name                    phpmyadmin
    55version                 2.6.4-pl1
     6revision                1
    67categories              www
    78maintainers             joe@netmusician.org
     
    1516                                and is available in 47 languages.
    1617homepage                http://www.phpmyadmin.net
    17 master_sites    sourceforge
     18master_sites            sourceforge
    1819distname                phpMyAdmin-${version}
    1920use_bzip2               yes
     
    2122platforms               darwin freebsd
    2223
    23 # Not sure this is the best way to handle this, but it works for now
    24 # if no apache variant is set, force set it
    25 if { ![variant_isset apache] && ![variant_isset apache2] } {
    26         set variations(apache) +
    27 }
    28 # if no mysql variant is set, force set it
    29 if { ![variant_isset mysql] && ![variant_isset mysql4] } {
    30         set variations(mysql4) +
    31 }
    32 # if no php variant is set, force set it
    33 if { ![variant_isset php4] && ![variant_isset php5] } {
    34         set variations(php4) +
    35 }
     24default_variants        +apache +mysql4 +php4
    3625
    3726variant apache conflicts apache2 {
    38         if { ![variant_isset apache_layout] } {
    39                 depends_lib-append      port:apache
    40         }
    41 }
    42 
    43 variant apache_layout requires apache conflicts apache2 {
    4427        depends_lib-append      port:apache
    4528}
     
    5033
    5134variant php4 conflicts php5 {
    52         if { [variant_isset apache2] } {
    53                 depends_lib-append path:${prefix}/apache2/modules/libphp4.so:php4
    54         } else {
    55                 if { ![variant_isset apache_layout] } {
    56                         depends_lib-append path:${prefix}/libexec/apache/libphp4.so:php4
    57                 } else {
    58                         depends_lib-append path:${prefix}/apache/libexec/libphp4.so:php4
    59                 }
    60         }
     35        depends_lib-append      port:php4
    6136}
    6237
    6338variant php5 conflicts php4 {
    64         if { [variant_isset apache2] } {
    65                 depends_lib-append path:${prefix}/apache2/modules/libphp5.so:php5
    66         } else {
    67                 if { ![variant_isset apache_layout] } {
    68                         depends_lib-append path:${prefix}/libexec/apache/libphp5.so:php5
    69                 } else {
    70                         depends_lib-append path:${prefix}/apache/libexec/libphp5.so:php5
    71                 }
    72         }
     39        depends_lib-append      port:php5
    7340}
    7441
     
    8148}
    8249
     50set docpath ${destroot}${prefix}/www/data
     51             
    8352use_configure   no
    8453configure               {}
     
    8655
    8756destroot {
    88         if { [variant_isset apache] } {
    89                 if { [variant_isset apache_layout] } {
    90                         set docpath ${destroot}${prefix}/apache/htdocs
    91                 } else {
    92                         set docpath ${destroot}${prefix}/www/data
    93                 }
    94         } elseif { [variant_isset apache2] } {
    95                 set docpath ${destroot}${prefix}/apache2/htdocs
    96         }
    97         xinstall -d -m 0755 ${docpath}
    98         system "cp -R ${worksrcpath} ${docpath}/phpmyadmin"
     57        xinstall -d -m 0755 ${docpath}/phpmyadmin
     58        eval file copy [glob ${worksrcpath}/*] ${docpath}/phpmyadmin
    9959        foreach confname {config config.footer config.header} {
    10060                file rename ${docpath}/phpmyadmin/${confname}.inc.php \
    10161                        ${docpath}/phpmyadmin/${confname}.inc.php-dist
    10262        }
    103         if {$env(USER) == "root"} {
    104                 system "chown -R root:wheel ${docpath}/phpmyadmin"
    105         }
    10663}
    10764
    108 post-activate {
    109         # Make sure initial conf file is present and setup correctly
    110         if { [variant_isset apache] } {
    111                 if { [variant_isset apache_layout] } {
    112                         set docpath ${prefix}/apache/htdocs
    113                 } else {
    114                         set docpath ${prefix}/www/data
    115                 }
    116         } elseif { [variant_isset apache2] } {
    117                 set docpath ${prefix}/apache2/htdocs
    118         }
    119         foreach confname {config config.footer config.header} {
    120                 if {![file exists ${docpath}/phpmyadmin/${confname}.inc.php]} {
    121                         xinstall -m 0644 ${docpath}/phpmyadmin/${confname}.inc.php-dist \
    122                                 ${docpath}/phpmyadmin/${confname}.inc.php
    123                 }
    124         }
    125 }
    12665
Note: See TracChangeset for help on using the changeset viewer.