Index: head/x11-clocks/asclock/Makefile =================================================================== --- head/x11-clocks/asclock/Makefile (revision 432713) +++ head/x11-clocks/asclock/Makefile (revision 432714) @@ -1,43 +1,84 @@ # Created by: Yukihiro Nakai # $FreeBSD$ PORTNAME= asclock PORTVERSION= 1.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-clocks afterstep MASTER_SITES= XCONTRIB/applications 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 + +.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 Index: head/x11-clocks/asclock/files/patch-color =================================================================== --- head/x11-clocks/asclock/files/patch-color (revision 432713) +++ head/x11-clocks/asclock/files/patch-color (nonexistent) @@ -1,76 +0,0 @@ ---- asclock.c -+++ work/asclock/asclock.c 2008-11-30 23:32:41.000000000 -0800 -@@ -302,8 +302,8 @@ - static char **clock_xpm; - XColor col; - XWindowAttributes attributes; -- char led1[22]; -- char led2[22]; -+ char led1[64]; -+ char led2[64]; - int ret; - - clock_xpm =ONLYSHAPE ? mask_xpm : clk_xpm; -@@ -317,51 +317,49 @@ - nocolor("parse",LedColor); - } - -- sprintf(&led1[0], ". c #%4X%4X%4X", col.red, col.green, col.blue); -- for(ret=10;ret<22;ret++) -- if(led1[ret]==' ') led1[ret]='0'; -- led_xpm[2] = &led1[0]; -+ sprintf(led1, ". c #%04X%04X%04X", col.red, col.green, col.blue); -+ led_xpm[2] = led1; - - col.red = (col.red /10) *3; - col.green = (col.green/10) *3; - col.blue = (col.blue /10) *3; -- sprintf(&led2[0], "X c #%4X%4X%4X", col.red, col.green, col.blue); -- for(ret=10;ret<22;ret++) -- if(led2[ret]==' ') led2[ret]='0'; -- led_xpm[3] = &led2[0]; -+ sprintf(led2, "X c #%04X%04X%04X", col.red, col.green, col.blue); -+ led_xpm[3] = led2; - - asclock.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); - ret = XpmCreatePixmapFromData(dpy, Root, clock_xpm, &asclock.pixmap, - &asclock.mask, &asclock.attributes); - if(ret != XpmSuccess) -- {fprintf(stderr, ERR_colorcells);exit(1);} -+ {fprintf(stderr, "1: %s\n", XpmGetErrorString(ret));exit(1);} - visible.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); - ret = XpmCreatePixmapFromData(dpy, Root, clk_xpm, &visible.pixmap, - &visible.mask, &visible.attributes); -+ if(ret != XpmSuccess) -+ {fprintf(stderr, "2: %s\n", XpmGetErrorString(ret));exit(1);} - - led.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); - ret = XpmCreatePixmapFromData(dpy, Root, led_xpm, &led.pixmap, - &led.mask, &led.attributes); - if(ret != XpmSuccess) -- {fprintf(stderr, ERR_colorcells);exit(1);} -+ {fprintf(stderr, "3: %s\n", XpmGetErrorString(ret));exit(1);} - - month.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); - ret = XpmCreatePixmapFromData(dpy, Root, month_xpm, &month.pixmap, - &month.mask, &month.attributes); - if(ret != XpmSuccess) -- {fprintf(stderr, ERR_colorcells);exit(1);} -+ {fprintf(stderr, "4: %s\n", XpmGetErrorString(ret));exit(1);} - - date.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); - ret = XpmCreatePixmapFromData(dpy, Root, date_xpm, &date.pixmap, - &date.mask, &date.attributes); - if(ret != XpmSuccess) -- {fprintf(stderr, ERR_colorcells);exit(1);} -+ {fprintf(stderr, "5: %s\n", XpmGetErrorString(ret));exit(1);} - - weekday.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); - ret = XpmCreatePixmapFromData(dpy, Root, weekday_xpm, &weekday.pixmap, - &weekday.mask, &weekday.attributes); - if(ret != XpmSuccess) -- {fprintf(stderr, ERR_colorcells);exit(1);} -+ {fprintf(stderr, "6: %s\n", XpmGetErrorString(ret));exit(1);} - } - /****************************************************************************/ - /* Removes expose events for a specific window from the queue */ Property changes on: head/x11-clocks/asclock/files/patch-color ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-clocks/asclock/files/patch-asclock.c =================================================================== --- head/x11-clocks/asclock/files/patch-asclock.c (nonexistent) +++ head/x11-clocks/asclock/files/patch-asclock.c (revision 432714) @@ -0,0 +1,100 @@ +--- asclock.c.orig 1996-08-25 22:35:49 UTC ++++ asclock.c +@@ -1,4 +1,7 @@ + #include ++#include ++#include ++#include + #include + #include + #include +@@ -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; +- char led1[22]; +- char led2[22]; ++ char led1[64]; ++ char led2[64]; + int ret; + + clock_xpm =ONLYSHAPE ? mask_xpm : clk_xpm; +@@ -317,51 +322,49 @@ void GetXPM(void) + nocolor("parse",LedColor); + } + +- sprintf(&led1[0], ". c #%4X%4X%4X", col.red, col.green, col.blue); +- for(ret=10;ret<22;ret++) +- if(led1[ret]==' ') led1[ret]='0'; +- led_xpm[2] = &led1[0]; ++ sprintf(led1, ". c #%04X%04X%04X", col.red, col.green, col.blue); ++ led_xpm[2] = led1; + + col.red = (col.red /10) *3; + col.green = (col.green/10) *3; + col.blue = (col.blue /10) *3; +- sprintf(&led2[0], "X c #%4X%4X%4X", col.red, col.green, col.blue); +- for(ret=10;ret<22;ret++) +- if(led2[ret]==' ') led2[ret]='0'; +- led_xpm[3] = &led2[0]; ++ sprintf(led2, "X c #%04X%04X%04X", col.red, col.green, col.blue); ++ led_xpm[3] = led2; + + asclock.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); + ret = XpmCreatePixmapFromData(dpy, Root, clock_xpm, &asclock.pixmap, + &asclock.mask, &asclock.attributes); + if(ret != XpmSuccess) +- {fprintf(stderr, ERR_colorcells);exit(1);} ++ {fprintf(stderr, "1: %s\n", XpmGetErrorString(ret));exit(1);} + visible.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); + ret = XpmCreatePixmapFromData(dpy, Root, clk_xpm, &visible.pixmap, + &visible.mask, &visible.attributes); ++ if(ret != XpmSuccess) ++ {fprintf(stderr, "2: %s\n", XpmGetErrorString(ret));exit(1);} + + led.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); + ret = XpmCreatePixmapFromData(dpy, Root, led_xpm, &led.pixmap, + &led.mask, &led.attributes); + if(ret != XpmSuccess) +- {fprintf(stderr, ERR_colorcells);exit(1);} ++ {fprintf(stderr, "3: %s\n", XpmGetErrorString(ret));exit(1);} + + month.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); + ret = XpmCreatePixmapFromData(dpy, Root, month_xpm, &month.pixmap, + &month.mask, &month.attributes); + if(ret != XpmSuccess) +- {fprintf(stderr, ERR_colorcells);exit(1);} ++ {fprintf(stderr, "4: %s\n", XpmGetErrorString(ret));exit(1);} + + date.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); + ret = XpmCreatePixmapFromData(dpy, Root, date_xpm, &date.pixmap, + &date.mask, &date.attributes); + if(ret != XpmSuccess) +- {fprintf(stderr, ERR_colorcells);exit(1);} ++ {fprintf(stderr, "5: %s\n", XpmGetErrorString(ret));exit(1);} + + weekday.attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); + ret = XpmCreatePixmapFromData(dpy, Root, weekday_xpm, &weekday.pixmap, + &weekday.mask, &weekday.attributes); + if(ret != XpmSuccess) +- {fprintf(stderr, ERR_colorcells);exit(1);} ++ {fprintf(stderr, "6: %s\n", XpmGetErrorString(ret));exit(1);} + } + /****************************************************************************/ + /* Removes expose events for a specific window from the queue */ Property changes on: head/x11-clocks/asclock/files/patch-asclock.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property