[goffice] Ensure that the lasem plugin builds with lasem-0.4.1. [#725693]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Ensure that the lasem plugin builds with lasem-0.4.1. [#725693]
- Date: Wed, 5 Mar 2014 14:40:47 +0000 (UTC)
commit 1274bc6b471621c8dd3ed35e46c0957d1298db3b
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed Mar 5 15:40:30 2014 +0100
Ensure that the lasem plugin builds with lasem-0.4.1. [#725693]
ChangeLog | 8 ++++++
INSTALL | 12 ++++----
NEWS | 6 ++++
configure.ac | 8 ++++++
mmlitex/Makefile.am | 2 +-
plugins/lasem/component.c | 60 +++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 89 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b4d5c65..6f232f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-03-05 Jean Brefort <jean brefort normalesup org>
+
+ * configure.ac: add test for lsm_itex_to_mathml
+ * plugins/lasem/component.c: use a local copy of lsm_itex_to_mathml and
+ friend when not available. [#725693]
+ * mmlitex/Makefile.am: remove extra DESTDIR. Patch from Julian
+ Sikorski. [#725684]
+
2014-03-03 Morten Welinder <terra gnome org>
* configure.ac: Post-release bump.
diff --git a/INSTALL b/INSTALL
index a1e89e1..2099840 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================
- Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
+ Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
@@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug. Until the bug is fixed you can use this workaround:
+an Autoconf limitation. Until the limitation is lifted, you can use
+this workaround:
- CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
@@ -367,4 +368,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
-
diff --git a/NEWS b/NEWS
index 4ba7b02..cb6a02f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
goffice 0.10.13:
+Jean:
+ * Ensure that the lasem plugin builds with lasem-0.4.1. [#725693]
+
+Julian Sikorski:
+ * Remove extra DESTDIR in mathml to itex converter. [#725684]
+
--------------------------------------------------------------------------
goffice 0.10.12:
diff --git a/configure.ac b/configure.ac
index a886697..6081415 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,6 +177,14 @@ if test "x$goffice_with_lasem" = "xtrue" ; then
AC_DEFINE(GOFFICE_WITH_LASEM, 1, [Define if Lasem is used])
goffice_reqs="$goffice_reqs $lasem >= 0.4.1 "
EXTRA_DEPS="$EXTRA_DEPS $lasem"
+dnl check for lsm_itex_to_mathml
+ saved_CFLAGS=$CFLAGS
+ saved_LIBS=$LIBS
+ CFLAGS="$CFLAGS $Lasem_CFLAGS"
+ LIBS="$LIBS $Lasem_LIBS"
+ AC_CHECK_FUNCS(lsm_itex_to_mathml)
+ CFLAGS=$saved_CFLAGS
+ LIBS=$saved_LIBS
fi
AM_CONDITIONAL(GOFFICE_WITH_LASEM, $goffice_with_lasem)
diff --git a/mmlitex/Makefile.am b/mmlitex/Makefile.am
index fb160d0..00eb075 100644
--- a/mmlitex/Makefile.am
+++ b/mmlitex/Makefile.am
@@ -7,6 +7,6 @@ xslt_DATA = \
mmlitex.xsl \
tables.xsl \
README
-xsltdir = $(DESTDIR)$(goffice_datadir)/mmlitex
+xsltdir = $(goffice_datadir)/mmlitex
EXTRA_DIST = $(xslt_DATA)
diff --git a/plugins/lasem/component.c b/plugins/lasem/component.c
index 3885540..dc88f44 100644
--- a/plugins/lasem/component.c
+++ b/plugins/lasem/component.c
@@ -28,6 +28,66 @@
#include <lsmdom.h>
#include <string.h>
+#ifndef HAVE_LSM_ITEX_TO_MATHML
+/* Lasem - SVG and Mathml library
+ *
+ * Copyright © 2013 Emmanuel Pacaud
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author:
+ * Emmanuel Pacaud <emmanuel gnome org>
+ */
+
+extern char * itex2MML_parse (const char * buffer, unsigned long length);
+extern void itex2MML_free_string (char * str);
+
+static char *
+lsm_itex_to_mathml (const char *itex, int size)
+{
+ char *mathml;
+
+ if (itex == NULL)
+ return NULL;
+
+ if (size < 0)
+ size = strlen (itex);
+
+ mathml = itex2MML_parse (itex, size);
+ if (mathml == NULL)
+ return NULL;
+
+ if (mathml[0] == '\0') {
+ itex2MML_free_string (mathml);
+ return NULL;
+ }
+
+ return mathml;
+}
+
+static void
+lsm_itex_free_mathml_buffer (char *mathml)
+{
+ if (mathml == NULL)
+ return;
+
+ itex2MML_free_string (mathml);
+}
+#endif
+
GOPluginModuleDepend const go_plugin_depends [] = {
{ "goffice", GOFFICE_API_VERSION }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]