summaryrefslogtreecommitdiffstats
path: root/sysutils/xfce4-settings/Makefile
blob: d504dfc3561e914d6e82a16afdb3ed8ae0576432 (plain)
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
# Created by: Oliver Lehmann <oliver@FreeBSD.org>
# $FreeBSD$

PORTNAME=	xfce4-settings
PORTVERSION=	4.10.1
CATEGORIES=	sysutils xfce
MASTER_SITES=	${MASTER_SITE_XFCE}
MASTER_SITE_SUBDIR=	src/xfce/${PORTNAME}/${PORTVERSION:R}
DIST_SUBDIR=	xfce4

MAINTAINER=	xfce@FreeBSD.org
COMMENT=	Xfce 4 settings application

LIB_DEPENDS=	dbus-glib-1:${PORTSDIR}/devel/dbus-glib

USE_AUTOTOOLS=	libtool
GNU_CONFIGURE=	yes
INSTALLS_ICONS=	yes
USE_BZIP2=	yes
USE_GMAKE=	yes
USE_GNOME=	glib20 gtk20 intltool intlhack
USE_XFCE=	configenv garcon libexo libmenu libutil xfconf
USE_XORG=	inputproto x11 xi
USES=		pathfix pkgconfig

CONFIGURE_ARGS=	--enable-pluggable-dialogs \
		--enable-gio-unix

OPTIONS_DEFINE=		XKLAVIER XCURSOR XRANDR NOTIFY NLS SOUND
OPTIONS_DEFAULT=	XKLAVIER XCURSOR XRANDR NOTIFY NLS
SOUND_DESC=		Enable sound control

NO_STAGE=	yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MXKLAVIER}
LIB_DEPENDS+=	xklavier:${PORTSDIR}/x11/libxklavier
CONFIGURE_ARGS+=--enable-libxklavier
.else
CONFIGURE_ARGS+=--disable-libxklavier
.endif

.if ${PORT_OPTIONS:MXCURSOR}
USE_XORG+=	xcursor
CONFIGURE_ARGS+=--enable-xcursor
.else
CONFIGURE_ARGS+=--disable-xcursor
.endif

.if ${PORT_OPTIONS:MXRANDR}
USE_XORG+=	xrandr
CONFIGURE_ARGS+=--enable-xrandr
PLIST_SUB+=	XRANDR=""
.else
CONFIGURE_ARGS+=--disable-xrandr
PLIST_SUB+=	XRANDR="@comment "
.endif

.if ${PORT_OPTIONS:MNOTIFY}
LIB_DEPENDS+=	notify:${PORTSDIR}/devel/libnotify
CONFIGURE_ARGS+=--enable-libnotify
.else
CONFIGURE_ARGS+=--disable-libnotify
.endif

.if ${PORT_OPTIONS:MNLS}
USES+=		gettext
CONFIGURE_ARGS+=--enable-nls
PLIST_SUB+=	NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+=	NLS="@comment "
.endif

.if ${PORT_OPTIONS:MSOUND}
LIB_DEPENDS+=	canberra:${PORTSDIR}/audio/libcanberra
CONFIGURE_ARGS+=--enable-sound-settings
.else
CONFIGURE_ARGS+=--disable-sound-settings
.endif

post-patch:
	# until xfce4-icon-theme is back we rely on Tango
	@${REINPLACE_CMD} -e 's|Rodent|Tango|g' \
		${WRKSRC}/dialogs/appearance-settings/main.c
	@${REINPLACE_CMD} -e 's|IconThemeName" type="empty|IconThemeName" type="string" value="Tango|; \
		s|"ThemeName" type="empty|"ThemeName" type="string" value="Xfce|' \
		${WRKSRC}/xfsettingsd/xsettings.xml
	@${REINPLACE_CMD} -e 's|xkl_config_registry_load (settings->priv->xkl_registry)|xkl_config_registry_load (settings->priv->xkl_registry, FALSE)|g; \
		s|xkl_engine_stop_listen (settings->priv->xkl_engine)|xkl_engine_stop_listen (settings->priv->xkl_engine, FALSE)|g' \
		${WRKSRC}/dialogs/keyboard-settings/xfce-keyboard-settings.c

.include <bsd.port.mk>
OpenPOWER on IntegriCloud