source: trunk/dports/_resources/port1.0/group/kde4-1.1.tcl @ 103807

Last change on this file since 103807 was 103807, checked in by nicos@…, 6 years ago

kde4 portgroup: correcting library paths

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.5 KB
Line 
1# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: kde4-1.1.tcl 103807 2013-03-08 03:49:20Z nicos@macports.org $
3
4# Copyright (c) 2010 The MacPorts Project
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions are
9# met:
10#
11# 1. Redistributions of source code must retain the above copyright
12#    notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright
14#    notice, this list of conditions and the following disclaimer in the
15#    documentation and/or other materials provided with the distribution.
16# 3. Neither the name of Apple Computer, Inc. nor the names of its
17#    contributors may be used to endorse or promote products derived from
18#    this software without specific prior written permission.
19#
20# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31#
32#
33# Usage:
34# PortGroup     kde4 1.1
35
36# Use CMake and Qt4 port groups
37PortGroup               cmake 1.0
38PortGroup               qt4 1.0
39
40# Make sure to not use any already installed headers and libraries;
41# these are set in CPATH and LIBRARY_PATH anyway.
42configure.ldflags-delete  -L${prefix}/lib
43configure.cppflags-delete -I${prefix}/include
44
45# setup all KDE4 ports to build in a separate directory from the source;
46# this setting must be the full directory path
47post-extract            { file mkdir ${workpath}/build }
48
49# standard post-arg, where to find the primary CMakeLists.txt file.
50default configure.post_args {../${worksrcdir}}
51default configure.dir       {${workpath}/build}
52default build.dir           {${workpath}/build}
53
54# Automoc added as build dependency here as most, if not all kde
55# programs currently need it. The automoc port, which includes this
56# PortGroup overrides depends_build, removing "port:automoc" to
57# prevent a cyclic dependency
58depends_build-append    port:automoc
59
60# Phonon added as library dependency here as most, if not all KDE
61# programs current need it.  The phonon port, which includes this
62# PortGroup overrides depends_lib, removing "port:phonon" to prevent a
63# cyclic dependency
64depends_lib-append      port:phonon
65
66# set compiler to Apple's GCC 4.2
67switch ${os.platform}_${os.major} {
68    darwin_8 {
69            depends_lib-append  port:apple-gcc42
70            configure.compiler  apple-gcc-4.2
71    }
72    darwin_9 {
73            configure.compiler  gcc-4.2
74    }
75}
76
77post-extract {
78    # Following the official word: Change #include ["<]Phonon...[">] to
79    # ...phonon... in all files that contain that header.
80    fs-traverse item ${worksrcpath} {
81        if {[file isfile ${item}]} {
82            reinplace -locale C "/#include/s@Phonon@phonon@" ${item}
83        }
84    }
85}
86
87# augment the CMake module lookup path, if necessary depending on
88# where Qt4 is installed.
89if {${qt_dir} != ${prefix}} {
90    set cmake_module_path ${cmake_share_module_dir}\;${qt_cmake_module_dir}
91    configure.args-delete -DCMAKE_MODULE_PATH=${cmake_share_module_dir}
92    configure.args-append -DCMAKE_MODULE_PATH="${cmake_module_path}"
93    unset cmake_module_path
94}
95
96# standard configure args; virtually all KDE ports use CMake and Qt4.
97configure.args-append   -DBUILD_doc=OFF \
98                        -DBUILD_docs=OFF \
99                        -DBUILD_SHARED_LIBS=ON \
100                        -DBUNDLE_INSTALL_DIR=${applications_dir}/KDE4 \
101                        -DKDE_DISTRIBUTION_TEXT=\"MacPorts\/Mac OS X\" \
102                        ${qt_cmake_defines}
103
104# explicitly define certain headers and libraries, to avoid
105# conflicts with those installed into system paths by the user.
106configure.args-append   -DDOCBOOKXSL_DIR=${prefix}/share/xsl/docbook-xsl \
107                        -DGETTEXT_INCLUDE_DIR=${prefix}/include \
108                        -DGETTEXT_LIBRARY=${prefix}/lib/libgettextlib.dylib \
109                        -DGIF_INCLUDE_DIR=${prefix}/include \
110                        -DGIF_LIBRARY=${prefix}/lib/libgif.dylib \
111                        -DJASPER_INCLUDE_DIR=${prefix}/include \
112                        -DJASPER_LIBRARY=${prefix}/lib/libjasper.dylib \
113                        -DJPEG_INCLUDE_DIR=${prefix}/include \
114                        -DJPEG_LIBRARY=${prefix}/lib/libjpeg.dylib \
115                        -DLBER_LIBRARIES=${prefix}/lib/liblber.dylib \
116                        -DLDAP_INCLUDE_DIR=${prefix}/include \
117                        -DLDAP_LIBRARIES=${prefix}/lib/libldap.dylib \
118                        -DLIBEXSLT_INCLUDE_DIR=${prefix}/include \
119                        -DLIBEXSLT_LIBRARIES=${prefix}/lib/libexslt.dylib \
120                        -DLIBICALSS_LIBRARY=${prefix}/lib/libicalss.dylib \
121                        -DLIBICAL_INCLUDE_DIRS=${prefix}/include \
122                        -DLIBICAL_LIBRARY=${prefix}/lib/libical.dylib \
123                        -DLIBINTL_INCLUDE_DIR=${prefix}/include \
124                        -DLIBINTL_LIBRARY=${prefix}/lib/libintl.dylib \
125                        -DLIBXML2_INCLUDE_DIR=${prefix}/include/libxml2 \
126                        -DLIBXML2_LIBRARIES=${prefix}/lib/libxml2.dylib \
127                        -DLIBXML2_XMLLINT_EXECUTABLE=${prefix}/bin/xmllint \
128                        -DLIBXSLT_INCLUDE_DIR=${prefix}/include \
129                        -DLIBXSLT_LIBRARIES=${prefix}/lib/libxslt.dylib \
130                        -DMYSQLD_EXECUTABLE=${prefix}/libexec/mysqld \
131                        -DMYSQL_INCLUDE_DIR=${prefix}/include/mysql5/mysql \
132                        -DMYSQL_LIB_DIR=${prefix}/lib/mysql5/mysql \
133                        -DMYSQLCONFIG_EXECUTABLE=${prefix}/bin/mysql_config5 \
134                        -DOPENAL_INCLUDE_DIR=/System/Library/Frameworks/OpenAL.framework/Headers \
135                        -DOPENAL_LIBRARY=/System/Library/Frameworks/OpenAL.framework \
136                        -DPNG_INCLUDE_DIR=${prefix}/include \
137                        -DPNG_PNG_INCLUDE_DIR=${prefix}/include \
138                        -DPNG_LIBRARY=${prefix}/lib/libpng.dylib \
139                        -DQCA2_INCLUDE_DIR=${prefix}/include/QtCrypto \
140                        -DQCA2_LIBRARIES=${prefix}/lib/libqca.dylib \
141                        -DTIFF_INCLUDE_DIR=${prefix}/include \
142                        -DTIFF_LIBRARY=${prefix}/lib/libtiff.dylib
143
144# standard variant for building documentation
145variant docs description "Build documentation" {
146    depends_lib-append      port:doxygen
147    configure.args-delete   -DBUILD_doc=OFF -DBUILD_docs=OFF
148}
149
150post-activate {
151    ui_msg "##########################################################"
152    ui_msg "# Don't forget that dbus needs to be started as the local "
153    ui_msg "# user (not with sudo) before any KDE programs will launch"
154    ui_msg "# To start it run the following command:                  "
155    ui_msg "# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist"
156    ui_msg "##########################################################"
157}
Note: See TracBrowser for help on using the repository browser.