Skip to content
Permalink
Browse files

Bug: https://trac.macports.org/ticket/5261

Submitted by:   joe@netmusician.org
Reviewed by:    mww@

some spring cleaning, inc. revision

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@14446 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Oct 6, 2005
1 parent 68d0cc7 commit 65737c10caa6d383daa43575d249a3a3474ff4a7
Showing with 11 additions and 72 deletions.
  1. +11 −72 www/phpmyadmin/Portfile
@@ -1,8 +1,9 @@
# $Id: Portfile,v 1.5 2005/09/30 18:05:16 toby Exp $
PortSystem 1.0
# $Id: Portfile,v 1.6 2005/10/06 19:33:53 mww Exp $
PortSystem 1.0

name phpmyadmin
version 2.6.4-pl1
revision 1
categories www
maintainers joe@netmusician.org
description A tool written in PHP intended to handle the administration \
@@ -14,33 +15,15 @@ long_description phpMyAdmin is a tool written in PHP intended to handle \
on fields, manage privileges,export data into various formats \
and is available in 47 languages.
homepage http://www.phpmyadmin.net
master_sites sourceforge
master_sites sourceforge
distname phpMyAdmin-${version}
use_bzip2 yes
checksums md5 aec734f9c9907f77a9dc497a226634e9
platforms darwin freebsd

# Not sure this is the best way to handle this, but it works for now
# if no apache variant is set, force set it
if { ![variant_isset apache] && ![variant_isset apache2] } {
set variations(apache) +
}
# if no mysql variant is set, force set it
if { ![variant_isset mysql] && ![variant_isset mysql4] } {
set variations(mysql4) +
}
# if no php variant is set, force set it
if { ![variant_isset php4] && ![variant_isset php5] } {
set variations(php4) +
}
default_variants +apache +mysql4 +php4

variant apache conflicts apache2 {
if { ![variant_isset apache_layout] } {
depends_lib-append port:apache
}
}

variant apache_layout requires apache conflicts apache2 {
depends_lib-append port:apache
}

@@ -49,27 +32,11 @@ variant apache2 conflicts apache {
}

variant php4 conflicts php5 {
if { [variant_isset apache2] } {
depends_lib-append path:${prefix}/apache2/modules/libphp4.so:php4
} else {
if { ![variant_isset apache_layout] } {
depends_lib-append path:${prefix}/libexec/apache/libphp4.so:php4
} else {
depends_lib-append path:${prefix}/apache/libexec/libphp4.so:php4
}
}
depends_lib-append port:php4
}

variant php5 conflicts php4 {
if { [variant_isset apache2] } {
depends_lib-append path:${prefix}/apache2/modules/libphp5.so:php5
} else {
if { ![variant_isset apache_layout] } {
depends_lib-append path:${prefix}/libexec/apache/libphp5.so:php5
} else {
depends_lib-append path:${prefix}/apache/libexec/libphp5.so:php5
}
}
depends_lib-append port:php5
}

variant mysql conflicts mysql4 {
@@ -80,47 +47,19 @@ variant mysql4 conflicts mysql {
depends_lib-append port:mysql4
}

set docpath ${destroot}${prefix}/www/data

use_configure no
configure {}
build {}

destroot {
if { [variant_isset apache] } {
if { [variant_isset apache_layout] } {
set docpath ${destroot}${prefix}/apache/htdocs
} else {
set docpath ${destroot}${prefix}/www/data
}
} elseif { [variant_isset apache2] } {
set docpath ${destroot}${prefix}/apache2/htdocs
}
xinstall -d -m 0755 ${docpath}
system "cp -R ${worksrcpath} ${docpath}/phpmyadmin"
xinstall -d -m 0755 ${docpath}/phpmyadmin
eval file copy [glob ${worksrcpath}/*] ${docpath}/phpmyadmin
foreach confname {config config.footer config.header} {
file rename ${docpath}/phpmyadmin/${confname}.inc.php \
${docpath}/phpmyadmin/${confname}.inc.php-dist
}
if {$env(USER) == "root"} {
system "chown -R root:wheel ${docpath}/phpmyadmin"
}
}

post-activate {
# Make sure initial conf file is present and setup correctly
if { [variant_isset apache] } {
if { [variant_isset apache_layout] } {
set docpath ${prefix}/apache/htdocs
} else {
set docpath ${prefix}/www/data
}
} elseif { [variant_isset apache2] } {
set docpath ${prefix}/apache2/htdocs
}
foreach confname {config config.footer config.header} {
if {![file exists ${docpath}/phpmyadmin/${confname}.inc.php]} {
xinstall -m 0644 ${docpath}/phpmyadmin/${confname}.inc.php-dist \
${docpath}/phpmyadmin/${confname}.inc.php
}
}
}

0 comments on commit 65737c1

Please sign in to comment.
You can’t perform that action at this time.