View | Details | Raw Unified | Return to bug 124046
Collapse All | Expand All

(-)x11-toolkits/plib/Makefile (-4 / +11 lines)
Lines 6-25 Link Here
6
#
6
#
7
7
8
PORTNAME=	plib
8
PORTNAME=	plib
9
PORTVERSION=	1.8.4
9
PORTVERSION=	1.8.5
10
PORTREVISION=	5
11
CATEGORIES=	x11-toolkits
10
CATEGORIES=	x11-toolkits
12
MASTER_SITES=	http://plib.sourceforge.net/dist/
11
MASTER_SITES=	http://plib.sourceforge.net/dist/
13
12
14
MAINTAINER=	ports@FreeBSD.org
13
MAINTAINER=	ports@FreeBSD.org
15
COMMENT=	A portable library for joystick/sound/OpenGL GUI/3D math
14
COMMENT=	A portable library for joystick/sound/OpenGL GUI/3D math
16
15
16
USE_GNOME=	gnometarget
17
USE_GL=		glu
17
USE_GL=		glu
18
USE_GMAKE=	yes
18
USE_GMAKE=	yes
19
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
20
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
21
20
CXXFLAGS+=	-fPIC
22
CXXFLAGS+=	-fPIC
21
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
23
CPPFLAGS=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
22
		LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
24
LDFLAGS=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
25
26
post-patch:
27
	@${REINPLACE_CMD} -e 's|-lpthread||g ; \
28
		 s|-ldl||g ; \
29
		 s|-lc_r||g' ${WRKSRC}/configure
23
30
24
post-build:
31
post-build:
25
	${CC} ${CFLAGS} -o ${WRKDIR}/plib-jscal ${FILESDIR}/jsBSDCal.c
32
	${CC} ${CFLAGS} -o ${WRKDIR}/plib-jscal ${FILESDIR}/jsBSDCal.c
(-)x11-toolkits/plib/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (plib-1.8.4.tar.gz) = 5e3f289a9d1c5de0b1cfdec76bf139e6
1
MD5 (plib-1.8.5.tar.gz) = 47a6fbf63668c1eed631024038b2ea90
2
SHA256 (plib-1.8.4.tar.gz) = 79e71d02fc2d7c984a4341239ed1d89ced743db2d6d4f83c30c422edaa6020e1
2
SHA256 (plib-1.8.5.tar.gz) = 485b22bf6fdc0da067e34ead5e26f002b76326f6371e2ae006415dea6a380a32
3
SIZE (plib-1.8.4.tar.gz) = 793758
3
SIZE (plib-1.8.5.tar.gz) = 779133
(-)x11-toolkits/plib/files/patch-src::sl::slPortability.h (-11 lines)
Lines 1-11 Link Here
1
--- ./src/sl/slPortability.h.orig	Sat Sep  7 17:54:59 2002
2
+++ ./src/sl/slPortability.h	Sat Sep  7 17:55:22 2002
3
@@ -74,7 +74,7 @@
4
 #  if defined(__linux__)
5
 #    include <linux/soundcard.h>
6
 #  elif defined(__FreeBSD__)
7
-#    include <machine/soundcard.h>
8
+#    include <sys/soundcard.h>
9
 #  else
10
     /*
11
       Tom thinks this file may be <sys/soundcard.h> under some
(-)x11-toolkits/plib/files/patch-src_js_jsBSD.cxx (-48 lines)
Lines 1-48 Link Here
1
--- src/js/jsBSD.cxx.orig	Wed Jan 12 02:22:26 2005
2
+++ src/js/jsBSD.cxx	Wed Dec  7 10:35:27 2005
3
@@ -44,6 +44,8 @@
4
 #define HAVE_USB_JS	1
5
 #endif
6
 
7
+#include <string.h>
8
+#include <errno.h>
9
 #include <sys/ioctl.h>
10
 #if defined(__FreeBSD__)
11
 # include <sys/joystick.h>
12
@@ -312,7 +314,7 @@
13
     int buttons [ _JS_MAX_AXES ] ;
14
   
15
     rawRead ( buttons, axes ) ;
16
-    error = axes[0] < -1000000000.0f ;
17
+    error = axes[0] < -1000000000.0f && axes[1] < -1000000000.0f ;
18
     if ( error )
19
       return ;
20
   
21
@@ -321,7 +323,11 @@
22
     joyfile = fopen ( joyfname, "r" ) ;
23
     error = ( joyfile == NULL ) ;
24
     if ( error )
25
+    {
26
+      ulSetError ( UL_WARNING, "unable to open calibration file %s (%s), joystick %i disabled (you can generate the calibration file with the plib-jscal utility)",
27
+		   joyfname, strerror ( errno ), id + 1 );
28
       return ;
29
+    }
30
 
31
     noargs = fscanf ( joyfile, "%d%f%f%f%f%f%f", &in_no_axes,
32
                       &min [ 0 ], &center [ 0 ], &max [ 0 ],
33
@@ -445,8 +451,13 @@
34
 
35
     if ( axes != NULL )
36
     {
37
-      axes[0] = (float) os->ajs.x ;
38
-      axes[1] = (float) os->ajs.y ;
39
+      if ( os->ajs.x >= -1000000000 )
40
+	os->cache_axes[0] = os->ajs.x;
41
+      if ( os->ajs.y >= -1000000000 )
42
+	os->cache_axes[1] = os->ajs.y;
43
+
44
+      axes[0] = os->cache_axes[0];
45
+      axes[1] = os->cache_axes[1];
46
     }
47
 
48
     return;
(-)x11-toolkits/plib/files/patch-src_ssgAux_ssgaSky.h (-20 lines)
Lines 1-20 Link Here
1
--- src/ssgAux/ssgaSky.h.orig	Fri Apr  6 03:58:33 2007
2
+++ src/ssgAux/ssgaSky.h	Fri Apr  6 03:58:45 2007
3
@@ -104,7 +104,7 @@
4
   ssgaCelestialBodyList ( int init = 3 )
5
 	  : ssgSimpleList ( sizeof(ssgaCelestialBody*), init ) { }
6
 
7
-  ssgaCelestialBodyList::~ssgaCelestialBodyList () { removeAll(); }
8
+  ~ssgaCelestialBodyList () { removeAll(); }
9
 
10
   int getNum (void) { return total ; }
11
 
12
@@ -192,7 +192,7 @@
13
   ssgaCloudLayerList ( int init = 3 )
14
 	  : ssgSimpleList ( sizeof(ssgaCloudLayer*), init ) { }
15
 
16
-  ssgaCloudLayerList::~ssgaCloudLayerList () { removeAll(); }
17
+  ~ssgaCloudLayerList () { removeAll(); }
18
 
19
   int getNum (void) { return total ; }
20

Return to bug 124046