Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2017 10:51:29 +0000 (UTC)
From:      Dirk Meyer <dinoex@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432714 - in head/x11-clocks/asclock: . files
Message-ID:  <201701291051.v0TApT02021758@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dinoex
Date: Sun Jan 29 10:51:28 2017
New Revision: 432714
URL: https://svnweb.freebsd.org/changeset/ports/432714

Log:
  - add LICENSE
  - add OPTIONS framework
  - cleanup configure
  - fix warnings
  - make portlint happier

Added:
  head/x11-clocks/asclock/files/patch-asclock.c
     - copied, changed from r432713, head/x11-clocks/asclock/files/patch-color
Deleted:
  head/x11-clocks/asclock/files/patch-color
Modified:
  head/x11-clocks/asclock/Makefile

Modified: head/x11-clocks/asclock/Makefile
==============================================================================
--- head/x11-clocks/asclock/Makefile	Sun Jan 29 10:35:23 2017	(r432713)
+++ head/x11-clocks/asclock/Makefile	Sun Jan 29 10:51:28 2017	(r432714)
@@ -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>

Copied and modified: head/x11-clocks/asclock/files/patch-asclock.c (from r432713, head/x11-clocks/asclock/files/patch-color)
==============================================================================
--- head/x11-clocks/asclock/files/patch-color	Sun Jan 29 10:35:23 2017	(r432713, copy source)
+++ head/x11-clocks/asclock/files/patch-asclock.c	Sun Jan 29 10:51:28 2017	(r432714)
@@ -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);
      }
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701291051.v0TApT02021758>