I plan to commit soon the following series of patches to the 1.3.x
branch and port them to HEAD. I just send them for comments, but I do
not think they will cause big problems.

macboost.diff: avoid some template generation problems. This may be a
  temporary solution that will be removed when gcc 3.x works with lyx.

macmenu.diff: a hack to work around Qt/Mac creative moving of menus.
  Again, I hope this will be replaced when proper support in qt/mac
  appears.

nox2.diff: make --disable-x work as intended with frontends that do
  not need X. This one should not be a problem.

I also add a patch that I will _not_  apply now, because it is
unclear when and why such tweak is needed.

lyx-qt.patch: the type1 fonts for symbols like sum. There is special
  code for some fonts in the normal version, and it seems that it has to
  be replaced with other special code for OS X (the win32 port seems to
  need similar tweaks). It would be nice if people who know about
  fonts could tell me what really happens.

JMarc

Index: boost/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/ChangeLog,v
retrieving revision 1.32.2.3
diff -u -p -r1.32.2.3 ChangeLog
--- boost/ChangeLog	27 May 2003 12:45:50 -0000	1.32.2.3
+++ boost/ChangeLog	3 Jul 2003 13:29:55 -0000
@@ -1,3 +1,8 @@
+2003-07-03  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* boost/config/user.hpp: define BOOST_REGEX_NARROW_INSTANTIATE on
+	Mac OS X.
+
 2003-05-26  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* boost/config/compiler/gcc.hpp: accept gcc 3.3 as valid compiler
Index: boost/boost/config/user.hpp
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/boost/config/user.hpp,v
retrieving revision 1.6
diff -u -p -r1.6 user.hpp
--- boost/boost/config/user.hpp	21 Nov 2002 18:33:01 -0000	1.6
+++ boost/boost/config/user.hpp	3 Jul 2003 13:29:55 -0000
@@ -70,3 +70,6 @@
 #define BOOST_NO_WREGEX 1
 #define BOOST_NO_WSTRING 1
 #define BOOST_FUNCTION_NO_DEPRECATED 1
+#if defined(__APPLE__) && defined(__GNUC__)
+#define BOOST_REGEX_NARROW_INSTANTIATE
+#endif
Index: src/frontends//qt2/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.389.2.28
diff -u -p -r1.389.2.28 ChangeLog
--- src/frontends//qt2/ChangeLog	4 Jun 2003 13:04:36 -0000	1.389.2.28
+++ src/frontends//qt2/ChangeLog	3 Jul 2003 13:03:52 -0000
@@ -1,3 +1,9 @@
+2003-07-03  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* QLPopupMenu.C (QLPopupMenu): initialize the menus with some
+	reasonable values, since Qt/Mac has an evil method to steal some
+	entries and put them in the application menu.
+
 2003-06-01  John Levon  <[EMAIL PROTECTED]>
   	 
 	* QGraphicsDialog.C: use relative file browsing
Index: src/frontends//qt2/QLPopupMenu.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLPopupMenu.C,v
retrieving revision 1.13
diff -u -p -r1.13 QLPopupMenu.C
--- src/frontends//qt2/QLPopupMenu.C	18 Dec 2002 14:24:32 -0000	1.13
+++ src/frontends//qt2/QLPopupMenu.C	3 Jul 2003 13:03:52 -0000
@@ -87,6 +87,11 @@ QLPopupMenu::QLPopupMenu(Menubar::Pimpl 
 		connect(this, SIGNAL(aboutToShow()), this, SLOT(showing()));
 	connect(this, SIGNAL(activated(int)),
 		owner_->view(), SLOT(activated(int)));
+#ifdef Q_WS_MACX
+	// This is a hack to allow menus in Qt/Mac to work correctly.
+	// Hopefully it will not stay there too long... (JMarc)
+	showing();
+#endif
 }
 
 
Index: config/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v
retrieving revision 1.86.2.15
diff -u -p -r1.86.2.15 ChangeLog
--- config/ChangeLog	27 May 2003 12:45:51 -0000	1.86.2.15
+++ config/ChangeLog	3 Jul 2003 12:59:16 -0000
@@ -1,3 +1,9 @@
+2003-07-03  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* configure.in:
+	* configure.ac: only add X libraries to LIBS if --disable-x has
+	not been passed to configure (useful for Qt/Mac)
+
 2003-05-26  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* relyx_configure.ac: 
Index: config/configure.ac
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/configure.ac,v
retrieving revision 1.24.2.13
diff -u -p -r1.24.2.13 configure.ac
--- config/configure.ac	6 May 2003 14:43:11 -0000	1.24.2.13
+++ config/configure.ac	3 Jul 2003 12:59:16 -0000
@@ -136,18 +136,24 @@ CHECK_WITH_PSPELL
 CHECK_WITH_CYGWIN
 
 ### Check for X libraries
-# The real thing.
 AC_PATH_XTRA
-LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
-# Since solaris X headers use int as implicit return type and modern
-# gcc's do not like that, let's use -isystem instead of -I.
-# We should test for gcc version and see whether it supports -isystem,
-# but since at least gcc 2.6.x supports it and it is still too old for
-# us, it seems we are safe.
-if test -n "$GXX" ; then
-  X_CFLAGS=`echo ${X_CFLAGS} | sed -e 's/-I/-isystem /'`
-fi
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+case $have_x in
+  yes) LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+       # Since solaris X headers use int as implicit return type and modern
+       # gcc's do not like that, let's use -isystem instead of -I.
+       # We should test for gcc version and see whether it supports -isystem,
+       # but since at least gcc 2.6.x supports it and it is still too old for
+       # us, it seems we are safe.
+       if test -n "$GXX" ; then
+         X_CFLAGS=`echo ${X_CFLAGS} | sed -e 's/-I/-isystem /'`
+       fi
+       CPPFLAGS="$CPPFLAGS $X_CFLAGS";;
+  no) LYX_ERROR(dnl
+[Cannot find X window libraries and/or headers. Check your installation.
+   If you use a Linux system, check that you have installed
+   the development tools.]);;
+  disable) ;;
+esac
 
 ### check which frontend we want to use
 
@@ -196,14 +202,6 @@ dnl	;;
   *)
     LYX_ERROR(Unknown frontend $lyx_use_frontend);;
 esac
-
-### Check for xforms and xpm (only if X has been found).
-if test "$have_x" = no ; then
-LYX_ERROR(dnl
-[Cannot find X window libraries and/or headers. Check your installation.
-   If you use a Linux system, check that you have installed
-   the development tools.])
-fi
 
 ### Setup GNU gettext
 dnl GNU gettext is written in C
Index: config/configure.in
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/configure.in,v
retrieving revision 1.17.2.13
diff -u -p -r1.17.2.13 configure.in
--- config/configure.in	6 May 2003 14:43:11 -0000	1.17.2.13
+++ config/configure.in	3 Jul 2003 12:59:16 -0000
@@ -141,16 +141,24 @@ CHECK_WITH_CYGWIN
 ### Check for X libraries
 # The real thing.
 AC_PATH_XTRA
-LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
-# Since solaris X headers use int as implicit return type and modern
-# gcc's do not like that, let's use -isystem instead of -I.
-# We should test for gcc version and see whether it supports -isystem,
-# but since at least gcc 2.6.x supports it and it is still too old for
-# us, it seems we are safe.
-if test -n "$GXX" ; then
-  X_CFLAGS=`echo ${X_CFLAGS} | sed -e 's/-I/-isystem /'`
-fi
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+case $have_x in
+  yes) LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+       # Since solaris X headers use int as implicit return type and modern
+       # gcc's do not like that, let's use -isystem instead of -I.
+       # We should test for gcc version and see whether it supports -isystem,
+       # but since at least gcc 2.6.x supports it and it is still too old for
+       # us, it seems we are safe.
+       if test -n "$GXX" ; then
+         X_CFLAGS=`echo ${X_CFLAGS} | sed -e 's/-I/-isystem /'`
+       fi
+       CPPFLAGS="$CPPFLAGS $X_CFLAGS";;
+  no) LYX_ERROR(dnl
+[Cannot find X window libraries and/or headers. Check your installation.
+   If you use a Linux system, check that you have installed
+   the development tools.]);;
+  disable) ;;
+esac
+
 
 ### check which frontend we want to use
 
@@ -201,14 +209,6 @@ dnl     FRONTEND_LIBS="@XPM_LIB@ @XFORMS
   *)
     LYX_ERROR(Unknown frontend $lyx_use_frontend);;
 esac
-
-### Check for xforms and xpm (only if X has been found).
-if test "$have_x" = no ; then
-LYX_ERROR(dnl
-[Cannot find X window libraries and/or headers. Check your installation.
-   If you use a Linux system, check that you have installed
-   the development tools.])
-fi
 
 ### Setup GNU gettext
 dnl GNU gettext is written in C
--- mathed/math_symbolinset.C.orig	Tue Jan  7 06:24:43 2003
+++ mathed/math_symbolinset.C	Fri Jun 27 07:35:57 2003
@@ -39,35 +39,38 @@
 	return sym_->name;
 }
 
-
 void MathSymbolInset::metrics(MathMetricsInfo & mi) const
 {
-	//lyxerr << "metrics: symbol: '" << sym_->name
-	//	<< "' in font: '" << sym_->inset
-	//	<< "' drawn as: '" << sym_->draw
-	//	<< "'\n";
+        //lyxerr << "metrics: symbol: '" << sym_->name
+        //      << "' in font: '" << sym_->inset
+        //      << "' drawn as: '" << sym_->draw
+        //      << "'\n";
 
-	int const em = mathed_char_width(mi.base.font, 'M');
-	MathFontSetChanger dummy(mi.base, sym_->inset.c_str());
-	mathed_string_dim(mi.base.font, sym_->draw, dim_);
-	// correct height for broken cmex and wasy font
-	if (sym_->inset == "cmex" || sym_->inset == "wasy") {
-		h_ = 4 * dim_.d / 5;
-		dim_.a += h_;
-		dim_.d -= h_;
-	}
-	// seperate things a bit
-	if (isRelOp())
-		dim_.w += static_cast<int>(0.5*em+0.5);
-	else
-		dim_.w += static_cast<int>(0.1667*em+0.5);
+        int const em = mathed_char_width(mi.base.font, 'M');
+        MathFontSetChanger dummy(mi.base, sym_->inset.c_str());
+        mathed_string_dim(mi.base.font, sym_->draw, dim_);
+        // correct height for broken cmex and wasy font
+        if (sym_->inset == "cmex") {
+                h_ = 4 * dim_.d / 5;
+                dim_.a += 0*h_;
+                dim_.d -= h_;
+                h_ = dim_.a;
+        } else if (sym_->inset == "wasy") {
+                h_ = 4 * dim_.d / 5;
+                dim_.a += h_;
+                dim_.d -= h_;
+        }
+        // seperate things a bit
+        if (isRelOp())
+                dim_.w += static_cast<int>(0.5*em+0.5);
+        else
+                dim_.w += static_cast<int>(0.1667*em+0.5);
 
-	scriptable_ = false;
-	if (mi.base.style == LM_ST_DISPLAY)
-		if (sym_->inset == "cmex" || sym_->extra == "funclim")
-			scriptable_ = true;
+        scriptable_ = false;
+        if (mi.base.style == LM_ST_DISPLAY)
+                if (sym_->inset == "cmex" || sym_->extra == "funclim")
+                        scriptable_ = true;
 }
-
 
 void MathSymbolInset::draw(MathPainterInfo & pi, int x, int y) const
 {

Reply via email to