[35908] trunk/dports/x11/glui
mcalhoun at macports.org
mcalhoun at macports.org
Wed Apr 9 09:58:05 PDT 2008
Revision: 35908
http://trac.macosforge.org/projects/macports/changeset/35908
Author: mcalhoun at macports.org
Date: 2008-04-09 09:58:04 -0700 (Wed, 09 Apr 2008)
Log Message:
-----------
glui: Added patchfiles.
Added Paths:
-----------
trunk/dports/x11/glui/files/
trunk/dports/x11/glui/files/patch-glui.diff
trunk/dports/x11/glui/files/patch-glui_filebrowser.diff
trunk/dports/x11/glui/files/patch-makefile.diff
Added: trunk/dports/x11/glui/files/patch-glui.diff
===================================================================
--- trunk/dports/x11/glui/files/patch-glui.diff (rev 0)
+++ trunk/dports/x11/glui/files/patch-glui.diff 2008-04-09 16:58:04 UTC (rev 35908)
@@ -0,0 +1,47 @@
+--- include/GL/glui.h.orig 2006-07-06 09:08:28.000000000 -0600
++++ include/GL/glui.h 2007-10-31 13:30:05.000000000 -0600
+@@ -700,7 +700,7 @@
+ void *font;
+ int curr_modifiers;
+
+- void adjust_glut_xy( int &x, int &y ) { y = h-y; }
++ void adjust_glut_xy( int &/*x*/, int &y ) { y = h-y; }
+ void activate_control( GLUI_Control *control, int how );
+ void align_controls( GLUI_Control *control );
+ void deactivate_current_control( void );
+@@ -824,19 +824,19 @@
+ virtual int get_id( void ) const { return user_id; }
+ virtual void set_id( int id ) { user_id=id; }
+
+- virtual int mouse_down_handler( int local_x, int local_y ) { return false; }
+- virtual int mouse_up_handler( int local_x, int local_y, bool inside ) { return false; }
+- virtual int mouse_held_down_handler( int local_x, int local_y, bool inside) { return false; }
+- virtual int key_handler( unsigned char key, int modifiers ) { return false; }
+- virtual int special_handler( int key,int modifiers ) { return false; }
++ virtual int mouse_down_handler( int /*local_x*/, int /*local_y*/ ) { return false; }
++ virtual int mouse_up_handler( int /*local_x*/, int /*local_y*/, bool /*inside*/ ) { return false; }
++ virtual int mouse_held_down_handler( int /*local_x*/, int /*local_y*/, bool /*inside*/) { return false; }
++ virtual int key_handler( unsigned char /*key*/, int /*modifiers*/ ) { return false; }
++ virtual int special_handler( int /*key*/,int /*modifiers*/ ) { return false; }
+
+ virtual void update_size( void ) { }
+ virtual void idle( void ) { }
+- virtual int mouse_over( int state, int x, int y ) { return false; }
++ virtual int mouse_over( int /*state*/, int /*x*/, int /*y*/ ) { return false; }
+
+ virtual void enable( void );
+ virtual void disable( void );
+- virtual void activate( int how ) { active = true; }
++ virtual void activate( int /*how*/ ) { active = true; }
+ virtual void deactivate( void ) { active = false; }
+
+ /** Hide (shrink into a rollout) and unhide (expose from a rollout) */
+@@ -894,7 +894,7 @@
+ void sync_live( int recurse, int draw ); /* Reads live variable */
+ void init_live( void );
+ void output_live( int update_main_gfx ); /** Writes live variable **/
+- virtual void set_text( const char *t ) {}
++ virtual void set_text( const char */*t*/ ) {}
+ void execute_callback( void );
+ void get_this_column_dims( int *col_x, int *col_y,
+ int *col_w, int *col_h,
Added: trunk/dports/x11/glui/files/patch-glui_filebrowser.diff
===================================================================
--- trunk/dports/x11/glui/files/patch-glui_filebrowser.diff (rev 0)
+++ trunk/dports/x11/glui/files/patch-glui_filebrowser.diff 2008-04-09 16:58:04 UTC (rev 35908)
@@ -0,0 +1,46 @@
+--- glui_filebrowser.cpp.orig 2007-11-08 01:36:23.000000000 -0700
++++ glui_filebrowser.cpp 2007-11-08 01:44:31.000000000 -0700
+@@ -74,17 +74,16 @@
+ if (!me)
+ return;
+ int this_item;
+- const char *selected;
+ this_item = list->get_current_item();
+ if (this_item > 0) { /* file or directory selected */
+- selected = list->get_item_ptr( this_item )->text.c_str();
+- if (selected[0] == '/' || selected[0] == '\\') {
++ const GLUI_String selected = list->get_item_ptr( this_item )->text.c_str();
++ if (*selected.rbegin() == '/' || selected[0] == '\\') {
+ if (me->allow_change_dir) {
+ #ifdef __GNUC__
+- chdir(selected+1);
++ chdir(selected.substr(0,selected.size()-1u).c_str());
+ #endif
+ #ifdef _WIN32
+- SetCurrentDirectory(selected+1);
++ SetCurrentDirectory(selected.substr(1).c_str());
+ #endif
+ me->fbreaddir(".");
+ }
+@@ -113,8 +112,8 @@
+
+ hFind = FindFirstFile("*.*", &FN);
+ if (list) {
+- list->delete_all();
+ if (hFind != INVALID_HANDLE_VALUE) {
++ list->delete_all();
+ do {
+ int len = strlen(FN.cFileName);
+ if (FN.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+@@ -141,10 +140,10 @@
+ struct stat dr;
+
+ if (list) {
+- list->delete_all();
+ if ((dir = opendir(d)) == NULL)
+ perror("fbreaddir:");
+ else {
++ list->delete_all();
+ while ((dirp = readdir(dir)) != NULL) /* open directory */
+ {
+ if (!lstat(dirp->d_name,&dr) && S_ISDIR(dr.st_mode)) /* dir is directory */
Added: trunk/dports/x11/glui/files/patch-makefile.diff
===================================================================
--- trunk/dports/x11/glui/files/patch-makefile.diff (rev 0)
+++ trunk/dports/x11/glui/files/patch-makefile.diff 2008-04-09 16:58:04 UTC (rev 35908)
@@ -0,0 +1,38 @@
+--- makefile.orig 2006-07-06 02:42:56.000000000 -0600
++++ makefile 2007-10-31 12:51:51.000000000 -0600
+@@ -5,9 +5,10 @@
+ #CC=gcc
+
+ # Compiler options
+-OPTS=-g
+-OPTS=-O0
+-#OPTS=-O2
++#OPTS=-g
++#OPTS=-O0
++OPTS=-O2
++CPPFLAGS += $(OPTS)
+
+ UNAME = $(shell uname)
+
+@@ -21,8 +22,8 @@
+ CPPFLAGS += -I./ -I./include
+
+ LIBGLUI = -L./lib -lglui
+-LIBGL = -lGLU -lGL
+-LIBS = -lXmu -lXext -lX11 -lXi -lm
++LIBGL = -framework OpenGL
++LIBS =
+
+ # One of the following options only...
+
+@@ -35,8 +36,8 @@
+ # CPPFLAGS += -I/usr/X11R6/include -DGLUI_FREEGLUT
+
+ # (3) GLUT
+-LIBGLUT = -L/usr/X11R6/lib -lglut
+-CPPFLAGS += -I/usr/X11R6/include
++LIBGLUT = -framework GLUT
++CPPFLAGS +=
+
+ #######################################
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080409/fe53435b/attachment-0001.html
More information about the macports-changes
mailing list