- update to 0.6.2

- no need to RUN_DEPENDS on xfce4-panel as it's in LIB_DEPENDS and xfce4
doesn't build on static archs.
- tidy up WANTLIB
- patch-panel-plugin_weather-http_c has been merged upstream

with feedback and ok steven@
This commit is contained in:
landry 2007-11-19 13:26:06 +00:00
parent 24854c8d58
commit 7a4415f8c4
4 changed files with 44 additions and 89 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.16 2007/09/15 20:04:27 merdely Exp $
# $OpenBSD: Makefile,v 1.17 2007/11/19 13:26:06 landry Exp $
COMMENT= see temperature/weather conditions on the xfce4 panel
V= 0.6.0
V= 0.6.2
DISTNAME= xfce4-weather-plugin-${V}
PKGNAME= xfce4-weather-${V}p0
PKGNAME= xfce4-weather-${V}
HOMEPAGE= http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin
MAINTAINER= Landry Breuil <gaston@gcu.info>
@ -19,17 +19,13 @@ MASTER_SITES= http://goodies.xfce.org/releases/xfce4-weather-plugin/
EXTRACT_SUFX= .tar.bz2
USE_GMAKE= Yes
LIB_DEPENDS= xfce4panel.>=2.2::x11/xfce4/xfce4-panel \
xfcegui4.>=4::x11/xfce4/libxfcegui4 \
LIB_DEPENDS= xfce4panel.>=2::x11/xfce4/xfce4-panel \
xml2.>=9::textproc/libxml
RUN_DEPENDS= :xfce4-panel->=4.4.1:x11/xfce4/xfce4-panel
WANTLIB= X11 Xdmcp Xrender Xau fontconfig freetype m z c \
Xcursor Xext Xfixes Xi Xinerama Xrandr expat \
atk-1.0 gdk-x11-2.0 gdk_pixbuf-2.0 glib-2.0 \
gmodule-2.0 gobject-2.0 gtk-x11-2.0 pango-1.0 \
pangoft2-1.0 pangocairo-1.0 cairo glitz png \
xfce4util.>=1
WANTLIB= X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes \
Xi Xinerama Xrandr Xrender atk-1.0 c cairo expat fontconfig \
freetype gdk-x11-2.0 gdk_pixbuf-2.0 glib-2.0 glitz \
gmodule-2.0 gobject-2.0 gtk-x11-2.0 m pango-1.0 pangocairo-1.0 \
pangoft2-1.0 png xfce4util xfcegui4 z
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (xfce4/xfce4-weather-plugin-0.6.0.tar.bz2) = bX7RkJULLMmccLlIEWn5+g==
RMD160 (xfce4/xfce4-weather-plugin-0.6.0.tar.bz2) = KPW3ApJCzofdJ4S0zSJ0GkUefnU=
SHA1 (xfce4/xfce4-weather-plugin-0.6.0.tar.bz2) = VCCVVpMzgFKztt3KEGCQctU6ouM=
SHA256 (xfce4/xfce4-weather-plugin-0.6.0.tar.bz2) = bcDzBncyc/mO5ZLinDZu6cs3gwYI2Bxg2Ov19LEMb0U=
SIZE (xfce4/xfce4-weather-plugin-0.6.0.tar.bz2) = 537194
MD5 (xfce4/xfce4-weather-plugin-0.6.2.tar.bz2) = uonE84TToyr9CzOsrQIa8A==
RMD160 (xfce4/xfce4-weather-plugin-0.6.2.tar.bz2) = 2Emz5tzFsUe7m9m3cdzF1R2g5+E=
SHA1 (xfce4/xfce4-weather-plugin-0.6.2.tar.bz2) = 2+fmaVzWR6r4Q9x5DZuzfqlcg+o=
SHA256 (xfce4/xfce4-weather-plugin-0.6.2.tar.bz2) = J5548u+pe67HSt4pQUPbwfP0u14/RXck6du+rBwmlgU=
SIZE (xfce4/xfce4-weather-plugin-0.6.2.tar.bz2) = 555001

View File

@ -1,70 +0,0 @@
$OpenBSD: patch-panel-plugin_weather-http_c,v 1.1 2007/05/14 17:54:35 steven Exp $
--- panel-plugin/weather-http.c.orig Wed Jan 17 19:02:39 2007
+++ panel-plugin/weather-http.c Mon May 14 17:04:58 2007
@@ -83,14 +83,61 @@ http_connect (gchar *hostname,
fcntl (fd, F_SETFL, O_NONBLOCK);
if ((connect (fd, (struct sockaddr *) &dest_host, sizeof (struct sockaddr))
- == -1) && errno != EINPROGRESS)
+ == -1))
{
- perror ("http_connect()");
- return -1;
+ gboolean failed = TRUE;
+
+ if(errno == EWOULDBLOCK || errno == EINPROGRESS || errno == EALREADY)
+ {
+ gint iters_left;
+ for(iters_left = 5; iters_left >= 0; iters_left--) {
+ fd_set wfd;
+ struct timeval tv = { 2, 0 };
+ int sock_err = 0;
+ socklen_t sock_err_len = sizeof(int);
+
+ FD_ZERO(&wfd);
+ FD_SET(fd, &wfd);
+
+ DBG("checking for a connection...");
+
+ /* wait until the connect attempt finishes */
+ if(select(FD_SETSIZE, NULL, &wfd, NULL, &tv) < 0)
+ break;
+
+ /* check to see if it finished, and, if so, if there was an
+ * error, or if it completed successfully */
+ if(FD_ISSET(fd, &wfd)) {
+ if(!getsockopt(fd, SOL_SOCKET, SO_ERROR,
+ &sock_err, &sock_err_len)
+ && !sock_err)
+ {
+ DBG(" connection succeeded");
+ failed = FALSE;
+ } else {
+ g_warning(" connection failed");
+ DBG(" connection failed: sock_err is %d", sock_err);
+ }
+ break;
+ }
+ }
+ }
+
+ if(failed)
+ {
+ DBG("failed to connect");
+ close(fd);
+ fd = -1;
+ perror ("http_connect()");
+ return -1;
+ }
}
- else
- return fd;
+
+ if(fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~(O_NONBLOCK))) {
+ g_warning("Unable to return socket to blocking mode.");
+ }
+ return fd;
}

View File

@ -1,21 +1,50 @@
@comment $OpenBSD: PLIST,v 1.5 2007/05/28 19:53:07 steven Exp $
@comment $OpenBSD: PLIST,v 1.6 2007/11/19 13:26:06 landry Exp $
@conflict xfce4-weather-plugin-*
libexec/xfce4/
libexec/xfce4/panel-plugins/
libexec/xfce4/panel-plugins/xfce4-weather-plugin
share/icons/
share/icons/hicolor/
share/icons/hicolor/48x48/
share/icons/hicolor/48x48/apps/
share/icons/hicolor/48x48/apps/xfce4-weather.png
share/locale/ca/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/cs/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/de/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/en_GB/
share/locale/en_GB/LC_MESSAGES/
share/locale/en_GB/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/eu/
share/locale/eu/LC_MESSAGES/
share/locale/eu/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/fi/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/fr/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/gl/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/hu/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/lt/
share/locale/lt/LC_MESSAGES/
share/locale/lt/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/nb_NO/
share/locale/nb_NO/LC_MESSAGES/
share/locale/nb_NO/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/nl/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/pa/
share/locale/pa/LC_MESSAGES/
share/locale/pa/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/pt_BR/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/pt_PT/
share/locale/pt_PT/LC_MESSAGES/
share/locale/pt_PT/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/sk/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/sq/
share/locale/sq/LC_MESSAGES/
share/locale/sq/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/ur/
share/locale/ur/LC_MESSAGES/
share/locale/ur/LC_MESSAGES/xfce4-weather-plugin.mo
share/locale/zh_TW/LC_MESSAGES/xfce4-weather-plugin.mo
share/xfce4/
share/xfce4/panel-plugins/
share/xfce4/panel-plugins/weather.desktop
share/xfce4/weather/
share/xfce4/weather/icons/