[114312] trunk/dports/gnome/gnome-session
devans at macports.org
devans at macports.org
Wed Dec 4 20:35:03 PST 2013
Revision: 114312
https://trac.macports.org/changeset/114312
Author: devans at macports.org
Date: 2013-12-04 20:35:03 -0800 (Wed, 04 Dec 2013)
Log Message:
-----------
gnome-session: tentative build fix for SL.
Modified Paths:
--------------
trunk/dports/gnome/gnome-session/Portfile
Added Paths:
-----------
trunk/dports/gnome/gnome-session/files/patch-gnome-session-check-accelerated-helper.c.diff
Modified: trunk/dports/gnome/gnome-session/Portfile
===================================================================
--- trunk/dports/gnome/gnome-session/Portfile 2013-12-05 04:19:55 UTC (rev 114311)
+++ trunk/dports/gnome/gnome-session/Portfile 2013-12-05 04:35:03 UTC (rev 114312)
@@ -43,7 +43,8 @@
port:xorg-xtrans \
port:mesa
-patchfiles patch-gnome-session-main.c.diff
+patchfiles patch-gnome-session-main.c.diff \
+ patch-gnome-session-check-accelerated-helper.c.diff
configure.cflags-append \
-Wno-format-nonliteral
Added: trunk/dports/gnome/gnome-session/files/patch-gnome-session-check-accelerated-helper.c.diff
===================================================================
--- trunk/dports/gnome/gnome-session/files/patch-gnome-session-check-accelerated-helper.c.diff (rev 0)
+++ trunk/dports/gnome/gnome-session/files/patch-gnome-session-check-accelerated-helper.c.diff 2013-12-05 04:35:03 UTC (rev 114312)
@@ -0,0 +1,79 @@
+diff -ur tools.orig/gnome-session-check-accelerated-helper.c tools/gnome-session-check-accelerated-helper.c
+--- tools.orig/gnome-session-check-accelerated-helper.c 2013-03-05 19:59:51.000000000 -0800
++++ tools/gnome-session-check-accelerated-helper.c 2013-12-04 20:17:43.000000000 -0800
+@@ -84,6 +84,75 @@
+ #include <GL/gl.h>
+ #include <GL/glx.h>
+
++#ifdef __APPLE__
++#include <Availability.h>
++#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
++
++static const int line_size = 128;
++
++static ssize_t
++getdelim (char **lineptr, size_t *n, int delim, FILE *stream);
++
++static ssize_t
++getline (char **lineptr, size_t *n, FILE *stream);
++
++static ssize_t
++getdelim (char **lineptr, size_t *n, int delim, FILE *stream)
++{
++ int indx = 0;
++ int c;
++
++ /* Sanity checks. */
++ if (lineptr == NULL || n == NULL || stream == NULL)
++ return -1;
++
++ /* Allocate the line the first time. */
++ if (*lineptr == NULL)
++ {
++ *lineptr = malloc (line_size);
++ if (*lineptr == NULL)
++ return -1;
++ *n = line_size;
++ }
++
++ /* Clear the line. */
++ memset (*lineptr, '\0', *n);
++
++ while ((c = getc (stream)) != EOF)
++ {
++ /* Check if more memory is needed. */
++ if (indx >= *n)
++ {
++ *lineptr = realloc (*lineptr, *n + line_size);
++ if (*lineptr == NULL)
++ {
++ return -1;
++ }
++ /* Clear the rest of the line. */
++ memset(*lineptr + *n, '\0', line_size);
++ *n += line_size;
++ }
++
++ /* Push the result in the line. */
++ (*lineptr)[indx++] = c;
++
++ /* Bail out. */
++ if (c == delim)
++ {
++ break;
++ }
++ }
++ return (c == EOF) ? -1 : indx;
++}
++
++static ssize_t
++getline (char **lineptr, size_t *n, FILE *stream)
++{
++ return getdelim (lineptr, n, '\n', stream);
++}
++#endif
++#endif
++
+ #define SIZE_UNSET 0
+ #define SIZE_ERROR -1
+ static int max_texture_size = SIZE_UNSET;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131204/6d162161/attachment.html>
More information about the macports-changes
mailing list