diff --git a/graphics/freeglut/Makefile b/graphics/freeglut/Makefile index 955c9065b0cf3..b908aae8d75b7 100644 --- a/graphics/freeglut/Makefile +++ b/graphics/freeglut/Makefile @@ -1,8 +1,6 @@ -# $NetBSD: Makefile,v 1.17 2015/04/25 14:23:10 tnn Exp $ -# +# $NetBSD: Makefile,v 1.18 2016/10/01 07:47:04 wiz Exp $ -DISTNAME= freeglut-2.8.1 -PKGREVISION= 1 +DISTNAME= freeglut-3.0.0 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeglut/} @@ -11,9 +9,16 @@ HOMEPAGE= http://freeglut.sourceforge.net/ COMMENT= Alternative to the OpenGL Utility Toolkit (GLUT) library LICENSE= x11 +USE_CMAKE= yes +CMAKE_ARGS+= -DFREEGLUT_REPLACE_GLUT:BOOL=OFF + +USE_LANGUAGES= c c++ USE_LIBTOOL= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --disable-replace-glut + +PKGCONFIG_OVERRIDE= freeglut.pc.in + +post-install: + ${RM} ${DESTDIR}${PREFIX}/include/GL/glut.h .include "../../graphics/MesaLib/buildlink3.mk" .include "../../graphics/glu/buildlink3.mk" diff --git a/graphics/freeglut/PLIST b/graphics/freeglut/PLIST index b72f8567db42a..bcdffd6fb2f31 100644 --- a/graphics/freeglut/PLIST +++ b/graphics/freeglut/PLIST @@ -1,5 +1,9 @@ -@comment $NetBSD: PLIST,v 1.4 2009/06/14 20:05:41 joerg Exp $ +@comment $NetBSD: PLIST,v 1.5 2016/10/01 07:47:04 wiz Exp $ include/GL/freeglut.h include/GL/freeglut_ext.h include/GL/freeglut_std.h -lib/libfreeglut.la +lib/libfreeglut.a +lib/libfreeglut.so +lib/libfreeglut.so.3 +lib/libfreeglut.so.3.10.0 +lib/pkgconfig/freeglut.pc diff --git a/graphics/freeglut/distinfo b/graphics/freeglut/distinfo index 9e221c908c64b..84542aae6d64c 100644 --- a/graphics/freeglut/distinfo +++ b/graphics/freeglut/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.6 2015/11/03 21:33:57 agc Exp $ +$NetBSD: distinfo,v 1.7 2016/10/01 07:47:04 wiz Exp $ -SHA1 (freeglut-2.8.1.tar.gz) = 7330b622481e2226c0c9f6d2e72febe96b03f9c4 -RMD160 (freeglut-2.8.1.tar.gz) = 22a8de93e68657bb34200fba0124c99704b34f93 -SHA512 (freeglut-2.8.1.tar.gz) = 935fddfa197c5f0ec74c5f2005fe5a0ebfd39f4a402cc79363da7cfe2e8576263130e44bd7e4f6c07ea53d3137bd7ca8ee8db85c0a09f25508fcf1b9ed07052e -Size (freeglut-2.8.1.tar.gz) = 1005343 bytes -SHA1 (patch-src_freeglut__joystick.c) = b2baf2f79113c3daa30cc77e483d1a4248f79ac8 +SHA1 (freeglut-3.0.0.tar.gz) = fca52242f9344627a30f11487ee42002e6b0dacd +RMD160 (freeglut-3.0.0.tar.gz) = ce4129a22199516ecf24491f0ed026f40c3f5dae +SHA512 (freeglut-3.0.0.tar.gz) = 9c45d5b203b26a7ff92331b3e080a48e806c92fbbe7c65d9262dd18c39cd6efdad8a795a80f499a2d23df84b4909dbd7c1bab20d7dd3555d3d88782ce9dd15b0 +Size (freeglut-3.0.0.tar.gz) = 419095 bytes +SHA1 (patch-src_freeglut__joystick.c) = a3f52010378afd1218ba12328a2b4626b758d483 +SHA1 (patch-src_x11_fg__joystick__x11.c) = ccd79599939d936e4364c6e8d91a8ce0e058db78 diff --git a/graphics/freeglut/patches/patch-src_freeglut__joystick.c b/graphics/freeglut/patches/patch-src_freeglut__joystick.c index c948d12cf4b22..92d28073cf7c6 100644 --- a/graphics/freeglut/patches/patch-src_freeglut__joystick.c +++ b/graphics/freeglut/patches/patch-src_freeglut__joystick.c @@ -1,19 +1,30 @@ -$NetBSD: patch-src_freeglut__joystick.c,v 1.1 2013/05/04 14:32:20 rodent Exp $ +$NetBSD: patch-src_freeglut__joystick.c,v 1.2 2016/10/01 07:47:04 wiz Exp $ Fix usb.h include for NetBSD. ---- src/freeglut_joystick.c.orig 2011-09-28 01:37:26.000000000 +0000 -+++ src/freeglut_joystick.c -@@ -152,7 +152,11 @@ +--- src/fg_joystick.c.orig 2014-10-20 15:27:04.000000000 +0000 ++++ src/fg_joystick.c +@@ -46,21 +46,20 @@ + + # ifdef HAVE_USB_JS + # if defined(__NetBSD__) +-/* XXX The below hack is done until freeglut's autoconf is updated. */ +-# define HAVE_USBHID_H 1 + # ifdef HAVE_USBHID_H + # include + # else + # include + # endif ++# include + # elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + # ifdef HAVE_USBHID_H + # include + # else # include # endif ++# include # endif -# include -+# if defined(__NetBSD__) -+# include -+# else -+# include -+# endif # include /* Compatibility with older usb.h revisions */ diff --git a/graphics/freeglut/patches/patch-src_x11_fg__joystick__x11.c b/graphics/freeglut/patches/patch-src_x11_fg__joystick__x11.c new file mode 100644 index 0000000000000..f25cb0eade492 --- /dev/null +++ b/graphics/freeglut/patches/patch-src_x11_fg__joystick__x11.c @@ -0,0 +1,51 @@ +$NetBSD: patch-src_x11_fg__joystick__x11.c,v 1.1 2016/10/01 07:47:04 wiz Exp $ + +This code does not work on NetBSD, remove wrong ifdefs. + +--- src/x11/fg_joystick_x11.c.orig 2014-12-02 05:22:12.000000000 +0000 ++++ src/x11/fg_joystick_x11.c +@@ -50,7 +50,7 @@ void fgPlatformJoystickRawRead( SFG_Joys + { + int status; + +-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + int len; + + if ( joy->pJoystick.os->is_analog ) +@@ -215,7 +215,7 @@ void fgPlatformJoystickRawRead( SFG_Joys + + void fgPlatformJoystickOpen( SFG_Joystick* joy ) + { +-#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ ) ++#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) + int i = 0; + char *cp; + #endif +@@ -229,7 +229,7 @@ void fgPlatformJoystickOpen( SFG_Joystic + # endif + #endif + +-#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ ) ++#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) + for( i = 0; i < _JS_MAX_AXES; i++ ) + joy->pJoystick.os->cache_axes[ i ] = 0.0f; + +@@ -409,7 +409,7 @@ void fgPlatformJoystickOpen( SFG_Joystic + + void fgPlatformJoystickInit( SFG_Joystick *fgJoystick[], int ident ) + { +-#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ ) ++#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) + fgJoystick[ ident ]->id = ident; + fgJoystick[ ident ]->error = GL_FALSE; + +@@ -436,7 +436,7 @@ void fgPlatformJoystickInit( SFG_Joystic + + void fgPlatformJoystickClose ( int ident ) + { +-#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ ) ++#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) + if( fgJoystick[ident]->pJoystick.os ) + { + if( ! fgJoystick[ ident ]->error )