Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2003 21:01:45 +0200 (CEST)
From:      harald.wille@students.jku.at
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/50834: New port: x11/wm 
Message-ID:  <200304111901.h3BJ1jnC051997@z465-033-043.Raab-Heim.Uni-Linz.AC.AT>
Resent-Message-ID: <200304111910.h3BJAGNq087334@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         50834
>Category:       ports
>Synopsis:       New port: x11/wm
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 11 12:10:15 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Wille Harald
>Release:        FreeBSD 4.8-RC i386
>Organization:
>Environment:
System: FreeBSD z465-033-043.Raab-Heim.Uni-Linz.AC.AT 4.8-RC FreeBSD 4.8-RC #1: Wed Mar 5 22:53:10 CET 2003 root@z465-033-043.Raab-Heim.Uni-Linz.AC.AT:/usr/obj/usr/src/sys/HYPERDRIVE i386


	
>Description:
	wmweather+ will download the National Weather Serivce METAR bulletins, 
ANV and MRF forecasts, and any weather map for display in a WindowMaker
dockapp. Think wmweather with a smaller font, forecasts, a weather map,
and a sky condition display.
You will need to look up the METAR code for your city (a standard code
used in aviation)

>How-To-Repeat:
	
>Fix:
	
# 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:
#
#	wmweather+/
#	wmweather+/Makefile
#	wmweather+/pkg-descr
#	wmweather+/files
#	wmweather+/files/patch-convert.h
#	wmweather+/files/patch-convert.c
#	wmweather+/files/patch-moon.c
#	wmweather+/files/patch-subst.c
#	wmweather+/files/patch-wmweather+.c
#	wmweather+/distinfo
#	wmweather+/pkg-plist
#
echo c - wmweather+/
mkdir -p wmweather+/ > /dev/null 2>&1
echo x - wmweather+/Makefile
sed 's/^X//' >wmweather+/Makefile << 'END-of-wmweather+/Makefile'
X# New ports collection makefile for:	wmweather+-2.4
X# Date created:		11 April 2003
X# Whom:			Harald Wille <harald.wille@students.jku.at>
X#
X# $FreeBSD$
X
XPORTNAME=	wmweather+
XPORTVERSION=	2.4
XCATEGORIES=	misc windowmaker
XMASTER_SITES=  	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	wmweatherplus
X
XMAINTAINER=	harald.wille@students.jku.at
XCOMMENT=	Think wmweather with forecasts, weather map, and a sky cond. display;
X
XGNU_CONFIGURE= 	yes
XUSE_X_PREFIX=	yes
XUSE_XPM=	yes
X
XMAN1=		wmweather+.1
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/wmweather+ ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKSRC}/wmweather+.1 ${PREFIX}/man/man1
X
X.include <bsd.port.mk>
END-of-wmweather+/Makefile
echo x - wmweather+/pkg-descr
sed 's/^X//' >wmweather+/pkg-descr << 'END-of-wmweather+/pkg-descr'
Xwmweather+ will download the National Weather Serivce METAR bulletins, 
XANV and MRF forecasts, and any weather map for display in a WindowMaker
Xdockapp. Think wmweather with a smaller font, forecasts, a weather map,
Xand a sky condition display.
XYou will need to look up the METAR code for your city (a standard code
Xused in aviation)
X
XWWW: http://www.nws.noaa.gov/tg/siteloc.shtml
END-of-wmweather+/pkg-descr
echo c - wmweather+/files
mkdir -p wmweather+/files > /dev/null 2>&1
echo x - wmweather+/files/patch-convert.h
sed 's/^X//' >wmweather+/files/patch-convert.h << 'END-of-wmweather+/files/patch-convert.h'
X--- convert.h.orig	Fri Sep  6 04:04:06 2002
X+++ convert.h	Fri Apr 11 02:07:44 2003
X@@ -12,6 +12,8 @@
X  *   x<0 is used for rh, pressure, and windspeed
X  */
X 
X+#define NAN 0/0
X+
X /* Calculations */
X int rh_C(int temp_C, int dewpt_C);
X int rh_F(int temp_F, int dewpt_F);
END-of-wmweather+/files/patch-convert.h
echo x - wmweather+/files/patch-convert.c
sed 's/^X//' >wmweather+/files/patch-convert.c << 'END-of-wmweather+/files/patch-convert.c'
X--- convert.c.orig	Sun Sep 22 22:00:53 2002
X+++ convert.c	Fri Apr 11 02:07:44 2003
X@@ -52,7 +52,7 @@
X     if(temp_C==999 || dewpt_C==999) return 999;
X 
X     f=1782.75*(dewpt_C-temp_C)/((237.7+dewpt_C)*(237.7+temp_C));
X-    return round(pow(10, f+2));
X+    return rint(pow(10, f+2));
X }
X 
X int rh_F(int temp_F, int dewpt_F){
X@@ -61,7 +61,7 @@
X     if(temp_F==999 || dewpt_F==999) return 999;
X 
X     f=3208.95*(dewpt_F-temp_F)/((395.86+dewpt_F)*(395.86+temp_F));
X-    return round(pow(10, f+2));
X+    return rint(pow(10, f+2));
X }
X 
X int heatindex_C(int temp_C, int rh){
X@@ -75,7 +75,7 @@
X 
X     temp2=temp_C*temp_C;
X     rh2=rh*rh;
X-    return round(16.18754948 + 2.900509394*temp_C - 0.0221545692*temp2 + 4.20938791*rh - 0.26300889*temp_C*rh + 0.0039811176*temp2*rh - 0.02956469*rh2 + 0.001305828*temp_C*rh2 - 6.4476e-06*temp2*rh2);
X+    return rint(16.18754948 + 2.900509394*temp_C - 0.0221545692*temp2 + 4.20938791*rh - 0.26300889*temp_C*rh + 0.0039811176*temp2*rh - 0.02956469*rh2 + 0.001305828*temp_C*rh2 - 6.4476e-06*temp2*rh2);
X #endif
X }
X 
X@@ -88,9 +88,9 @@
X     temp3=temp2*temp_F;
X     rh2=rh*rh;
X     rh3=rh2*rh;
X-    return round(16.923 + .185212*temp_F + 5.37941*rh - .100254*temp_F*rh + (9.41695e-3)*temp2 + (7.28898e-3)*rh2 + (3.45372e-4)*temp2*rh - (8.14971e-4)*temp_F*rh2 + (1.02102e-5)*temp2*rh2 - (3.8646e-5)*temp3 + (2.91583e-5)*rh3 + (1.42721e-6)*temp3*rh + (1.97483e-7)*temp_F*rh3 - (2.18429e-8)*temp3*rh2 + (8.43296e-10)*temp2*rh3 - (4.81975e-11)*temp3*rh3);
X+    return rint(16.923 + .185212*temp_F + 5.37941*rh - .100254*temp_F*rh + (9.41695e-3)*temp2 + (7.28898e-3)*rh2 + (3.45372e-4)*temp2*rh - (8.14971e-4)*temp_F*rh2 + (1.02102e-5)*temp2*rh2 - (3.8646e-5)*temp3 + (2.91583e-5)*rh3 + (1.42721e-6)*temp3*rh + (1.97483e-7)*temp_F*rh3 - (2.18429e-8)*temp3*rh2 + (8.43296e-10)*temp2*rh3 - (4.81975e-11)*temp3*rh3);
X #if 0
X-    return round(-42.379 + 2.04901523*temp_F + 10.14333127*rh - 0.22475541*temp_F*rh - .00683783*temp2 - .05481717*rh2 + .00122874*temp2*rh + .00085282*temp_F*rh2 - .00000199*temp2*rh2);
X+    return rint(-42.379 + 2.04901523*temp_F + 10.14333127*rh - 0.22475541*temp_F*rh - .00683783*temp2 - .05481717*rh2 + .00122874*temp2*rh + .00085282*temp_F*rh2 - .00000199*temp2*rh2);
X #endif
X }
X 
X@@ -106,14 +106,14 @@
X 
X     ret=35.74 + 0.6215*temp_F + (-35.75 + 0.4275*temp_F)*pow(windspeed*50292/57875.0, 0.16);
X     if(ret>temp_F) return temp_F;
X-    return round(ret);
X+    return rint(ret);
X }
X 
X /* Length Conversions */
X 
X int in2cm(int in){
X     if(in<0) return in;
X-    return round(in*2.54);
X+    return rint(in*2.54);
X }
X 
X float m2mi(int meters){
X@@ -125,27 +125,27 @@
X 
X int knots2mph(int knots){
X     if(knots<0) return knots;
X-    return round(knots*57875/50292.0);
X+    return rint(knots*57875/50292.0);
X }
X 
X int knots2kph(int knots){
X     if(knots<0) return knots;
X-    return round(knots*463/250.0);
X+    return rint(knots*463/250.0);
X }
X 
X int kph2knots(int kph){
X     if(kph<0) return kph;
X-    return round(kph*250/463.0);
X+    return rint(kph*250/463.0);
X }
X 
X int knots2mps(int knots){
X     if(knots<0) return knots;
X-    return round(knots*463/900.0);
X+    return rint(knots*463/900.0);
X }
X 
X int mps2knots(int mps){
X     if(mps<0) return mps;
X-    return round(mps*900/463.0);
X+    return rint(mps*900/463.0);
X }
X 
X int knots2beaufort(int knots){
X@@ -170,12 +170,12 @@
X 
X int temp_C2F(int temp_C){
X     if(temp_C==999) return 999;
X-    return round(temp_C*9/5.0+32);
X+    return rint(temp_C*9/5.0+32);
X }
X 
X int temp_F2C(int temp_F){
X     if(temp_F==999) return 999;
X-    return round((temp_F-32)*5/9.0);
X+    return rint((temp_F-32)*5/9.0);
X }
X 
X 
END-of-wmweather+/files/patch-convert.c
echo x - wmweather+/files/patch-moon.c
sed 's/^X//' >wmweather+/files/patch-moon.c << 'END-of-wmweather+/files/patch-moon.c'
X--- moon.c.orig	Sun Sep 22 22:00:53 2002
X+++ moon.c	Fri Apr 11 02:07:44 2003
X@@ -44,7 +44,7 @@
X #include "wmgeneral/wmgeneral-x11.h"
X 
X static double fpart(double t){
X-    return t-trunc(t);
X+    return rint(t);
X }
X 
X double calc_moon(int month, int day, int year, int hm){
END-of-wmweather+/files/patch-moon.c
echo x - wmweather+/files/patch-subst.c
sed 's/^X//' >wmweather+/files/patch-subst.c << 'END-of-wmweather+/files/patch-subst.c'
X--- subst.c.orig	Sun Sep 22 22:00:53 2002
X+++ subst.c	Fri Apr 11 02:07:44 2003
X@@ -48,7 +48,7 @@
X     char *format=NULL;
X     size_t formatlen=0;
X     int flags;
X-    ssize_t str_start;
X+    size_t str_start;
X 
X     for(i=j=0; s[i]!='\0'; i++){
X         if(s[i]!='%'){
END-of-wmweather+/files/patch-subst.c
echo x - wmweather+/files/patch-wmweather+.c
sed 's/^X//' >wmweather+/files/patch-wmweather+.c << 'END-of-wmweather+/files/patch-wmweather+.c'
X--- wmweather+.c.orig	Sun Mar 23 01:04:41 2003
X+++ wmweather+.c	Fri Apr 11 02:07:45 2003
X@@ -103,7 +103,7 @@
X /**********************************
X  * Prototypes
X  **********************************/
X-void usage(int i) __THROW __attribute__ ((__noreturn__));
X+void usage(int i);
X void printversion(void);
X int readconf(char *file);
X int parse_option(char *option, char *value);
X@@ -671,12 +671,12 @@
X         F("Please specify a METAR station.\n   See http://www.nws.noaa.gov/tg/siteloc.shtml\n");
X     }
X     if(latitude==999){{
X-        time_t t=0;
X         int flag=0;
X-
X-        localtime(&t);
X+	time_t t=time(NULL);
X+	struct tm *tm;
X+	tm=gmtime(&t);
X         latitude=0;
X-        longitude=timezone/240;
X+        longitude=tm->tm_gmtoff/240;
X         if(longitude<0){
X             flag=1;
X             longitude=-longitude;
END-of-wmweather+/files/patch-wmweather+.c
echo x - wmweather+/distinfo
sed 's/^X//' >wmweather+/distinfo << 'END-of-wmweather+/distinfo'
XMD5 (wmweather+-2.4.tar.gz) = f09d1b31da5fd171b27715121e2d9662
END-of-wmweather+/distinfo
echo x - wmweather+/pkg-plist
sed 's/^X//' >wmweather+/pkg-plist << 'END-of-wmweather+/pkg-plist'
Xbin/wmweather+
END-of-wmweather+/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:



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