a project to simplify installation of open source software
on Mac OS X and Darwin
# $Id: Portfile 21387 2007-01-22 19:08:00Z takanori@macports.org $
#Synced with Fink, Version 1.6.0-1021
PortSystem 1.0
name koffice
version 1.6.0
revision 1
set kdeadmin kde-admindir-429
categories kde
maintainers nomaintainer@macports.org
description KDE office suite. \
NB KDE sound does not work.
long_description ${description}
platforms darwin
homepage http://www.koffice.org/
master_sites kde:stable/${name}-${version}/src/:koffice160 \
http://ranger.users.finkproject.org/distfiles/:admin \
http://ranger.befunk.com/fink/:admin \
http://astrange.ithinksw.net/~astrange/ranger-fink/:admin \
http://www.southofheaven.net/befunk/:admin \
http://www.opendarwin.org/~takanori/mirror/${name}/${version}_0/:patch \
kde:security_patches/:security
# opendarwin::koffice160
# opendarwin::admin
use_bzip2 yes
distname ${name}-${version}
set distpatch ${name}-${version}_0-tiger.patch
distfiles ${distname}.tar.bz2:koffice160 \
${distpatch}:patch \
${kdeadmin}.tar.bz2:admin \
post-koffice-1.6.0.diff:security \
koffce-xpdf-CVE-2007-0104.diff:security
depends_build port:autoconf \
port:unsermake
depends_lib port:kdebase3 \
port:ImageMagick \
port:lcms \
port:libwpd \
port:mysql4 \
port:ruby \
port:wv2
# port:python24 can't be found. looking for .so
# port:postgresql8 can't be found. looking for .so
checksums ${distname}.tar.bz2 md5 e669cf19b2e1c7db7029c0772c527c0d \
${kdeadmin}.tar.bz2 md5 73186bf0bdabf96c9f7d559de56d3772 \
${name}-${version}_0-panther.patch md5 adbb064e50d02af7f2eebbba51b5c907 \
${name}-${version}_0-tiger.patch md5 9f9e5b1c557d5e8da45c5f5f43daa90f \
post-koffice-1.6.0.diff md5 20dff20ccd2e184f1874aa60d85f4380 \
koffce-xpdf-CVE-2007-0104.diff md5 dc28881c39f11c040f8c942e4af238d1
extract.only ${distname}.tar.bz2
post-extract { system "cd ${worksrcpath} && bzcat -dc ${distpath}/${kdeadmin}.tar.bz2 | tar xf -" }
patchfiles
patch {
cd ${worksrcpath}
system "sed -e 's,@FINKPREFIX@,${prefix},g' ${distpath}/${distpatch} | patch -p1"
foreach file $patchfiles {
system "sed -e 's,@FINKPREFIX@,${prefix},g' ${filespath}/${file} | patch -p1"
}
system "perl -pi -e 's,-O2,-Os,g; s,doc/HTML,doc/kde,g; s,/usr/share/doc/packages/qt3/html,${prefix}/share/doc/qt3/html,g;' admin/*"
system "patch -p0 < ${distpath}/post-koffice-1.6.0.diff"
system "patch -p0 < ${distpath}/koffce-xpdf-CVE-2007-0104.diff"
}
post-patch {
reinplace "s|/lib/freetype219||g" ${worksrcpath}/environment-helper.sh
reinplace "s|--with-ssl-dir=/usr|--with-ssl-dir=\$PREFIX|g" ${worksrcpath}/environment-helper.sh
reinplace "s|HOME=/tmp|HOME=${workpath}|g" ${worksrcpath}/environment-helper.sh
reinplace "s|/tmp/buildlog|${workpath}/buildlog|g" ${worksrcpath}/build-helper.sh
foreach file {CompileScript.sh InstallScript.sh} {
file copy ${filespath}/${file} ${worksrcpath}
reinplace "s|%p|${prefix}|g" ${worksrcpath}/${file}
reinplace "s|%N|${name}|g" ${worksrcpath}/${file}
reinplace "s|%v|${version}|g" ${worksrcpath}/${file}
reinplace "s|%r|${revision}|g" ${worksrcpath}/${file}
reinplace "s|%c|${configure.args}|g" ${worksrcpath}/${file}
reinplace "s|%d|${destroot}|g" ${worksrcpath}/${file}
reinplace "s|%i|${destroot}${prefix}|g" ${worksrcpath}/${file}
file attributes ${worksrcpath}/${file} -permissions 0755
}
}
configure.args --enable-mysql --with-distribution='MacPorts/Mac OS X' --without-arts
# (libpqxx is missing.)
# --enable-pgsql --with-pgsqlincdir=${prefix}/include/pgsql8 --with-pgsqllibdir=${prefix}/lib/pgsql8 --with-pqxx-includes=${prefix}/include --with-pqxx-libraries=${prefix}/lib
configure {}
build { system "cd ${worksrcpath} && ./CompileScript.sh" }
destroot { system "cd ${worksrcpath} && ./InstallScript.sh" }
post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING COPYING.LIB INSTALL README ${destroot}${prefix}/share/doc/${name}
}
platform darwin 7 {
distfiles-delete ${distpatch}:patch
set distpatch ${name}-${version}_0-panther.patch
distfiles-append ${distpatch}:patch
post-patch {
# if {[variant_isset with-ruby]} {
system "perl -pi -e \"s|-bundle|-bundle -bundle_loader /usr/lib/crt1.o|g\" ${worksrcpath}/admin/libtool.m4.in"
# }
}
}