diff options
Diffstat (limited to 'x11-clocks/asclock')
-rw-r--r-- | x11-clocks/asclock/Makefile | 85 | ||||
-rw-r--r-- | x11-clocks/asclock/files/patch-asclock.c (renamed from x11-clocks/asclock/files/patch-color) | 32 |
2 files changed, 91 insertions, 26 deletions
diff --git a/x11-clocks/asclock/Makefile b/x11-clocks/asclock/Makefile index cbf7d367b92d..b73a1135eb51 100644 --- a/x11-clocks/asclock/Makefile +++ b/x11-clocks/asclock/Makefile @@ -3,7 +3,7 @@ PORTNAME= asclock PORTVERSION= 1.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-clocks afterstep MASTER_SITES= XCONTRIB/applications DISTNAME= ${PORTNAME} @@ -11,33 +11,74 @@ DISTNAME= ${PORTNAME} MAINTAINER= dinoex@FreeBSD.org COMMENT= Afterstep clock with some language extensions +LICENSE= BSD2CLAUSE + CONFLICTS= asclock-gtk-[0-9]* asclock-xlib-[0-9]* USES= tar:tgz imake USE_XORG= xpm xext x11 PLIST_FILES= bin/asclock man/man1/asclock.1.gz +OPTIONS_DEFINE= +OPTIONS_SINGLE= LANG +OPTIONS_SINGLE_LANG= EN DE PT NL NO IT SE ES HU BRE FR CZ +OPTIONS_DEFAULT= EN +NO_OPTIONS_SORT=yes +EN_DESC= english +DE_DESC= german +PT_DESC= portuguese +NL_DESC= dutch +NO_DESC= norwegian +IT_DESC= italian +SE_DESC= swedish +ES_DESC= spanish +HU_DESC= hungarian +BRE_DESC= breton +FR_DESC= french +CZ_DESC= czech + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MDE} +ASCLOCK_LANG= german +.endif +.if ${PORT_OPTIONS:MPT} +ASCLOCK_LANG= portuguese +.endif +.if ${PORT_OPTIONS:MNL} +ASCLOCK_LANG= dutch +.endif +.if ${PORT_OPTIONS:MNO} +ASCLOCK_LANG= norwegian +.endif +.if ${PORT_OPTIONS:MIT} +ASCLOCK_LANG= italian +.endif +.if ${PORT_OPTIONS:MSE} +ASCLOCK_LANG= swedish +.endif +.if ${PORT_OPTIONS:MES} +ASCLOCK_LANG= spanish +.endif +.if ${PORT_OPTIONS:MHU} +ASCLOCK_LANG= hungarian +.endif +.if ${PORT_OPTIONS:MBRE} +ASCLOCK_LANG= breton +.endif +.if ${PORT_OPTIONS:MFR} +ASCLOCK_LANG= french +.endif +.if ${PORT_OPTIONS:MCZ} +ASCLOCK_LANG= czech +.endif + +# default +ASCLOCK_LANG?= english + pre-configure: - (cd ${WRKSRC}; \ - ${ECHO_CMD} ${ASCLOCK_LANG} | ${WRKSRC}/configure > /dev/null) - @${ECHO_MSG} "***************** NOTE *****************" - @${ECHO_MSG} "* *" - @${ECHO_MSG} "* You can choose languages for asclock. *" - @${ECHO_MSG} "* 1) english [DEFAULT] *" - @${ECHO_MSG} "* 2) german *" - @${ECHO_MSG} "* 3) portuguese *" - @${ECHO_MSG} "* 4) dutch *" - @${ECHO_MSG} "* 5) norwegian *" - @${ECHO_MSG} "* 6) italian *" - @${ECHO_MSG} "* 7) swedish *" - @${ECHO_MSG} "* 8) spanish *" - @${ECHO_MSG} "* 9) hungarian *" - @${ECHO_MSG} "* 0) breton *" - @${ECHO_MSG} "* a) french *" - @${ECHO_MSG} "* b) czech *" - @${ECHO_MSG} "* *" - @${ECHO_MSG} "* Specify the number you want when make. *" - @${ECHO_MSG} "* Example: \" make ASCLOCK_LANG=1 \" *" - @${ECHO_MSG} "******************************************" + ${RM} ${WRKSRC}/month.xpm ${WRKSRC}/weekday.xpm + (cd ${WRKSRC} && ${LN} -s ./${ASCLOCK_LANG}/month.xpm ./month.xpm) + (cd ${WRKSRC} && ${LN} -s ./${ASCLOCK_LANG}/weekday.xpm ./weekday.xpm) .include <bsd.port.mk> diff --git a/x11-clocks/asclock/files/patch-color b/x11-clocks/asclock/files/patch-asclock.c index cd2ccfc1eb29..f85db294cecb 100644 --- a/x11-clocks/asclock/files/patch-color +++ b/x11-clocks/asclock/files/patch-asclock.c @@ -1,6 +1,30 @@ ---- asclock.c -+++ work/asclock/asclock.c 2008-11-30 23:32:41.000000000 -0800 -@@ -302,8 +302,8 @@ +--- asclock.c.orig 1996-08-25 22:35:49 UTC ++++ asclock.c +@@ -1,4 +1,7 @@ + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <unistd.h> + #include <X11/Xlib.h> + #include <X11/xpm.h> + #include <X11/extensions/shape.h> +@@ -245,6 +248,7 @@ int main(int argc,char *argv[]) + InsertTime(); + } + if (ITBLINKS) ++ { + if (actualtime % 2) + /* Sekunden Doppelpunkt ein */ + XCopyArea(dpy, led.pixmap, visible.pixmap, NormalGC, +@@ -253,6 +257,7 @@ int main(int argc,char *argv[]) + /* Sekunden Doppelpunkt aus */ + XCopyArea(dpy, asclock.pixmap, visible.pixmap, NormalGC, + 27,6,3,11,posx[2], posy[0]); ++ } + + RedrawWindow(&visible); + +@@ -302,8 +307,8 @@ void GetXPM(void) static char **clock_xpm; XColor col; XWindowAttributes attributes; @@ -11,7 +35,7 @@ int ret; clock_xpm =ONLYSHAPE ? mask_xpm : clk_xpm; -@@ -317,51 +317,49 @@ +@@ -317,51 +322,49 @@ void GetXPM(void) nocolor("parse",LedColor); } |