aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm/pawm/Makefile
blob: 54c90129c60b45676e76b0ec2b64914798a29e25 (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
# New ports collection makefile for:    pawm
# Date created:             2002-08-22
# Whom:                 trevor
#
# $FreeBSD$
#

PORTNAME=   pawm
PORTVERSION=    2.2.3
CATEGORIES= x11-wm
MASTER_SITES=   http://www.pleyades.net/pawm/files/

MAINTAINER= ports@FreeBSD.org
COMMENT=    The Puto Amo Window Manager

USE_BZIP2=  yes
USE_X_PREFIX=   yes
USE_XPM=    yes
USE_GMAKE=  yes
MAKEFILE=   Makefile.in
MAKE_ARGS=  GCC="${CC}" MAKE.binary="${CC} ${LDFLAGS} -o"

CFLAGS+=    -I. -I${X11BASE}/include -DNDEBUG
LDFLAGS=    -lm -L${X11BASE}/lib -lXpm -lXrandr

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
CFLAGS+=    -Dintmax_t=u_int32_t -Duintmax_t=u_int32_t \
        -Dstrtoimax=strtoll -Dstrtoumax=strtoull \
        -DSIZE_MAX=UINT_MAX
.endif

.if ${X_WINDOW_SYSTEM} == xfree86-3 || defined(WITHOUT_XFT)
CFLAGS+=    -DDISABLE_XFT
.else
LIB_DEPENDS+=   Xft.2:${PORTSDIR}/x11-fonts/libXft
CFLAGS+=    `pkg-config --cflags xft`
LDFLAGS+=   `pkg-config --libs xft`
.endif

.if defined(WITH_SN)
LIB_DEPENDS+=   startup-notification-1.0:${PORTSDIR}/x11/startup-notification
CFLAGS+=    -DENABLE_STARTUP -DSN_API_NOT_YET_FROZEN \
        `pkg-config --cflags libstartup-notification-1.0`
LDFLAGS+=   `pkg-config --libs libstartup-notification-1.0`
.endif

post-patch:
.if ${OSVERSION} < 500000
    @${GREP} -lR "<stdint\.h>" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
        's|<stdint\.h>|<inttypes.h>|g'
.endif

do-configure:
    @${ECHO_CMD} -n > ${WRKSRC}/config.h
    @${ECHO_CMD} '#define PROJECT "${PORTNAME}"' >> ${WRKSRC}/config.h
    @${ECHO_CMD} '#define VERSION "${PORTVERSION}"' >> ${WRKSRC}/config.h
    @${ECHO_CMD} '#define CONFDIR "${PREFIX}/etc"' >> ${WRKSRC}/config.h
    @${ECHO_CMD} '#define DATADIR "${DATADIR}"' >> ${WRKSRC}/config.h

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/pawm ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/conf/pawm.conf ${PREFIX}/etc
    @${MKDIR} ${DATADIR}/icons
    ${INSTALL_DATA} ${WRKSRC}/data/icons/*.xpm ${DATADIR}/icons
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for ii in AUTHORS Changelog GPL INSTALL README
    ${INSTALL_DATA} ${WRKSRC}/${ii} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>