Ticket #5261: phpmyadmin.2.diff
File phpmyadmin.2.diff, 3.5 KB (added by joe@…, 19 years ago) |
---|
-
Portfile
old new 14 14 on fields, manage privileges,export data into various formats \ 15 15 and is available in 47 languages. 16 16 homepage http://www.phpmyadmin.net 17 master_sites sourceforge17 master_sites sourceforge 18 18 distname phpMyAdmin-${version} 19 19 use_bzip2 yes 20 20 checksums md5 aec734f9c9907f77a9dc497a226634e9 21 21 platforms darwin freebsd 22 22 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 } 23 default_variants +apache +mysql4 +php4 36 24 37 25 variant apache conflicts apache2 { 38 if { ![variant_isset apache_layout] } {39 depends_lib-append port:apache40 }41 }42 43 variant apache_layout requires apache conflicts apache2 {44 26 depends_lib-append port:apache 45 27 } 46 28 … … 49 31 } 50 32 51 33 variant 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 } 34 depends_lib-append port:php4 61 35 } 62 36 63 37 variant 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 } 38 depends_lib-append port:php5 73 39 } 74 40 75 41 variant mysql conflicts mysql4 { … … 80 46 depends_lib-append port:mysql4 81 47 } 82 48 49 set docpath ${destroot}${prefix}/www/data 50 83 51 use_configure no 84 52 configure {} 85 53 build {} 86 54 87 55 destroot { 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" 56 xinstall -d -m 0755 ${docpath}/phpmyadmin 57 eval file copy [glob ${worksrcpath}/*] ${docpath}/phpmyadmin 99 58 foreach confname {config config.footer config.header} { 100 59 file rename ${docpath}/phpmyadmin/${confname}.inc.php \ 101 60 ${docpath}/phpmyadmin/${confname}.inc.php-dist 102 61 } 103 if {$env(USER) == "root"} {104 system "chown -R root:wheel ${docpath}/phpmyadmin"105 }106 62 } 107 63 108 post-activate {109 # Make sure initial conf file is present and setup correctly110 if { [variant_isset apache] } {111 if { [variant_isset apache_layout] } {112 set docpath ${prefix}/apache/htdocs113 } else {114 set docpath ${prefix}/www/data115 }116 } elseif { [variant_isset apache2] } {117 set docpath ${prefix}/apache2/htdocs118 }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.php123 }124 }125 }126 64