From dbbbe3968de9263eb5d765fd120a3f3da7b9f79b Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 6 Jan 2001 16:43:44 +0000 Subject: [PATCH] Update to 2.0.12; requested and tested by Joshua Stein . - Docks under WindowMaker. - The port now supports three themes with 19 localizations each, plus five fixed themes, for a total of 62 different flavors. --- x11/asclock/Makefile | 70 ++++++++------------------- x11/asclock/files/configure | 74 +++++++++++++++++++++++++++++ x11/asclock/files/md5 | 6 +-- x11/asclock/patches/patch-Imakefile | 11 +++++ x11/asclock/patches/patch-asclock_c | 12 +++++ x11/asclock/patches/patch-config_c | 14 ++++++ x11/asclock/pkg/COMMENT | 2 +- x11/asclock/pkg/DESCR | 2 +- x11/asclock/pkg/PLIST | 1 + 9 files changed, 137 insertions(+), 55 deletions(-) create mode 100755 x11/asclock/files/configure create mode 100644 x11/asclock/patches/patch-Imakefile create mode 100644 x11/asclock/patches/patch-asclock_c create mode 100644 x11/asclock/patches/patch-config_c diff --git a/x11/asclock/Makefile b/x11/asclock/Makefile index cfdef5180bd..5b6523127f5 100644 --- a/x11/asclock/Makefile +++ b/x11/asclock/Makefile @@ -1,65 +1,35 @@ -# OpenBSD makefile for: asclock -# Version required: 1.0 -# Date created: May 19 1998 -# Whom: Angelos D. Keromytis -# -# $OpenBSD: Makefile,v 1.6 2000/10/22 15:43:44 espie Exp $ -# +# $OpenBSD: Makefile,v 1.7 2001/01/06 16:43:44 naddy Exp $ -DISTNAME= asclock -PKGNAME= asclock-1.0 +DISTNAME= asclock-2.0.12 CATEGORIES= x11 -NEED_VERSION= 1.305 -MASTER_SITES= ${MASTER_SITE_XCONTRIB} -MASTER_SITE_SUBDIR= applications -EXTRACT_SUFX= .tgz - -MAINTAINER= ports@openbsd.org +NEED_VERSION= 1.348 +MASTER_SITES= ftp://ftp.afterstep.org/apps/asclock/ \ + ftp://fuf.sh.cvut.cz/pub/AfterStep/apps/asclock/ \ + http://www.tigr.net/afterstep/download/asclock/ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -CONFIGURE_STYLE= imake +THEMES= Freeamp Newstone Orb Stone beats classic penguin shaped +CLASSICS= beats classic shaped +LANGUAGES= english german portuguese dutch norwegian italian \ + swedish spanish hungarian breton french czech russian \ + ukrainian slovene indonesian danish hebrew japanese -FLAVORS=english german portuguese dutch norwegian italian swedish spanish \ -hungarian breton french czech +FLAVORS= ${THEMES:L} ${LANGUAGES} +FLAVOR?= classic english -FLAVOR?=english +CONFIGURE_STYLE= imake +USE_X11= Yes - -# Note we test whether FLAVOR contains english or german or... -# there are some other options to asclock building, maybe we should extend -# the flavor ? - -.if ${FLAVOR:L:Menglish} -ASCLOCK_LANG=1 -.elif ${FLAVOR:L:Mgerman} -ASCLOCK_LANG=2 -.elif ${FLAVOR:L:Mportuguese} -ASCLOCK_LANG=3 -.elif ${FLAVOR:L:Mdutch} -ASCLOCK_LANG=4 -.elif ${FLAVOR:L:Mnorwegian} -ASCLOCK_LANG=5 -.elif ${FLAVOR:L:Mitalian} -ASCLOCK_LANG=6 -.elif ${FLAVOR:L:Mswedish} -ASCLOCK_LANG=7 -.elif ${FLAVOR:L:Mspanish} -ASCLOCK_LANG=8 -.elif ${FLAVOR:L:Mhungarian} -ASCLOCK_LANG=9 -.elif ${FLAVOR:L:Mbreton} -ASCLOCK_LANG=0 -.elif ${FLAVOR:L:Mfrench} -ASCLOCK_LANG=a -.elif ${FLAVOR:L:Mczech} -ASCLOCK_LANG=b -.endif +pre-fetch: + @THEMES='${THEMES}' CLASSICS='${CLASSICS}' LANGUAGES='${LANGUAGES}' \ + FLAVOR='${FLAVOR}' ${FILESDIR}/configure chk pre-configure: - @cd ${WRKSRC} && echo ${ASCLOCK_LANG} | ./configure >/dev/null + @THEMES='${THEMES}' CLASSICS='${CLASSICS}' LANGUAGES='${LANGUAGES}' \ + WRKSRC=${WRKSRC} FLAVOR='${FLAVOR}' ${FILESDIR}/configure conf .include diff --git a/x11/asclock/files/configure b/x11/asclock/files/configure new file mode 100755 index 00000000000..43d6d9b4f41 --- /dev/null +++ b/x11/asclock/files/configure @@ -0,0 +1,74 @@ +#!/usr/bin/perl -w +# +# $OpenBSD: configure,v 1.1 2001/01/06 16:43:44 naddy Exp $ + +use strict; + +my @themes = split " ", $ENV{THEMES} or die "$0: must define THEMES\n"; +my @classics = split " ", $ENV{CLASSICS} or die "$0: must define CLASSICS\n"; +my @languages = split " ", $ENV{LANGUAGES} or die "$0: must define LANGUAGES\n"; +my @flavor = split " ", $ENV{FLAVOR} or die "$0: must define FLAVOR\n"; +my (%theme, %classic, %lang); +my $action; + +if ($ARGV[0] eq 'chk') { + $action = 0; +} elsif ($ARGV[0] eq 'conf') { + $action = 1; +} else { + die "usage: $0 chk|conf\n"; +} + +my $wrksrc = $ENV{WRKSRC} or die "$0: must define WRKSRC\n" if $action; + +foreach my $i (@themes) { $theme{lc $i} = $i }; +foreach my $i (@classics) { $classic{lc $i} = 1 }; +foreach my $i (@languages) { $lang{$i} = 1 }; + +chdir $wrksrc or die "$0: can't chdir to $wrksrc: $!\n" if $action; + +if ($#flavor == 0) { + &invalid_flavor if !$theme{$flavor[0]} || $classic{$flavor[0]}; + symlink "themes/$theme{$flavor[0]}", "default_theme" if $action; +} elsif ($#flavor == 1) { + if ($classic{$flavor[0]} && $lang{$flavor[1]}) { + ; + } elsif ($classic{$flavor[1]} && $lang{$flavor[0]}) { + @flavor = ($flavor[1], $flavor[0]); + } else { + &invalid_flavor; + } + mkdir "default_theme" if $action; + foreach my $i (qw(config date.xpm clock.xpm led.xpm hour.xpm + minute.xpm second.xpm beats.xpm)) { + symlink "../themes/$theme{$flavor[0]}/$i","default_theme/$i" if $action; + } + foreach my $i (qw(month.xpm weekday.xpm)) { + symlink "../languages/$flavor[1]/$i", "default_theme/$i" if $action; + } +} else { + &invalid_flavor; +} + +sub invalid_flavor { + my (@a, $i); + + print STDERR "$0: invalid FLAVOR: @flavor\n\n"; + print STDERR "Available flavors are:\n"; + @a = sort keys %theme; + for ($i = 0; $i <= $#a; $i++) { + print STDERR "\t" if $i % 4 == 0; + print STDERR $a[$i]; + print STDERR " " if $classic{$a[$i]}; + print STDERR ($i % 4 == 3) ? "\n" : ", " if $i != $#a; + } + print STDERR "\nwhere is a choice from\n"; + @a = sort keys %lang; + for ($i = 0; $i <= $#a; $i++) { + print STDERR "\t" if $i % 6 == 0; + print STDERR $a[$i]; + print STDERR ($i % 6 == 5) ? "\n" : ", " if $i != $#a; + } + print STDERR "\n"; + exit 2; +} diff --git a/x11/asclock/files/md5 b/x11/asclock/files/md5 index dc4269be171..9e18ba63856 100644 --- a/x11/asclock/files/md5 +++ b/x11/asclock/files/md5 @@ -1,3 +1,3 @@ -MD5 (asclock.tgz) = c096d6b3cf225a8b70dc1cfa2081993c -RMD160 (asclock.tgz) = 900bb5c2b36061b161ffea7c8efca01021f1adf7 -SHA1 (asclock.tgz) = 7f08fce9c0aba82608802e1b38068a8418e4ec5d +MD5 (asclock-2.0.12.tar.gz) = 99cb6491358bb0044e9b75b2e06b043b +RMD160 (asclock-2.0.12.tar.gz) = c3673329c5bcf5be097abb770e861502e20f77ca +SHA1 (asclock-2.0.12.tar.gz) = 8527d7b013f6d55bdb49e6d6a08c2085d081b486 diff --git a/x11/asclock/patches/patch-Imakefile b/x11/asclock/patches/patch-Imakefile new file mode 100644 index 00000000000..ad2c6320d65 --- /dev/null +++ b/x11/asclock/patches/patch-Imakefile @@ -0,0 +1,11 @@ +$OpenBSD: patch-Imakefile,v 1.1 2001/01/06 16:43:45 naddy Exp $ +--- Imakefile.orig Fri Jan 5 20:32:35 2001 ++++ Imakefile Fri Jan 5 20:32:40 2001 +@@ -5,7 +5,6 @@ DEPLIBS = $(DEPXLIB) + LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) + + LINTLIBS = $(LINTXLIB) +-CC = gcc -g + + SRCS = asclock.c parser.c symbols.c config.c + OBJS = asclock.o parser.o symbols.o config.o diff --git a/x11/asclock/patches/patch-asclock_c b/x11/asclock/patches/patch-asclock_c new file mode 100644 index 00000000000..c20dd26ef84 --- /dev/null +++ b/x11/asclock/patches/patch-asclock_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-asclock_c,v 1.1 2001/01/06 16:43:45 naddy Exp $ +--- asclock.c.orig Fri Jan 5 20:35:47 2001 ++++ asclock.c Fri Jan 5 20:59:45 2001 +@@ -24,7 +24,7 @@ GC NormalGC; + Window iconwin, win; /* My home is my window */ + char *Geometry; + char *LedColor = "LightSeaGreen"; +-char exec_str[] = "echo no program has been specified >/dev/console"; ++char exec_str[MAX_PATH_LEN]; + char *ERR_colorcells = "not enough free color cells or xpm not found\n"; + char *ampers = " &"; + char month_xpm_fn[MAX_PATH_LEN]=""; diff --git a/x11/asclock/patches/patch-config_c b/x11/asclock/patches/patch-config_c new file mode 100644 index 00000000000..a62cdb4e90e --- /dev/null +++ b/x11/asclock/patches/patch-config_c @@ -0,0 +1,14 @@ +$OpenBSD: patch-config_c,v 1.1 2001/01/06 16:43:45 naddy Exp $ +--- config.c.orig Fri Jan 5 20:59:29 2001 ++++ config.c Fri Jan 5 21:00:43 2001 +@@ -251,8 +251,8 @@ void parseArgs(int argc, char **argv) + continue; + case 'e': + if(++i >=argc) usage(ProgName); +- strcpy(exec_str, argv[i]); +- strcat(exec_str, " &"); ++ strlcpy(exec_str, argv[i], MAX_PATH_LEN); ++ strlcat(exec_str, " &", MAX_PATH_LEN); + continue; + + } diff --git a/x11/asclock/pkg/COMMENT b/x11/asclock/pkg/COMMENT index d7d0fae07f5..66b938bcad0 100644 --- a/x11/asclock/pkg/COMMENT +++ b/x11/asclock/pkg/COMMENT @@ -1 +1 @@ -Afterstep clock with some language extensions +afterstep clock with some language extensions diff --git a/x11/asclock/pkg/DESCR b/x11/asclock/pkg/DESCR index d83dba60001..85f8845d96b 100644 --- a/x11/asclock/pkg/DESCR +++ b/x11/asclock/pkg/DESCR @@ -1 +1 @@ -afterstep clock with some language extentions +Afterstep clock with some language extentions. diff --git a/x11/asclock/pkg/PLIST b/x11/asclock/pkg/PLIST index b7dcb9709c7..4edafbdb2b2 100644 --- a/x11/asclock/pkg/PLIST +++ b/x11/asclock/pkg/PLIST @@ -1,2 +1,3 @@ +@comment $OpenBSD: PLIST,v 1.3 2001/01/06 16:43:45 naddy Exp $ bin/asclock man/cat1/asclock.0