summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2019-11-26 17:40:06 -0500
committerMatt Turner <mattst88@gentoo.org>2019-11-26 17:45:31 -0500
commit4c03f78243963efce16ce414767f32d32c267026 (patch)
tree760f4a4d1d59bf7ddd68cbf11e1ae6ec2a05b1c2 /media-libs/freeglut
parentdev-libs/libinput: Drop old versions (diff)
downloadgentoo-4c03f78243963efce16ce414767f32d32c267026.tar.gz
gentoo-4c03f78243963efce16ce414767f32d32c267026.tar.bz2
gentoo-4c03f78243963efce16ce414767f32d32c267026.zip
media-libs/freeglut: Drop old versions
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs/freeglut')
-rw-r--r--media-libs/freeglut/Manifest1
-rw-r--r--media-libs/freeglut/files/freeglut-3.0.0-bsd-usb-joystick.patch753
-rw-r--r--media-libs/freeglut/files/freeglut-3.0.0-drop-unnecessary-x11-libs.patch30
-rw-r--r--media-libs/freeglut/freeglut-3.0.0.ebuild44
4 files changed, 0 insertions, 828 deletions
diff --git a/media-libs/freeglut/Manifest b/media-libs/freeglut/Manifest
index 395bdc3311a6..65e5ed2d1602 100644
--- a/media-libs/freeglut/Manifest
+++ b/media-libs/freeglut/Manifest
@@ -1,2 +1 @@
-DIST freeglut-3.0.0.tar.gz 419095 BLAKE2B 6065044fb2816ddfebd363189cdb897e00fa433d79c09f5a705b80ff730e1312158ed5db8d7a2cbfc2ddac0d0a9400300c5c245d967c33c937da11303fc316de SHA512 9c45d5b203b26a7ff92331b3e080a48e806c92fbbe7c65d9262dd18c39cd6efdad8a795a80f499a2d23df84b4909dbd7c1bab20d7dd3555d3d88782ce9dd15b0
DIST freeglut-3.2.1.tar.gz 440228 BLAKE2B ed8a4b2361416cfee5540350ee50c32a56e5ea75d6834c677c5cec676967a04e13b2adf3da1cc9a3a2c73fbc6147b3b0bc91953a6edf1e35ce8c933eeff6f97a SHA512 aced4bbcd36269ce6f4ee1982e0f9e3fffbf18c94f785d3215ac9f4809b992e166c7ada496ed6174e13d77c0f7ef3ca4c57d8a282e96cbbe6ff086339ade3b08
diff --git a/media-libs/freeglut/files/freeglut-3.0.0-bsd-usb-joystick.patch b/media-libs/freeglut/files/freeglut-3.0.0-bsd-usb-joystick.patch
deleted file mode 100644
index 505b3467ec46..000000000000
--- a/media-libs/freeglut/files/freeglut-3.0.0-bsd-usb-joystick.patch
+++ /dev/null
@@ -1,753 +0,0 @@
-From 5908c36a4a3964cdc8db5c7bfdfd4381ec0996df Mon Sep 17 00:00:00 2001
-From: dcnieho <dcnieho@7f0cb862-5218-0410-a997-914c9d46530a>
-Date: Wed, 12 Jul 2017 20:44:35 +0000
-Subject: [PATCH] Fix build on NetBSD.
-
-(cherry picked from commit 06e1d815cf9abda49b845754ff420734446eb95b)
-
-(cherry picked from commit c4294ad59093c27159ea6028d33e3c9581df5354)
-
-git-svn-id: http://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1829 7f0cb862-5218-0410-a997-914c9d46530a
----
- src/fg_joystick.c | 5 ++---
- src/x11/fg_joystick_x11.c | 10 +++++-----
- 2 files changed, 7 insertions(+), 8 deletions(-)
-
-diff --git a/src/fg_joystick.c b/src/fg_joystick.c
-index 6f6771c..b73d7e7 100644
---- a/src/fg_joystick.c
-+++ b/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 <usbhid.h>
- # else
- # include <usb.h>
- # endif
-+# include <dev/usb/usb.h>
- # elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- # ifdef HAVE_USBHID_H
- # include <usbhid.h>
- # else
- # include <libusbhid.h>
- # endif
-+# include <legacy/dev/usb/usb.h>
- # endif
--# include <legacy/dev/usb/usb.h>
- # include <dev/usb/usbhid.h>
-
- /* Compatibility with older usb.h revisions */
-diff --git a/src/x11/fg_joystick_x11.c b/src/x11/fg_joystick_x11.c
-index a37388b..04bc373 100644
---- a/src/x11/fg_joystick_x11.c
-+++ b/src/x11/fg_joystick_x11.c
-@@ -50,7 +50,7 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
- {
- 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_Joystick* joy, int* buttons, float* axes )
-
- 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_Joystick* joy )
- # 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_Joystick* joy )
-
- 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_Joystick *fgJoystick[], int ident )
-
- 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 )
---
-2.19.2
-
-From c0f0f1e0903a5dd848825db0fe1f01d5db37c4e1 Mon Sep 17 00:00:00 2001
-From: dcnieho <dcnieho@7f0cb862-5218-0410-a997-914c9d46530a>
-Date: Wed, 12 Jul 2017 20:44:47 +0000
-Subject: [PATCH] some whitespace cleanup
-
-(cherry picked from commit 2dd5aa4aa1b5c19392f9abd00e0f6893907df205)
-
-git-svn-id: http://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1830 7f0cb862-5218-0410-a997-914c9d46530a
----
- src/fg_init.c | 32 ++--
- src/fg_joystick.c | 8 +-
- src/fg_main.c | 14 +-
- src/freeglutdll.def.in | 312 +++++++++++++++++-----------------
- src/mswin/fg_joystick_mswin.c | 2 +-
- src/mswin/fg_main_mswin.c | 160 ++++++++---------
- 6 files changed, 264 insertions(+), 264 deletions(-)
-
-diff --git a/src/fg_joystick.c b/src/fg_joystick.c
-index b73d7e7..2f4f6ed 100644
---- a/src/fg_joystick.c
-+++ b/src/fg_joystick.c
-@@ -581,7 +581,7 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
-
- void fgPlatformJoystickOpen( SFG_Joystick* joy )
- {
-- int i = 0;
-+ int i = 0;
- OSStatus err;
-
- /* XXX FIXME: get joystick name in Mac */
-@@ -856,7 +856,7 @@ static void fghJoystickOpen( SFG_Joystick* joy )
- joy->num_axes = joy->num_buttons = 0;
- joy->name[ 0 ] = '\0';
-
-- fgPlatformJoystickOpen ( joy );
-+ fgPlatformJoystickOpen ( joy );
-
- }
-
-@@ -878,7 +878,7 @@ static void fghJoystickInit( int ident )
- fgJoystick[ ident ]->num_axes = fgJoystick[ ident ]->num_buttons = 0;
- fgJoystick[ ident ]->error = GL_TRUE;
-
-- fgPlatformJoystickInit( fgJoystick, ident );
-+ fgPlatformJoystickInit( fgJoystick, ident );
-
- fghJoystickOpen( fgJoystick[ ident ] );
- }
-@@ -906,7 +906,7 @@ void fgJoystickClose( void )
- {
- if( fgJoystick[ ident ] )
- {
-- fgPlatformJoystickClose ( ident );
-+ fgPlatformJoystickClose ( ident );
-
- free( fgJoystick[ ident ] );
- fgJoystick[ ident ] = NULL;
---
-2.19.2
-
-From 6096caf2468ad4557968b9156ea9fcab2efb3fd1 Mon Sep 17 00:00:00 2001
-From: dcnieho <dcnieho@7f0cb862-5218-0410-a997-914c9d46530a>
-Date: Wed, 12 Jul 2017 20:45:07 +0000
-Subject: [PATCH] moved static variables and functions that should not have
- stuck behind in fg_joystick.c, but should have been in fg_joystick_x11.c
-
-(cherry picked from commit 0d98472817921dc95d070f13bba59b72d792a7b2)
-
-git-svn-id: http://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1832 7f0cb862-5218-0410-a997-914c9d46530a
----
- src/fg_joystick.c | 173 ----------------------------------
- src/x11/fg_joystick_x11.c | 190 +++++++++++++++++++++++++++++++++++++-
- 2 files changed, 185 insertions(+), 178 deletions(-)
-
-diff --git a/src/fg_joystick.c b/src/fg_joystick.c
-index 2f4f6ed..e548c04 100644
---- a/src/fg_joystick.c
-+++ b/src/fg_joystick.c
-@@ -68,8 +68,6 @@
- # endif
- # endif
-
--static int hatmap_x[9] = { 0, 0, 1, 1, 1, 0, -1, -1, -1 };
--static int hatmap_y[9] = { 0, 1, 1, 0, -1, -1, -1, 0, 1 };
- struct os_specific_s {
- char fname [128 ];
- int fd;
-@@ -98,178 +96,7 @@ struct os_specific_s {
- # define UHIDDEV "/dev/uhid"
- # define AJSDEV "/dev/joy"
-
--# ifdef HAVE_USB_JS
--/*
-- * fghJoystickFindUSBdev (and its helper, fghJoystickWalkUSBdev) try to locate
-- * the full name of a USB device. If /dev/usbN isn't readable, we punt and
-- * return the uhidN device name. We warn the user of this situation once.
-- */
--static char *fghJoystickWalkUSBdev(int f, char *dev, char *out, int outlen)
--{
-- struct usb_device_info di;
-- int i, a;
-- char *cp;
--
-- for (a = 1; a < USB_MAX_DEVICES; a++) {
-- di.udi_addr = a;
-- if (ioctl(f, USB_DEVICEINFO, &di) != 0)
-- return NULL;
-- for (i = 0; i < USB_MAX_DEVNAMES; i++)
-- if (di.udi_devnames[i][0] &&
-- strcmp(di.udi_devnames[i], dev) == 0) {
-- cp = calloc( 1, strlen(di.udi_vendor) + strlen(di.udi_product) + 2);
-- strcpy(cp, di.udi_vendor);
-- strcat(cp, " ");
-- strcat(cp, di.udi_product);
-- strncpy(out, cp, outlen - 1);
-- out[outlen - 1] = 0;
-- free( cp );
-- return out;
-- }
-- }
-- return NULL;
--}
--
--static int fghJoystickFindUSBdev(char *name, char *out, int outlen)
--{
-- int i, f;
-- char buf[50];
-- char *cp;
-- static int protection_warned = 0;
--
-- for (i = 0; i < 16; i++) {
-- snprintf(buf, sizeof(buf), "%s%d", USBDEV, i);
-- f = open(buf, O_RDONLY);
-- if (f >= 0) {
-- cp = fghJoystickWalkUSBdev(f, name, out, outlen);
-- close(f);
-- if (cp)
-- return 1;
-- }
-- else if (errno == EACCES) {
-- if (!protection_warned) {
-- fgWarning ( "Can't open %s for read!", buf );
-- protection_warned = 1;
-- }
-- }
-- }
-- return 0;
--}
-
--static int fghJoystickInitializeHID(struct os_specific_s *os,
-- int *num_axes, int *num_buttons)
--{
-- int size, is_joystick;
--# ifdef HAVE_USBHID_H
-- int report_id = 0;
--# endif
-- struct hid_data *d;
-- struct hid_item h;
-- report_desc_t rd;
--
-- if ( ( rd = hid_get_report_desc( os->fd ) ) == 0 )
-- {
-- fgWarning ( "error: %s: %s", os->fname, strerror( errno ) );
-- return FALSE;
-- }
--
-- os->hids = NULL;
--
--# ifdef HAVE_USBHID_H
-- if( ioctl( os->fd, USB_GET_REPORT_ID, &report_id ) < 0)
-- {
-- /*** XXX {report_id} may not be the right variable? ***/
-- fgWarning ( "error: %s%d: %s", UHIDDEV, report_id, strerror( errno ) );
-- return FALSE;
-- }
--
-- size = hid_report_size( rd, hid_input, report_id );
--# else
-- size = hid_report_size( rd, 0, hid_input );
--# endif
-- os->hid_data_buf = calloc( 1, size );
-- os->hid_dlen = size;
--
-- is_joystick = 0;
--# ifdef HAVE_USBHID_H
-- d = hid_start_parse( rd, 1 << hid_input, report_id );
--# else
-- d = hid_start_parse( rd, 1 << hid_input );
--# endif
-- while( hid_get_item( d, &h ) )
-- {
-- int usage, page, interesting_hid;
--
-- page = HID_PAGE( h.usage );
-- usage = HID_USAGE( h.usage );
--
-- /* This test is somewhat too simplistic, but this is how MicroSoft
-- * does, so I guess it works for all joysticks/game pads. */
-- is_joystick = is_joystick ||
-- ( h.kind == hid_collection &&
-- page == HUP_GENERIC_DESKTOP &&
-- ( usage == HUG_JOYSTICK || usage == HUG_GAME_PAD ) );
--
-- if( h.kind != hid_input )
-- continue;
--
-- if( !is_joystick )
-- continue;
--
-- interesting_hid = TRUE;
-- if( page == HUP_GENERIC_DESKTOP )
-- {
-- switch( usage )
-- {
-- case HUG_X:
-- case HUG_RX:
-- case HUG_Y:
-- case HUG_RY:
-- case HUG_Z:
-- case HUG_RZ:
-- case HUG_SLIDER:
-- if( *num_axes < _JS_MAX_AXES )
-- {
-- os->axes_usage[ *num_axes ] = usage;
-- ( *num_axes )++;
-- }
-- break;
-- case HUG_HAT_SWITCH:
-- /* Allocate two axes for a hat */
-- if( *num_axes + 1 < _JS_MAX_AXES )
-- {
-- os->axes_usage[ *num_axes ] = usage;
-- (*num_axes)++;
-- os->axes_usage[ *num_axes ] = usage;
-- (*num_axes)++;
-- }
-- break;
-- default:
-- interesting_hid = FALSE;
-- break;
-- }
-- }
-- else if( page == HUP_BUTTON )
-- {
-- interesting_hid = ( usage > 0 ) &&
-- ( usage <= _JS_MAX_BUTTONS );
--
-- if( interesting_hid && usage - 1 > *num_buttons )
-- *num_buttons = usage - 1;
-- }
--
-- if( interesting_hid )
-- {
-- h.next = os->hids;
-- os->hids = calloc( 1, sizeof ( struct hid_item ) );
-- *os->hids = h;
-- }
-- }
-- hid_end_parse( d );
--
-- return os->hids != NULL;
--}
--# endif
- #endif
-
- /*
-diff --git a/src/x11/fg_joystick_x11.c b/src/x11/fg_joystick_x11.c
-index 04bc373..30ad4b5 100644
---- a/src/x11/fg_joystick_x11.c
-+++ b/src/x11/fg_joystick_x11.c
-@@ -42,8 +42,188 @@
- #include <fcntl.h>
-
-
-+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-+
-+static int hatmap_x[9] = {0, 0, 1, 1, 1, 0, -1, -1, -1};
-+static int hatmap_y[9] = {0, 1, 1, 0, -1, -1, -1, 0, 1};
-+
-+# ifdef HAVE_USB_JS
-+/*
-+* fghJoystickFindUSBdev (and its helper, fghJoystickWalkUSBdev) try to locate
-+* the full name of a USB device. If /dev/usbN isn't readable, we punt and
-+* return the uhidN device name. We warn the user of this situation once.
-+*/
-+static char *fghJoystickWalkUSBdev(int f, char *dev, char *out, int outlen)
-+{
-+ struct usb_device_info di;
-+ int i, a;
-+ char *cp;
-+
-+ for (a = 1; a < USB_MAX_DEVICES; a++) {
-+ di.udi_addr = a;
-+ if (ioctl(f, USB_DEVICEINFO, &di) != 0)
-+ return NULL;
-+ for (i = 0; i < USB_MAX_DEVNAMES; i++)
-+ if (di.udi_devnames[i][0] &&
-+ strcmp(di.udi_devnames[i], dev) == 0) {
-+ cp = calloc(1, strlen(di.udi_vendor) + strlen(di.udi_product) + 2);
-+ strcpy(cp, di.udi_vendor);
-+ strcat(cp, " ");
-+ strcat(cp, di.udi_product);
-+ strncpy(out, cp, outlen - 1);
-+ out[outlen - 1] = 0;
-+ free(cp);
-+ return out;
-+ }
-+ }
-+ return NULL;
-+}
-+
-+static int fghJoystickFindUSBdev(char *name, char *out, int outlen)
-+{
-+ int i, f;
-+ char buf[50];
-+ char *cp;
-+ static int protection_warned = 0;
-+
-+ for (i = 0; i < 16; i++) {
-+ snprintf(buf, sizeof(buf), "%s%d", USBDEV, i);
-+ f = open(buf, O_RDONLY);
-+ if (f >= 0) {
-+ cp = fghJoystickWalkUSBdev(f, name, out, outlen);
-+ close(f);
-+ if (cp)
-+ return 1;
-+ }
-+ else if (errno == EACCES) {
-+ if (!protection_warned) {
-+ fgWarning("Can't open %s for read!", buf);
-+ protection_warned = 1;
-+ }
-+ }
-+ }
-+ return 0;
-+}
-+
-+static int fghJoystickInitializeHID(struct os_specific_s *os,
-+ int *num_axes, int *num_buttons)
-+{
-+ int size, is_joystick;
-+# ifdef HAVE_USBHID_H
-+ int report_id = 0;
-+# endif
-+ struct hid_data *d;
-+ struct hid_item h;
-+ report_desc_t rd;
-+
-+ if ((rd = hid_get_report_desc(os->fd)) == 0)
-+ {
-+ fgWarning("error: %s: %s", os->fname, strerror(errno));
-+ return FALSE;
-+ }
-+
-+ os->hids = NULL;
-+
-+# ifdef HAVE_USBHID_H
-+ if (ioctl(os->fd, USB_GET_REPORT_ID, &report_id) < 0)
-+ {
-+ /*** XXX {report_id} may not be the right variable? ***/
-+ fgWarning("error: %s%d: %s", UHIDDEV, report_id, strerror(errno));
-+ return FALSE;
-+ }
-+
-+ size = hid_report_size(rd, hid_input, report_id);
-+# else
-+ size = hid_report_size(rd, 0, hid_input);
-+# endif
-+ os->hid_data_buf = calloc(1, size);
-+ os->hid_dlen = size;
-+
-+ is_joystick = 0;
-+# ifdef HAVE_USBHID_H
-+ d = hid_start_parse(rd, 1 << hid_input, report_id);
-+# else
-+ d = hid_start_parse(rd, 1 << hid_input);
-+# endif
-+ while (hid_get_item(d, &h))
-+ {
-+ int usage, page, interesting_hid;
-+
-+ page = HID_PAGE(h.usage);
-+ usage = HID_USAGE(h.usage);
-+
-+ /* This test is somewhat too simplistic, but this is how MicroSoft
-+ * does, so I guess it works for all joysticks/game pads. */
-+ is_joystick = is_joystick ||
-+ (h.kind == hid_collection &&
-+ page == HUP_GENERIC_DESKTOP &&
-+ (usage == HUG_JOYSTICK || usage == HUG_GAME_PAD));
-+
-+ if (h.kind != hid_input)
-+ continue;
-+
-+ if (!is_joystick)
-+ continue;
-+
-+ interesting_hid = TRUE;
-+ if (page == HUP_GENERIC_DESKTOP)
-+ {
-+ switch (usage)
-+ {
-+ case HUG_X:
-+ case HUG_RX:
-+ case HUG_Y:
-+ case HUG_RY:
-+ case HUG_Z:
-+ case HUG_RZ:
-+ case HUG_SLIDER:
-+ if (*num_axes < _JS_MAX_AXES)
-+ {
-+ os->axes_usage[*num_axes] = usage;
-+ (*num_axes)++;
-+ }
-+ break;
-+ case HUG_HAT_SWITCH:
-+ /* Allocate two axes for a hat */
-+ if (*num_axes + 1 < _JS_MAX_AXES)
-+ {
-+ os->axes_usage[*num_axes] = usage;
-+ (*num_axes)++;
-+ os->axes_usage[*num_axes] = usage;
-+ (*num_axes)++;
-+ }
-+ break;
-+ default:
-+ interesting_hid = FALSE;
-+ break;
-+ }
-+ }
-+ else if (page == HUP_BUTTON)
-+ {
-+ interesting_hid = (usage > 0) &&
-+ (usage <= _JS_MAX_BUTTONS);
-+
-+ if (interesting_hid && usage - 1 > *num_buttons)
-+ *num_buttons = usage - 1;
-+ }
-+
-+ if (interesting_hid)
-+ {
-+ h.next = os->hids;
-+ os->hids = calloc(1, sizeof(struct hid_item));
-+ *os->hids = h;
-+ }
-+ }
-+ hid_end_parse(d);
-+
-+ return os->hids != NULL;
-+}
-+# endif
-+#endif
-+
-+
- /*this should be defined in a header file */
--#define MAX_NUM_JOYSTICKS 2
-+#define MAX_NUM_JOYSTICKS 2
- extern SFG_Joystick *fgJoystick [ MAX_NUM_JOYSTICKS ];
-
- void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
-@@ -216,15 +396,15 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
- void fgPlatformJoystickOpen( SFG_Joystick* joy )
- {
- #if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__)
-- int i = 0;
-+ int i = 0;
- char *cp;
- #endif
- #ifdef JS_NEW
- unsigned char u;
-- int i=0;
-+ int i=0;
- #else
- # if defined( __linux__ ) || TARGET_HOST_SOLARIS
-- int i = 0;
-+ int i = 0;
- int counter = 0;
- # endif
- #endif
-@@ -448,7 +628,7 @@ void fgPlatformJoystickClose ( int ident )
- free( fgJoystick[ ident ]->pJoystick.os->hid_data_buf );
- #endif
- free( fgJoystick[ident]->pJoystick.os );
-- }
-+ }
- #endif
-
- if( ! fgJoystick[ident]->error )
---
-2.19.2
-
-From f310b56bb6f93e255cf880c8970c794e0f2efc8d Mon Sep 17 00:00:00 2001
-From: dcnieho <dcnieho@7f0cb862-5218-0410-a997-914c9d46530a>
-Date: Mon, 31 Jul 2017 20:49:26 +0000
-Subject: [PATCH] Fix build on NetBSD.
-
-(cherry picked from commit 1236c7644508227b616e97e29e123b34257e36d1)
-
-git-svn-id: http://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1835 7f0cb862-5218-0410-a997-914c9d46530a
----
- src/fg_joystick.c | 59 -------------------------------------
- src/x11/fg_joystick_x11.c | 61 +++++++++++++++++++++++++++++++++++++++
- 2 files changed, 61 insertions(+), 59 deletions(-)
-
-diff --git a/src/fg_joystick.c b/src/fg_joystick.c
-index e548c04..b24476a 100644
---- a/src/fg_joystick.c
-+++ b/src/fg_joystick.c
-@@ -40,65 +40,6 @@
- #define JS_TRUE 1
- #define JS_FALSE 0
-
--/* BSD defines from "jsBSD.cxx" around lines 42-270 */
--
--#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
--
--# ifdef HAVE_USB_JS
--# if defined(__NetBSD__)
--# ifdef HAVE_USBHID_H
--# include <usbhid.h>
--# else
--# include <usb.h>
--# endif
--# include <dev/usb/usb.h>
--# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
--# ifdef HAVE_USBHID_H
--# include <usbhid.h>
--# else
--# include <libusbhid.h>
--# endif
--# include <legacy/dev/usb/usb.h>
--# endif
--# include <dev/usb/usbhid.h>
--
--/* Compatibility with older usb.h revisions */
--# if !defined(USB_MAX_DEVNAMES) && defined(MAXDEVNAMES)
--# define USB_MAX_DEVNAMES MAXDEVNAMES
--# endif
--# endif
--
--struct os_specific_s {
-- char fname [128 ];
-- int fd;
-- int is_analog;
-- /* The following structure members are specific to analog joysticks */
-- struct joystick ajs;
--# ifdef HAVE_USB_JS
-- /* The following structure members are specific to USB joysticks */
-- struct hid_item *hids;
-- int hid_dlen;
-- int hid_offset;
-- char *hid_data_buf;
-- int axes_usage [ _JS_MAX_AXES ];
--# endif
-- /* We keep button and axes state ourselves, as they might not be updated
-- * on every read of a USB device
-- */
-- int cache_buttons;
-- float cache_axes [ _JS_MAX_AXES ];
--};
--
--/* Idents lower than USB_IDENT_OFFSET are for analog joysticks. */
--# define USB_IDENT_OFFSET 2
--
--# define USBDEV "/dev/usb"
--# define UHIDDEV "/dev/uhid"
--# define AJSDEV "/dev/joy"
--
--
--#endif
--
- /*
- * Functions associated with the "jsJoystick" class in PLIB
- */
-diff --git a/src/x11/fg_joystick_x11.c b/src/x11/fg_joystick_x11.c
-index 30ad4b5..8c75bbe 100644
---- a/src/x11/fg_joystick_x11.c
-+++ b/src/x11/fg_joystick_x11.c
-@@ -42,8 +42,68 @@
- #include <fcntl.h>
-
-
-+/* BSD defines from "jsBSD.cxx" around lines 42-270 */
-+
-+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-+
-+# ifdef HAVE_USB_JS
-+# if defined(__NetBSD__)
-+# ifdef HAVE_USBHID_H
-+# include <usbhid.h>
-+# else
-+# include <usb.h>
-+# endif
-+# include <dev/usb/usb.h>
-+# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-+# ifdef HAVE_USBHID_H
-+# include <usbhid.h>
-+# else
-+# include <libusbhid.h>
-+# endif
-+# include <legacy/dev/usb/usb.h>
-+# endif
-+# include <dev/usb/usbhid.h>
-+
-+/* Compatibility with older usb.h revisions */
-+# if !defined(USB_MAX_DEVNAMES) && defined(MAXDEVNAMES)
-+# define USB_MAX_DEVNAMES MAXDEVNAMES
-+# endif
-+# endif
-+
-+struct os_specific_s {
-+ char fname [128 ];
-+ int fd;
-+ int is_analog;
-+ /* The following structure members are specific to analog joysticks */
-+ struct joystick ajs;
-+# ifdef HAVE_USB_JS
-+ /* The following structure members are specific to USB joysticks */
-+ struct hid_item *hids;
-+ int hid_dlen;
-+ int hid_offset;
-+ char *hid_data_buf;
-+ int axes_usage [ _JS_MAX_AXES ];
-+# endif
-+ /* We keep button and axes state ourselves, as they might not be updated
-+ * on every read of a USB device
-+ */
-+ int cache_buttons;
-+ float cache_axes [ _JS_MAX_AXES ];
-+};
-+
-+/* Idents lower than USB_IDENT_OFFSET are for analog joysticks. */
-+# define USB_IDENT_OFFSET 2
-+
-+# define USBDEV "/dev/usb"
-+# define UHIDDEV "/dev/uhid"
-+# define AJSDEV "/dev/joy"
-+
-+
-+#endif
-+
- #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-
-+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- static int hatmap_x[9] = {0, 0, 1, 1, 1, 0, -1, -1, -1};
- static int hatmap_y[9] = {0, 1, 1, 0, -1, -1, -1, 0, 1};
-
-@@ -104,6 +164,7 @@ static int fghJoystickFindUSBdev(char *name, char *out, int outlen)
- }
- return 0;
- }
-+#endif
-
- static int fghJoystickInitializeHID(struct os_specific_s *os,
- int *num_axes, int *num_buttons)
---
-2.19.2
-
diff --git a/media-libs/freeglut/files/freeglut-3.0.0-drop-unnecessary-x11-libs.patch b/media-libs/freeglut/files/freeglut-3.0.0-drop-unnecessary-x11-libs.patch
deleted file mode 100644
index 761a6bfce7c2..000000000000
--- a/media-libs/freeglut/files/freeglut-3.0.0-drop-unnecessary-x11-libs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From bbdaa724ef363e34bd19fb2308739e59a9e8ddc8 Mon Sep 17 00:00:00 2001
-From: jtsiomb <jtsiomb@7f0cb862-5218-0410-a997-914c9d46530a>
-Date: Tue, 26 Mar 2019 18:55:42 +0000
-Subject: [PATCH] Applied Christian's change to drop unnecessary dependency to
- X11 libraries we don't actually use, by asking cmake to link with X11_X11_LIB
- instead of the catch-all X11_LIBRARIES.
-
-git-svn-id: http://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1845 7f0cb862-5218-0410-a997-914c9d46530a
----
- CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d1c20e8..e324a02 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -312,8 +312,8 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
- INCLUDE(CheckIncludeFiles)
- IF(UNIX AND NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND))
- FIND_PACKAGE(X11 REQUIRED)
-- INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
-- LIST(APPEND LIBS ${X11_LIBRARIES})
-+ INCLUDE_DIRECTORIES(${X11_X11_INCLUDE_PATH})
-+ LIST(APPEND LIBS ${X11_X11_LIB})
- IF(X11_Xrandr_FOUND)
- SET(HAVE_X11_EXTENSIONS_XRANDR_H TRUE)
- LIST(APPEND LIBS ${X11_Xrandr_LIB})
---
-2.19.2
-
diff --git a/media-libs/freeglut/freeglut-3.0.0.ebuild b/media-libs/freeglut/freeglut-3.0.0.ebuild
deleted file mode 100644
index 1ac3aea844d6..000000000000
--- a/media-libs/freeglut/freeglut-3.0.0.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-multilib
-
-DESCRIPTION="Completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library"
-HOMEPAGE="http://freeglut.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-IUSE="debug static-libs"
-
-# enabling GLES support seems to cause build failures
-RDEPEND=">=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
- >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]"
-# gles? ( media-libs/mesa[gles1,${MULTILIB_USEDEP}] )
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- x11-base/xorg-proto"
-
-HTML_DOCS=( doc/. )
-
-PATCHES=(
- "${FILESDIR}"/${P}-drop-unnecessary-x11-libs.patch
- "${FILESDIR}"/${P}-bsd-usb-joystick.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- "-DFREEGLUT_GLES=OFF"
- "-DFREEGLUT_BUILD_STATIC_LIBS=$(usex static-libs ON OFF)"
- )
-# $(cmake-utils_use gles FREEGLUT_GLES)
- cmake-multilib_src_configure
-}