aboutsummaryrefslogtreecommitdiff
path: root/Mk/Uses/kde.mk
blob: 0dbc952882da8bf7ed75b5dfcfe57fb67b71945c (plain) (blame)
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# $FreeBSD$
#
# Provides support for KDE-based ports.
#
# Feature:	kde
# Usage:	USES=kde:ARGS
# Valid ARGS:	4
#
# 4: 		Depend on KDE4 components and variables.
#
# Variables that can be set by a port:
#
# USE_KDE	List of KDE4 components (other ports) that this
#		port depends on.
#		* foo_build	Add a build-time dependency (BUILD_DEPENDS)
#		* foo_run	Add a run-time dependency (RUN_DEPENDS)
#		* foo (default)	Add both dependencies on component <foo>
#
#
# To simplify the ports, also:
# CATEGORIES	If the port is part of one of the KDE Software distribution,
#		it can add, in addition to 'kde' one of the following:
#			kde-kde4: 		part of kde4 release
#		this will then set default values for MASTER_SITES and DIST_SUBDIR
#		as well as CPE_VENDOR and LICENSE.
#
# MAINTAINER:	kde@FreeBSD.org

.if !defined(_INCLUDE_USES_KDE_MK)
_INCLUDE_USES_KDE_MK=	yes

_KDE_SUPPORTED=		4

.  if empty(kde_ARGS)
IGNORE=	kde needs a version (${_KDE_SUPPORTED})
.  endif

# At the moment we support KDE versions 4.
.  for ver in ${_KDE_SUPPORTED:O:u}
.    if ${kde_ARGS:M${ver}}
.      if !defined(_KDE_VERSION)
_KDE_VERSION=	${ver}
.      else
IGNORE?=	cannot be installed: different KDE versions specified via kde:[${_KDE_SUPPORTED:S/ //g}] #'
.      endif
.    endif
.  endfor

.  if empty(_KDE_VERSION)
IGNORE?=	kde:[${_KDE_SUPPORTED:S/ //g}] needs an argument  #'
.  endif

_KDE_RELNAME=		KDE${_KDE_VERSION}

# === VERSIONS OF THE DIFFERENT COMPONENTS =====================================
# Old KDE desktop.
KDE4_VERSION?=			4.14.3
KDE4_KDELIBS_VERSION=		4.14.10
KDE4_ACTIVITIES_VERSION=	4.13.3
KDE4_WORKSPACE_VERSION=		4.11.21
KDE4_KDEPIM_VERSION?=		4.14.10
# Applications version for the kde4-applications.
KDE4_APPLICATIONS_BRANCH?=	Attic
KDE4_APPLICATIONS_VERSION?=	15.04.3
KDE4_BRANCH?=			stable

# Extended KDE universe applications.
CALLIGRA_VERSION?=		2.9.11
CALLIGRA_BRANCH?=		stable

KDEVELOP_VERSION?=		4.7.3
KDEVELOP_BRANCH?=		stable

KTP_VERSION?=			0.9.0
KTP_BRANCH?=			stable
# ==============================================================================

# === INSTALLATION PREFIX ======================================================
# Define installation prefix.
KDE_PREFIX=	${LOCALBASE}
# ==============================================================================

# === CATEGORIES HANDLING -- SETTING DEFAULT VALUES ============================
# Doing MASTER_SITES magic based on the category of the port
_KDE_CATEGORIES_SUPPORTED=	kde-kde4
.  for cat in ${_KDE_CATEGORIES_SUPPORTED}
.    if ${CATEGORIES:M${cat}}
.      if !defined(_KDE_CATEGORY)
_KDE_CATEGORY=	${cat}
.      else
IGNORE?=	cannot be installed: multiple kde-<...> categories specified via CATEGORIES=${CATEGORIES} #'
.      endif
.    endif
.  endfor

.  if defined(_KDE_CATEGORY)
# KDE is normally licensed under the LGPL 2.0.
LICENSE?=		LGPL20

# Set CPE Vendor Information
#    As _KDE_CATEGORY is set we can assume it is port release by KDE and the
#    vendor is therefore kde.
CPE_VENDOR?=		kde

.    if ${_KDE_CATEGORY:Mkde-kde4}
PORTVERSION?=		${KDE4_VERSION}
MASTER_SITES?=		KDE/${KDE4_BRANCH}/${KDE4_VERSION}/src
DIST_SUBDIR?=		KDE/${KDE4_VERSION}
.    else
IGNORE?=		unknown CATEGORY value '${_KDE_CATEGORY}' #'
.    endif
.  endif #defined(_KDE_CATEGORY)
# ==============================================================================

# ==== SETUP CMAKE ENVIRONMENT =================================================
# Help cmake to find files when testing ports with non-default PREFIX.
CMAKE_ARGS+=	-DCMAKE_PREFIX_PATH="${LOCALBASE}"

.  if ${_KDE_VERSION:M*4*}
CMAKE_ARGS+=	-DKDE4_BUILD_TESTS:BOOL=OFF
.  endif

# Set man-page installation prefix.
CMAKE_ARGS+=	-DKDE_INSTALL_MANDIR:PATH="${KDE_PREFIX}/man" \
		-DMAN_INSTALL_DIR:PATH="${KDE_PREFIX}/man"
# ==============================================================================

# === SET-UP PLIST_SUB =========================================================
# Prefix and include directory.
PLIST_SUB+=		KDE_PREFIX="${KDE_PREFIX}"
# KDE Applications version.
PLIST_SUB+=		KDE_APPLICATIONS_VERSION="${KDE_APPLICATIONS_VERSION}"
# For KDE4 applications provide KDE4 version numbers.
.  if ${_KDE_VERSION:M*4*}
PLIST_SUB+=		KDE4_VERSION="${KDE4_VERSION}" \
			KDE4_GENERIC_LIB_VERSION=${KDE4_KDELIBS_VERSION} \
			KDE4_NON_GENERIC_LIB_VERSION=${KDE4_KDELIBS_VERSION:S,^4,5,} \
			KDE4_KDELIBS_VERSION=${KDE4_KDELIBS_VERSION} \
			KDE4_NG_KDELIBS_VERSION=${KDE4_KDELIBS_VERSION:S,^4,5,}
.  endif
# ==============================================================================

# === HANDLE PYTHON ============================================================
# TODO: Keep in sync with cmake/modules/PythonMacros.cmake
_PYTHON_SHORT_VER=	${PYTHON_VERSION:S/^python//:S/.//}
.  if ${_PYTHON_SHORT_VER} > 31
PLIST_SUB+=		PYCACHE="__pycache__/" \
			PYC_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyc \
			PYO_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyo
.  else
PLIST_SUB+=		PYCACHE="" \
			PYC_SUFFIX=pyc \
			PYO_SUFFIX=pyo
.  endif
# ==============================================================================
_USE_KDE4_ALL=		baloo baloo-widgets baseapps kactivities kate kdelibs \
			kfilemetadata korundum libkcddb libkcompactdisc \
			libkdcraw libkdeedu libkdegames libkexiv2 libkipi \
			libkonq libksane marble nepomuk-core nepomuk-widgets \
			okular oxygen-icons4 perlkde perlqt pimlibs pykde4 \
			pykdeuic4 qtruby runtime smokegen smokekde smokeqt \
			workspace
# These components are not part of the Software Compilation.
_USE_KDE4_ALL+=		akonadi attica automoc4 ontologies qimageblitz soprano \
			strigi

# ====================== kde4 components =======================================
baloo_PORT=		sysutils/baloo
baloo_LIB=		libbaloocore.so

baloo-widgets_PORT=	sysutils/baloo-widgets
baloo-widgets_LIB=	libbaloowidgets.so

baseapps_PORT=		x11/kde4-baseapps
baseapps_PATH=		${KDE_PREFIX}/bin/kfmclient
baseapps_TYPE=		run

kactivities_PORT=	x11/kactivities
kactivities_LIB=	libkactivities.so

kate_PORT=		editors/kate
kate_LIB=		libkateinterfaces.so

kdelibs_PORT=		x11/kdelibs4
kdelibs_LIB=		libkdecore.so

kfilemetadata_PORT=	sysutils/kfilemetadata
kfilemetadata_LIB=	libkfilemetadata.so

korundum_PORT=		devel/ruby-korundum
korundum_PATH=		${KDE_PREFIX}/lib/kde4/krubypluginfactory.so
korundum_TYPE=		run

libkcddb_PORT=		audio/libkcddb
libkcddb_LIB=		libkcddb.so

libkcompactdisc_PORT=	audio/libkcompactdisc
libkcompactdisc_LIB=	libkcompactdisc.so

libkdcraw_PORT=		graphics/libkdcraw-kde4
libkdcraw_LIB=		libkdcraw.so

libkdeedu_PORT=		misc/libkdeedu
libkdeedu_LIB=		libkeduvocdocument.so

libkdegames_PORT=	games/libkdegames
libkdegames_LIB=	libkdegames.so

libkexiv2_PORT=		graphics/libkexiv2-kde4
libkexiv2_LIB=		libkexiv2.so

libkipi_PORT=		graphics/libkipi-kde4
libkipi_LIB=		libkipi.so

libkonq_PORT=		x11/libkonq
libkonq_LIB=		libkonq.so

libksane_PORT=		graphics/libksane
libksane_LIB=		libksane.so

marble_PORT=		astro/marble
marble_LIB=		libmarblewidget.so

nepomuk-core_PORT=	sysutils/nepomuk-core
nepomuk-core_LIB=	libnepomukcore.so

nepomuk-widgets_PORT=	sysutils/nepomuk-widgets
nepomuk-widgets_LIB=	libnepomukwidgets.so

okular_PORT=		graphics/okular
okular_LIB=		libokularcore.so

oxygen-icons4_PORT=	x11-themes/kde4-icons-oxygen
oxygen-icons4_PATH=	${KDE_PREFIX}/share/icons/oxygen/index.theme
oxygen-icons4_TYPE=	run

perlkde_PORT=		devel/p5-perlkde
perlkde_PATH=		${KDE_PREFIX}/lib/kde4/kperlpluginfactory.so
perlkde_TYPE=		run

perlqt_PORT=		devel/p5-perlqt
perlqt_PATH=		${KDE_PREFIX}/bin/puic4

pimlibs_PORT=		deskutils/kdepimlibs4
pimlibs_LIB=		libkpimutils.so

pykde4_PORT=		devel/py-pykde4
pykde4_PATH=		${KDE_PREFIX}/lib/kde4/kpythonpluginfactory.so
pykde4_TYPE=		run

pykdeuic4_PORT=		devel/py-pykdeuic4
pykdeuic4_PATH=		${LOCALBASE}/bin/pykdeuic4
pykdeuic4_TYPE=		run

qtruby_PORT=		devel/ruby-qtruby
qtruby_LIB=		libqtruby4shared.so

runtime_PORT=		x11/kde4-runtime
runtime_PATH=		${KDE_PREFIX}/bin/knotify4
runtime_TYPE=		run

smokegen_PORT=		devel/smokegen
smokegen_LIB=		libsmokebase.so

smokekde_PORT=		devel/smokekde
smokekde_LIB=		libsmokekdecore.so

smokeqt_PORT=		devel/smokeqt
smokeqt_LIB=		libsmokeqtcore.so

workspace_PORT=		x11/kde4-workspace
workspace_LIB=		libkworkspace.so

# Non-Software Compilation components
akonadi_PORT=		databases/akonadi
akonadi_LIB=		libakonadiprotocolinternals.so

attica_PORT=		x11-toolkits/attica
attica_LIB=		libattica.so

automoc4_PORT=		devel/automoc4
automoc4_PATH=		${LOCALBASE}/bin/automoc4
automoc4_TYPE=		build

ontologies_PORT=	x11-toolkits/shared-desktop-ontologies
ontologies_PATH=	${LOCALBASE}/share/ontology/core/rdf.ontology

qimageblitz_PORT=	x11/qimageblitz
qimageblitz_LIB=	libqimageblitz.so

soprano_PORT=		textproc/soprano
soprano_LIB=		libsoprano.so

strigi_PORT=		deskutils/libstreamanalyzer
strigi_LIB=		libstreamanalyzer.so.0
# ====================== end of kde4 components ================================

# end of component list ########################################################

_USE_KDE_ALL=	${_USE_${_KDE_RELNAME}_ALL}

# Iterate through components deprived of suffix.
.  for component in ${USE_KDE:O:u:C/_.+//}
  # Check that the component is valid.
.    if ${_USE_KDE_ALL:M${component}} != ""
   # Skip meta-components (currently none).
.      if defined(${component}_PORT) && (defined(${component}_PATH) || defined(${component}_LIB))
    # Check if a dependency type is explicitly requested.
.        if ${USE_KDE:M${component}_*} != "" && ${USE_KDE:M${component}} == ""
${component}_TYPE=	# empty
.          if ${USE_KDE:M${component}_build} != ""
${component}_TYPE+=	build
.          endif
.          if ${USE_KDE:M${component}_run} != ""
${component}_TYPE+=	run
.          endif
.        endif # ${USE_KDE:M${component}_*} != "" && ${USE_KDE:M${component}} == ""
    # If no dependency type is set, default to full dependency.
.        if !defined(${component}_TYPE)
${component}_TYPE=	build run
.        endif
    # Set real dependencies.
.        if defined(${component}_LIB) && ${${component}_TYPE:Mbuild} && ${${component}_TYPE:Mrun}
LIB_DEPENDS+=		${${component}_LIB}:${${component}_PORT}
.        else
${component}_PATH?=	${KDE_PREFIX}/lib/${${component}_LIB}
${component}_DEPENDS=	${${component}_PATH}:${${component}_PORT}
.          if ${${component}_TYPE:Mbuild} != ""
BUILD_DEPENDS+=		${${component}_DEPENDS}
.          endif
.          if ${${component}_TYPE:Mrun} != ""
RUN_DEPENDS+=		${${component}_DEPENDS}
.          endif
.        endif # ${${component}_LIB} && ${${component}_TYPE:Mbuild} && ${${component}_TYPE:Mrun}
.      endif # defined(${component}_PORT) && defined(${component}_PATH)
.    else # ! ${_USE_KDE_ALL:M${component}} != ""
IGNORE=				cannot be installed: unknown USE_KDE component '${component}'
.    endif # ${_USE_KDE_ALL:M${component}} != ""
.  endfor

.endif