fix xpi extraction
[dports.git] / Mk / bsd.kde4.mk
1 # $FreeBSD$
2
3 .if !defined(_POSTMKINCLUDED) && !defined(Kde_Pre_Include)
4
5 # Please make sure all changes to this file are past through the maintainer.
6 # Do not commit them yourself (unless of course you're the Port's Wraith ;).
7 Kde_Include_MAINTAINER= kde@FreeBSD.org
8 Kde_Pre_Include=        bsd.kde4.mk
9
10 #
11 # This file contains some variable definitions that are supposed to make your
12 # life easier when dealing with ports related to the KDE Software Compilation 4.
13 # It's automatically included when ${USE_KDE4} is defined in a port's Makefile.
14 #
15 # KDE4 related ports can use this as follows:
16 #
17 # USE_KDE4=             kdehier kdelibs kdeprefix
18 # USE_QT4=              corelib # Set Qt 4 components here.
19 #
20 # .include <bsd.port.mk>
21 #
22 # Additionally, '_build' and '_run' suffixes can be used to force components
23 # dependency type (e.g., 'marble_run'). If no suffix is set, a default
24 # dependency type will be used. If you want to force both types, add the
25 # component twice with both suffixes (e.g., 'pykde4_build pykde4_run').
26 #
27 # Available KDE4 components are:
28 #
29 # baseapps              - Basic applications for KDE Desktop
30 # kactivities           - KDE activities library
31 # kate                  - KDE text editor framework
32 # kdehier               - Hierarchy of common KDE directories
33 # kdelibs               - KDE Developer Platform
34 # kdeprefix             - If set, port will be installed into ${KDE4_PREFIX} instead of
35 #                         ${LOCALBASE}
36 # korundum              - KDE Ruby bindings
37 # libkcddb              - KDE CDDB library
38 # libkcompactdisc       - KDE library for interfacing with audio CDs
39 # libkdcraw             - KDE LibRaw library
40 # libkdeedu             - Libraries used by KDE educational applications
41 # libkdegames           - Libraries used by KDE games
42 # libkexiv2             - KDE Exiv2 library
43 # libkipi               - KDE Image Plugin Interface
44 # libkonq               - Konqueror core library
45 # libksane              - KDE SANE library
46 # marble                - KDE virtual globe
47 # okular                - KDE universal document viewer
48 # nepomuk-core          - Nepomuk core libraries
49 # nepomuk-widgets       - Nepomuk widgets library
50 # oxygen                - KDE icon theme
51 # perlkde               - KDE Perl bindings
52 # perlqt                - Qt 4 Perl bindings
53 # pimlibs               - KDE-Pim libraries
54 # pykde4                - KDE Python bindings
55 # pykdeuic4             - PyKDE user interface compiler
56 # qtruby                - Qt 4 Ruby bindings
57 # runtime               - Components required by many KDE Applications
58 # smokegen              - SMOKE base libraries
59 # smokekde              - KDE SMOKE libraries
60 # smokeqt               - Qt 4 SMOKE libraries
61 # workspace             - KDE user environments
62 # akonadi               - Storage server for KDE-Pim
63 # attica                - Qt library implementing Open Collaboration Services API
64 # automoc4              - Automatic moc for Qt 4 packages
65 # ontologies            - Shared ontologies for semantic searching
66 # qimageblitz           - KDE graphical effects and filters library
67 # soprano               - Qt 4 RDF framework
68 # strigi                - Desktop search daemon
69 #
70 # These read-only variables can be used in a port's Makefile:
71 #
72 # KDE4_PREFIX           - The place where KDE4 ports live. Currently it is
73 #                         ${LOCALBASE}/kde4, but this could change in the future.
74 #
75
76 KDE4_VERSION?=          4.12.5
77 KDE4_WORKSPACE_VERSION= 4.11.9
78 KDE4_BRANCH?=           stable
79 KTP_VERSION?=           0.6.1
80 KTP_BRANCH?=            stable
81 CALLIGRA_VERSION?=      2.7.5
82 CALLIGRA_BRANCH?=       stable
83 KDEVELOP_VERSION?=      4.6.0
84 KDEVELOP_BRANCH?=       stable
85
86 KDE4_PREFIX?=   ${LOCALBASE}
87
88 # Help cmake to find files when testing ports with non-default PREFIX
89 CMAKE_ARGS+=    -DCMAKE_PREFIX_PATH="${LOCALBASE};${KDE4_PREFIX}" \
90                 -DKDE4_BUILD_TESTS:BOOL=OFF
91
92 # ${PREFIX} and ${NO_MTREE} have to be defined in the pre-makefile section.
93 .if defined(USE_KDE4) && ${USE_KDE4:Mkdeprefix} != ""
94 . if ${.MAKEFLAGS:MPREFIX=*} == ""
95 PREFIX=         ${KDE4_PREFIX}
96 .  if ${KDE4_PREFIX} != ${LOCALBASE}
97 NO_MTREE=       yes
98 .  endif
99 . endif
100 .endif
101
102 PLIST_SUB+=     KDE4_PREFIX="${KDE4_PREFIX}" \
103                 KDE4_VERSION="${KDE4_VERSION}" \
104                 KDE4_GENERIC_LIB_VERSION=${KDE4_VERSION} \
105                 KDE4_NON_GENERIC_LIB_VERSION=${KDE4_VERSION:S,^4,5,}
106
107 # Keep in sync with cmake/modules/PythonMacros.cmake
108 _PYTHON_SHORT_VER=      ${PYTHON_VERSION:S/^python//:S/.//}
109 .if ${_PYTHON_SHORT_VER} > 31
110 PLIST_SUB+=     PYCACHE="__pycache__/" \
111                 PYC_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyc \
112                 PYO_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyo
113 .else
114 PLIST_SUB+=     PYCACHE="" \
115                 PYC_SUFFIX=pyc \
116                 PYO_SUFFIX=pyo
117 .endif
118
119 .endif # !defined(_POSTMKINCLUDED) && !defined(Kde_Pre_Include)
120
121 .if defined(_POSTMKINCLUDED) && !defined(Kde_Post_Include)
122
123 Kde_Post_Include=       bsd.kde4.mk
124
125 #
126 # KDE4 components.
127 # Set ${component}_TYPE to 'build' or 'run' to specify default dependency type
128 # for ${component}; otherwise, it will default to 'build run'.
129 #
130
131 _USE_KDE4_ALL=          baseapps kactivities kate kdehier kdelibs kdeprefix \
132                         korundum libkcddb libkcompactdisc libkdcraw libkdeedu \
133                         libkexiv2 libkdegames libkipi libkonq libksane marble \
134                         nepomuk-core nepomuk-widgets \
135                         okular oxygen perlkde perlqt pimlibs pykde4 pykdeuic4 \
136                         qtruby runtime smokegen smokekde smokeqt \
137                         workspace
138 # These components are not part of the Software Compilation.
139 _USE_KDE4_ALL+=         akonadi attica automoc4 ontologies qimageblitz soprano \
140                         strigi
141
142 baseapps_PORT=          x11/kde4-baseapps
143 baseapps_PATH=          ${KDE4_PREFIX}/bin/kfmclient
144 baseapps_TYPE=          run
145
146 kactivities_PORT=       x11/kactivities
147 kactivities_PATH=       ${KDE4_PREFIX}/lib/libkactivities.so
148
149 kate_PORT=              editors/kate
150 kate_PATH=              ${KDE4_PREFIX}/lib/libkateinterfaces.so
151
152 kdehier_PORT=           misc/kdehier4
153 kdehier_PATH=           kdehier4>=0
154 kdehier_TYPE=           run
155
156 kdelibs_PORT=           x11/kdelibs4
157 kdelibs_PATH=           ${KDE4_PREFIX}/lib/libkdecore.so
158
159 korundum_PORT=          devel/ruby-korundum
160 korundum_PATH=          ${KDE4_PREFIX}/lib/kde4/krubypluginfactory.so
161 korundum_TYPE=          run
162
163 libkcddb_PORT=          audio/libkcddb
164 libkcddb_PATH=          ${KDE4_PREFIX}/lib/libkcddb.so
165
166 libkcompactdisc_PORT=   audio/libkcompactdisc
167 libkcompactdisc_PATH=   ${KDE4_PREFIX}/lib/libkcompactdisc.so
168
169 libkdcraw_PORT=         graphics/libkdcraw-kde4
170 libkdcraw_PATH=         ${KDE4_PREFIX}/lib/libkdcraw.so
171
172 libkdeedu_PORT=         misc/libkdeedu
173 libkdeedu_PATH=         ${KDE4_PREFIX}/lib/libkeduvocdocument.so
174
175 libkdegames_PORT=       games/libkdegames
176 libkdegames_PATH=       ${KDE4_PREFIX}/lib/libkdegames.so
177
178 libkexiv2_PORT=         graphics/libkexiv2-kde4
179 libkexiv2_PATH=         ${KDE4_PREFIX}/lib/libkexiv2.so
180
181 libkipi_PORT=           graphics/libkipi-kde4
182 libkipi_PATH=           ${KDE4_PREFIX}/lib/libkipi.so
183
184 libkonq_PORT=           x11/libkonq
185 libkonq_PATH=           ${KDE4_PREFIX}/lib/libkonq.so
186
187 libksane_PORT=          graphics/libksane
188 libksane_PATH=          ${KDE4_PREFIX}/lib/libksane.so
189
190 marble_PORT=            astro/marble
191 marble_PATH=            ${KDE4_PREFIX}/lib/libmarblewidget.so
192
193 nepomuk-core_PORT=      sysutils/nepomuk-core
194 nepomuk-core_PATH=      ${KDE4_PREFIX}/lib/libnepomukcore.so
195
196 nepomuk-widgets_PORT=   sysutils/nepomuk-widgets
197 nepomuk-widgets_PATH=   ${KDE4_PREFIX}/lib/libnepomukwidgets.so
198
199 okular_PORT=            graphics/okular
200 okular_PATH=            ${KDE4_PREFIX}/lib/libokularcore.so
201
202 oxygen_PORT=            x11-themes/kde4-icons-oxygen
203 oxygen_PATH=            ${KDE4_PREFIX}/share/icons/oxygen/index.theme
204 oxygen_TYPE=            run
205
206 perlkde_PORT=           devel/p5-perlkde
207 perlkde_PATH=           ${KDE4_PREFIX}/lib/kde4/kperlpluginfactory.so
208 perlkde_TYPE=           run
209
210 perlqt_PORT=            devel/p5-perlqt
211 perlqt_PATH=            ${KDE4_PREFIX}/bin/puic4
212
213 pimlibs_PORT=           deskutils/kdepimlibs4
214 pimlibs_PATH=           ${KDE4_PREFIX}/lib/libkpimutils.so
215
216 pykde4_PORT=            devel/py-pykde4
217 pykde4_PATH=            ${KDE4_PREFIX}/lib/kde4/kpythonpluginfactory.so
218 pykde4_TYPE=            run
219
220 pykdeuic4_PORT=         devel/py-pykdeuic4
221 pykdeuic4_PATH=         ${LOCALBASE}/bin/pykdeuic4
222 pykdeuic4_TYPE=         run
223
224 qtruby_PORT=            devel/ruby-qtruby
225 qtruby_PATH=            ${KDE4_PREFIX}/lib/libqtruby4shared.so
226
227 runtime_PORT=           x11/kde4-runtime
228 runtime_PATH=           ${KDE4_PREFIX}/bin/knotify4
229 runtime_TYPE=           run
230
231 smokegen_PORT=          devel/smokegen
232 smokegen_PATH=          ${KDE4_PREFIX}/lib/libsmokebase.so
233
234 smokekde_PORT=          devel/smokekde
235 smokekde_PATH=          ${KDE4_PREFIX}/lib/libsmokekdecore.so
236
237 smokeqt_PORT=           devel/smokeqt
238 smokeqt_PATH=           ${KDE4_PREFIX}/lib/libsmokeqtcore.so
239
240 workspace_PORT=         x11/kde4-workspace
241 workspace_PATH=         ${KDE4_PREFIX}/lib/libkworkspace.so
242
243 akonadi_PORT=           databases/akonadi
244 akonadi_PATH=           ${KDE4_PREFIX}/lib/libakonadiprotocolinternals.so
245
246 attica_PORT=            x11-toolkits/attica
247 attica_PATH=            ${LOCALBASE}/lib/libattica.so
248
249 automoc4_PORT=          devel/automoc4
250 automoc4_PATH=          ${LOCALBASE}/bin/automoc4
251 automoc4_TYPE=          build
252
253 ontologies_PORT=        x11-toolkits/shared-desktop-ontologies
254 ontologies_PATH=        ${LOCALBASE}/share/ontology/core/rdf.ontology
255
256 qimageblitz_PORT=       x11/qimageblitz
257 qimageblitz_PATH=       ${LOCALBASE}/lib/libqimageblitz.so
258
259 soprano_PORT=           textproc/soprano
260 soprano_PATH=           ${LOCALBASE}/lib/libsoprano.so
261
262 strigi_PORT=            deskutils/libstreamanalyzer
263 strigi_PATH=            ${LOCALBASE}/lib/libstreamanalyzer.so.0
264
265 # Iterate through components deprived of suffix.
266 .for component in ${USE_KDE4:O:u:C/_.+//}
267   # Check that the component is valid.
268 . if ${_USE_KDE4_ALL:M${component}} != ""
269    # Skip meta-components (e.g., kdeprefix).
270 .  if defined(${component}_PORT) && defined(${component}_PATH)
271 ${component}_DEPENDS=   ${${component}_PATH}:${PORTSDIR}/${${component}_PORT}
272     # Check if a dependency type is explicitly requested.
273 .   if ${USE_KDE4:M${component}_*} != "" && ${USE_KDE4:M${component}} == ""
274 ${component}_TYPE=      # empty
275 .    if ${USE_KDE4:M${component}_build} != ""
276 ${component}_TYPE+=     build
277 .    endif
278 .    if ${USE_KDE4:M${component}_run} != ""
279 ${component}_TYPE+=     run
280 .    endif
281 .   endif # ${USE_KDE4:M${component}_*} != "" && ${USE_KDE4:M${component}} == ""
282     # If no dependency type is set, default to full dependency.
283 .   if !defined(${component}_TYPE)
284 ${component}_TYPE=      build run
285 .   endif
286     # Set real dependencies.
287 .   if ${${component}_TYPE:Mbuild} != ""
288 BUILD_DEPENDS+=         ${${component}_DEPENDS}
289 .   endif
290 .   if ${${component}_TYPE:Mrun} != ""
291 RUN_DEPENDS+=           ${${component}_DEPENDS}
292 .   endif
293 .  endif # defined(${component}_PORT) && defined(${component}_PATH)
294 . else # ! ${_USE_KDE4_ALL:M${component}} != ""
295 IGNORE=                         can't be installed: unknown USE_KDE4 component '${component}'
296 . endif # ${_USE_KDE4_ALL:M${component}} != ""
297 .endfor
298
299 .endif # defined(_POSTMKINCLUDED) && !defined(Kde_Post_Include)