diff options
author | jlam <jlam@pkgsrc.org> | 1999-10-28 19:04:56 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 1999-10-28 19:04:56 +0000 |
commit | 902c0e4086894e2a1e02e5605eb9aa99b1ffb709 (patch) | |
tree | 1e65f17bb2d43399fff94aa2dc3190260ae3fdee /x11/asclock | |
parent | 5f6416f6cbc047a5fb0a60cfd80ca0b90559a862 (diff) | |
download | pkgsrc-902c0e4086894e2a1e02e5605eb9aa99b1ffb709.tar.gz |
Internationalize asclock (hi, Hubert!). Asclock now respects the environment
setting LANG=<langcode> or can be started with the option "-lang <langcode>",
where <langcode> is a two-letter country abbreviation as found in
/usr/share/misc/language.
Also, change MAINTAINER to jlam@netbsd.org.
Diffstat (limited to 'x11/asclock')
-rw-r--r-- | x11/asclock/Makefile | 85 | ||||
-rw-r--r-- | x11/asclock/files/asclock.sh | 36 | ||||
-rw-r--r-- | x11/asclock/files/patch-sum | 8 | ||||
-rw-r--r-- | x11/asclock/patches/patch-aa | 61 | ||||
-rw-r--r-- | x11/asclock/patches/patch-ab | 152 | ||||
-rw-r--r-- | x11/asclock/patches/patch-ac | 104 | ||||
-rw-r--r-- | x11/asclock/pkg/PLIST | 3 |
7 files changed, 244 insertions, 205 deletions
diff --git a/x11/asclock/Makefile b/x11/asclock/Makefile index 538558b1a21..684e470f947 100644 --- a/x11/asclock/Makefile +++ b/x11/asclock/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 1999/10/07 17:22:59 jlam Exp $ +# $NetBSD: Makefile,v 1.15 1999/10/28 19:04:56 jlam Exp $ # DISTNAME= asclock-classic-1.0 @@ -6,63 +6,60 @@ PKGNAME= asclock-1.0 CATEGORIES= x11 MASTER_SITES= http://www.asclock.org/tar/ -MAINTAINER= hubertf@netbsd.org +MAINTAINER= jlam@netbsd.org HOMEPAGE= http://www.asclock.org/ DEPENDS+= xpm-3.4k:../../graphics/xpm -CONFLICTS= asclock-xlib-* asclock-gtk-* - USE_IMAKE= yes -LANGUAGES= english german portuguese dutch norwegian italian swedish \ - spanish hungarian breton french czech russian ukrainian \ - slovene indonesian danish - -# Choose language from: -# 1) english [DEFAULT] -# 2) german -# 3) portuguese -# 4) dutch -# 5) norwegian -# 6) italian -# 7) swedish -# 8) spanish -# 9) hungarian -# 0) breton -# a) french -# b) czech -# c) russian -# d) ukrainian -# e) slovene -# f) indonesian -# g) danish -LANG?=1 - -# Choose paneltype from: -# 1) 8bit AfterStep-colors (47 colors) [DEFAULT] -# 2) 8bit NeXTStep -colors (76 colors) -# 3) 2bit greyscale ( 4 colors) -PANEL?=1 +LANGUAGES= en de pt nl no it sv es hu br fr cs ru uk sl id da WRKSRC= ${WRKDIR}/asclock1.0 PLIST_SRC= ${WRKDIR}/.PLIST_SRC -do-configure: - cd ${WRKSRC} ; ( ${ECHO} ${LANG} ; ${ECHO} ${PANEL} ) | ./configure +# Translate to two-letter abbreviations in /usr/share/misc/language. +# +post-extract: + ${MV} ${WRKSRC}/english ${WRKSRC}/en + ${MV} ${WRKSRC}/german ${WRKSRC}/de + ${MV} ${WRKSRC}/portuguese ${WRKSRC}/pt + ${MV} ${WRKSRC}/dutch ${WRKSRC}/nl + ${MV} ${WRKSRC}/norwegian ${WRKSRC}/no + ${MV} ${WRKSRC}/italian ${WRKSRC}/it + ${MV} ${WRKSRC}/swedish ${WRKSRC}/sv + ${MV} ${WRKSRC}/spanish ${WRKSRC}/es + ${MV} ${WRKSRC}/hungarian ${WRKSRC}/hu + ${MV} ${WRKSRC}/breton ${WRKSRC}/br + ${MV} ${WRKSRC}/french ${WRKSRC}/fr + ${MV} ${WRKSRC}/czech ${WRKSRC}/cs + ${MV} ${WRKSRC}/russian ${WRKSRC}/ru + ${MV} ${WRKSRC}/ukrainian ${WRKSRC}/uk + ${MV} ${WRKSRC}/slovene ${WRKSRC}/sl + ${MV} ${WRKSRC}/indonesian ${WRKSRC}/id + ${MV} ${WRKSRC}/danish ${WRKSRC}/da + +pre-configure: + ${LN} -sf ./en/month.xpm ${WRKSRC}/month.xpm + ${LN} -sf ./en/weekday.xpm ${WRKSRC}/weekday.xpm + ${LN} -sf ./xpm/color.xpm ${WRKSRC}/clk.xpm -post-install: - ${RM} -rf ${WRKSRC}/french/french2 +do-install: + ${SED} -e "s,@PREFIX@,${PREFIX},g" \ + ${FILESDIR}/asclock.sh > ${WRKDIR}/asclock.sh + ${INSTALL_SCRIPT} ${WRKDIR}/asclock.sh ${PREFIX}/bin/asclock + ${INSTALL_PROGRAM} ${WRKSRC}/asclock ${PREFIX}/libexec/asclock + ${INSTALL_DATA} ${WRKSRC}/asclock.0 ${PREFIX}/man/cat1/asclock.0 + ${INSTALL_DATA_DIR} ${PREFIX}/share/asclock ${CAT} ${PKGDIR}/PLIST > ${PLIST_SRC} - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/asclock .for LANGUAGE in ${LANGUAGES} - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/asclock/${LANGUAGE} + ${INSTALL_DATA_DIR} ${PREFIX}/share/asclock/${LANGUAGE} cd ${WRKSRC}/${LANGUAGE}; ${INSTALL_DATA} month.xpm weekday.xpm \ - ${PREFIX}/share/examples/asclock/${LANGUAGE} - @${ECHO} share/examples/asclock/${LANGUAGE}/month.xpm >> ${PLIST_SRC} - @${ECHO} share/examples/asclock/${LANGUAGE}/weekday.xpm >> ${PLIST_SRC} - @${ECHO} @dirrm share/examples/asclock/${LANGUAGE} >> ${PLIST_SRC} + ${PREFIX}/share/asclock/${LANGUAGE} + @${ECHO} share/asclock/${LANGUAGE}/month.xpm >> ${PLIST_SRC} + @${ECHO} share/asclock/${LANGUAGE}/weekday.xpm >> ${PLIST_SRC} + @${ECHO} @dirrm share/asclock/${LANGUAGE} >> ${PLIST_SRC} .endfor - @${ECHO} @dirrm share/examples/asclock >> ${PLIST_SRC} + @${ECHO} @dirrm share/asclock >> ${PLIST_SRC} .include "../../mk/bsd.pkg.mk" diff --git a/x11/asclock/files/asclock.sh b/x11/asclock/files/asclock.sh new file mode 100644 index 00000000000..ea26e28391b --- /dev/null +++ b/x11/asclock/files/asclock.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $NetBSD: asclock.sh,v 1.1 1999/10/28 19:04:57 jlam Exp $ + +args='' +while [ $# -gt 0 ] +do + case $1 in + -lang) + LANG=$2; shift + if [ -z "${LANG}" ] + then + echo "asclock: -lang needs a language option" + quit 1 + fi + ;; + *) + args="${args} $1" + ;; + esac + shift +done + +ASCLOCKDIR=@PREFIX@/share/asclock + +# default to American English +if [ -z "${LANG}" -o ! -d ${ASCLOCKDIR}/${LANG} ] +then + LANG=en +fi + +monthxpm=${ASCLOCKDIR}/${LANG}/month.xpm +weekdayxpm=${ASCLOCKDIR}/${LANG}/weekday.xpm + +args="${args} -monthxpm ${monthxpm} -weekdayxpm ${weekdayxpm}" +exec @PREFIX@/libexec/asclock ${args} diff --git a/x11/asclock/files/patch-sum b/x11/asclock/files/patch-sum index 30aee27a3c4..2b0b182002b 100644 --- a/x11/asclock/files/patch-sum +++ b/x11/asclock/files/patch-sum @@ -1,5 +1,5 @@ -$NetBSD: patch-sum,v 1.2 1999/10/07 17:23:00 jlam Exp $ +$NetBSD: patch-sum,v 1.3 1999/10/28 19:04:57 jlam Exp $ -MD5 (patch-aa) = 1811eca2938c0c6ce3724852fb9ff828 -MD5 (patch-ab) = 9b2352523b3a1848354f3870f401b463 -MD5 (patch-ac) = bc529b9960dec5e61a71c1c29a7e74bf +MD5 (patch-aa) = ddddd4ce995df7f14094cb6641e62677 +MD5 (patch-ab) = 9ec1fd6bcf07ca38c5bc80ce67231955 +MD5 (patch-ac) = 33ddc79bc6880a2d46513816e7493ab8 diff --git a/x11/asclock/patches/patch-aa b/x11/asclock/patches/patch-aa index 16556561033..b3ee6549f86 100644 --- a/x11/asclock/patches/patch-aa +++ b/x11/asclock/patches/patch-aa @@ -1,56 +1,11 @@ -$NetBSD: patch-aa,v 1.2 1999/10/07 17:23:01 jlam Exp $ +$NetBSD: patch-aa,v 1.3 1999/10/28 19:04:57 jlam Exp $ ---- asclock.c.orig Sat Sep 26 17:05:03 1998 -+++ asclock.c Thu Oct 7 02:57:23 1999 -@@ -19,6 +19,7 @@ - int ONLYSHAPE=0; /* default value is noshape */ - int ITBLINKS=1; /* default is blinking */ - int ICONIFIED=0; /* default is not iconified */ -+int ITDOCKS=0; /* default is not Docking mode */ - int YEAR=0; /* default is to show time, not year */ - /* led positions *************************************************************/ - int twelve[5] = {5, 14, 24, 28, 37}; -@@ -88,11 +89,12 @@ - " -monthxpm <xpm> month xpm", - " -clockxpm <xpm> clock xpm", - " -weekdayxpm <xpm> weekday xpm", -+" -year show year instead of time", - " -position [+|-]x[+|-]y position of asclock", - " -shape without groundplate", - " -noblink don't blink", - " -iconic start up as icon", --" -year show year instead of time", -+" -dock Window Maker docking", - NULL - }; +--- Imakefile.orig Wed Sep 16 11:56:00 1998 ++++ Imakefile Thu Oct 28 13:11:11 1999 +@@ -1,5 +1,5 @@ -@@ -173,6 +175,9 @@ - case 'n': - ITBLINKS = 0; - continue; -+ case 'd': -+ ITDOCKS = 1; -+ continue; - case 'y': - YEAR = 1; - continue; -@@ -256,13 +261,17 @@ - XShapeCombineMask(dpy, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet); - } - -- mywmhints.initial_state = (ICONIFIED ? IconicState : NormalState); -+ mywmhints.initial_state = ITDOCKS ? WithdrawnState : -+ (ICONIFIED ? IconicState : NormalState); - mywmhints.icon_window = iconwin; - mywmhints.icon_x = mysizehints.x; - mywmhints.icon_y = mysizehints.y; -- mywmhints.flags = StateHint | IconWindowHint | IconPositionHint; -+ mywmhints.window_group = win; -+ mywmhints.flags = StateHint | IconWindowHint | IconPositionHint -+ | WindowGroupHint; - XSetWMHints(dpy, win, &mywmhints); +-XPMLIB = -L/usr/lib/X11 -lXpm ++XPMLIB = -Wl,-R${X11BASE}/lib -L${X11BASE}/lib -lXpm + DEPLIBS = $(DEPXLIB) -+ XSetCommand(dpy, win, argv, argc); - XMapWindow(dpy,win); - - InsertTime(); + LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) diff --git a/x11/asclock/patches/patch-ab b/x11/asclock/patches/patch-ab index 959ffb0d2a2..91cb1f875d8 100644 --- a/x11/asclock/patches/patch-ab +++ b/x11/asclock/patches/patch-ab @@ -1,94 +1,60 @@ -$NetBSD: patch-ab,v 1.2 1999/10/07 17:23:01 jlam Exp $ +$NetBSD: patch-ab,v 1.3 1999/10/28 19:04:57 jlam Exp $ ---- asclock.man.orig Wed Sep 16 11:56:00 1998 -+++ asclock.man Thu Oct 7 03:04:28 1999 -@@ -1,14 +1,17 @@ --.TH asclock 0.99 "23 July 1996" asclock -+.TH asclock 1.0 "11 April 1998" asclock - .UC - .SH NAME - \fBasclock\fP \- the AfterStep clock - .SH SYNOPSIS - .B asclock --[ -help] [-12 | -24] [-shape] -- [-position \fI[+|-]x[+|-]y\fP] -+[ -help] [-12 | -24] [-shape] - [-exe \fIprogram\fP] - [-led \fIcolor\fP] -- [-noblink] [-iconic] -+ [-monthxpm \fIxpm\fP] [-clockxpm \fIxpm\fP] -+ [-weekdayxpm \fIxpm\fP] -+ [-year] -+ [-position \fI[+|-]x[+|-]y\fP] -+ [-noblink] [-iconic] [-dock] - .SH DESCRIPTION - The \fBasclock\fP is a clock written to emulate the date/time application on - the NEXTSTEP(tm) operating system. \fBasclock\fP supports multiple languages, -@@ -23,12 +26,17 @@ - where options include: - -12 12 hour format - -24 24 hour format -+ -shape without groundplate - -exe <program> program to start on click - -led <color> color of the led -+ -monthxpm <xpm> month xpm -+ -clockxpm <xpm> clock xpm -+ -weekdayxpm <xpm> weekday xpm -+ -year show year instead of time - -position [+|-]x[+|-]y position of asclock -- -shape without groundplate - -noblink don't blink - -iconic start up as icon -+ -dock Window Maker docking - .fi - .RE - .IP "-12 or -24" -@@ -50,6 +58,22 @@ - .I showrgb - .P (part of X11). - .RE -+.IP "-monthxpm <xpm>" -+.RS -+specifies the XPM file for the month pages. -+.RE -+.IP "-clockxpm <xpm>" -+.RS -+specifies the XPM file for the clock and calendar display. -+.RE -+.IP "-weekdayxpm <xpm>" -+.RS -+specifies the XPM file for the weekday pages. -+.RE -+.IP "-year" -+.RS -+shows the current the year in the display instead of the current time. -+.RE - .IP "-position [+|-]x[+|-]y " - .RS - specifies the starting position of \fBasclock\fP. The [+|-] works like the standard X-Windows x/y geometry option. -@@ -66,6 +90,10 @@ - .RS - This gives weird output with AfterStep, so don't bother. It's for mwm and other wm's with no hint functionality. - .RE -+.IP "-dock" -+.RS -+starts \fBasclock\fP in docking mode. This option is necessary to dock \fBasclock\fP in the Window Maker dock. \fBasclock\fP ignores the -iconic option when started in docking mode. -+.RE - .SH INVOCATION - \fBasclock\fP can be called from one of many ways. The most common invocation - is the command line: -@@ -86,6 +114,14 @@ - will cause \fBasclock\fP to use the shape extensions so that it will be a - button on the \fBWharf (1)\fP button bar under the \fBafterstep (1)\fP - window manager. -+ -+If you run Window Maker then you should use the "-dock" option: -+.nf -+ -+ [user@host] ~% asclock -shape -12 -dock & -+ -+.fi -+and then drag the icon to the dock. - .SH BUGS - we don't have bugs :) - .SH COPYRIGHTS +--- asclock.c.orig Sat Sep 26 17:05:03 1998 ++++ asclock.c Thu Oct 28 13:12:29 1999 +@@ -19,6 +19,7 @@ + int ONLYSHAPE=0; /* default value is noshape */ + int ITBLINKS=1; /* default is blinking */ + int ICONIFIED=0; /* default is not iconified */ ++int ITDOCKS=0; /* default is not Docking mode */ + int YEAR=0; /* default is to show time, not year */ + /* led positions *************************************************************/ + int twelve[5] = {5, 14, 24, 28, 37}; +@@ -85,14 +86,15 @@ + " -24 24 hour format", + " -exe <program> program to start on click", + " -led <color> color of the led", +-" -monthxpm <xpm> month xpm", + " -clockxpm <xpm> clock xpm", ++" -monthxpm <xpm> month xpm", + " -weekdayxpm <xpm> weekday xpm", ++" -year show year instead of time", + " -position [+|-]x[+|-]y position of asclock", + " -shape without groundplate", + " -noblink don't blink", + " -iconic start up as icon", +-" -year show year instead of time", ++" -dock Window Maker docking", + NULL + }; + +@@ -173,6 +175,9 @@ + case 'n': + ITBLINKS = 0; + continue; ++ case 'd': ++ ITDOCKS = 1; ++ continue; + case 'y': + YEAR = 1; + continue; +@@ -256,13 +261,17 @@ + XShapeCombineMask(dpy, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet); + } + +- mywmhints.initial_state = (ICONIFIED ? IconicState : NormalState); ++ mywmhints.initial_state = ITDOCKS ? WithdrawnState : ++ (ICONIFIED ? IconicState : NormalState); + mywmhints.icon_window = iconwin; + mywmhints.icon_x = mysizehints.x; + mywmhints.icon_y = mysizehints.y; +- mywmhints.flags = StateHint | IconWindowHint | IconPositionHint; ++ mywmhints.window_group = win; ++ mywmhints.flags = StateHint | IconWindowHint | IconPositionHint ++ | WindowGroupHint; + XSetWMHints(dpy, win, &mywmhints); + ++ XSetCommand(dpy, win, argv, argc); + XMapWindow(dpy,win); + + InsertTime(); diff --git a/x11/asclock/patches/patch-ac b/x11/asclock/patches/patch-ac index 2ca22e7a7a7..d8c8451ba95 100644 --- a/x11/asclock/patches/patch-ac +++ b/x11/asclock/patches/patch-ac @@ -1,11 +1,95 @@ -$NetBSD: patch-ac,v 1.1 1999/10/07 17:23:01 jlam Exp $ +$NetBSD: patch-ac,v 1.2 1999/10/28 19:04:57 jlam Exp $ ---- ./Imakefile.orig Wed Sep 16 11:56:00 1998 -+++ ./Imakefile Thu Oct 7 01:28:40 1999 -@@ -1,5 +1,5 @@ - --XPMLIB = -L/usr/lib/X11 -lXpm -+XPMLIB = -Wl,-R${X11BASE}/lib -L${X11BASE}/lib -lXpm - DEPLIBS = $(DEPXLIB) - - LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) +--- asclock.man.orig Wed Sep 16 11:56:00 1998 ++++ asclock.man Thu Oct 28 13:14:36 1999 +@@ -1,14 +1,18 @@ +-.TH asclock 0.99 "23 July 1996" asclock ++.TH asclock 1.0 "11 April 1998" asclock + .UC + .SH NAME + \fBasclock\fP \- the AfterStep clock + .SH SYNOPSIS + .B asclock +-[ -help] [-12 | -24] [-shape] +- [-position \fI[+|-]x[+|-]y\fP] ++[ -help] [-12 | -24] [-shape] + [-exe \fIprogram\fP] + [-led \fIcolor\fP] +- [-noblink] [-iconic] ++ [-clockxpm \fIxpm\fP] ++ [-monthxpm \fIxpm\fP] ++ [-weekdayxpm \fIxpm\fP] ++ [-year] ++ [-position \fI[+|-]x[+|-]y\fP] ++ [-noblink] [-iconic] [-dock] + .SH DESCRIPTION + The \fBasclock\fP is a clock written to emulate the date/time application on + the NEXTSTEP(tm) operating system. \fBasclock\fP supports multiple languages, +@@ -23,12 +27,17 @@ + where options include: + -12 12 hour format + -24 24 hour format ++ -shape without groundplate + -exe <program> program to start on click + -led <color> color of the led ++ -clockxpm <xpm> clock xpm ++ -monthxpm <xpm> month xpm ++ -weekdayxpm <xpm> weekday xpm ++ -year show year instead of time + -position [+|-]x[+|-]y position of asclock +- -shape without groundplate + -noblink don't blink + -iconic start up as icon ++ -dock Window Maker docking + .fi + .RE + .IP "-12 or -24" +@@ -50,6 +59,22 @@ + .I showrgb + .P (part of X11). + .RE ++.IP "-monthxpm <xpm>" ++.RS ++specifies the XPM file for the month pages. ++.RE ++.IP "-clockxpm <xpm>" ++.RS ++specifies the XPM file for the clock and calendar display. ++.RE ++.IP "-weekdayxpm <xpm>" ++.RS ++specifies the XPM file for the weekday pages. ++.RE ++.IP "-year" ++.RS ++shows the current the year in the display instead of the current time. ++.RE + .IP "-position [+|-]x[+|-]y " + .RS + specifies the starting position of \fBasclock\fP. The [+|-] works like the standard X-Windows x/y geometry option. +@@ -66,6 +91,10 @@ + .RS + This gives weird output with AfterStep, so don't bother. It's for mwm and other wm's with no hint functionality. + .RE ++.IP "-dock" ++.RS ++starts \fBasclock\fP in docking mode. This option is necessary to dock \fBasclock\fP in the Window Maker dock. \fBasclock\fP ignores the -iconic option when started in docking mode. ++.RE + .SH INVOCATION + \fBasclock\fP can be called from one of many ways. The most common invocation + is the command line: +@@ -86,6 +115,14 @@ + will cause \fBasclock\fP to use the shape extensions so that it will be a + button on the \fBWharf (1)\fP button bar under the \fBafterstep (1)\fP + window manager. ++ ++If you run Window Maker then you should use the "-dock" option: ++.nf ++ ++ [user@host] ~% asclock -shape -12 -dock & ++ ++.fi ++and then drag the icon to the dock. + .SH BUGS + we don't have bugs :) + .SH COPYRIGHTS diff --git a/x11/asclock/pkg/PLIST b/x11/asclock/pkg/PLIST index f6109d9e093..b3e81acaa57 100644 --- a/x11/asclock/pkg/PLIST +++ b/x11/asclock/pkg/PLIST @@ -1,3 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 1997/11/09 23:43:49 hubertf Exp $ +@comment $NetBSD: PLIST,v 1.2 1999/10/28 19:04:57 jlam Exp $ bin/asclock +libexec/asclock man/cat1/asclock.0 |