aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/xneur/Makefile
blob: 0ea5c0de290c00682f68766f3c1cabe1c7f6b36d (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
# Created by: Alex "lissyara" Keda <admin@lissyara.su>
# $FreeBSD$

PORTNAME=   xneur
PORTVERSION=    0.15.0
PORTREVISION=   3
CATEGORIES= deskutils
MASTER_SITES=   http://dists.xneur.ru/release-${DISTVERSION}/tgz/ \
        http://mirror.amdmi3.ru/distfiles/

MAINTAINER= admin@lissyara.su
COMMENT=    Auto keyboard switcher

LIB_DEPENDS=    notify.4:${PORTSDIR}/devel/libnotify \
        pcre.3:${PORTSDIR}/devel/pcre

USE_BZIP2=  yes
USES=       pkgconfig iconv
USE_GNOME=  gnomehack
GNU_CONFIGURE=  yes
LDFLAGS+=   -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CPPFLAGS+=  -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
CONFIGURE_ARGS= --disable-static --libdir=${PREFIX}/lib/xneur

USE_LDCONFIG=   yes
INSTALLS_ICONS= yes

MAN1=       xneur.1
MAN5=       xneurrc.5

OPTIONS_DEFINE= ASPELL XOSD NLS X11
OPTIONS_DEFAULT=    GSTREAMER ASPELL
OPTIONS_RADIO=  SOUND
OPTIONS_RADIO_SOUND=    GSTREAMER OPENAL
XOSD_DESC=  Xosd support

.include <bsd.port.options.mk>

.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:MX11}
USE_XORG+=  x11
CONFIGURE_ARGS+=    --with-x
.else
CONFIGURE_ARGS+=    --without-x
.endif

.if ${PORT_OPTIONS:MGSTREAMER}
USE_GSTREAMER=  yes
CONFIGURE_ARGS+=    --with-sound=gstreamer
.elif ${PORT_OPTIONS:MOPENAL}
USE_OPENAL=     al alut
CONFIGURE_ARGS+=    --with-sound=openal
.else
CONFIGURE_ARGS+=    --with-sound=no
.endif

.if ${PORT_OPTIONS:MASPELL}
LIB_DEPENDS+=   aspell:${PORTSDIR}/textproc/aspell
CONFIGURE_ARGS+=    --with-spell=aspell
.else
CONFIGURE_ARGS+=    --with-spell=no --without-aspell
.endif

.if ${PORT_OPTIONS:MXOSD}
LIB_DEPENDS+=   xosd.4:${PORTSDIR}/misc/xosd
CONFIGURE_ARGS+=    --with-xosd
.else
CONFIGURE_ARGS+=    --without-xosd
.endif

post-patch:
    @${MV} ${WRKSRC}/etc/xneurrc ${WRKSRC}/etc/xneurrc.sample

post-install:
.if !exists(${PREFIX}/etc/xneur/xneurrc)
    ${CP} -p ${PREFIX}/etc/xneur/xneurrc.sample ${PREFIX}/etc/xneur/xneurrc
.endif

.include <bsd.port.mk>