Make kde compile in macports in 10.4
Index: kde4-1.0.tcl
===================================================================
--- kde4-1.0.tcl (revision 47836)
+++ kde4-1.0.tcl (working copy)
@@ -31,31 +31,49 @@
# Use CMake Portgroup
PortGroup cmake 1.0
+# Pull in automoc build dependency. Needed by most/all KDE software.
depends_build-append port:automoc
+# Turn on parallel builds.
use_parallel_build yes
+# Create out of source build which KDE requires (and enforces).
worksrcdir build
+# Create 'build' directory here to allow macports to apply patches.
post-extract { file mkdir ${worksrcpath} }
-depends_lib-append port:doxygen
+# If on 10.4 use the gcc-4.2 with c++ support
+platform darwin 8 {
+ depends_build-append apple-gcc42-devel
+ configure.args-append -DCMAKE_C_COMPILER=${prefix}/bin/gcc-4.2 \
+ -DCMAKE_CXX_COMPILER=${prefix}/bin/g++-4.2
+}
-configure.compiler gcc-4.2
+# If we are on 10.5 (really should be 10.5 or greater) use xcode's gcc-4.2
+platform darwin 9 {
+ configure.compiler gcc-4.2
+}
-configure.args-append -DBUILD_doc=ON \
+# Set default compilation options common to most, if not all KDE software.
+# Also setup defaults for installation and identification of
+# where KDE came from; for bugs.kde.org.
+configure.args-append -DBUILD_doc=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUNDLE_INSTALL_DIR=${applications_dir}/KDE4 \
-DPHONON_INCLUDE_DIR=${prefix}/include \
-DPHONON_LIBRARY=${prefix}/lib/libphonon.dylib \
-DKDE_DISTRIBUTION_TEXT="MacPorts\/Mac OS X"
-variant no_docs description "Omit documentation" {
- depends_lib-delete port:doxygen
- configure.args-delete -DBUILD_doc=ON
- configure.args-append -DBUILD_doc=OFF
+# Build documentation only on request because Doxygen pulls in unnecessary
+# X11 dependencies.
+variant docs description "Build documentation" {
+ depends_lib-append port:doxygen
+ configure.args-append -DBUILD_doc=ON
+ configure.args-delete -DBUILD_doc=OFF
}
+# Information to workaround permissions and dbus autolaunch problems.
post-activate {
ui_msg "##########################################################"
ui_msg "# Don't forget that dbus needs to be started as the local "
@@ -68,7 +86,7 @@
ui_msg "# Programs will not start until you run the command "
ui_msg "# 'sudo chown -R \$USER ~/Library/Preferences/KDE' "
ui_msg "# replacing \$USER with your username, followed by "
- ui_msg "# 'open ${applications_dir}/KDE4/kdeinit4.app' "
+ ui_msg "# 'open ${applications_dir}/KDE4/kdeinit4.app' "
ui_msg "# in a Terminal. "
ui_msg "######################################################"
}
illogic-al.Org