35 | | patchfiles |
36 | | patch { |
37 | | foreach file $patchfiles { |
38 | | system "cd ${worksrcpath} && sed -e 's,@FINKPREFIX@,${prefix},g' ${filespath}/${file} | patch -p1" |
39 | | } |
40 | | 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;' ${worksrcpath}/admin/*" |
41 | | system "echo \"KDE_ENABLE_HIDDEN_VISIBILITY\" >> ${worksrcpath}/configure.in.in" |
42 | | } |
43 | | |
44 | | post-patch { |
45 | | reinplace "s|/lib/freetype219||g" ${worksrcpath}/environment-helper.sh |
46 | | reinplace "s|--with-ssl-dir=/usr|--with-ssl-dir=\$PREFIX|g" ${worksrcpath}/environment-helper.sh |
47 | | reinplace "s|HOME=/tmp|HOME=${workpath}|g" ${worksrcpath}/environment-helper.sh |
48 | | reinplace "s|/tmp/buildlog|${workpath}/buildlog|g" ${worksrcpath}/build-helper.sh |
49 | | foreach file {CompileScript.sh InstallScript.sh} { |
50 | | file copy ${filespath}/${file} ${worksrcpath} |
51 | | reinplace "s|%p|${prefix}|g" ${worksrcpath}/${file} |
52 | | reinplace "s|%N|${name}|g" ${worksrcpath}/${file} |
53 | | reinplace "s|%v|${version}|g" ${worksrcpath}/${file} |
54 | | reinplace "s|%r|${revision}|g" ${worksrcpath}/${file} |
55 | | reinplace "s|%c|${configure.args}|g" ${worksrcpath}/${file} |
56 | | reinplace "s|%d|${destroot}|g" ${worksrcpath}/${file} |
57 | | reinplace "s|%i|${destroot}${prefix}|g" ${worksrcpath}/${file} |
58 | | file attributes ${worksrcpath}/${file} -permissions 0755 |
59 | | } |
60 | | } |
61 | | |
62 | | configure.args --with-distribution='MacPorts/Mac OS X' --without-arts |
63 | | |
64 | | use_configure no |
65 | | use_parallel_build yes |
66 | | |
67 | | build { system "cd ${worksrcpath} && MAKEFLAGS=\"-j ${build.jobs}\" ./CompileScript.sh" } |
68 | | |
69 | | destroot { system "cd ${worksrcpath} && ./InstallScript.sh" } |
70 | | |
71 | | post-destroot { |
72 | | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
73 | | xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL README TODO ${destroot}${prefix}/share/doc/${name} |
74 | | } |