Bug 44291

Summary: Fix build of x11-toolkits/plib on -current
Product: Ports & Packages Reporter: Steven G. Kargl <kargl>
Component: Individual Port(s)Assignee: freebsd-ports (Nobody) <ports>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Steven G. Kargl 2002-10-20 01:10:01 UTC
x11-toolkits/plib does not build because machine/joystick.h is
actually located in sys.

Fix: Replace files/patch-src::js::js.h with the following patch.

How-To-Repeat: 
cd x11-toolkits/plib ; make
Comment 1 Kris Kennaway 2002-10-20 01:50:29 UTC
On Sat, Oct 19, 2002 at 05:04:19PM -0700, Steven G. Kargl wrote:

> --- src/js/js.h.orig	Sat Oct 19 16:41:00 2002
> +++ src/js/js.h	Sat Oct 19 16:49:23 2002
> @@ -63,7 +63,11 @@
>  #  include <fcntl.h>
>  
>  #  if defined(__FreeBSD__) || defined(__NetBSD__)
> -#    include <machine/joystick.h>
> +#    if __FreeBSD_version >= 500000
> +#      include <sys/joystick.h>
> +#    elif
> +#      include <machine/joystick.h>
> +#    endif

You don't have to worry about the elif case here because
<sys/joystick.h> exists in 4.x too (machine/joystick.h is a symlink)

Kris
Comment 2 Steven G. Kargl 2002-10-20 02:45:05 UTC
Kris Kennaway said:
> On Sat, Oct 19, 2002 at 05:04:19PM -0700, Steven G. Kargl wrote:
> 
> > --- src/js/js.h.orig	Sat Oct 19 16:41:00 2002
> > +++ src/js/js.h	Sat Oct 19 16:49:23 2002
> > @@ -63,7 +63,11 @@
> >  #  include <fcntl.h>
> >  
> >  #  if defined(__FreeBSD__) || defined(__NetBSD__)
> > -#    include <machine/joystick.h>
> > +#    if __FreeBSD_version >= 500000
> > +#      include <sys/joystick.h>
> > +#    elif
> > +#      include <machine/joystick.h>
> > +#    endif
> 
> You don't have to worry about the elif case here because
> <sys/joystick.h> exists in 4.x too (machine/joystick.h is a symlink)
> 

This replaces patch-src::js::js.h.


--- src/js/js.h.orig	Sat Oct 19 18:30:58 2002
+++ src/js/js.h	Sat Oct 19 18:32:49 2002
@@ -62,7 +62,11 @@
 #  include <unistd.h>
 #  include <fcntl.h>
 
-#  if defined(__FreeBSD__) || defined(__NetBSD__)
+#  if defined(__FreeBSD__)
+#    include <sys/joystick.h>
+#    define JS_DATA_TYPE joystick
+#    define JS_RETURN (sizeof(struct JS_DATA_TYPE))
+#  elif defined(__NetBSD__)
 #    include <machine/joystick.h>
 #    define JS_DATA_TYPE joystick
 #    define JS_RETURN (sizeof(struct JS_DATA_TYPE))
@@ -132,9 +136,9 @@
 
 
 
-/*#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
   int          id ;
-#endif*/
+#endif
 #ifdef WIN32
   JOYINFOEX    js       ;
   UINT         js_id    ;

-- 
Steve
http://troutmask.apl.washington.edu/~kargl/
Comment 3 Pete Fritchman freebsd_committer freebsd_triage 2002-11-14 18:34:28 UTC
State Changed
From-To: open->closed

Requested by originator.