Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 2003 16:47:32 -0600 (CST)
From:      Jeremy Messenger <mezz7@cox.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/59440: Maintainer update: astro/gdesklets-goodweather, fix a bug and add Python compile.
Message-ID:  <200311182247.hAIMlWAO096995@ns1.mezzweb.com>
Resent-Message-ID: <200311182320.hAINKGd0012060@freefall.freebsd.org>

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

>Number:         59440
>Category:       ports
>Synopsis:       Maintainer update: astro/gdesklets-goodweather, fix a bug and add Python compile.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 18 15:20:16 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Mezz
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD ns1.mezzweb.com 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Aug 13
22:39:47 CDT 2003 mezz@mezz.mezzweb.com:/usr/obj/usr/src/sys/BSDROCKS i386

>Description:
Fix a bug where you fill out the location and update at the same time; it will
break the refresh/update. This patch made by Franz Klammer
<klammer@webonaut.com> is a workaround to avoid this happen.

While I am here, add Python compile and a new mirror.

>How-To-Repeat:
n/a

>Fix:

--- gdesklets-goodweather.diff begins here ---
diff -urN gdesklets-goodweather.orig/Makefile gdesklets-goodweather/Makefile
--- gdesklets-goodweather.orig/Makefile	Tue Nov 18 01:30:13 2003
+++ gdesklets-goodweather/Makefile	Tue Nov 18 17:02:34 2003
@@ -7,8 +7,10 @@
 
 PORTNAME=	goodweather
 PORTVERSION=	0.1
+PORTREVISION=	1
 CATEGORIES=	astro gnome
-MASTER_SITES=	http://people.roqe.org/kr/misc/
+MASTER_SITES=	http://gdesklets.gnomedesktop.org/files/ \
+		http://people.roqe.org/kr/misc/
 PKGNAMEPREFIX=	gdesklets-
 DISTNAME=	GoodWeather-${PORTVERSION}
 
@@ -18,6 +20,7 @@
 RUN_DEPENDS=	${X11BASE}/libdata/pkgconfig/gdesklets-core.pc:${PORTSDIR}/deskutils/gdesklets
 
 USE_BZIP2=	yes
+USE_PYTHON=	yes
 USE_X_PREFIX=	yes
 USE_REINPLACE=	yes
 
@@ -27,6 +30,8 @@
 
 do-build:
 	@${WRKSRC}/Install_${NAME}_Sensor.bin --nomsg ${WRKSRC}
+	@${PATCH} ${WRKSRC}/${NAME}/__init__.py < ${FILESDIR}/${NAME}::__init__.py
+	@${FIND} ${WRKSRC} -name '*.orig' -delete
 
 do-install:
 	@${MKDIR} ${DATADIR}/gdesklets/Displays/${NAME}/gfx
@@ -46,6 +51,8 @@
 		${DATADIR}/gdesklets/Sensors/${NAME}/README
 
 post-install:
+	@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${DATADIR}/gdesklets/Sensors/${NAME}
+	@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${DATADIR}/gdesklets/Sensors/${NAME}
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
diff -urN gdesklets-goodweather.orig/files/GoodWeather::__init__.py gdesklets-goodweather/files/GoodWeather::__init__.py
--- gdesklets-goodweather.orig/files/GoodWeather::__init__.py	Wed Dec 31 18:00:00 1969
+++ gdesklets-goodweather/files/GoodWeather::__init__.py	Tue Nov 18 16:42:23 2003
@@ -0,0 +1,21 @@
+# Many thanks to Franz Klammer <klammer@webonaut.com> for help
+# and create this patch.
+
+--- GoodWeather/__init__.py.orig	Tue Nov 18 16:38:53 2003
++++ GoodWeather/__init__.py	Tue Nov 18 16:40:14 2003
+@@ -151,7 +151,14 @@
+                 fh = urllib.urlopen(self.WEATHER_SOURCE % vars())
+                 data = fh.read()
+    
+-                weather = parseGoodWeatherData(data) 
++                #weather = parseGoodWeatherData(data)
++                data_error = re.search(r'''(<error>)''', data)
++                if not data_error:
++                   weather = parseGoodWeatherData(data) 
++                else:
++                   time.sleep(1)
++                   continue
++
+                 metric = 0
+                 if (units == self.CELSIUS): 
+                    metric = 1 
diff -urN gdesklets-goodweather.orig/pkg-plist gdesklets-goodweather/pkg-plist
--- gdesklets-goodweather.orig/pkg-plist	Tue Nov 18 01:30:13 2003
+++ gdesklets-goodweather/pkg-plist	Tue Nov 18 16:58:27 2003
@@ -6,6 +6,8 @@
 share/gnome/gdesklets/Displays/GoodWeather/gfx/bg-weather.png
 share/gnome/gdesklets/Sensors/GoodWeather/README
 share/gnome/gdesklets/Sensors/GoodWeather/__init__.py
+share/gnome/gdesklets/Sensors/GoodWeather/__init__.pyc
+share/gnome/gdesklets/Sensors/GoodWeather/__init__.pyo
 share/gnome/gdesklets/Sensors/GoodWeather/liquid/large_icons/1.png
 share/gnome/gdesklets/Sensors/GoodWeather/liquid/large_icons/10.png
 share/gnome/gdesklets/Sensors/GoodWeather/liquid/large_icons/11.png
@@ -285,6 +287,8 @@
 share/gnome/gdesklets/Sensors/GoodWeather/weather.com/small_icons/9.png
 share/gnome/gdesklets/Sensors/GoodWeather/weather.com/small_icons/na.png
 share/gnome/gdesklets/Sensors/GoodWeather/weather.py
+share/gnome/gdesklets/Sensors/GoodWeather/weather.pyc
+share/gnome/gdesklets/Sensors/GoodWeather/weather.pyo
 @dirrm share/gnome/gdesklets/Sensors/GoodWeather/weather.com/small_icons
 @dirrm share/gnome/gdesklets/Sensors/GoodWeather/weather.com/large_icons
 @dirrm share/gnome/gdesklets/Sensors/GoodWeather/weather.com
--- gdesklets-goodweather.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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