aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/xneur/Makefile
blob: c25d8cf2459b6c712bb99bc73ec8c07aa77bc4f1 (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
# New ports collection makefile for:    xneur
# Date created:     19 January 2007
# Whom:         Alex "lissyara" Keda <admin@lissyara.su>
#
# $FreeBSD$
#

PORTNAME=   xneur
PORTVERSION=    0.13.0
PORTREVISION=   1
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.0:${PORTSDIR}/devel/pcre

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

USE_LDCONFIG=   yes
INSTALLS_ICONS= yes

MAN1=       xneur.1
MAN5=       xneurrc.5

OPTIONS=    GSTREAMER   "Build with GStreamer sound support"    on \
        OPENAL      "Build with OpenAL sound support"   off \
        ASPELL      "Build with aspell support"     on \
        XOSD        "Build with xosd support"       off

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_NLS)
USE_GETTEXT=    yes
CONFIGURE_ARGS+=    --enable-nls
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=    --disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.if defined(WITHOUT_X11)
CONFIGURE_ARGS+=    --without-x
.else
USE_XORG+=  x11
CONFIGURE_ARGS+=    --with-x
.endif

.if !defined(WITHOUT_GSTREAMER) && defined(WITH_OPENAL)
IGNORE= please select only one sound library
.else
.if !defined(WITHOUT_GSTREAMER)
USE_GSTREAMER=  yes
CONFIGURE_ARGS+=    --with-sound=gstreamer
.endif
.if defined(WITH_OPENAL)
USE_OPENAL=     al alut
CONFIGURE_ARGS+=    --with-sound=openal
.endif
.if defined(WITHOUT_GSTREAMER) && !defined(WITH_OPENAL)
CONFIGURE_ARGS+=    --with-sound=no
.endif
.endif

.if defined(WITHOUT_ASPELL)
CONFIGURE_ARGS+=    --with-spell=no --without-aspell
.else
LIB_DEPENDS+=   aspell:${PORTSDIR}/textproc/aspell
CONFIGURE_ARGS+=    --with-spell=aspell
.endif

.if !defined(WITH_XOSD)
CONFIGURE_ARGS+=    --without-xosd
.else
LIB_DEPENDS+=   xosd.4:${PORTSDIR}/misc/xosd
CONFIGURE_ARGS+=    --with-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.post.mk>