2
# Riverbank Computing Limited <info@riverbankcomputing.co.uk>
3
# Jim Bublitz <jbublitz@nwinternet.com>
5
# This file is part of PyKDE.
7
# This copy of PyKDE is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by the Free
9
# Software Foundation; either version 2, or (at your option) any later
12
# PyKDE is supplied in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17
# You should have received a copy of the GNU General Public License along with
18
# PyKDE; see the file LICENSE. If not, write to the Free Software Foundation,
19
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
# This module is intended to be used by the configuration scripts of extension
22
# modules that %Import PyKDE modules.
25
import sipconfig, pyqtconfig
28
# These are installation specific values created when PyQt was configured.
30
'kde_version': 0x030300,
31
'kde_version_extra': 'kde330',
32
'kde_version_sfx': '-kde330.diff',
33
'kde_version_str': '3.3.0',
34
'kdebasedir': '/opt/kde3',
35
'kdeincdir': '/opt/kde3/include',
36
'kdelibdir': '/opt/kde3/lib',
37
'pykde_kde_sip_flags': '-x Qt_STYLE_WINDOWSXP -x Qt_STYLE_INTERLACE -x Qt_STYLE_WINDOWSXP -t WS_X11 -t Qt_3_3_0 -t KDE_3_3_0',
38
'pykde_mod_dir': '/usr/lib/python2.3/site-packages',
39
'pykde_modules': 'dcop kdecore kdesu kdefx kdeui kio kutils kfile kparts khtml kspell kdeprint kmdi',
40
'pykde_sip_dir': '/usr/share/sip',
41
'pykde_version': 0x030b03,
42
'pykde_version_str': '3.11.3'
47
class Configuration(pyqtconfig.Configuration):
48
"""The class that represents PyQt configuration values.
50
def __init__(self, sub_cfg=None):
51
"""Initialise an instance of the class.
53
sub_cfg is the list of sub-class configurations. It should be None
61
cfg.append(_pkg_config)
63
pyqtconfig.Configuration.__init__(self, cfg)
66
class DCOPModuleMakefile(pyqtconfig.QtModuleMakefile):
67
"""The Makefile class for modules that %Import DCOP.
70
"""Finalise the macros.
72
if self.config.sip_version < 0x040000:
73
# Note that we don't use self.extra_lib_dirs because we don't want
74
# it to be added to the rpath.
75
self.LIBDIR.append(self.config.pykde_mod_dir)
76
self.LIBDIR.append(self.config.pykde_lib_dir)
77
self.extra_libs.append(self.module_as_lib("DCOP"))
79
pyqtconfig.QtModuleMakefile.finalise(self)
81
class KdecoreModuleMakefile(DCOPModuleMakefile):
82
"""The Makefile class for modules that %Import kdecore.
85
"""Finalise the macros.
87
if self.config.sip_version < 0x040000:
88
# Note that we don't use self.extra_lib_dirs because we don't want
89
# it to be added to the rpath.
90
self.LIBDIR.append(self.config.pyqt_mod_dir)
91
self.extra_libs.append(self.module_as_lib("kdecore"))
93
DCOPModuleMakefile.finalise(self)
95
class KdesuModuleMakefile(KdecoreModuleMakefile):
96
"""The Makefile class for modules that %Import kdesu.
99
"""Finalise the macros.
101
if self.config.sip_version < 0x040000:
102
# Note that we don't use self.extra_lib_dirs because we don't want
103
# it to be added to the rpath.
104
self.LIBDIR.append(self.config.pyqt_mod_dir)
105
self.extra_libs.append(self.module_as_lib("kdesu"))
107
KdecoreModuleMakefile.finalise(self)
109
class KdefxModuleMakefile(KdecoreModuleMakefile):
110
"""The Makefile class for modules that %Import kdefx.
113
"""Finalise the macros.
115
if self.config.sip_version < 0x040000:
116
# Note that we don't use self.extra_lib_dirs because we don't want
117
# it to be added to the rpath.
118
self.LIBDIR.append(self.config.pyqt_mod_dir)
119
self.extra_libs.append(self.module_as_lib("kdefx"))
121
KdecoreModuleMakefile.finalise(self)
123
class KdeuiModuleMakefile(KdefxModuleMakefile):
124
"""The Makefile class for modules that %Import kdeui.
127
"""Finalise the macros.
129
if self.config.sip_version < 0x040000:
130
# Note that we don't use self.extra_lib_dirs because we don't want
131
# it to be added to the rpath.
132
self.LIBDIR.append(self.config.pyqt_mod_dir)
133
self.extra_libs.append(self.module_as_lib("kdeui"))
135
if self.config.sip_version < 0x040000:
136
self.extra_libs.append(self.module_as_lib("qtxml"))
138
KdefxModuleMakefile.finalise(self)
140
class KioModuleMakefile(KdeuiModuleMakefile):
141
"""The Makefile class for modules that %Import kio.
144
"""Finalise the macros.
146
if self.config.sip_version < 0x040000:
147
# Note that we don't use self.extra_lib_dirs because we don't want
148
# it to be added to the rpath.
149
self.LIBDIR.append(self.config.pyqt_mod_dir)
150
self.extra_libs.append(self.module_as_lib("kio"))
152
KdeuiModuleMakefile.finalise(self)
154
class KfileModuleMakefile(KioModuleMakefile):
155
"""The Makefile class for modules that %Import kfile.
158
"""Finalise the macros.
160
if self.config.sip_version < 0x040000:
161
# Note that we don't use self.extra_lib_dirs because we don't want
162
# it to be added to the rpath.
163
self.LIBDIR.append(self.config.pyqt_mod_dir)
164
self.extra_libs.append(self.module_as_lib("kfile"))
166
KioModuleMakefile.finalise(self)
168
class KpartsModuleMakefile(KfileModuleMakefile):
169
"""The Makefile class for modules that %Import kparts.
172
"""Finalise the macros.
174
if self.config.sip_version < 0x040000:
175
# Note that we don't use self.extra_lib_dirs because we don't want
176
# it to be added to the rpath.
177
self.LIBDIR.append(self.config.pyqt_mod_dir)
178
self.extra_libs.append(self.module_as_lib("kparts"))
180
KfileModuleMakefile.finalise(self)
182
class KhtmlModuleMakefile(KpartsModuleMakefile):
183
"""The Makefile class for modules that %Import khtml.
186
"""Finalise the macros.
188
if self.config.sip_version < 0x040000:
189
# Note that we don't use self.extra_lib_dirs because we don't want
190
# it to be added to the rpath.
191
self.LIBDIR.append(self.config.pyqt_mod_dir)
192
self.extra_libs.append(self.module_as_lib("khtml"))
194
KpartsModuleMakefile.finalise(self)
196
class KjsModuleMakefile(KhtmlModuleMakefile):
197
"""The Makefile class for modules that %Import kjs.
200
"""Finalise the macros.
202
if self.config.sip_version < 0x040000:
203
# Note that we don't use self.extra_lib_dirs because we don't want
204
# it to be added to the rpath.
205
self.LIBDIR.append(self.config.pyqt_mod_dir)
206
self.extra_libs.append(self.module_as_lib("kjs"))
208
KjsModuleMakefile.finalise(self)
210
class KdeprintModuleMakefile(KdeuiModuleMakefile):
211
"""The Makefile class for modules that %Import kdeprint.
214
"""Finalise the macros.
216
if self.config.sip_version < 0x040000:
217
# Note that we don't use self.extra_lib_dirs because we don't want
218
# it to be added to the rpath.
219
self.LIBDIR.append(self.config.pyqt_mod_dir)
220
self.extra_libs.append(self.module_as_lib("kdeprint"))
222
KdeuiModuleMakefile.finalise(self)