From bogorodskiy@inbox.ru  Fri Aug  6 04:58:51 2004
Return-Path: <bogorodskiy@inbox.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0E09F16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  6 Aug 2004 04:58:51 +0000 (GMT)
Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F326043D54
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  6 Aug 2004 04:58:49 +0000 (GMT)
	(envelope-from bogorodskiy@inbox.ru)
Received: from [194.186.150.161] (port=49543 helo=inbox.ru)
	by mx1.mail.ru with esmtp 
	id 1BswoZ-000N8U-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 06 Aug 2004 08:58:48 +0400
Message-Id: <E1BswoZ-000N8U-00.bogorodskiy-inbox-ru@mx1.mail.ru>
Date: Fri, 06 Aug 2004 08:58:48 +0400
From: Roman Bogorodskiy <bogorodskiy@inbox.ru>
Reply-To: Roman Bogorodskiy <bogorodskiy@inbox.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ new port ] x11-clocks/osdclock: small clock which uses libxosd to render text to the root window
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         70061
>Category:       ports
>Synopsis:       [ new port ] x11-clocks/osdclock: small clock which uses libxosd to render text to the root window
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 06 05:00:43 GMT 2004
>Closed-Date:    Tue Nov 30 10:11:30 GMT 2004
>Last-Modified:  Tue Nov 30 10:11:30 GMT 2004
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 5.2.1-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #11: Thu Aug 5 07:58:46 MSD 2004 root@lame.novel.ru:/usr/obj/usr/src/sys/NOV i386

>Description:
	osd_clock is a small clock designed for minimalist desktops. It renders text
	directly to the root window using libxosd.

	I've added patch to make it use modern xosd interface instead of deprecated one. 

>How-To-Repeat:
>Fix:

--- osdclock.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	osdclock
#	osdclock/pkg-descr
#	osdclock/Makefile
#	osdclock/distinfo
#	osdclock/files
#	osdclock/files/patch-osd_clock.c
#
echo c - osdclock
mkdir -p osdclock > /dev/null 2>&1
echo x - osdclock/pkg-descr
sed 's/^X//' >osdclock/pkg-descr << 'END-of-osdclock/pkg-descr'
Xosd_clock is a small clock designed for minimalist desktops. It renders text
Xdirectly to the root window using libxosd. 
X
XWWW:	http://leftorium.net/software.phtml
END-of-osdclock/pkg-descr
echo x - osdclock/Makefile
sed 's/^X//' >osdclock/Makefile << 'END-of-osdclock/Makefile'
X# New ports collection makefile for:	osdclock
X# Date created:		2004-08-06
X# Whom:			Roman Bogorodskiy <bogorodskiy@inbox.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	osdclock
XPORTVERSION=	0.4
XCATEGORIES=	x11-clocks
XMASTER_SITES=	http://leftorium.net/software/
XDISTNAME=	osd_clock-${PORTVERSION}
X
XMAINTAINER=	bogorodskiy@inbox.ru
XCOMMENT=	Small clock which uses libxosd to render text to the root window
X
XLIB_DEPENDS=	xosd.4:${PORTSDIR}/misc/xosd
X
XUSE_REINPLACE=	yes
XUSE_X_PREFIX=	yes
XMAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS} -I${X11BASE}/include" \
X		LDFLAGS="${LDFLAGS} -L${X11BASE}/lib ${PTHREAD_LIBS}" \
X		PREFIX="${PREFIX}"
X
XPLIST_FILES=	bin/osd_clock
XMAN1=	osd_clock.1
X
X.include <bsd.port.mk>
END-of-osdclock/Makefile
echo x - osdclock/distinfo
sed 's/^X//' >osdclock/distinfo << 'END-of-osdclock/distinfo'
XMD5 (osd_clock-0.4.tar.gz) = 41a8dee3814b831cf7d53370c4701696
XSIZE (osd_clock-0.4.tar.gz) = 9915
END-of-osdclock/distinfo
echo c - osdclock/files
mkdir -p osdclock/files > /dev/null 2>&1
echo x - osdclock/files/patch-osd_clock.c
sed 's/^X//' >osdclock/files/patch-osd_clock.c << 'END-of-osdclock/files/patch-osd_clock.c'
X--- osd_clock.c.orig	Thu Mar 29 19:10:24 2001
X+++ osd_clock.c	Fri Aug  6 08:05:45 2004
X@@ -109,7 +109,15 @@
X     }
X   }
X   
X-  osd = xosd_init (font, color, delay, pos, offset, shadow);
X+  osd = xosd_create(1);
X+
X+  xosd_set_font(osd, font);
X+  xosd_set_colour(osd, color);
X+  xosd_set_timeout(osd, delay);
X+  xosd_set_pos(osd, pos);
X+  xosd_set_vertical_offset(osd, offset);
X+  xosd_set_shadow_offset(osd, shadow);
X+  
X   if (!osd)
X   {
X     fprintf (stderr, "Error initializing osd\n");
X@@ -127,11 +135,12 @@
X     output = malloc(255 * sizeof(char));
X     strftime(output, 255, format, localtime(&curr_time));
X 
X-    xosd_display (osd, 1, XOSD_string, output);
X+    if ((xosd_display (osd, 0, XOSD_string, output)) == -1) 
X+	    (void)fprintf(stderr, "xosd_display() failed\n");
X     sleep(interval);
X   }
X 
X-  xosd_uninit (osd);
X+  xosd_destroy (osd);
X   
X   return EXIT_SUCCESS;
X }
END-of-osdclock/files/patch-osd_clock.c
exit
--- osdclock.shar ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Mon Nov 29 14:15:47 GMT 2004 
State-Changed-Why:  
Does not build on 4.10: 

===>  Building for osdclock-0.4 
cc -O2 -pipe -g  -I/usr/X11R6/include -c osd_clock.c 
osd_clock.c:27: getopt.h: No such file or directory 
osd_clock.c:30: elements of array `long_options' have incomplete type 
osd_clock.c:31: warning: excess elements in struct initializer 
osd_clock.c:31: warning: (near initialization for `long_options[0]') 
[lots stripped] 
osd_clock.c:42: invalid use of undefined type `struct option' 
*** Error code 1 

Simply using gcc34 seems to fix this. Also, the mastersite has 0.5 by now. 
If you have no objections, I'll do all this on-the-fly when committing... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=70061 
State-Changed-From-To: feedback->closed 
State-Changed-By: vs 
State-Changed-When: Tue Nov 30 10:11:11 GMT 2004 
State-Changed-Why:  
Committed with modifications, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=70061 
>Unformatted:
