Ticket #42886: patch-gildas-gtk-quartz.diff

File patch-gildas-gtk-quartz.diff, 3.0 KB (added by seanfarley (Sean Farley), 11 years ago)

compile with gtk2+quartz; fails to run

  • admin/Makefile.def

    # HG changeset patch
    # User Sean Farley <sean.michael.farley@gmail.com>
    # Date 1397849193 18000
    #      Fri Apr 18 14:26:33 2014 -0500
    # Node ID 436da9915ef75995539303661dc8a84ce6885cea
    # Parent  5eceb5b8043a7a763ac0c1e18fbac272477670f5
    gtk: try to use quartz
    
    diff --git a/admin/Makefile.def b/admin/Makefile.def
    a b ifeq ($(GAG_USE_XML),yes) 
    554554else
    555555  GUI_LIBS =
    556556  GUI_SYS_LIBS =
    557557  ifeq ($(GAG_USE_GTK),yes)
    558558    ifndef GTK_CFLAGS
    559       GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0 gthread-2.0)
     559      GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0 gthread-2.0 gdk-quartz-2.0)
    560560    endif
    561561    ifndef GTK_LIBS
    562       GTK_LIBS = $(shell pkg-config --libs gtk+-2.0 gthread-2.0)
     562      GTK_LIBS = $(shell pkg-config --libs gtk+-2.0 gthread-2.0 gdk-quartz-2.0)
    563563    endif
    564564 
    565565    GUI_DIRS += ggtk
    566566    GUI_LIBS += -lggtk
    567567    GUI_SYS_LIBS += $(GTK_LIBS)
  • kernel/lib/ggtk/Makefile

    diff --git a/kernel/lib/ggtk/Makefile b/kernel/lib/ggtk/Makefile
    a b LIB_C_OBJECTS = gtk-dialog.o gtk-menu.o  
    1717# hsvcontrol.o
    1818
    1919#LIB_EXPORTS = dialog.h xm-menu.h hsvcontrol.h
    2020
    2121#LOCAL_CFLAGS = -I.. -DGAG_USE_CAIRO
    22 LOCAL_CFLAGS = -I.. $(GTK_CFLAGS)
     22LOCAL_CFLAGS = -I.. $(GTK_CFLAGS) -x objective-c
    2323
    2424# avoid make depend on GTK
    2525depend: LOCAL_CFLAGS = -I..
    2626
    2727LIB_DEPENDS  = -lgtv -lggui -lgcore -lgsys
  • kernel/lib/ggtk/gtk-menu.c

    diff --git a/kernel/lib/ggtk/gtk-menu.c b/kernel/lib/ggtk/gtk-menu.c
    a b  
    55#include "gcore/glaunch.h"
    66
    77#include <stdio.h>
    88#include <stdlib.h>
    99#include <string.h>
     10
    1011#ifndef WIN32
    1112#include <unistd.h>
    1213#endif /* WIN32 */
     14
    1315#include <gtk/gtk.h>
    14 #ifndef WIN32
    15 #include <gdk/gdkx.h>
    16 #define GGTK_PATH_MAX PATH_MAX
    17 #else /* WIN32 */
    18 #include <gdk/gdkwin32.h>
    19 #define GGTK_PATH_MAX MAX_PATH
    20 #define strdup _strdup
     16
     17#ifdef WIN32
     18  #include <gdk/gdkwin32.h>
     19  #define GGTK_PATH_MAX MAX_PATH
     20  #define strdup _strdup
     21#elif defined(GDK_WINDOWING_X11)
     22  #include <gdk/gdkx.h>
     23  #define GGTK_PATH_MAX PATH_MAX
     24#elif defined(GDK_WINDOWING_QUARTZ)
     25  #include <gdk/gdkquartz.h>
     26  #define GGTK_PATH_MAX PATH_MAX
    2127#endif /* WIN32 */
    2228
    2329static void send_command( GtkWidget *w, char *command)
    2430{
    2531    if (sic_post_command_text( command) == -1) {
  • kernel/lib/ggtk/gtk-toolbar.c

    diff --git a/kernel/lib/ggtk/gtk-toolbar.c b/kernel/lib/ggtk/gtk-toolbar.c
    a b  
    88#include "gtk-graph.h"
    99#include "gtv/event-stack.h"
    1010#include <stdio.h>
    1111#include <stdlib.h>
    1212#include <string.h>
    13 #ifndef WIN32
    14 #include <gdk/gdkx.h>
    15 #else /* WIN32 */
    16 #include <gdk/gdkwin32.h>
     13
     14#ifdef WIN32
     15  #include <gdk/gdkwin32.h>
     16  #define GGTK_PATH_MAX MAX_PATH
     17  #define strdup _strdup
     18#elif defined(GDK_WINDOWING_X11)
     19  #include <gdk/gdkx.h>
     20  #define GGTK_PATH_MAX PATH_MAX
     21#elif defined(GDK_WINDOWING_QUARTZ)
     22  #include <gdk/gdkquartz.h>
     23  #define GGTK_PATH_MAX PATH_MAX
    1724#endif /* WIN32 */
    1825
    1926#undef GGTK_USE_MENU_BAR
    2027
    2128GdkColor ggtk_black = {0, 0, 0, 0};