gephex--main--0.4--patch-1848

[email protected]
Newsgroups gmane.comp.video.gephex.devel
Message-ID <[email protected]>
Archive: [email protected]
New revision: gephex--main--0.4--patch-1848

--
Revision: gephex--main--0.4--patch-1848
Archive: [email protected]
Creator: The Gephex Source Archive <[email protected]>
Date: Wed Mar  2 20:23:14 CET 2005
Standard-date: 2005-03-02 19:23:14 GMT
Modified-files: configure.ac doc/Makefile.am
    modules/src/frboutmodule/x11output.c
    modules/src/joystickmodule/Makefile.am
    util/src/joystick_midi_net/Makefile.am
    util/src/libjoystick/Makefile.am
New-patches: [email protected]/gephex--macport--0.4--patch-11
    [email protected]/gephex--macport--0.4--patch-12
    [email protected]/gephex--macport--0.4--patch-13
    [email protected]/gephex--macport--0.4--patch-14
    [email protected]/gephex--macport--0.4--patch-15
    [email protected]/gephex--macport--0.4--patch-16
    [email protected]/gephex--macport--0.4--patch-17
    [email protected]/gephex--main--0.4--patch-1848
Summary: [MERGE-REQUEST] Fixed X11 bug #87, fixed autoconf stuff for mac build
Keywords: 

Patches applied:

 * [email protected]/gephex--macport--0.4--patch-11
   Merged in --main--

 * [email protected]/gephex--macport--0.4--patch-12
   Fixed bug #87 in x11output

 * [email protected]/gephex--macport--0.4--patch-13
   Turned libjoystick into a libtool library to make SDL dependency more sane

 * [email protected]/gephex--macport--0.4--patch-14
   Autoconf now checks for docbook2man and docbook xsl dir

 * [email protected]/gephex--macport--0.4--patch-15
   autoconf stuff

 * [email protected]/gephex--macport--0.4--patch-16
   Add -lobjc to libjoysticks libadd - seems to be needed on my mac os x setup

 * [email protected]/gephex--macport--0.4--patch-17
   Merged in main

* added files

    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-11
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-12
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-13
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-14
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-15
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-16
    {arch}/gephex/gephex--macport/gephex--macport--0.4/[email protected]/patch-log/patch-17
    {arch}/gephex/gephex--main/gephex--main--0.4/[email protected]/patch-log/patch-1848

* modified files

--- orig/configure.ac
+++ mod/configure.ac
@@ -65,6 +65,7 @@
   AC_DEFINE([OS_POSIX])
   AC_MSG_RESULT([Darwin detected.])
   SHAREDLIBEXT=dylib
+  AM_CONDITIONAL(OS_DARWIN, true)
  ;;
 *-*-linux*)
   AC_DEFINE([OS_LINUX])
@@ -385,6 +386,52 @@
 AC_SUBST(gphx_module_lib_dir, '$(prefix)/lib/gephex-0.4/modules')
 AC_SUBST(gphx_type_lib_dir, '$(prefix)/lib/gephex-0.4/types')
 
+# check for docbook2x and docbook xslt
+
+AC_MSG_CHECKING([docbook2x command])
+
+GUESS_DOCBOOK2MAN="`which docbook2x-man` `which docbook2man`"
+
+docbooktoxman=""
+for cmd in $GUESS_DOCBOOK2MAN
+do
+  if test -e $cmd
+  then
+    docbooktoxman=$cmd
+    break
+  fi
+done
+
+if test "x$docbooktoxman" = "x"; then
+  AC_MSG_RESULT([not found])
+else
+  AC_MSG_RESULT([assuming $docbooktoxman])
+fi
+
+AC_SUBST(docbooktoxman)
+
+AC_MSG_CHECKING([docbook xsl dir])
+
+GUESS_DOCBOOK_XSL_DIRS="/sw/share/xml/xsl/docbook-xsl /usr/share/xml/docbook/stylesheet/nwalsh"
+
+docbook_xsl_dir=""
+for dir in $GUESS_DOCBOOK_XSL_DIRS
+do
+  if test -e $dir/html/docbook.xsl
+  then
+    docbook_xsl_dir=$dir
+    break
+  fi
+done
+
+if test "x$docbook_xsl_dir" = "x"; then
+  AC_MSG_RESULT([not found])
+else
+  AC_MSG_RESULT([assuming $docbook_xsl_dir])
+fi
+
+AC_SUBST(docbook_xsl_dir)
+
 AC_CONFIG_FILES([Makefile
 base/Makefile
 base/src/Makefile


--- orig/doc/Makefile.am
+++ mod/doc/Makefile.am
@@ -5,23 +5,32 @@
 
 man_MANS = gephex.1 gephex-engine.1 gephex-gui.1
 
+DB2M=@docbooktoxman@
+DBXSLDIR=@docbook_xsl_dir@
+
 # include this prebuild stuff (and its sources) in the dist
-EXTRA_DIST     =  $(html_DATA)  $(man_MANS) $(srcdir)/documentation.xml $(srcdir)/module-api*.xml  $(srcdir)/type-api*.xml $(srcdir)/gephex.xml $(srcdir)/gephex-engine.xml $(srcdir)/gephex-gui.xml
+EXTRA_DIST     =  \
+	$(html_DATA)                \
+	$(man_MANS)                 \
+	$(srcdir)/documentation.xml \
+	$(srcdir)/module-api*.xml   \
+	$(srcdir)/type-api*.xml     \
+	$(srcdir)/gephex.xml        \
+	$(srcdir)/gephex-engine.xml \
+	$(srcdir)/gephex-gui.xml
+
 DISTCLEANFILES = documentation.html gephex.1 gephex-engine.1 gephex-gui.1
 
 gephex.1: $(srcdir)/gephex.xml
-	docbook2x-man $(srcdir)/gephex.xml > gephex.1
+	if test "x${DB2M}" = "x"; then  touch gephex.1; else ${DB2M} $(srcdir)/gephex.xml > gephex.1; fi
 
 gephex-engine.1: $(srcdir)/gephex-engine.xml
-	docbook2x-man $(srcdir)/gephex-engine.xml > gephex-engine.1
+	if test "x${DB2M}" = "x"; then  touch gephex-engine.1; else ${DB2M} $(srcdir)/gephex-engine.xml > gephex-engine.1; fi
 
 gephex-gui.1: $(srcdir)/gephex-gui.xml
-	docbook2x-man $(srcdir)/gephex-gui.xml > gephex-gui.1
+	if test "x${DB2M}" = "x"; then  touch gephex-gui.1; else ${DB2M} $(srcdir)/gephex-gui.xml > gephex-gui.1; fi
 
 all-local: documentation.html gephex.1 gephex-engine.1 gephex-gui.1
 
 documentation.html: $(srcdir)/documentation.xml  $(srcdir)/module-api*.xml  $(srcdir)/type-api*.xml $(srcdir)/images/*.png
-	xsltproc --xinclude --param shade.verbatim 1 -o documentation.html /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $(srcdir)/documentation.xml
-
-
-
+	if test "x$DBXSLDIR" = "x"; then touch documentation.html; else xsltproc --xinclude --param shade.verbatim 1 -o documentation.html ${DBXSLDIR}/html/docbook.xsl $(srcdir)/documentation.xml; fi


--- orig/modules/src/frboutmodule/x11output.c
+++ mod/modules/src/frboutmodule/x11output.c
@@ -311,6 +311,7 @@
 
   if (sh->ximage != 0)
     {
+      sh->ximage->data = 0;
       XDestroyImage(sh->ximage);
       sh->ximage = 0;
     }
@@ -345,8 +346,8 @@
 }
 
 static int X11_resize(struct DriverInstance* sh,
-                       int width, int height,
-                       char* error_text, int text_len)
+		      int width, int height,
+		      char* error_text, int text_len)
 { 
   if (sh->width != width || sh->height != height)
     {
@@ -367,14 +368,23 @@
       if ((sh->used_extensions & USE_XSHM) == USE_XSHM &&
           (sh->used_extensions & USE_XV) == 0)
         {
+	  assert(sh->ximage);
+
+	  sh->ximage->data = 0;
           XDestroyImage(sh->ximage);
 
           sh->ximage = XShmCreateImage(sh->display,
-                                        sh->vis.visual,
-                                        sh->vis.depth,
-                                        ZPixmap,
-                                        sh->shminfo.shmaddr, 
-                                        &sh->shminfo, width, height);
+				       sh->vis.visual,
+				       sh->vis.depth,
+				       ZPixmap,
+				       sh->shminfo.shmaddr, 
+				       &sh->shminfo, width, height);
+
+	  if (sh->ximage == 0)
+	    {
+	      snprintf(error_text, text_len, "Could not create XShmImage");
+	      return 0;
+	    }
         }
     }
   return 1;
@@ -405,6 +415,12 @@
         }
     }
 
+  if (sh->ximage == 0)
+    {
+      snprintf(error_text, text_len, "Internal error: sh->ximage == 0");
+      return 0;
+    }
+ 
   // adjust and scale input framebuffer frb into shared mem
   if (needs_adjust)
     {
@@ -586,24 +602,24 @@
                            int needs_adjust,
                            char* error_text, int text_len)
 {
-  uint8_t* framebuffer;
+  uint8_t* framebuffer = 0;
 
   if (width != sh->width || height != sh->height ||
       params->mirrorx || params->mirrory || needs_adjust)
     {
       int size = sh->width*sh->height*4;
 
+      if (sh->data && sh->data_size < size)
+	{
+	  free(sh->data);
+	  sh->data = 0;
+	}
+
       if (sh->data == 0)
         {
           sh->data = malloc(size);
           sh->data_size = size;
         }
-      else if (sh->data_size < size)
-        {
-          free(sh->data);
-          sh->data = malloc(size);
-          sh->data_size = size;
-        }
 
       if (sh->data == 0)
 	{
@@ -636,9 +652,14 @@
           sh->data_size = 0;
         }
 
+      assert(width == sh->width);
+      assert(height == sh->height);
+
       framebuffer = (uint8_t*) fb;
     }
 
+  assert(framebuffer != 0);
+
   // now create an XImage using the framebuffers pixel data
 
   //TODO: this is a hack for big-endian machines
@@ -653,7 +674,10 @@
       sh->image_height != sh->height)
     {
       if (sh->ximage)
-        XDestroyImage(sh->ximage);
+	{
+	  sh->ximage->data = 0;
+	  XDestroyImage(sh->ximage);
+	}
 
       sh->ximage = XCreateImage(sh->display,
                                 sh->vis.visual,


--- orig/modules/src/joystickmodule/Makefile.am
+++ mod/modules/src/joystickmodule/Makefile.am
@@ -10,31 +10,28 @@
 
 lib_LTLIBRARIES = joystickmodule.la
 
-joystickmodule_la_SOURCES = 	joystickmodule_auto.c \
-				joystickmodule.cpp \
-				joystickmodule.h \
-				joystickmodule.spec \
-				joystickmodule.xpm
-
-joystickmodule_la_LIBADD = $(SDL_LD_FLAGS) -ljoystick \
-	-L@builddir@/../../../util/src/libjoystick
-
-joystickmodule_la_DEPENDENCIES = @builddir@/../../../util/src/libjoystick/libjoystick.a
-joystickmodule_la_LDFLAGS = -module -avoid-version 
-
-
-INCLUDES = 	-I @srcdir@/../../../engine/src/engine \
-		-I @srcdir@/../../../util/include \
-		-I @srcdir@/../../../types/src/miditype \
-		-I @srcdir@/../../../types/src/numbertype \
-		-I @srcdir@/../../../types/src/stringtype \
-		$(SDL_CFLAGS) \
-		-I @srcdir@/../libmidi \
-		-I @srcdir@/../../../util/src/libjoystick
-
-
-
- 
+joystickmodule_la_SOURCES = \
+	joystickmodule_auto.c \
+	joystickmodule.cpp \
+	joystickmodule.h \
+	joystickmodule.spec \
+	joystickmodule.xpm
+
+joystickmodule_la_LIBADD = \
+	-L@builddir@/../../../util/src/libjoystick \
+	-ljoystick
+
+joystickmodule_la_DEPENDENCIES = @builddir@/../../../util/src/libjoystick/.libs/libjoystick.a
+joystickmodule_la_LDFLAGS = -module -avoid-version
+
+INCLUDES = \
+	-I @srcdir@/../../../engine/src/engine \
+	-I @srcdir@/../../../util/include \
+	-I @srcdir@/../../../types/src/miditype \
+	-I @srcdir@/../../../types/src/numbertype \
+	-I @srcdir@/../../../types/src/stringtype \
+	-I @srcdir@/../libmidi \
+	-I @srcdir@/../../../util/src/libjoystick
 
 DISTCLEANFILES = joystickmodule.h joystickmodule_auto.c
 EXTRA_DIST = joystickmodule.dsp joystickmodule.mak joystickmodule.dep


--- orig/util/src/joystick_midi_net/Makefile.am
+++ mod/util/src/joystick_midi_net/Makefile.am
@@ -6,9 +6,9 @@
 
 INCLUDES = -I @srcdir@/../libjoystick
 
-joystick_midi_net_LDFLAGS =
+joystick_midi_net_LDFLAGS = -L@builddir@/../libjoystick/ -ljoystick
 
-joystick_midi_net_LDADD = -ljoystick $(SDL_LD_FLAGS) -L@builddir@/../libjoystick/ 
+#joystick_midi_net_LDADD = 
 
-joystick_midi_net_DEPENDENCIES = @builddir@/../libjoystick/libjoystick.a
+joystick_midi_net_DEPENDENCIES = @builddir@/../libjoystick/.libs/libjoystick.a
 


--- orig/util/src/libjoystick/Makefile.am
+++ mod/util/src/libjoystick/Makefile.am
@@ -1,14 +1,13 @@
 EXTRA_DIST = libjoystick.dsp libjoystick.mak libjoystick.dep \
 	win32joystickdriver.cpp win32joystickdriver.h
 
-noinst_LIBRARIES = libjoystick.a
+noinst_LTLIBRARIES = libjoystick.la
 
 if WITH_SDL
 SDL_sOURCES = \
 	sdljoystickdriver.h \
 	sdljoystickdriver.cpp
-#SDL_lIBADD = @SDL_LD_FLAGS@
-SDL_lIBADD = @SDL_PREFIX@/lib/libSDL.@SHAREDLIBEXT@ #/usr/lib/libpthread.so
+SDL_lIBADD = @SDL_LD_FLAGS@
 endif
 
 if WITH_LINUX_JOYSTICK
@@ -17,15 +16,18 @@
 	linuxjoystickdriver.cpp
 endif
 
-libjoystick_a_SOURCES = \
+libjoystick_la_SOURCES = \
 	libjoystick.cpp \
 	joystickdriver.h  $(LJ_sOURCES) $(SDL_sOURCES)
 
-libjoystick_a_LIBADD = $(SDL_lIBADD)
+if OS_DARWIN
+ADDITIONAL_LIBS = -lobjc
+endif
+
+libjoystick_la_LIBADD = $(SDL_lIBADD) $(ADDITIONAL_LIBS)
+
 noinst_HEADERS = libjoystick.h
 
 INCLUDES = -I @srcdir@/.. \
 	   -I @srcdir@/../../include @SDL_CFLAGS@
 
-
-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.