Ticket #5261: phpmyadmin.diff
File phpmyadmin.diff, 3.8 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:apache 40 } 26 depends_lib-append port:apache 41 27 } 42 28 43 29 variant apache_layout requires apache conflicts apache2 { … … 49 35 } 50 36 51 37 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 } 38 depends_lib-append port:php4 61 39 } 62 40 63 41 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 } 42 depends_lib-append port:php5 73 43 } 74 44 75 45 variant mysql conflicts mysql4 { … … 80 50 depends_lib-append port:mysql4 81 51 } 82 52 53 if { [variant_isset apache] } { 54 if { [variant_isset apache_layout] } { 55 set docpath ${destroot}${prefix}/apache/htdocs 56 } else { 57 set docpath ${destroot}${prefix}/www/data 58 } 59 } elseif { [variant_isset apache2] } { 60 set docpath ${destroot}${prefix}/apache2/htdocs 61 } 62 83 63 use_configure no 84 64 configure {} 85 65 build {} 86 66 87 67 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" 68 xinstall -d -m 0755 ${docpath}/phpmyadmin 69 eval file copy [glob ${worksrcpath}/*] ${docpath}/phpmyadmin 99 70 foreach confname {config config.footer config.header} { 100 71 file rename ${docpath}/phpmyadmin/${confname}.inc.php \ 101 72 ${docpath}/phpmyadmin/${confname}.inc.php-dist 102 73 } 103 if {$env(USER) == "root"} {104 system "chown -R root:wheel ${docpath}/phpmyadmin"105 }106 74 } 107 75 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 76