aboutsummaryrefslogtreecommitdiffstats
path: root/x11/tint/Makefile
blob: d8fbf45f179e26c16d1b6c82815c534a9c96da43 (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
# $FreeBSD$

PORTNAME=   tint2
PORTVERSION=    0.11
PORTREVISION=   2
CATEGORIES= x11
MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE}

MAINTAINER= yamagi@yamagi.org
COMMENT=    Lightweight freedesktop-compliant panel/taskbar/systray/clock

LIB_DEPENDS=    libcairo.so:${PORTSDIR}/graphics/cairo

PROJECTHOST=    tint2
USES=       cmake pkgconfig tar:bzip2
USE_GNOME=  pango glib20
USE_XORG=   xinerama xrandr xdamage xcomposite
USE_EFL=    imlib2

CMAKE_ARGS= -DENABLE_BATTERY:BOOL=ON -DMANDIR:PATH=man

OPTIONS_DEFINE= PYCONF DOCS EXAMPLES
OPTIONS_DEFAULT=    PYCONF
OPTIONS_SUB=    yes
PYCONF_DESC=    Configuration editing tool (req. python)

EXAMPLES=   icon_and_text_1.tint2rc icon_and_text_2.tint2rc \
        icon_and_text_3.tint2rc icon_and_text_4.tint2rc \
        icon_only_1.tint2rc icon_only_2.tint2rc icon_only_3.tint2rc \
        icon_only_4.tint2rc icon_only_6.tint2rc icon_only_7.tint2rc \
        text_only_1.tint2rc text_only_2.tint2rc text_only_3.tint2rc \
        text_only_4.tint2rc text_only_5.tint2rc text_only_6.tint2rc tint2rc
DOCS=       AUTHORS ChangeLog README

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MPYCONF}
USE_PYTHON= yes
USE_GNOME=  gtk20 pygtk2
CMAKE_ARGS+=    -DENABLE_TINT2CONF:BOOL=ON
PYCONF_SRC= ${WRKSRC}/src/tint2conf
.else
CMAKE_ARGS+=    -DENABLE_TINT2CONF:BOOL=OFF
.endif

.if ${PORT_OPTIONS:MPYCONF}
post-patch:
    @${MV} ${PYCONF_SRC}/tintwizard.py ${PYCONF_SRC}/tintwizard.py.Dist
    @${SED} -e 's#pidof#pgrep#g' ${PYCONF_SRC}/tintwizard.py.Dist \
        > ${PYCONF_SRC}/tintwizard.py
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/tint2 ${STAGEDIR}${PREFIX}/bin
    ${MKDIR} ${STAGEDIR}${PREFIX}/share/tint2
    ${INSTALL_DATA} ${WRKSRC}/default_icon.png ${STAGEDIR}${PREFIX}/share/tint2
    ${INSTALL_MAN} ${WRKSRC}/doc/tint2.1 ${STAGEDIR}${MANPREFIX}/man/man1
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${MKDIR}  ${STAGEDIR}${EXAMPLESDIR}
    cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC}/sample; ${INSTALL_DATA} ${EXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
.if ${PORT_OPTIONS:MPYCONF}
    ${INSTALL_PROGRAM} ${PYCONF_SRC}/tint2conf ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_SCRIPT} ${PYCONF_SRC}/tintwizard.py ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_DATA} ${PYCONF_SRC}/tint2conf.desktop ${STAGEDIR}${PREFIX}/share/applications
    ${INSTALL_DATA} ${PYCONF_SRC}/tint2conf.png ${STAGEDIR}${PREFIX}/share/pixmaps
    ${INSTALL_DATA} ${PYCONF_SRC}/tint2conf.svg ${STAGEDIR}${PREFIX}/share/pixmaps
.endif

.include <bsd.port.mk>