source: trunk/dports/_resources/port1.0/group/kde4-1.0.tcl

Last change on this file was 110374, checked in by jeremyhu@…, 7 years ago

kde-*: Remove redundant dependency

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# $Id: kde4-1.0.tcl 110374 2013-08-30 19:16:12Z jeremyhu@macports.org $
2
3# Copyright (c) 2009 Orville Bennett <illogical1 at gmail.com>
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met:
9#
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15# 3. Neither the name of Apple Computer, Inc. nor the names of its
16#    contributors may be used to endorse or promote products derived from
17#    this software without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30#
31#
32# Usage:
33# PortGroup     kde4 1.0
34
35
36# Use CMake Portgroup
37PortGroup               cmake 1.0
38
39use_parallel_build      yes
40
41worksrcdir              build
42
43post-extract            { file mkdir ${worksrcpath} }
44
45set qt                  qt4-mac
46set qt_dir              ${prefix}/libexec/${qt}
47
48post-patch {
49    if { ![file exists ${prefix}/libexec/${qt}/lib/phonon.framework/phonon] } {
50        ui_error "######################################################"
51        ui_error "A copy of phonon could not be found. Please install  "
52        ui_error "${qt} to provide this. If you have already done this "
53        ui_error "your Qt installation is missing the phonon backend.  "
54        ui_error "Please reinstall Qt4 with phonon support.            "
55        ui_error "######################################################"
56    }
57}
58
59# Automoc added as build dependency here as most, if not all kde programs
60# currently need it. The automoc port, which includes this PortGroup
61# overrides depends_build, removing "port:automoc" to prevent a
62# cyclic dependency
63depends_build-append    port:automoc
64depends_lib-append      port:${qt}
65
66switch ${os.platform}_${os.major} {
67    darwin_8 {
68            configure.compiler  apple-gcc-4.2
69    }
70    darwin_9 {
71            configure.compiler      gcc-4.2
72    }
73}
74
75configure.args-append   -DBUILD_doc=OFF \
76                        -DBUILD_SHARED_LIBS=ON \
77                        -DBUNDLE_INSTALL_DIR=${applications_dir}/KDE4 \
78                        -DPHONON_INCLUDE_DIR=${qt_dir}/include \
79                        -DPHONON_LIBRARY=${qt_dir}/lib/phonon.framework/phonon \
80                        -DQT_QMAKE_EXECUTABLE=${qt_dir}/bin/qmake \
81                        -DKDE_DISTRIBUTION_TEXT="MacPorts\/Mac OS X"
82
83variant docs description "Build documentation" {
84    depends_lib-append      port:doxygen
85    configure.args-delete   -DBUILD_doc=OFF
86}
87
88post-activate {
89    ui_msg "##########################################################"
90    ui_msg "# Don't forget that dbus needs to be started as the local "
91    ui_msg "# user (not with sudo) before any KDE programs will launch"
92    ui_msg "# To start it run the following command:                  "
93    ui_msg "# launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist"
94    ui_msg "##########################################################"
95    ui_msg " "
96    ui_msg "######################################################"
97    ui_msg "#  Programs will not start until you run the command "
98    ui_msg "#  'sudo chown -R \$USER ~/Library/Preferences/KDE'  "
99    ui_msg "#  replacing \$USER with your username.              "
100    ui_msg "######################################################"
101}
Note: See TracBrowser for help on using the repository browser.