2012-11-27 00:17:03 +01:00
|
|
|
# Created by: David Leonard <leonard@dstc.edu.au>
|
1999-08-31 05:04:38 +02:00
|
|
|
# $FreeBSD$
|
1996-08-16 09:39:57 +02:00
|
|
|
|
2000-04-10 02:33:10 +02:00
|
|
|
PORTNAME= dclock
|
2012-11-27 00:17:03 +01:00
|
|
|
PORTVERSION= 2.2.2
|
1998-09-23 00:32:14 +02:00
|
|
|
CATEGORIES= x11-clocks
|
2012-11-27 00:17:03 +01:00
|
|
|
MASTER_SITES= http://opencircuitdesign.com/~tim/programs/dclock/archive/
|
1996-08-16 09:39:57 +02:00
|
|
|
|
2012-09-07 08:52:56 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2014-08-08 10:42:44 +02:00
|
|
|
COMMENT= 7-segment digital clock with some optional features
|
1996-08-16 09:39:57 +02:00
|
|
|
|
2012-11-27 00:17:03 +01:00
|
|
|
OPTIONS_DEFINE= SOX XFT DOCS
|
|
|
|
OPTIONS_DEFAULT=SOX XFT
|
|
|
|
SOX_DESC= Install SOX to play audio
|
2005-12-18 15:54:18 +01:00
|
|
|
|
2012-11-27 00:17:03 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
1996-08-16 09:39:57 +02:00
|
|
|
|
2012-11-27 00:17:03 +01:00
|
|
|
USE_XORG= x11 xt
|
2014-07-29 21:11:51 +02:00
|
|
|
USES= pkgconfig tar:tgz
|
2012-11-27 00:17:03 +01:00
|
|
|
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib -lX11 -lXt -lm
|
2005-12-18 15:54:18 +01:00
|
|
|
|
2012-11-27 00:17:03 +01:00
|
|
|
PORTDOCS= README TODO
|
|
|
|
PLIST_FILES= bin/dclock \
|
|
|
|
lib/X11/app-defaults/DClock \
|
2014-01-11 13:51:31 +01:00
|
|
|
man/man1/${PORTNAME}.1.gz \
|
2012-11-27 00:17:03 +01:00
|
|
|
%%DATADIR%%/sounds/bell.wav \
|
|
|
|
%%DATADIR%%/sounds/digital.wav
|
|
|
|
PLIST_DIRS= %%DATADIR%%/sounds \
|
|
|
|
%%DATADIR%%
|
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
2005-12-18 15:54:18 +01:00
|
|
|
|
2012-09-07 08:52:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MSOX}
|
2005-12-18 15:54:18 +01:00
|
|
|
RUN_DEPENDS+= play:${PORTSDIR}/audio/sox
|
|
|
|
.endif
|
|
|
|
|
2012-11-27 00:17:03 +01:00
|
|
|
.if ${PORT_OPTIONS:MXFT}
|
|
|
|
USE_XORG+= xft
|
|
|
|
CPPFLAGS+= $$(freetype-config --cflags) -DXFT_SUPPORT
|
|
|
|
LDFLAGS+= $$(freetype-config --libs) -lXft
|
|
|
|
.endif
|
|
|
|
|
2005-12-18 15:54:18 +01:00
|
|
|
post-patch:
|
2012-11-27 00:17:03 +01:00
|
|
|
.for i in Dclock.c Dclock.ad dclock.1
|
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|%%DATADIR%%|${DATADIR}| ; \
|
|
|
|
s|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/${i}
|
2005-12-18 15:54:18 +01:00
|
|
|
.endfor
|
2012-11-27 00:17:03 +01:00
|
|
|
|
|
|
|
do-build:
|
|
|
|
(cd ${WRKSRC} \
|
|
|
|
&& ${CC} ${CFLAGS} ${CPPFLAGS} *.c -o ${PORTNAME} ${LDFLAGS})
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
(cd ${WRKSRC} \
|
2014-01-11 13:51:31 +01:00
|
|
|
&& ${INSTALL_PROGRAM} dclock ${STAGEDIR}${PREFIX}/bin \
|
|
|
|
&& ${INSTALL_MAN} dclock.1 ${STAGEDIR}${MANPREFIX}/man/man1 \
|
2012-11-27 00:17:03 +01:00
|
|
|
&& ${INSTALL_DATA} Dclock.ad \
|
2014-01-11 13:51:31 +01:00
|
|
|
${STAGEDIR}${PREFIX}/lib/X11/app-defaults/DClock)
|
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/sounds
|
|
|
|
(cd ${WRKSRC}/sounds && ${INSTALL_DATA} *.wav ${STAGEDIR}${DATADIR}/sounds)
|
2012-09-07 08:52:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2014-01-11 13:51:31 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
2012-11-27 00:17:03 +01:00
|
|
|
.for f in ${PORTDOCS}
|
2014-01-11 13:51:31 +01:00
|
|
|
(cd ${WRKSRC} && ${INSTALL_DATA} ${f} ${STAGEDIR}${DOCSDIR})
|
2005-12-18 15:54:18 +01:00
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
2012-11-27 00:17:03 +01:00
|
|
|
.include <bsd.port.mk>
|