diff --git a/.cvsignore b/.cvsignore index 9ef4e8a..4bfb9cb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -latex2rtf-1.9.19.tar.gz +latex2rtf-2.1.0.tar.gz diff --git a/latex2rtf-imgh.patch b/latex2rtf-imgh.patch deleted file mode 100644 index f8ff569..0000000 --- a/latex2rtf-imgh.patch +++ /dev/null @@ -1,67 +0,0 @@ -Fix wrong height of pictures on x86_64 - -On 64-bit Fedora latex2rtf produced RTFs with insanely large pictures. -The dimensions of a PNG are stored in the header as 4-byte values. -GetPngSize() reads them as consecutive unsigned longs. -The problem is that sizeof(unsigned long) != 4 bytes. It's 8 bytes on -x86_64 Linux. -Use standard ISO C uint32_t instead. -With this patch the figures have their normal size. - -Index: graphics.c -=================================================================== ---- graphics.c (revision 894) -+++ graphics.c (working copy) -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #ifdef UNIX - #include - #endif -@@ -755,7 +756,7 @@ - - static unsigned char * getPngChunk(FILE *fp, char *s) - { -- unsigned long size, crc; -+ uint32_t size, crc; - char head[5]; - unsigned char *data; - -@@ -777,7 +778,7 @@ - - if (strcmp(head,"IEND") == 0) return NULL; - -- diagnostics(6,"found chunk '%s' size %ld bytes",head,size); -+ diagnostics(6,"found chunk '%s' size %ld bytes",head,(unsigned long)size); - data = malloc(size); - if (data == NULL) return NULL; - -@@ -798,7 +799,7 @@ - static void GetPngSize(char *s, unsigned long *w, unsigned long *h, unsigned long *xres, unsigned long *yres, int *bad_res) - { - FILE *fp; -- unsigned long *p; -+ uint32_t *p; - unsigned char buffer[16]; - char reftag[9] = "\211PNG\r\n\032\n"; - unsigned char *data = NULL; -@@ -833,7 +834,7 @@ - return; - } - -- p = (unsigned long *) data; -+ p = (uint32_t *) data; - *w = (g_little_endian) ? LETONL(*p) : *p; - p++; - *h = (g_little_endian) ? LETONL(*p) : *p; -@@ -846,7 +847,7 @@ - return; - } - -- p = (unsigned long *) data; -+ p = (uint32_t *) data; - *xres = (g_little_endian) ? LETONL(*p) : *p; - p++; - *yres = (g_little_endian) ? LETONL(*p) : *p; diff --git a/latex2rtf.patch b/latex2rtf.patch deleted file mode 100644 index 0ff1c33..0000000 --- a/latex2rtf.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff -up latex2rtf-1.9.19/doc/latex2rtf.info.orig latex2rtf-1.9.19/doc/latex2rtf.info ---- latex2rtf-1.9.19/doc/latex2rtf.info.orig 2007-11-20 17:36:11.000000000 +0200 -+++ latex2rtf-1.9.19/doc/latex2rtf.info 2008-11-02 19:45:44.000000000 +0200 -@@ -3,6 +3,11 @@ latex2rtf.texi. - - - -+INFO-DIR-SECTION LaTeX2RTF -+START-INFO-DIR-ENTRY -+* latex2rtf: (latex2rtf). LaTeX2RTF reference. -+END-INFO-DIR-ENTRY -+ -  - File: latex2rtf.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) - -diff -up latex2rtf-1.9.19/Makefile.orig latex2rtf-1.9.19/Makefile ---- latex2rtf-1.9.19/Makefile.orig 2007-11-18 08:10:57.000000000 +0200 -+++ latex2rtf-1.9.19/Makefile 2008-11-02 19:48:42.000000000 +0200 -@@ -23,21 +23,21 @@ LINK_FLAGS = -lm - #CFLAGS:=$(CFLAGS) -Zwin32 - - #Base directory - adapt as needed --PREFIX=$(PREFIX_DRIVE)/usr/local -+PREFIX=@PREFIX@ - - #Name of executable binary --- beware of 8.3 restriction under DOS - BINARY_NAME=latex2rtf$(EXE_SUFFIX) - - # Location of binary, man, info, and support files - adapt as needed --BIN_INSTALL=$(PREFIX)/bin --MAN_INSTALL=$(PREFIX)/man/man1 --INFO_INSTALL=$(PREFIX)/info --SUPPORT_INSTALL=$(PREFIX)/share/latex2rtf --CFG_INSTALL=$(PREFIX)/share/latex2rtf/cfg -+BIN_INSTALL=$(PREFIX)/@BINDIR@ -+MAN_INSTALL=$(PREFIX)/@MANDIR@/man1 -+INFO_INSTALL=$(PREFIX)/@INFODIR@ -+SUPPORT_INSTALL=$(PREFIX)/@DATADIR@/latex2rtf -+CFG_INSTALL=@DATADIR@/latex2rtf/cfg - - # Nothing to change below this line - --CFLAGS:=$(CFLAGS) -g -Wall -fsigned-char -+CFLAGS:=@OPTFLAGS@ -DUNIX -fsigned-char - - LIBS= - #LIBS=-lMallocDebug -force_flat_namespace -@@ -205,12 +205,12 @@ install: latex2rtf doc/latex2rtf.1 $(CFG - cd doc && $(MAKE) - $(MKDIR) $(BIN_INSTALL) - $(MKDIR) $(MAN_INSTALL) -- $(MKDIR) $(CFG_INSTALL) -+ $(MKDIR) $(PREFIX)/$(CFG_INSTALL) - cp $(BINARY_NAME) $(BIN_INSTALL) - cp scripts/latex2png $(BIN_INSTALL) - cp doc/latex2rtf.1 $(MAN_INSTALL) - cp doc/latex2png.1 $(MAN_INSTALL) -- cp $(CFGS) $(CFG_INSTALL) -+ cp $(CFGS) $(PREFIX)/$(CFG_INSTALL) - cp doc/latex2rtf.html $(SUPPORT_INSTALL) - cp doc/latex2rtf.pdf $(SUPPORT_INSTALL) - cp doc/latex2rtf.txt $(SUPPORT_INSTALL) -@@ -232,7 +232,7 @@ install: latex2rtf doc/latex2rtf.1 $(CFG - install-info: doc/latex2rtf.info - $(MKDIR) $(INFO_INSTALL) - cp doc/latex2rtf.info $(INFO_INSTALL) -- install-info --info-dir=$(INFO_INSTALL) doc/latex2rtf.info -+# install-info --info-dir=$(INFO_INSTALL) doc/latex2rtf.info - - realclean: checkdir clean - $(RM) -f makefile.depend latex2rtf-$(VERSION).tar.gz -@@ -245,7 +245,7 @@ splint: - pkg: - $(MKDIR) $(PKG_CONTENTS)/$(BIN_INSTALL) - $(MKDIR) $(PKG_CONTENTS)/$(MAN_INSTALL) -- $(MKDIR) $(PKG_CONTENTS)/$(CFG_INSTALL) -+ $(MKDIR) $(PKG_CONTENTS)/$(PREFIX)/$(CFG_INSTALL) - $(MKDIR) $(PKG_CONTENTS)/$(SUPPORT_INSTALL) - $(MKDIR) $(PKG_RESOURCES) - $(MKDIR) $(DMG_DIR) -@@ -254,7 +254,7 @@ pkg: - cp scripts/latex2png $(PKG_CONTENTS)/$(BIN_INSTALL) - cp doc/latex2rtf.1 $(PKG_CONTENTS)/$(MAN_INSTALL) - cp doc/latex2png.1 $(PKG_CONTENTS)/$(MAN_INSTALL) -- cp $(CFGS) $(PKG_CONTENTS)/$(CFG_INSTALL) -+ cp $(CFGS) $(PKG_CONTENTS)/$(PREFIX)/$(CFG_INSTALL) - cp doc/latex2rtf.html $(PKG_CONTENTS)/$(SUPPORT_INSTALL) - cp doc/latex2rtf.pdf $(PKG_CONTENTS)/$(SUPPORT_INSTALL) - cp doc/latex2rtf.txt $(PKG_CONTENTS)/$(SUPPORT_INSTALL) diff --git a/latex2rtf.spec b/latex2rtf.spec index 6f2f82b..d72ad56 100644 --- a/latex2rtf.spec +++ b/latex2rtf.spec @@ -1,26 +1,23 @@ Name: latex2rtf -Version: 1.9.19 -Release: 9%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: LaTeX to RTF converter that handles equations, figures, and cross-references Group: Applications/File License: GPLv2+ URL: http://latex2rtf.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -# Patch to makefile changing man and info file locations and compiler flags -Patch0: latex2rtf.patch -# Patch to fix wrong height of images on 64-bit architectures -# Bug https://bugzilla.redhat.com/attachment.cgi?id=341372 -Patch1: latex2rtf-imgh.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # For running the tests BuildRequires: ImageMagick -BuildRequires: latex2html +BuildRequires: texinfo +BuildRequires: texinfo-tex %if 0%{?rhel} == 5 BuildRequires: tetex-latex %else BuildRequires: tex(latex) %endif + # For converting images Requires: ImageMagick # Info file requirement @@ -30,18 +27,17 @@ Requires(preun): info %description LaTeX2rtf is a translator program which is intended to translate a LaTeX document (precisely: the text and a limited subset of LaTeX tags) into the RTF -format which can be imported by several textprocessors (including Microsoft +format which can be imported by several text processors (including Microsoft Word for Windows and Word for Macintosh). %prep %setup -q -%patch0 -p1 -%patch1 -p0 chmod a-x cfg/*.cfg +find -name "*.o" -delete %build -sed -i 's#@OPTFLAGS@#%{optflags}#g;s#@PREFIX@#%{buildroot}#g;s#@BINDIR@#%{_bindir}#g;s#@MANDIR@#%{_mandir}#g;s#@INFODIR@#%{_infodir}#g;s#@DATADIR@#%{_datadir}#g' Makefile -make %{?_smp_mflags} +# Set the necessary config options, including location of config files +make CFLAGS="%{optflags} -DUNIX -fsigned-char" CFG_INSTALL=%{_datadir}/%{name}/cfg %{?_smp_mflags} # Change encoding of documentation for txtfile in ChangeLog Copyright; do @@ -51,21 +47,17 @@ for txtfile in ChangeLog Copyright; do done %install -rm -rf $RPM_BUILD_ROOT -make install -make install-info +rm -rf %{buildroot} +make install PREFIX=%{buildroot}%{_prefix} MAN_INSTALL=%{buildroot}%{_mandir}/man1 +make install-info PREFIX=%{buildroot}%{_prefix} INFO_INSTALL=%{buildroot}%{_infodir} +# Remove unnecessary file from infodir +rm -f %{buildroot}%{_infodir}/dir %check -%if 0%{?rhel} != 0 -# Don't do anything since make check fails in a segfault at least on ppc -%else -# Otherwise perform check make check -%endif - %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post /sbin/install-info --quiet %{_infodir}/%{name}.info %{_infodir}/dir || : @@ -77,38 +69,43 @@ fi %files %defattr(-,root,root,-) %doc ChangeLog Copyright doc/latex2rtf.html doc/latex2rtf.pdf doc/copying.txt doc/credits -%{_bindir}/* -%{_mandir}/man1/* -%{_infodir}/* -%{_datadir}/%{name} +%{_bindir}/latex2rtf +%{_bindir}/latex2png +%{_mandir}/man1/latex2rtf.1.* +%{_mandir}/man1/latex2png.1.* +%{_infodir}/latex2rtf.info.* +%{_datadir}/latex2rtf/ %changelog +* Fri Mar 05 2010 Jussi Lehtola - 2.1.0-1 +- Update to 2.1.0. + * Fri Jul 24 2009 Fedora Release Engineering - 1.9.19-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild -* Mon Apr 27 2009 Jussi Lehtola - 1.9.19-8 +* Mon Apr 27 2009 Jussi Lehtola - 1.9.19-8 - Added patch to fix image height on 64-bit architectures. https://bugzilla.redhat.com/show_bug.cgi?id=497752 -* Wed Mar 25 2009 Jussi Lehtola - 1.9.19-7 +* Wed Mar 25 2009 Jussi Lehtola - 1.9.19-7 - Retry EPEL fix: disable check phase which doesn't seem to work for some reason on EPEL 5 ppc (segfault in list.tex). -* Sun Mar 22 2009 Jussi Lehtola - 1.9.19-6 +* Sun Mar 22 2009 Jussi Lehtola - 1.9.19-6 - Fix EPEL build. -* Sat Mar 21 2009 Jussi Lehtola - 1.9.19-5 +* Sat Mar 21 2009 Jussi Lehtola - 1.9.19-5 - Keep documentation time stamps when converting encoding. -* Fri Mar 13 2009 Jussi Lehtola - 1.9.19-4 +* Fri Mar 13 2009 Jussi Lehtola - 1.9.19-4 - Added check phase. -* Thu Mar 12 2009 Jussi Lehtola - 1.9.19-3 +* Thu Mar 12 2009 Jussi Lehtola - 1.9.19-3 - Review fixes. -* Sun Dec 21 2008 Jussi Lehtola - 1.9.19-2 +* Sun Dec 21 2008 Jussi Lehtola - 1.9.19-2 - Fix perms on config files. -* Sun Nov 02 2008 Jussi Lehtola - 1.9.19-1 +* Sun Nov 02 2008 Jussi Lehtola - 1.9.19-1 - First release. diff --git a/sources b/sources index 8b37dd4..78a2d05 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8a3b920d59f6b38736aa256c26374472 latex2rtf-1.9.19.tar.gz +7b42e25ebdf9afa740d554b930f07d08 latex2rtf-2.1.0.tar.gz