Portfile

# $Id: Portfile 22416 2007-02-28 16:38:13Z jwa@macports.org $

PortSystem 1.0
name midgard-core
version 1.8.2.2
revision 0
categories www
maintainers jwa@macports.org
description "A content management system"
long_description "Midgard is a content management system\
platform using Apache, PHP and MySQL."
platforms darwin
homepage http://www.midgard-project.org/

master_sites http://www.midgard-project.org/midcom-serveattachmentguid-b3d515ecc71611db9618f12c8943a927a927/

use_bzip2 yes
checksums sha1 663af53f4c943a3734aa82b0894ffc618d28c4ff
depends_lib port:expat \
port:gettext \
port:glib2 \
port:libiconv \
port:libxml2 \
port:mysql5 \
port:openssl \
port:zlib

configure.args --sysconfdir=${prefix}/etc/midgard/ \
--with-expat=${prefix} \
--with-mysql-config=mysql_config5 \
--with-iconv=${prefix}

post-destroot {
reinplace "s;${workpath}/mysql5/lib;${prefix}/lib/mysql5;" ${destroot}${prefix}/bin/midgard-config
reinplace "s;${workpath}/mysql5/include;${prefix}/include/mysql5;" ${destroot}${prefix}/bin/midgard-config
}

variant check {
depends_lib-append port:check
configure.args-append --with-check=${prefix}
}

post-install {
ui_msg "NB! The other parts of the package are:"
ui_msg "midgard-apache2, midgard-php4 and midgard-data"
}

platform darwin 8 {
configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}