misc/104030: [patch] devel/upp: SDL, library dependencies and socket

Matthias Sund m.sund at arcor.de
Thu Oct 5 13:20:33 PDT 2006


>Number:         104030
>Category:       misc
>Synopsis:       [patch] devel/upp: SDL, library dependencies and socket
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 05 20:20:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Matthias Sund
>Release:        6.2-PRERELEASE
>Organization:
>Environment:
FreeBSD travelmate 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Thu Sep 28 14:24:07 CEST 2006     masu at travelmate:/usr/obj/usr/src/sys/TRAVELMATE  i386
>Description:
- added socket patch to fix (non-)blocking behaviour
- fixed a few library dependencies for upp packages
- changed SDL usage (to reflect recent change in devel/sdl12)

>How-To-Repeat:

>Fix:
diff -ruN upp_orig/Makefile upp/Makefile
--- upp_orig/Makefile	Wed Oct  4 23:15:21 2006
+++ upp/Makefile	Wed Oct  4 23:56:36 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	upp
 PORTVERSION=	605
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel x11-toolkits
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -24,6 +24,7 @@
 USE_DOS2UNIX=	yes
 USE_GMAKE=	yes
 USE_X_PREFIX=	yes
+USE_XLIB=	yes
 
 .if defined(WITH_SDL)
 USE_SDL=	sdl
diff -ruN upp_orig/files/patch-examples-SDLExample-SDLExample.upp upp/files/patch-examples-SDLExample-SDLExample.upp
--- upp_orig/files/patch-examples-SDLExample-SDLExample.upp	Wed Oct  4 23:15:21 2006
+++ upp/files/patch-examples-SDLExample-SDLExample.upp	Thu Oct  5 00:04:48 2006
@@ -1,12 +1,10 @@
---- examples/SDLExample/SDLExample.upp.orig	Tue Jun  6 20:57:56 2006
-+++ examples/SDLExample/SDLExample.upp	Tue Jun  6 21:18:25 2006
-@@ -7,6 +7,10 @@
+--- examples/SDLExample/SDLExample.upp.orig	Wed Oct  4 23:58:12 2006
++++ examples/SDLExample/SDLExample.upp	Thu Oct  5 00:00:08 2006
+@@ -7,6 +7,8 @@
  
  library(LINUX) "SDL SDLmain";
  
-+library(FREEBSD) "SDL-1.1 m vgl X11 Xext vga aa usbhid";
-+
-+link(FREEBSD) -pthread;
++library(FREEBSD) "SDL SDLmain X11 Xext Xrandr Xrender vga vgl aa usbhid ncurses";
 +
  file
  	main.cpp;
diff -ruN upp_orig/files/patch-examples-SDLExample-main.cpp upp/files/patch-examples-SDLExample-main.cpp
--- upp_orig/files/patch-examples-SDLExample-main.cpp	Wed Oct  4 23:15:21 2006
+++ upp/files/patch-examples-SDLExample-main.cpp	Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- examples/SDLExample/main.cpp.orig	Tue Jun  6 21:18:47 2006
-+++ examples/SDLExample/main.cpp	Tue Jun  6 21:18:58 2006
-@@ -3,7 +3,7 @@
- #ifdef PLATFORM_WIN32
- #include <SDL.h>
- #else
--#include <SDL/SDL.h>
-+#include <SDL11/SDL.h>
- #endif
- 
- const int maxpoint  = 1000;
diff -ruN upp_orig/files/patch-uppsrc-Core-Core.upp upp/files/patch-uppsrc-Core-Core.upp
--- upp_orig/files/patch-uppsrc-Core-Core.upp	Thu Jan  1 01:00:00 1970
+++ upp/files/patch-uppsrc-Core-Core.upp	Thu Oct  5 00:05:17 2006
@@ -0,0 +1,11 @@
+--- uppsrc/Core/Core.upp.orig	Thu Oct  5 00:00:40 2006
++++ uppsrc/Core/Core.upp	Thu Oct  5 00:01:06 2006
+@@ -7,6 +7,8 @@
+ 
+ library(LINUX) "pthread dl";
+ 
++library(FREEBSD) "pthread";
++
+ library(WIN32) "advapi32 shell32 winmm";
+ 
+ library(SOLARIS) "posix4 dl";
diff -ruN upp_orig/files/patch-uppsrc-Draw-Draw.upp upp/files/patch-uppsrc-Draw-Draw.upp
--- upp_orig/files/patch-uppsrc-Draw-Draw.upp	Thu Jan  1 01:00:00 1970
+++ upp/files/patch-uppsrc-Draw-Draw.upp	Thu Oct  5 00:05:48 2006
@@ -0,0 +1,15 @@
+--- uppsrc/Draw/Draw.upp.orig	Thu Oct  5 00:01:36 2006
++++ uppsrc/Draw/Draw.upp	Thu Oct  5 00:03:16 2006
+@@ -11,11 +11,9 @@
+ 
+ library(FREEBSD) X11;
+ 
+-library(FREEBSD !XLFD) "Xft fontconfig";
++library(FREEBSD !XLFD) "Xft fontconfig Xrender freetype expat";
+ 
+ library(LINUX !XLFD !SHARED) "fontconfig Xrender freetype expat";
+-
+-library(FREEBSD) "Xrender freetype expat";
+ 
+ file
+ 	Draw.h,
diff -ruN upp_orig/files/patch-uppsrc-Web-socket.cpp upp/files/patch-uppsrc-Web-socket.cpp
--- upp_orig/files/patch-uppsrc-Web-socket.cpp	Thu Jan  1 01:00:00 1970
+++ upp/files/patch-uppsrc-Web-socket.cpp	Thu Oct  5 20:51:38 2006
@@ -0,0 +1,42 @@
+--- uppsrc/Web/socket.cpp.orig	Thu Oct  5 00:43:27 2006
++++ uppsrc/Web/socket.cpp	Thu Oct  5 20:33:14 2006
+@@ -12,6 +12,12 @@
+ {
+ 	NB_TIMEOUT  = 30000,
+ 	SOCKBUFSIZE = 65536,
++
++#ifdef PLATFORM_WIN32
++	IS_BLOCKED = SOCKERR(EWOULDBLOCK),
++#else
++	IS_BLOCKED = SOCKERR(EINPROGRESS),
++#endif
+ };
+ 
+ static bool LogSocketFlag = false;
+@@ -202,7 +208,7 @@
+ 		return true;
+ 
+ 	int err = GetLastError();
+-	if(err != SOCKERR(EWOULDBLOCK)) {
++	if(err != IS_BLOCKED) {
+ 		SetSockError(NFormat("connect(%s:%d)", host, port));
+ 		SLOG("Socket::Data::OpenClient -> connect error, returning false");
+ 		return false;
+@@ -274,7 +280,7 @@
+ #endif
+ 	if(res == 0)
+ 		is_eof = true;
+-	else if(res < 0 && GetLastError() != SOCKERR(EWOULDBLOCK))
++	else if(res < 0 && GetLastError() != IS_BLOCKED)
+ 		SetSockError("recv");
+ 	return res;
+ }
+@@ -282,7 +288,7 @@
+ int Socket::Data::Write(const void *buf, int amount)
+ {
+ 	int res = send(socket, (const char *)buf, amount, 0);
+-	if(res == 0 || res < 0 && GetLastError() != SOCKERR(EWOULDBLOCK))
++	if(res == 0 || res < 0 && GetLastError() != IS_BLOCKED)
+ 		SetSockError("send");
+ 	return res;
+ }

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


More information about the freebsd-bugs mailing list