aboutsummaryrefslogtreecommitdiffstats
path: root/x11-clocks/dclock/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'x11-clocks/dclock/Makefile')
-rw-r--r--x11-clocks/dclock/Makefile89
1 files changed, 50 insertions, 39 deletions
diff --git a/x11-clocks/dclock/Makefile b/x11-clocks/dclock/Makefile
index 992fc5d2ad76..5491e05a04ef 100644
--- a/x11-clocks/dclock/Makefile
+++ b/x11-clocks/dclock/Makefile
@@ -1,61 +1,72 @@
-# New ports collection makefile for: dclock
-# Date created: 15 Aug 1996
-# Whom: David Leonard <leonard@dstc.edu.au>
-#
+# Created by: David Leonard <leonard@dstc.edu.au>
# $FreeBSD$
-#
PORTNAME= dclock
-PORTVERSION= 2.1.2.8
-PORTREVISION= 5
+PORTVERSION= 2.2.2
CATEGORIES= x11-clocks
-MASTER_SITES= ${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR= pool/main/d/dclock
-DISTNAME= dclock_2.1.2.orig
-
-PATCH_SITES= ${MASTER_SITE_DEBIAN:S,%SUBDIR%,pool/main/d/dclock,}
-PATCHFILES= dclock_2.1.2-8.diff.gz
-PATCH_DIST_STRIP= -p1
+MASTER_SITES= http://opencircuitdesign.com/~tim/programs/dclock/archive/
+EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
COMMENT= A 7-segment digital clock with some optional features
-USE_IMAKE= yes
-USE_XORG= ice sm x11 xext xt
+OPTIONS_DEFINE= SOX XFT DOCS
+OPTIONS_DEFAULT=SOX XFT
+SOX_DESC= Install SOX to play audio
-WRKSRC= ${WRKDIR}/dclock
-MAN1= dclock.1
+WRKSRC= ${WRKDIR}/${PORTNAME}
-OPTIONS_DEFINE= SOX
-SOX_DESC= Install SOX to play audio
-OPTIONS_DEFAULT= SOX
+USE_XORG= x11 xt
+USE_PKGCONFIG= build
+
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lX11 -lXt -lm
-.include <bsd.port.pre.mk>
+MAN1= dclock.1
+PORTDOCS= README TODO
+PLIST_FILES= bin/dclock \
+ lib/X11/app-defaults/DClock \
+ %%DATADIR%%/sounds/bell.wav \
+ %%DATADIR%%/sounds/digital.wav
+PLIST_DIRS= %%DATADIR%%/sounds \
+ %%DATADIR%%
+
+.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSOX}
RUN_DEPENDS+= play:${PORTSDIR}/audio/sox
.endif
+.if ${PORT_OPTIONS:MXFT}
+USE_XORG+= xft
+CPPFLAGS+= $$(freetype-config --cflags) -DXFT_SUPPORT
+LDFLAGS+= $$(freetype-config --libs) -lXft
+.endif
+
post-patch:
- @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \
- -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
- ${WRKSRC}/Dclock.c \
- ${WRKSRC}/Dclock.ad \
- ${WRKSRC}/dclock.1
- @${MV} ${WRKSRC}/dclock.1 ${WRKSRC}/dclock.man
-
-post-install:
- ${INSTALL_DATA} ${WRKSRC}/Dclock.ad ${PREFIX}/lib/X11/app-defaults/DClock
- ${MKDIR} ${DATADIR}/sounds
-.for f in bell.wav digital.wav
- ${INSTALL_DATA} ${WRKSRC}/sounds/${f} ${DATADIR}/sounds
+.for i in Dclock.c Dclock.ad dclock.1
+ @${REINPLACE_CMD} -e \
+ 's|%%DATADIR%%|${DATADIR}| ; \
+ s|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/${i}
.endfor
+
+do-build:
+ (cd ${WRKSRC} \
+ && ${CC} ${CFLAGS} ${CPPFLAGS} *.c -o ${PORTNAME} ${LDFLAGS})
+
+do-install:
+ (cd ${WRKSRC} \
+ && ${INSTALL_PROGRAM} dclock ${PREFIX}/bin \
+ && ${INSTALL_MAN} dclock.1 ${MANPREFIX}/man/man1 \
+ && ${INSTALL_DATA} Dclock.ad \
+ ${PREFIX}/lib/X11/app-defaults/DClock)
+ @${MKDIR} ${DATADIR}/sounds
+ (cd ${WRKSRC}/sounds && ${INSTALL_DATA} *.wav ${DATADIR}/sounds)
.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
-.for f in README TODO
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+ @${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${f} ${DOCSDIR})
.endfor
- ${INSTALL_DATA} ${WRKSRC}/debian/changelog ${DOCSDIR}/changelog.Debian
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>