aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm/i3/Makefile
blob: 1871d94789d5cdddd7c7384c823357963a3be9d1 (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
# Created by: Dennis Herrmann <dhn@FreeBSD.org>
# $FreeBSD$

PORTNAME=   i3
DISTVERSION=    4.11
CATEGORIES= x11-wm
MASTER_SITES=   http://i3wm.org/downloads/

MAINTAINER= bapt@FreeBSD.org
COMMENT=    Improved dynamic tiling window manager

LICENSE=    BSD3CLAUSE

LIB_DEPENDS=    libstartup-notification-1.so:${PORTSDIR}/x11/startup-notification \
        libxcb-util.so:${PORTSDIR}/x11/xcb-util \
        libxcb-keysyms.so:${PORTSDIR}/x11/xcb-util-keysyms \
        libxcb-icccm.so:${PORTSDIR}/x11/xcb-util-wm \
        libev.so:${PORTSDIR}/devel/libev \
        libyajl.so:${PORTSDIR}/devel/yajl \
        libcairo.so:${PORTSDIR}/graphics/cairo \
        libpangocairo-1.0.so:${PORTSDIR}/x11-toolkits/pango \
        libpcre.so:${PORTSDIR}/devel/pcre \
        libxcb-cursor.so:${PORTSDIR}/x11/xcb-util-cursor \
        libxkbcommon.so:${PORTSDIR}/x11/libxkbcommon
RUN_DEPENDS=    p5-IPC-Run>=0:${PORTSDIR}/devel/p5-IPC-Run \
        p5-Try-Tiny>=0:${PORTSDIR}/lang/p5-Try-Tiny \
        p5-AnyEvent-I3>=0:${PORTSDIR}/devel/p5-AnyEvent-I3

USE_XORG=   xcb
USES=       pkgconfig iconv gmake perl5 tar:bzip2
USE_PERL5=  run
LDFLAGS+=   -L${LOCALBASE}/lib ${ICONV_LIB}
MAKE_JOBS_UNSAFE=   yes

post-patch:
    @${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|g' ${WRKSRC}/src/config.c
    @${REINPLACE_CMD} -e 's|/usr/|${PREFIX}/|g' ${WRKSRC}/i3.config
    @${REINPLACE_CMD} -e 's|/usr/|${PREFIX}/|g' ${WRKSRC}/i3.config
    @${REINPLACE_CMD} -e 's|PREFIX|${PREFIX}/|g' ${WRKSRC}/man/Makefile
    @${REINPLACE_CMD} -e 's|/usr/|${PREFIX}/|g' ${WRKSRC}/man/i3.1
    @${REINPLACE_CMD} -e 's|/usr/|${PREFIX}/|g' ${WRKSRC}/man/i3-msg.1
    @${REINPLACE_CMD} -e 's|/usr/|${PREFIX}/|g' ${WRKSRC}/man/i3-input.1
    @${REINPLACE_CMD} -e 's|.SILENT||g' ${WRKSRC}/common.mk
    @${REINPLACE_CMD} -e 's|-Iinclude|-Iinclude -Isrc|g' \
              -e 's|-liconv|${ICONV_LIB}|' \
              -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/common.mk

post-install:
    @${INSTALL_DATA} ${WRKSRC}/man/*.1 ${STAGEDIR}${MANPREFIX}/man/man1/
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/i3 \
        ${STAGEDIR}${PREFIX}/bin/i3bar \
        ${STAGEDIR}${PREFIX}/bin/i3-config-wizard \
        ${STAGEDIR}${PREFIX}/bin/i3-msg \
        ${STAGEDIR}${PREFIX}/bin/i3-input \
        ${STAGEDIR}${PREFIX}/bin/i3-nagbar \
        ${STAGEDIR}${PREFIX}/bin/i3-dump-log

.include <bsd.port.mk>