1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
|
# Copyright (c) 2004
# Riverbank Computing Limited <info@riverbankcomputing.co.uk>
# Jim Bublitz <jbublitz@nwinternet.com>
#
# This file is part of PyKDE.
#
# This copy of PyKDE is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
#
# PyKDE is supplied in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# PyKDE; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# This module is intended to be used by the configuration scripts of extension
# modules that %Import PyKDE modules.
import sipconfig, pyqtconfig
# These are installation specific values created when PyQt was configured.
_pkg_config = {
'dist_name': '',
'kde_version': 0x030503,
'kde_version_extra': 'kde353',
'kde_version_sfx': '-kde353.diff',
'kde_version_str': '3.5.3',
'kdebasedir': '/opt/kde3',
'kdeincdir': '/opt/kde3/include',
'kdelibdir': '/opt/kde3/lib',
'libdir': 'lib',
'pykde_kde_sip_flags': '-t ALL -x Qt_STYLE_WINDOWSXP -x Qt_STYLE_INTERLACE -x Qt_STYLE_WINDOWSXP -x Qt_SIP_PRE_4_7_2 -x VendorID -t WS_X11 -t Qt_3_3_6 -t KDE_3_5_3',
'pykde_mod_dir': '/usr/lib/python2.5/site-packages',
'pykde_modules': 'dcop kdecore kdefx kdeui kio kresources kabc kutils kfile kparts khtml kspell kdeprint kmdi',
'pykde_sip_dir': '/usr/share/sip',
'pykde_version': 0x031000,
'pykde_version_str': '3.16.0'
}
_default_macros = None
class Configuration(pyqtconfig.Configuration):
"""The class that represents PyQt configuration values.
"""
def __init__(self, sub_cfg=None):
"""Initialise an instance of the class.
sub_cfg is the list of sub-class configurations. It should be None
when called normally.
"""
if sub_cfg:
cfg = sub_cfg
else:
cfg = []
cfg.append(_pkg_config)
pyqtconfig.Configuration.__init__(self, cfg)
class DCOPModuleMakefile(pyqtconfig.QtModuleMakefile):
"""The Makefile class for modules that %Import DCOP.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pykde_mod_dir)
self.LIBDIR.append(self.config.pykde_lib_dir)
self.extra_libs.append(self.module_as_lib("DCOP"))
pyqtconfig.QtModuleMakefile.finalise(self)
class KdecoreModuleMakefile(DCOPModuleMakefile):
"""The Makefile class for modules that %Import kdecore.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kdecore"))
DCOPModuleMakefile.finalise(self)
class KdesuModuleMakefile(KdecoreModuleMakefile):
"""The Makefile class for modules that %Import kdesu.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kdesu"))
KdecoreModuleMakefile.finalise(self)
class KdefxModuleMakefile(KdecoreModuleMakefile):
"""The Makefile class for modules that %Import kdefx.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kdefx"))
KdecoreModuleMakefile.finalise(self)
class KdeuiModuleMakefile(KdefxModuleMakefile):
"""The Makefile class for modules that %Import kdeui.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kdeui"))
if self.config.sip_version < 0x040000:
self.extra_libs.append(self.module_as_lib("qtxml"))
KdefxModuleMakefile.finalise(self)
class KioModuleMakefile(KdeuiModuleMakefile):
"""The Makefile class for modules that %Import kio.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kio"))
KdeuiModuleMakefile.finalise(self)
class KfileModuleMakefile(KioModuleMakefile):
"""The Makefile class for modules that %Import kfile.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kfile"))
KioModuleMakefile.finalise(self)
class KpartsModuleMakefile(KfileModuleMakefile):
"""The Makefile class for modules that %Import kparts.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kparts"))
KfileModuleMakefile.finalise(self)
class KhtmlModuleMakefile(KpartsModuleMakefile):
"""The Makefile class for modules that %Import khtml.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("khtml"))
KpartsModuleMakefile.finalise(self)
class KjsModuleMakefile(KhtmlModuleMakefile):
"""The Makefile class for modules that %Import kjs.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kjs"))
KjsModuleMakefile.finalise(self)
class KdeprintModuleMakefile(KdeuiModuleMakefile):
"""The Makefile class for modules that %Import kdeprint.
"""
def finalise(self):
"""Finalise the macros.
"""
if self.config.sip_version < 0x040000:
# Note that we don't use self.extra_lib_dirs because we don't want
# it to be added to the rpath.
self.LIBDIR.append(self.config.pyqt_mod_dir)
self.extra_libs.append(self.module_as_lib("kdeprint"))
KdeuiModuleMakefile.finalise(self)
|