aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/lxqt.mk
blob: 93bdede9bf9adf7c74e84d3622c7033ffb51ae9b (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
# $FreeBSD$
#
# This file contains some variable definitions that are supposed to make your
# life easier, when dealing with ports related to the LXQt Desktop Environment.
#
# Feature:  lxqt
# Usage:    USES=lxqt
# Valid ARGS:   does not require args
#
# Available LXQt components are:
#
# buildtools    - Helpers CMake modules
# globalkeys    - Keyboard shortcuts daemon
# libfmqt   - Libfm Qt bindings
# lxqt      - LXQt core library
# qtxdg     - Qt implementation of freedesktop.org xdg specs
#
# MAINTAINER: ports@FreeBSD.org

.if !defined(_INCLUDE_USES_LXQT_MK)
_INCLUDE_USES_LXQT_MK=  yes

.if !empty(lxqt_ARGS)
IGNORE= Incorrect 'USES+=lxqt:${lxqt_ARGS} takes no arguments
.endif

_LXQT_PROJECT=  ${DISTNAME:S/-${DISTVERSION}//:tl}

MASTER_SITE_LXQT+= \
    https://github.com/lxqt/%SUBDIR%/releases/download/${PORTVERSION}/ \
    https://downloads.lxqt.org/downloads/%SUBDIR%/${PORTVERSION}/
MASTER_SITE_LXQT_SUBDIR=    ${_LXQT_PROJECT}

MASTER_SITES?=  ${MASTER_SITE_LXQT}
MASTER_SITE_SUBDIR?=    ${MASTER_SITE_LXQT_SUBDIR}

DIST_SUBDIR=    lxqt

PLIST_SUB+= LXQT_INCLUDEDIR="include/lxqt" \
    LXQT_SHAREDIR="share/lxqt" \
    LXQT_TRANSLATIONS="share/lxqt/translations" \
    VERSION="${PORTVERSION}"

CMAKE_ARGS+=    -DCMAKE_INSTALL_MANDIR=${MANDIRS} \
    -DPULL_TRANSLATIONS:BOOL=OFF

# Available LXQt components are:
_USE_LXQT_ALL=  buildtools globalkeys libfmqt lxqt qtxdg

_DATAROOTDIR=   ${LOCALBASE}/share

buildtools_BUILD_DEPENDS=   ${_DATAROOTDIR}/cmake/lxqt-build-tools/lxqt-build-tools-config.cmake:devel/lxqt-build-tools

globalkeys_LIB_DEPENDS= liblxqt-globalkeys.so:x11/lxqt-globalkeys

globalkeys_USE_LXQT_REQ=    lxqt

libfmqt_LIB_DEPENDS=    libfm-qt.so:x11/libfm-qt

lxqt_LIB_DEPENDS=   liblxqt.so:devel/liblxqt
lxqt_USE_LXQT_REQ=  qtxdg

qtxdg_LIB_DEPENDS=  libQt5Xdg.so:devel/libqtxdg

.if defined(USE_LXQT)

# First, expand all USE_LXQT_REQ recursively.
.for comp in ${_USE_LXQT_ALL}
. for subcomp in ${${comp}_USE_LXQT_REQ}
${comp}_USE_LXQT_REQ+=  ${${subcomp}_USE_LXQT_REQ}
. endfor
.endfor

# Then, use already expanded USE_LXQT_REQ to expand USE_LXQT.
.for comp in ${USE_LXQT}
. if empty(_USE_LXQT_ALL:M${comp})
IGNORE= cannot install: Unknown component ${comp}
. else
_USE_LXQT+= ${${comp}_USE_LXQT_REQ} ${comp}
. endif
.endfor

# Remove duplicate components
USE_LXQT=   ${_USE_LXQT:O:u}

.for comp in ${USE_LXQT}
. if defined(${comp}_BUILD_DEPENDS)
BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS}
. endif

. if defined(${comp}_LIB_DEPENDS)
LIB_DEPENDS+=   ${${comp}_LIB_DEPENDS}
. endif

. if defined(${comp}_RUN_DEPENDS)
RUN_DEPENDS+=   ${${comp}_RUN_DEPENDS}
. endif
.endfor

.endif # end of defined(USE_LXQT)

.endif # end of !defined(_INCLUDE_USES_LXQT_MK)

.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LXQT_POST_MK)

_INCLUDE_USES_LXQT_POST_MK= yes

.endif