media-libs/allegro: Patch around GLX_RGBA_FLOAT_BIT issue in 4.4.2
authorJames Le Cuirot <chewi@gentoo.org>
Mon, 30 Sep 2019 21:00:18 +0000 (22:00 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Mon, 30 Sep 2019 21:33:46 +0000 (22:33 +0100)
Thanks to Pablo Yanez Trujillo for the patch.

Closes: https://bugs.gentoo.org/672858
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
media-libs/allegro/allegro-4.4.2-r2.ebuild
media-libs/allegro/files/allegro-4.4.2-GLX_RGBA_FLOAT_BIT.patch [new file with mode: 0644]

index 5797f5829b3f51d5a34e47284d2e23321d88da75..dba29ec2a94dfb33b4e91088f6cc0f3eb7dc1fb0 100644 (file)
@@ -46,6 +46,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-rpath.patch
        "${FILESDIR}"/${P}-Werror-format-security.patch # bug 540470
        "${FILESDIR}"/${P}-glibc228.patch               # bug 670781
+       "${FILESDIR}"/${P}-GLX_RGBA_FLOAT_BIT.patch     # bug 672858
 )
 
 src_prepare() {
diff --git a/media-libs/allegro/files/allegro-4.4.2-GLX_RGBA_FLOAT_BIT.patch b/media-libs/allegro/files/allegro-4.4.2-GLX_RGBA_FLOAT_BIT.patch
new file mode 100644 (file)
index 0000000..54ff4f9
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/addons/allegrogl/src/x.c 2019-01-27 20:35:26.209055856 +0100
++++ b/addons/allegrogl/src/x.c 2019-01-27 20:38:54.135570782 +0100
+@@ -650,7 +650,7 @@
+               return -1;
+       }
+-      if (!(render_type & GLX_RGBA_BIT) && !(render_type & GLX_RGBA_FLOAT_BIT)) {
++      if (!(render_type & GLX_RGBA_BIT) && !(render_type & GLX_RGBA_FLOAT_BIT_ARB)) {
+               TRACE(PREFIX_I "decode_fbconfig: Not RGBA mode\n");
+               return -1;
+       }
+@@ -674,7 +674,7 @@
+       /* Floating-point depth is not supported as glx extension (yet). */
+       i->float_depth = 0;
+-      i->float_color = (render_type & GLX_RGBA_FLOAT_BIT);
++      i->float_color = (render_type & GLX_RGBA_FLOAT_BIT_ARB);
+       v = glXGetVisualFromFBConfig(_xwin.display, fbc);
+       if (!v) {