* gnu/packages/patches/abiword-explictly-cast-bools.patch New file. * gnu/packages/patches/abiword-link-plugins-against-backend.patch: New file. * gnu/packages/patches/abiword-no-include-glib-internal-headers.patch: New file. * gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch * gnu/packages/patches/abiword-use-proper-png-api.patch: New file. * gnu/packages/patches/abiword-wmf-version-lookup-fix.patch: New file. * gnu/packages/abiword.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add abiword.scm. (dist_patch_DATA): Add the 6 patches for abiword. --- gnu-system.am | 7 + gnu/packages/abiword.scm | 107 ++++ .../patches/abiword-explictly-cast-bools.patch | 93 +++ .../abiword-link-plugins-against-backend.patch | 639 ++++++++++++++++++++ .../abiword-no-include-glib-internal-headers.patch | 13 + .../abiword-pass-no-undefined-to-linker.patch | 608 +++++++++++++++++++ .../patches/abiword-use-proper-png-api.patch | 175 ++++++ .../patches/abiword-wmf-version-lookup-fix.patch | 28 + 8 files changed, 1670 insertions(+) create mode 100644 gnu/packages/abiword.scm create mode 100644 gnu/packages/patches/abiword-explictly-cast-bools.patch create mode 100644 gnu/packages/patches/abiword-link-plugins-against-backend.patch create mode 100644 gnu/packages/patches/abiword-no-include-glib-internal-headers.patch create mode 100644 gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch create mode 100644 gnu/packages/patches/abiword-use-proper-png-api.patch create mode 100644 gnu/packages/patches/abiword-wmf-version-lookup-fix.patch diff --git a/gnu-system.am b/gnu-system.am index b8465d6..b2795e6 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -24,6 +24,7 @@ GNU_SYSTEM_MODULES = \ gnu.scm \ gnu/packages.scm \ + gnu/packages/abiword.scm \ gnu/packages/acct.scm \ gnu/packages/acl.scm \ gnu/packages/admin.scm \ @@ -289,6 +290,12 @@ GNU_SYSTEM_MODULES = \ patchdir = $(guilemoduledir)/gnu/packages/patches dist_patch_DATA = \ + gnu/packages/patches/abiword-explictly-cast-bools.patch \ + gnu/packages/patches/abiword-link-plugins-against-backend.patch \ + gnu/packages/patches/abiword-no-include-glib-internal-headers.patch \ + gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch \ + gnu/packages/patches/abiword-use-proper-png-api.patch \ + gnu/packages/patches/abiword-wmf-version-lookup-fix.patch \ gnu/packages/patches/alsa-lib-mips-atomic-fix.patch \ gnu/packages/patches/apr-skip-getservbyname-test.patch \ gnu/packages/patches/automake-skip-amhello-tests.patch \ diff --git a/gnu/packages/abiword.scm b/gnu/packages/abiword.scm new file mode 100644 index 0000000..2c5286a --- /dev/null +++ b/gnu/packages/abiword.scm @@ -0,0 +1,107 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 Marek Benc +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix 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 General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages abiword) + #:use-module ((guix licenses) + #:renamer (symbol-prefix-proc 'license:)) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages boost) + #:use-module (gnu packages compression) + #:use-module (gnu packages enchant) + #:use-module (gnu packages fribidi) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages image) + #:use-module (gnu packages ots) + #:use-module (gnu packages popt) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages readline) + #:use-module (gnu packages wvware) + #:use-module (gnu packages xml)) + +(define-public abiword + (package + (name "abiword") + (version "2.8.6") + (source + (origin + (method url-fetch) + (uri + (string-append "http://abisource.org/downloads/" name "/" version + "/source/" name "-" version ".tar.gz")) + (sha256 + (base32 "059sd2apxdmcacc4pll880i7vm18h0kyjsq299m1mz3c7ak8k46r")) + (patches + (list + (search-patch "abiword-wmf-version-lookup-fix.patch") + (search-patch "abiword-no-include-glib-internal-headers.patch") + (search-patch "abiword-explictly-cast-bools.patch") + (search-patch "abiword-use-proper-png-api.patch") + (search-patch "abiword-pass-no-undefined-to-linker.patch") + (search-patch "abiword-link-plugins-against-backend.patch"))))) + + (build-system gnu-build-system) + (arguments ;; NOTE: rsvg is disabled, since Abiword + `(#:configure-flags ;; supports it directly, and its BS is broken. + (list + "--enable-clipart" ;; TODO: The following plugins have unresolved + "--enable-templates" ;; dependencies: aiksaurus, grammar, wpg, gda, + (string-append ;; wordperfect, psion, mathview, goffice. + "--enable-plugins=" + "applix " "babelfish " "bmp " "clarisworks " "collab " "command " + "docbook " "eml " "freetranslation " "garble " "gdict " "gimp " + "google " "hancom " "hrtext " "iscii " "kword " "latex " + "loadbindings " "mht " "mif " "mswrite " "opendocument " + "openwriter " "openxml " "opml " "ots " "paint " "passepartout " + "pdb " "pdf " "presentation " "s5 " "sdw " "t602 " "urldict " + "wikipedia " "wmf " "wml " "xslfo")))) + (inputs + `(("boost" ,boost) + ("enchant" ,enchant) + ("fontconfig" ,fontconfig) + ("fribidi" ,fribidi) + ("glib" ,glib) + ("gtk+" ,gtk+-2) + ("libglade" ,libglade) + ("libgsf" ,libgsf) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("librsvg" ,librsvg) + ("libwmf" ,libwmf) + ("libxml2" ,libxml2) + ("ots" ,ots) + ("popt" ,popt) + ("readline" ,readline) + ("wvware" ,wvware) + ("zlib" ,zlib))) + (native-inputs + `(("intltool" ,intltool) + ("glib:bin" ,glib "bin") + ("pkg-config" ,pkg-config))) + (home-page "http://abisource.org/") + (synopsis "Word processing program") + (description + "AbiWord is a free word processing program. It is rapidly becoming a +state of the art Word Processor, with lots of features useful for your daily +work, personal needs, or for just some good old typing fun.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/abiword-explictly-cast-bools.patch b/gnu/packages/patches/abiword-explictly-cast-bools.patch new file mode 100644 index 0000000..7927a18 --- /dev/null +++ b/gnu/packages/patches/abiword-explictly-cast-bools.patch @@ -0,0 +1,93 @@ +As of JPEG-9, the type 'boolean' is an enumeration, but since glib defines +TRUE and FALSE as numeric constants and this is C++, they need to be explicitly +casted. + +--- a/src/af/util/xp/ut_jpeg.cpp 2009-07-08 19:33:53.000000000 +0200 ++++ b/src/af/util/xp/ut_jpeg.cpp 2014-09-06 19:55:55.876997404 +0200 +@@ -102,7 +102,7 @@ + src->pub.next_input_byte = src->sourceBuf->getPointer (src->pos); + src->pub.bytes_in_buffer = src->sourceBuf->getLength (); + +- return TRUE; ++ return (boolean)TRUE; + } + + /* +@@ -161,7 +161,7 @@ + /* set the data source */ + _JPEG_ByteBufSrc (&cinfo, pBB); + +- jpeg_read_header(&cinfo, TRUE); ++ jpeg_read_header(&cinfo, (boolean)TRUE); + jpeg_start_decompress(&cinfo); + iImageWidth = cinfo.output_width; + iImageHeight = cinfo.output_height; +@@ -189,7 +189,7 @@ + /* set the data source */ + _JPEG_ByteBufSrc (&cinfo, pBB); + +- jpeg_read_header(&cinfo, TRUE); ++ jpeg_read_header(&cinfo, (boolean)TRUE); + jpeg_start_decompress(&cinfo); + + int row_stride = cinfo.output_width * cinfo.output_components; + + +In the following file, we also need to reverse header include order: JPEG needs +to be included before Glib, which is included by "abiword-garble.h" for this fix +to work. + +The JPEG header needs the types FILE and size_t, we can get them from cstdio. + +--- a/plugins/garble/xp/abiword-garble-jpeg.cpp 2009-09-05 17:49:53.000000000 +0200 ++++ b/plugins/garble/xp/abiword-garble-jpeg.cpp 2014-09-07 21:28:49.364008571 +0200 +@@ -20,12 +20,14 @@ + * 02111-1307, USA. + */ + +-#include "abiword-garble.h" ++#include + + extern "C" { + #include + } + ++#include "abiword-garble.h" ++ + //----------------------------------------------------------------------------- + typedef struct { + struct jpeg_destination_mgr pub; +@@ -49,7 +51,7 @@ + mem_dest_ptr dest = (mem_dest_ptr) cinfo->dest; + dest->pub.next_output_byte = dest->buf; + dest->pub.free_in_buffer = dest->bufsize; +- return FALSE; ++ return (boolean)FALSE; + } + + //----------------------------------------------------------------------------- +@@ -96,7 +98,7 @@ + cinfo.image_width = (JDIMENSION) w; + cinfo.image_height = (JDIMENSION) h; + jpeg_set_defaults (&cinfo); +- jpeg_set_quality ( &cinfo, 50, TRUE ); ++ jpeg_set_quality ( &cinfo, 50, (boolean)TRUE ); + cinfo.dest = (struct jpeg_destination_mgr *) (*cinfo.mem->alloc_small)((j_common_ptr)&cinfo, JPOOL_PERMANENT, sizeof(mem_destination_mgr)); + dest = (mem_dest_ptr) cinfo.dest; + dest->pub.init_destination = _jpeg_init_destination; +@@ -105,7 +107,7 @@ + dest->buf = (JOCTET*)data; + dest->bufsize = length; + dest->jpegsize = 0; +- jpeg_start_compress (&cinfo, TRUE); ++ jpeg_start_compress (&cinfo, (boolean)TRUE); + + // write data + for (int i=0; i ++#include + + G_BEGIN_DECLS + diff --git a/gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch b/gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch new file mode 100644 index 0000000..a17d465 --- /dev/null +++ b/gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch @@ -0,0 +1,608 @@ +gcc/g++ chokes on --no-undefined, so instead pass it directly to the linker. + +--- a/plugins/loadbindings/Makefile.in 2010-06-13 23:17:48.000000000 +0200 ++++ b/plugins/loadbindings/Makefile.in 2014-09-06 11:03:21.151951221 +0200 +@@ -433,7 +433,7 @@ + $(LOADBINDINGS_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + loadbindings_la_SOURCES = + nodist_EXTRA_loadbindings_la_SOURCES = dummy.cpp + +--- a/plugins/pdf/Makefile.in 2010-06-13 23:17:53.000000000 +0200 ++++ b/plugins/pdf/Makefile.in 2014-09-06 11:03:21.207951223 +0200 +@@ -431,7 +431,7 @@ + $(PDF_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + pdf_la_SOURCES = + nodist_EXTRA_pdf_la_SOURCES = dummy.cpp + +--- a/plugins/xslfo/Makefile.in 2010-06-13 23:17:55.000000000 +0200 ++++ b/plugins/xslfo/Makefile.in 2014-09-06 11:03:21.227951224 +0200 +@@ -431,7 +431,7 @@ + $(XSLFO_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + xslfo_la_SOURCES = + nodist_EXTRA_xslfo_la_SOURCES = dummy.cpp + +--- a/plugins/gda/Makefile.in 2010-06-13 23:17:45.000000000 +0200 ++++ b/plugins/gda/Makefile.in 2014-09-06 11:03:21.251951225 +0200 +@@ -425,7 +425,7 @@ + $(GDA_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + gda_la_SOURCES = + EXTRA_DIST = \ + +--- a/plugins/wikipedia/Makefile.in 2010-06-13 23:17:54.000000000 +0200 ++++ b/plugins/wikipedia/Makefile.in 2014-09-06 11:03:21.271951225 +0200 +@@ -431,7 +431,7 @@ + $(WIKIPEDIA_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + wikipedia_la_SOURCES = + nodist_EXTRA_wikipedia_la_SOURCES = dummy.cpp + +--- a/plugins/collab/Makefile.in 2010-06-13 23:17:41.000000000 +0200 ++++ b/plugins/collab/Makefile.in 2014-09-06 11:03:21.291951226 +0200 +@@ -435,7 +435,7 @@ + @TOOLKIT_COCOA_FALSE@ $(SYSTEM_LIBS) \ + @TOOLKIT_COCOA_FALSE@ -avoid-version \ + @TOOLKIT_COCOA_FALSE@ -module \ address@hidden@ -no-undefined address@hidden@ -Wl,--no-undefined + + @address@hidden = + @address@hidden = dummy.cpp + +--- a/plugins/paint/Makefile.in 2010-06-13 23:17:52.000000000 +0200 ++++ b/plugins/paint/Makefile.in 2014-09-06 11:03:21.315951227 +0200 +@@ -432,7 +432,7 @@ + $(PAINT_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + paint_la_SOURCES = + nodist_EXTRA_paint_la_SOURCES = dummy.cpp + +--- a/plugins/garble/Makefile.in 2010-06-13 23:17:45.000000000 +0200 ++++ b/plugins/garble/Makefile.in 2014-09-06 11:03:21.335951227 +0200 +@@ -433,7 +433,7 @@ + @TOOLKIT_COCOA_FALSE@ $(GARBLE_LIBS) \ + @TOOLKIT_COCOA_FALSE@ -avoid-version \ + @TOOLKIT_COCOA_FALSE@ -module \ address@hidden@ -no-undefined address@hidden@ -Wl,--no-undefined + + @address@hidden = + @address@hidden = dummy.cpp + +--- a/plugins/latex/Makefile.in 2010-06-13 23:17:48.000000000 +0200 ++++ b/plugins/latex/Makefile.in 2014-09-06 11:03:21.359951228 +0200 +@@ -432,7 +432,7 @@ + $(LATEX_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + latex_la_SOURCES = + nodist_EXTRA_latex_la_SOURCES = dummy.cpp + +--- a/plugins/mht/Makefile.in 2010-06-13 23:17:49.000000000 +0200 ++++ b/plugins/mht/Makefile.in 2014-09-06 11:03:21.379951229 +0200 +@@ -428,7 +428,7 @@ + $(MHT_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + mht_la_SOURCES = + nodist_EXTRA_mht_la_SOURCES = dummy.cpp + +--- a/plugins/google/Makefile.in 2010-06-13 23:17:46.000000000 +0200 ++++ b/plugins/google/Makefile.in 2014-09-06 11:03:21.399951230 +0200 +@@ -431,7 +431,7 @@ + $(GOOGLE_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + google_la_SOURCES = + nodist_EXTRA_google_la_SOURCES = dummy.cpp + +--- a/plugins/babelfish/Makefile.in 2010-06-13 23:17:40.000000000 +0200 ++++ b/plugins/babelfish/Makefile.in 2014-09-06 11:03:21.419951230 +0200 +@@ -431,7 +431,7 @@ + $(BABELFISH_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + babelfish_la_SOURCES = + nodist_EXTRA_babelfish_la_SOURCES = dummy.cpp + +--- a/plugins/opendocument/Makefile.in 2010-06-13 23:17:50.000000000 +0200 ++++ b/plugins/opendocument/Makefile.in 2014-09-06 11:03:21.443951231 +0200 +@@ -436,7 +436,7 @@ + $(OPENDOCUMENT_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + opendocument_la_SOURCES = + +--- a/plugins/opml/Makefile.in 2010-06-13 23:17:51.000000000 +0200 ++++ b/plugins/opml/Makefile.in 2014-09-06 11:03:21.463951232 +0200 +@@ -431,7 +431,7 @@ + $(OPML_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + opml_la_SOURCES = + nodist_EXTRA_opml_la_SOURCES = dummy.cpp + +--- a/plugins/gimp/Makefile.in 2010-06-13 23:17:46.000000000 +0200 ++++ b/plugins/gimp/Makefile.in 2014-09-06 11:03:21.483951232 +0200 +@@ -431,7 +431,7 @@ + $(GIMP_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + gimp_la_SOURCES = + nodist_EXTRA_gimp_la_SOURCES = dummy.cpp + +--- a/plugins/mswrite/Makefile.in 2010-06-13 23:17:49.000000000 +0200 ++++ b/plugins/mswrite/Makefile.in 2014-09-06 11:03:21.507951233 +0200 +@@ -431,7 +431,7 @@ + $(MSWRITE_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + mswrite_la_SOURCES = + nodist_EXTRA_mswrite_la_SOURCES = dummy.cpp + +--- a/plugins/wordperfect/Makefile.in 2010-06-13 23:17:55.000000000 +0200 ++++ b/plugins/wordperfect/Makefile.in 2014-09-06 11:03:21.527951234 +0200 +@@ -429,7 +429,7 @@ + $(WORDPERFECT_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + wordperfect_la_SOURCES = + nodist_EXTRA_wordperfect_la_SOURCES = dummy.cpp + +--- a/plugins/pdb/Makefile.in 2010-06-13 23:17:53.000000000 +0200 ++++ b/plugins/pdb/Makefile.in 2014-09-06 11:03:21.547951234 +0200 +@@ -431,7 +431,7 @@ + $(PDB_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + pdb_la_SOURCES = + nodist_EXTRA_pdb_la_SOURCES = dummy.cpp + +--- a/plugins/ots/Makefile.in 2010-06-13 23:17:52.000000000 +0200 ++++ b/plugins/ots/Makefile.in 2014-09-06 11:03:21.571951235 +0200 +@@ -425,7 +425,7 @@ + $(OTS_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + ots_la_SOURCES = + EXTRA_DIST = \ + +--- a/plugins/wml/Makefile.in 2010-06-13 23:17:55.000000000 +0200 ++++ b/plugins/wml/Makefile.in 2014-09-06 11:03:21.591951236 +0200 +@@ -431,7 +431,7 @@ + $(WML_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + wml_la_SOURCES = + nodist_EXTRA_wml_la_SOURCES = dummy.cpp + +--- a/plugins/bmp/Makefile.in 2010-06-13 23:17:40.000000000 +0200 ++++ b/plugins/bmp/Makefile.in 2014-09-06 11:03:21.615951237 +0200 +@@ -431,7 +431,7 @@ + $(BMP_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + bmp_la_SOURCES = + nodist_EXTRA_bmp_la_SOURCES = dummy.cpp + +--- a/plugins/applix/Makefile.in 2010-06-13 23:17:40.000000000 +0200 ++++ b/plugins/applix/Makefile.in 2014-09-06 11:03:21.635951237 +0200 +@@ -431,7 +431,7 @@ + $(APPLIX_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + applix_la_SOURCES = + +--- a/plugins/iscii/Makefile.in 2010-06-13 23:17:47.000000000 +0200 ++++ b/plugins/iscii/Makefile.in 2014-09-06 11:03:21.659951238 +0200 +@@ -431,7 +431,7 @@ + $(ISCII_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + iscii_la_SOURCES = + nodist_EXTRA_iscii_la_SOURCES = dummy.cpp + +--- a/plugins/gdict/Makefile.in 2010-06-13 23:17:46.000000000 +0200 ++++ b/plugins/gdict/Makefile.in 2014-09-06 11:03:21.679951239 +0200 +@@ -429,7 +429,7 @@ + @TOOLKIT_GTK_TRUE@ $(GDICT_LIBS) \ + @TOOLKIT_GTK_TRUE@ -avoid-version \ + @TOOLKIT_GTK_TRUE@ -module \ address@hidden@ -no-undefined address@hidden@ -Wl,--no-undefined + + @address@hidden = + @address@hidden = \ + +--- a/plugins/openwriter/Makefile.in 2010-06-13 23:17:50.000000000 +0200 ++++ b/plugins/openwriter/Makefile.in 2014-09-06 11:03:21.699951239 +0200 +@@ -432,7 +432,7 @@ + $(OPENWRITER_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + openwriter_la_SOURCES = + nodist_EXTRA_openwriter_la_SOURCES = dummy.cpp + +--- a/plugins/sdw/Makefile.in 2010-06-13 23:17:54.000000000 +0200 ++++ b/plugins/sdw/Makefile.in 2014-09-06 11:03:21.723951240 +0200 +@@ -431,7 +431,7 @@ + $(SDW_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + sdw_la_SOURCES = + nodist_EXTRA_sdw_la_SOURCES = dummy.cpp + +--- a/plugins/grammar/Makefile.in 2010-06-13 23:17:47.000000000 +0200 ++++ b/plugins/grammar/Makefile.in 2014-09-06 11:03:21.747951241 +0200 +@@ -430,7 +430,7 @@ + $(GRAMMAR_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + nodist_EXTRA_grammar_la_SOURCES = dummy.cpp + grammar_la_SOURCES = + +--- a/plugins/urldict/Makefile.in 2010-06-13 23:17:54.000000000 +0200 ++++ b/plugins/urldict/Makefile.in 2014-09-06 11:03:21.779951242 +0200 +@@ -431,7 +431,7 @@ + $(URLDICT_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + urldict_la_SOURCES = + nodist_EXTRA_urldict_la_SOURCES = dummy.cpp + +--- a/plugins/wmf/Makefile.in 2010-06-13 23:17:55.000000000 +0200 ++++ b/plugins/wmf/Makefile.in 2014-09-06 11:03:21.799951243 +0200 +@@ -428,7 +428,7 @@ + $(WMF_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + wmf_la_SOURCES = + nodist_EXTRA_wmf_la_SOURCES = dummy.cpp + +--- a/plugins/mif/Makefile.in 2010-06-13 23:17:49.000000000 +0200 ++++ b/plugins/mif/Makefile.in 2014-09-06 11:03:21.819951243 +0200 +@@ -431,7 +431,7 @@ + $(MIF_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + mif_la_SOURCES = + nodist_EXTRA_mif_la_SOURCES = dummy.cpp + +--- a/plugins/eml/Makefile.in 2010-06-13 23:17:45.000000000 +0200 ++++ b/plugins/eml/Makefile.in 2014-09-06 11:03:21.843951244 +0200 +@@ -431,7 +431,7 @@ + $(EML_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + eml_la_SOURCES = + nodist_EXTRA_eml_la_SOURCES = dummy.cpp + +--- a/plugins/openxml/Makefile.in 2010-06-13 23:17:51.000000000 +0200 ++++ b/plugins/openxml/Makefile.in 2014-09-06 11:03:21.863951245 +0200 +@@ -434,7 +434,7 @@ + $(OPENXML_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + openxml_la_SOURCES = + nodist_EXTRA_openxml_la_SOURCES = dummy.cpp + +--- a/plugins/goffice/Makefile.in 2010-06-13 23:17:46.000000000 +0200 ++++ b/plugins/goffice/Makefile.in 2014-09-06 11:03:21.883951245 +0200 +@@ -425,7 +425,7 @@ + $(GOFFICE_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + goffice_la_SOURCES = + EXTRA_DIST = \ + +--- a/plugins/passepartout/Makefile.in 2010-06-13 23:17:52.000000000 +0200 ++++ b/plugins/passepartout/Makefile.in 2014-09-06 11:03:21.907951246 +0200 +@@ -433,7 +433,7 @@ + $(PASSEPARTOUT_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + passepartout_la_SOURCES = + nodist_EXTRA_passepartout_la_SOURCES = dummy.cpp + +--- a/plugins/clarisworks/Makefile.in 2010-06-13 23:17:41.000000000 +0200 ++++ b/plugins/clarisworks/Makefile.in 2014-09-06 11:03:21.927951247 +0200 +@@ -433,7 +433,7 @@ + $(CLARISWORKS_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + clarisworks_la_SOURCES = + nodist_EXTRA_clarisworks_la_SOURCES = dummy.cpp + +--- a/plugins/command/Makefile.in 2010-06-13 23:17:44.000000000 +0200 ++++ b/plugins/command/Makefile.in 2014-09-06 11:03:21.947951247 +0200 +@@ -426,7 +426,7 @@ + @TOOLKIT_COCOA_FALSE@ $(COMMAND_LIBS) \ + @TOOLKIT_COCOA_FALSE@ -avoid-version \ + @TOOLKIT_COCOA_FALSE@ -module \ address@hidden@ -no-undefined address@hidden@ -Wl,--no-undefined + + @address@hidden = + all: all-recursive + +--- a/plugins/presentation/Makefile.in 2010-06-13 23:17:53.000000000 +0200 ++++ b/plugins/presentation/Makefile.in 2014-09-06 11:03:21.971951248 +0200 +@@ -433,7 +433,7 @@ + $(PRESENTATION_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + presentation_la_SOURCES = + nodist_EXTRA_presentation_la_SOURCES = dummy.cpp + +--- a/plugins/psion/Makefile.in 2010-06-13 23:17:53.000000000 +0200 ++++ b/plugins/psion/Makefile.in 2014-09-06 11:03:21.991951249 +0200 +@@ -427,7 +427,7 @@ + $(PSION_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + psion_la_SOURCES = + EXTRA_DIST = \ + +--- a/plugins/rsvg/Makefile.in 2010-06-13 23:17:53.000000000 +0200 ++++ b/plugins/rsvg/Makefile.in 2014-09-06 11:03:22.011951250 +0200 +@@ -430,7 +430,7 @@ + rsvg_la_LDFLAGS = \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + rsvg_la_SOURCES = + nodist_EXTRA_rsvg_la_SOURCES = dummy.cpp + +--- a/plugins/wpg/Makefile.in 2010-06-13 23:17:55.000000000 +0200 ++++ b/plugins/wpg/Makefile.in 2014-09-06 11:03:22.035951250 +0200 +@@ -428,7 +428,7 @@ + $(WPG_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + wpg_la_SOURCES = + nodist_EXTRA_wpg_la_SOURCES = dummy.cpp + +--- a/plugins/t602/Makefile.in 2010-06-13 23:17:54.000000000 +0200 ++++ b/plugins/t602/Makefile.in 2014-09-06 11:03:22.055951251 +0200 +@@ -431,7 +431,7 @@ + $(T602_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + t602_la_SOURCES = + nodist_EXTRA_t602_la_SOURCES = dummy.cpp + +--- a/plugins/docbook/Makefile.in 2010-06-13 23:17:44.000000000 +0200 ++++ b/plugins/docbook/Makefile.in 2014-09-06 11:03:22.075951252 +0200 +@@ -431,7 +431,7 @@ + $(DOCBOOK_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + docbook_la_SOURCES = + nodist_EXTRA_docbook_la_SOURCES = dummy.cpp + +--- a/plugins/hrtext/Makefile.in 2010-06-13 23:17:47.000000000 +0200 ++++ b/plugins/hrtext/Makefile.in 2014-09-06 11:03:22.099951252 +0200 +@@ -431,7 +431,7 @@ + $(HRTEXT_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + hrtext_la_SOURCES = + nodist_EXTRA_hrtext_la_SOURCES = dummy.cpp + +--- a/plugins/s5/Makefile.in 2010-06-13 23:17:54.000000000 +0200 ++++ b/plugins/s5/Makefile.in 2014-09-06 11:03:22.119951253 +0200 +@@ -431,7 +431,7 @@ + $(S5_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + s5_la_SOURCES = + nodist_EXTRA_s5_la_SOURCES = dummy.cpp + +--- a/plugins/hancom/Makefile.in 2010-06-13 23:17:47.000000000 +0200 ++++ b/plugins/hancom/Makefile.in 2014-09-06 11:03:22.143951254 +0200 +@@ -431,7 +431,7 @@ + $(HANCOM_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + hancom_la_SOURCES = + nodist_EXTRA_hancom_la_SOURCES = dummy.cpp + +--- a/plugins/aiksaurus/Makefile.in 2010-06-13 23:17:40.000000000 +0200 ++++ b/plugins/aiksaurus/Makefile.in 2014-09-06 11:03:22.163951255 +0200 +@@ -428,7 +428,7 @@ + $(AIKSAURUS_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + aiksaurus_la_SOURCES = + all: all-recursive + +--- a/plugins/kword/Makefile.in 2010-06-13 23:17:48.000000000 +0200 ++++ b/plugins/kword/Makefile.in 2014-09-06 11:03:22.183951255 +0200 +@@ -431,7 +431,7 @@ + $(KWORD_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + kword_la_SOURCES = + nodist_EXTRA_kword_la_SOURCES = dummy.cpp + +--- a/plugins/freetranslation/Makefile.in 2010-06-13 23:17:45.000000000 +0200 ++++ b/plugins/freetranslation/Makefile.in 2014-09-06 11:03:22.207951256 +0200 +@@ -433,7 +433,7 @@ + $(FREETRANSLATION_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + freetranslation_la_SOURCES = + nodist_EXTRA_freetranslation_la_SOURCES = dummy.cpp + +--- a/plugins/mathview/Makefile.in 2010-06-13 23:17:48.000000000 +0200 ++++ b/plugins/mathview/Makefile.in 2014-09-06 11:03:22.227951257 +0200 +@@ -429,7 +429,7 @@ + $(MATHVIEW_LIBS) \ + -avoid-version \ + -module \ +- -no-undefined ++ -Wl,--no-undefined + + nodist_EXTRA_mathview_la_SOURCES = dummy.cpp + mathview_la_SOURCES = + +--- a/src/Makefile.in 2014-09-06 08:42:45.000000000 +0200 ++++ b/src/Makefile.in 2014-09-06 11:17:48.287979611 +0200 +@@ -538,7 +538,7 @@ + + @address@hidden = \ + @TOOLKIT_COCOA_TRUE@ $(DEPS_LIBS) \ address@hidden@ --no-undefined \ address@hidden@ -Wl,--no-undefined \ + @TOOLKIT_COCOA_TRUE@ -avoid-version \ + @TOOLKIT_COCOA_TRUE@ -export-dynamic \ + @TOOLKIT_COCOA_TRUE@ -headerpad_max_install_names +@@ -554,7 +554,7 @@ + + @address@hidden = \ + @TOOLKIT_COCOA_FALSE@ $(platform_ldflags) \ address@hidden@ --no-undefined \ address@hidden@ -Wl,--no-undefined \ + @TOOLKIT_COCOA_FALSE@ -avoid-version \ + @TOOLKIT_COCOA_FALSE@ -export-dynamic + diff --git a/gnu/packages/patches/abiword-use-proper-png-api.patch b/gnu/packages/patches/abiword-use-proper-png-api.patch new file mode 100644 index 0000000..e8ce028 --- /dev/null +++ b/gnu/packages/patches/abiword-use-proper-png-api.patch @@ -0,0 +1,175 @@ +Do not directly access the fields of png_struct and png_info. + +--- a/plugins/mswrite/xp/ie_imp_MSWrite.cpp 2010-05-30 21:20:53.000000000 +0200 ++++ b/plugins/mswrite/xp/ie_imp_MSWrite.cpp 2014-09-07 06:58:04.162298089 +0200 +@@ -891,7 +891,7 @@ + info_ptr = png_create_info_struct (png_ptr); + if (!info_ptr) goto err; + +- if (setjmp (png_ptr->jmpbuf) ) { ++ if (setjmp (png_jmpbuf(png_ptr)) ) { + png_destroy_write_struct (&png_ptr, &info_ptr); + goto err; + } + +--- a/src/af/gr/win/gr_Win32Image.cpp 2009-07-08 19:33:53.000000000 +0200 ++++ b/src/af/gr/win/gr_Win32Image.cpp 2014-09-07 06:58:04.198298090 +0200 +@@ -148,7 +148,7 @@ + info_ptr = png_create_info_struct(png_ptr); + + // libpng will longjmp back to here if a fatal error occurs +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + /* If we get here, we had a problem reading the file */ + png_destroy_write_struct(&png_ptr, (png_infopp)NULL); +@@ -547,7 +547,7 @@ + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + +--- a/src/af/util/xp/ut_png.cpp 2008-02-24 04:33:07.000000000 +0100 ++++ b/src/af/util/xp/ut_png.cpp 2014-09-07 06:58:04.230298091 +0200 +@@ -71,7 +71,7 @@ + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_read_struct(&png_ptr, &info_ptr, static_cast(NULL)); + +--- a/plugins/bmp/xp/ie_impGraphic_BMP.cpp 2009-06-25 06:02:06.000000000 +0200 ++++ b/plugins/bmp/xp/ie_impGraphic_BMP.cpp 2014-09-07 06:59:08.814300205 +0200 +@@ -313,7 +313,7 @@ + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); +@@ -332,7 +332,7 @@ + UT_Error IE_ImpGraphic_BMP::Convert_BMP_Pallet(UT_ByteBuf* pBB) + { + /* Reset error handling for libpng */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + return UT_ERROR; +@@ -372,7 +372,7 @@ + UT_Error IE_ImpGraphic_BMP::Convert_BMP(UT_ByteBuf* pBB) + { + /* Reset error handling for libpng */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + return UT_ERROR; + +--- a/plugins/rsvg/xp/AbiRSVG.cpp 2009-06-25 06:02:06.000000000 +0200 ++++ b/plugins/rsvg/xp/AbiRSVG.cpp 2014-09-07 06:59:08.914300209 +0200 +@@ -145,7 +145,7 @@ + return error; + } + +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + g_object_unref(G_OBJECT(pixbuf)); + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); +@@ -234,7 +234,7 @@ + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + +--- a/src/wp/impexp/win/ie_impGraphic_Win32Native.cpp 2009-07-07 18:50:18.000000000 +0200 ++++ b/src/wp/impexp/win/ie_impGraphic_Win32Native.cpp 2014-09-07 06:59:09.018300212 +0200 +@@ -501,7 +501,7 @@ + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); +@@ -520,7 +520,7 @@ + UT_Error IE_ImpGraphic_Win32Native::Convert_BMP_Palette(UT_ByteBuf* pBB) + { + /* Reset error handling for libpng */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + return UT_ERROR; +@@ -560,7 +560,7 @@ + UT_Error IE_ImpGraphic_Win32Native::Convert_BMP(UT_ByteBuf* pBB) + { + /* Reset error handling for libpng */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + return UT_ERROR; + +--- a/src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp 2009-07-01 06:02:04.000000000 +0200 ++++ b/src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp 2014-09-07 06:59:09.138300216 +0200 +@@ -185,7 +185,7 @@ + /** needed for the stejmp context */ + UT_Error IE_ImpGraphic_GdkPixbuf::_png_write(GdkPixbuf * pixbuf) + { +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + DELETEP(m_pPngBB); + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); +@@ -446,7 +446,7 @@ + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ +- if (setjmp(m_pPNG->jmpbuf)) ++ if (setjmp(png_jmpbuf(m_pPNG))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + +--- a/plugins/bmp/xp/ie_impGraphic_BMP.cpp 2014-09-07 07:03:02.000000000 +0200 ++++ b/plugins/bmp/xp/ie_impGraphic_BMP.cpp 2014-09-07 12:35:33.306961036 +0200 +@@ -191,7 +191,11 @@ + + /* Clean Up Memory Used */ + +- FREEP(m_pPNGInfo->palette); ++ ++ png_colorp palette; ++ int ignored_placeholder; ++ png_get_PLTE(m_pPNG, m_pPNGInfo, &palette, &ignored_placeholder); ++ FREEP(palette); + DELETEP(pBB); + png_destroy_write_struct(&m_pPNG, &m_pPNGInfo); + +--- a/plugins/garble/xp/abiword-garble-png.cpp 2009-09-05 17:34:44.000000000 +0200 ++++ b/plugins/garble/xp/abiword-garble-png.cpp 2014-09-08 00:15:04.508335153 +0200 +@@ -79,7 +79,7 @@ + png_set_strip_alpha( png_ptr ); + png_set_interlace_handling( png_ptr ); + png_set_bgr( png_ptr ); +- rowbytes = info_ptr->rowbytes; ++ rowbytes = png_get_rowbytes( png_ptr, info_ptr ); + png_destroy_read_struct( &png_ptr, &info_ptr, NULL ); + } + diff --git a/gnu/packages/patches/abiword-wmf-version-lookup-fix.patch b/gnu/packages/patches/abiword-wmf-version-lookup-fix.patch new file mode 100644 index 0000000..f27f32f --- /dev/null +++ b/gnu/packages/patches/abiword-wmf-version-lookup-fix.patch @@ -0,0 +1,28 @@ +The way the configure script determines the version of libwmf is by temporarily +making dots separator characters, but since the file name of the program which +returns the version contains dots in Guix (the version in the store entry name), +doing it this way will always fail. + +This is a simple guix-specific fix for the problem. + +--- a/configure 2010-06-13 23:17:37.000000000 +0200 ++++ b/configure 2014-09-08 17:31:52.102371800 +0200 +@@ -21140,13 +21140,11 @@ + $as_echo "$as_me: WARNING: wmf plugin: program libwmf-config not found in path" >&2;} + fi + else +- IFS_old="$IFS" +- IFS='.' +- set -- `$libwmfconfig --version` +- libwmf_major_found="${1}" +- libwmf_minor_found="${2}" +- libwmf_micro_found="${3}" +- IFS="$IFS_old" ++ libwmf_fullver_found=`$libwmfconfig --version` ++ libwmf_major_found=$(echo $libwmf_fullver_found | cut -d . -f 1) ++ libwmf_minor_found=$(echo $libwmf_fullver_found | cut -d . -f 2) ++ libwmf_micro_found=$(echo $libwmf_fullver_found | cut -d . -f 3) ++ + if test "$libwmf_major_found" -gt "$libwmf_major_req"; then + wmf_deps="yes" + elif test "$libwmf_major_found" -eq "$libwmf_major_req" && -- 1.7.10.4