aboutsummaryrefslogtreecommitdiff
path: root/x11/keybinder/Makefile
blob: 871a9ff85046f3821699c3684fcd242b7f3f1fd0 (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
# $FreeBSD$

PORTNAME=	keybinder
PORTVERSION=	0.3.1
DISTVERSIONPREFIX=	v
CATEGORIES=	x11

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Library for registering keyboard shortcuts

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

USE_GITHUB=	yes
GH_ACCOUNT=	engla

USES=		autoreconf gmake libtool pathfix pkgconfig
USE_GNOME=	gtk20 introspection:build
USE_XORG=	x11 xext xrender
GNU_CONFIGURE=	yes
INSTALL_TARGET=	install-strip
USE_LDCONFIG=	yes

OPTIONS_DEFINE=	EXAMPLES GTKDOC LUA PYTHON
OPTIONS_DEFAULT=	PYTHON
OPTIONS_SUB=	yes

GTKDOC_DESC=		Build API documentation (requires textproc/gtk-doc)
GTKDOC_BUILD_DEPENDS=	gtkdocize:textproc/gtk-doc
GTKDOC_CONFIGURE_ON=	--enable-gtk-doc

# Override LUA description
LUA_DESC=		Lua bindings
LUA_USES=		lua:51
LUA_CONFIGURE_ON=	--with-lua-includes=${LUA_INCDIR}
LUA_CONFIGURE_OFF=	--disable-lua

PYTHON_USES=		python:2
PYTHON_USE=		gnome=pygtk2
PYTHON_CONFIGURE_OFF=	--disable-python

post-patch-GTKDOC-off:
	@${REINPLACE_CMD} -E '/GTK_DOC_CHECK|docs/d' ${WRKSRC}/configure.ac
	@${REINPLACE_CMD} -e '/^SUBDIRS/s, docs,,' ${WRKSRC}/Makefile.am

pre-configure-GTKDOC-on:
	@(cd ${CONFIGURE_WRKSRC} && ${LOCALBASE}/bin/gtkdocize)

post-build-EXAMPLES-on:
	@${REINPLACE_CMD} -i '' -e \
		's|lua5.1|lua-${LUA_VER}|g' ${WRKSRC}/examples/Makefile

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>