components/openjade/patches/openjade-01-macros.patch
changeset 4946 0ef00d8ed5cc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openjade/patches/openjade-01-macros.patch	Tue Oct 13 20:41:07 2015 -0700
@@ -0,0 +1,112 @@
+# Existing set of patches from the desktop gate
+# Can be potentially sent upstream if there is an active community 
+
+--- openjade.orig/config/acinclude.m4
++++ openjade/config/acinclude.m4	2002/04/08 23:13:37
+@@ -0,0 +1,61 @@
++dnl Configure-time switch with default
++dnl
++dnl Each switch defines an --enable-FOO and --disable-FOO option in
++dnl the resulting configure script.
++dnl
++dnl Usage:
++dnl SMR_SWITCH(name, description, default, pos-def, neg-def)
++dnl
++dnl where:
++dnl
++dnl name        name of switch; generates --enable-name & --disable-name
++dnl             options
++dnl description help string is set to this prefixed by "enable" or
++dnl             "disable", whichever is the non-default value
++dnl default     either "on" or "off"; specifies default if neither
++dnl             --enable-name nor --disable-name is specified
++dnl pos-def     a symbol to AC_DEFINE if switch is on (optional)
++dnl neg-def     a symbol to AC_DEFINE if switch is off (optional)
++dnl
++AC_DEFUN(SMR_SWITCH, [
++    AC_MSG_CHECKING(whether to enable $2)
++    AC_ARG_ENABLE(
++        $1,
++        ifelse($3, on,
++            [  --disable-[$1]    disable [$2]],
++            [  --enable-[$1]     enable [$2]]),
++        [ if test "$enableval" = yes; then
++            AC_MSG_RESULT(yes)
++            ifelse($4, , , AC_DEFINE($4))
++        else
++            AC_MSG_RESULT(no)
++            ifelse($5, , , AC_DEFINE($5))
++        fi ],
++        ifelse($3, on,
++           [ AC_MSG_RESULT(yes)
++             ifelse($4, , , AC_DEFINE($4)) ],
++           [ AC_MSG_RESULT(no)
++            ifelse($5, , , AC_DEFINE($5))]))])
++
++dnl
++dnl Examine size_t and define SIZE_T_IS_UINT, if size_t is an unsigned int
++dnl
++AC_DEFUN(OJ_SIZE_T_IS_UINT,[
++	AC_REQUIRE([AC_TYPE_SIZE_T])
++	AC_MSG_CHECKING(whether size_t is unsigned int)
++	ac_cv_size_t_is_uint=no
++	AC_LANG_SAVE
++	AC_LANG_CPLUSPLUS
++	AC_TRY_COMPILE([#include <unistd.h>
++
++                       template<class T> class foo { };
++
++                        ], [
++			foo<size_t> x;
++			foo<unsigned int> y;
++			x = y;
++		],ac_cv_size_t_is_uint=yes)
++	AC_LANG_RESTORE
++	AC_MSG_RESULT($ac_cv_size_t_is_uint)
++	test "$ac_cv_size_t_is_uint" = "yes" && AC_DEFINE(SIZE_T_IS_UINT)
++])
+--- openjade.orig/config/aclocal.m4
++++ openjade/config/aclocal.m4	2002/04/08 23:18:36
+@@ -3352,7 +3352,7 @@
+ dnl the resulting configure script.
+ dnl
+ dnl Usage:
+-dnl smr_SWITCH(name, description, default, pos-def, neg-def)
++dnl SMR_SWITCH(name, description, default, pos-def, neg-def)
+ dnl
+ dnl where:
+ dnl
+@@ -3365,7 +3365,7 @@
+ dnl pos-def     a symbol to AC_DEFINE if switch is on (optional)
+ dnl neg-def     a symbol to AC_DEFINE if switch is off (optional)
+ dnl
+-AC_DEFUN(smr_SWITCH, [
++AC_DEFUN(SMR_SWITCH, [
+     AC_MSG_CHECKING(whether to enable $2)
+     AC_ARG_ENABLE(
+         $1,
+
+--- openjade.orig/config/configure.in
++++ openjade/config/configure.in	2002/04/08 23:13:17
+@@ -171,8 +171,8 @@
+ dnl
+ dnl  optional backends
+ dnl
+-smr_SWITCH(mif, support for FrameMaker MIF output, on, JADE_MIF, DUMMY)
+-smr_SWITCH(html, support for HTML+CSS output, on, JADE_HTML, DUMMY)
++SMR_SWITCH(mif, support for FrameMaker MIF output, on, JADE_MIF, DUMMY)
++SMR_SWITCH(html, support for HTML+CSS output, on, JADE_HTML, DUMMY)
+ 
+ 
+ dnl 
+--- openjade-1.3.2.orig/jade/Makefile.sub	Thu Dec 25 20:59:39 2003
++++ openjade-1.3.2/jade/Makefile.sub	Thu Dec 25 20:59:54 2003
+@@ -4,7 +4,7 @@
+ INCLUDE=-I$(srcdir)/../grove -I$(srcdir)/../spgrove -I$(srcdir)/../style
+ # XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a \
+ #   ../lib/libosp.a
+-XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a $(splibdir)/libosp.a
++XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a $(splibdir)/libosp.so
+ GENSRCS=JadeMessages.h HtmlMessages.h RtfMessages.h TeXMessages.h \
+  HtmlFOTBuilder_inst.cxx RtfFOTBuilder_inst.cxx  TeXFOTBuilder_inst.cxx \
+  TransformFOTBuilder_inst.cxx MifMessages.h MifFOTBuilder_inst.cxx