pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/converters/tex2rtf Update tex2rtf to version 2.01. A ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/70a6054e1ba3
branches: trunk
changeset: 471739:70a6054e1ba3
user: ben <ben%pkgsrc.org@localhost>
date: Tue Mar 30 18:23:46 2004 +0000
description:
Update tex2rtf to version 2.01. A changelog is not available, but this
version of tex2rtf is updated to work with newer versions of wxwindows,
and the prior version is referred to as obsolete. I am told that some
of the patches duplicate work that is done in CVS, so some patches
should disappear over time.
diffstat:
converters/tex2rtf/Makefile | 22 +-
converters/tex2rtf/distinfo | 19 +-
converters/tex2rtf/files/stringmatch.cpp | 44 +++
converters/tex2rtf/files/stringmatch.h | 5 +
converters/tex2rtf/patches/patch-aa | 31 +-
converters/tex2rtf/patches/patch-ab | 167 ++++++++++-
converters/tex2rtf/patches/patch-ac | 116 ++++++-
converters/tex2rtf/patches/patch-ad | 50 ++-
converters/tex2rtf/patches/patch-ae | 429 +++++++++++++++++++++++++++++++
converters/tex2rtf/patches/patch-af | 13 +
converters/tex2rtf/patches/patch-ag | 13 +
converters/tex2rtf/patches/patch-ah | 12 +
converters/tex2rtf/patches/patch-ai | 13 +
13 files changed, 855 insertions(+), 79 deletions(-)
diffs (truncated from 1016 to 300 lines):
diff -r b4064cb3780f -r 70a6054e1ba3 converters/tex2rtf/Makefile
--- a/converters/tex2rtf/Makefile Tue Mar 30 18:09:43 2004 +0000
+++ b/converters/tex2rtf/Makefile Tue Mar 30 18:23:46 2004 +0000
@@ -1,22 +1,24 @@
-# $NetBSD: Makefile,v 1.8 2004/03/29 05:19:47 ben Exp $
+# $NetBSD: Makefile,v 1.9 2004/03/30 18:23:46 ben Exp $
-DISTNAME= tex2rtf164_source
-PKGNAME= tex2rtf-164
+DISTNAME= tex2rtf-2.01-source
+PKGNAME= tex2rtf-2.01
CATEGORIES= converters textproc
-MASTER_SITES= ftp://www.remstar.com/pub/wxwin/tex2rtf/ \
- ftp://ftp.sunet.se/pub7/lang/wxwin/tex2rtf/
-EXTRACT_SUFX= .zip
+MASTER_SITES= ftp://biolpc22.york.ac.uk/pub/tex2rtf/
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= ben%NetBSD.org@localhost
HOMEPAGE= http://www.wxwindows.org/tex2rtf/index.htm
COMMENT= LaTex-to-RTF translator
-WRKSRC= ${WRKDIR}/src
+WRKSRC= ${WRKDIR}/${DISTNAME}/src
+MAKEFILE= makefile.unx
+USE_BUILDLINK3= yes
-do-build:
- cd ${WRKSRC} && make -f makefile.unx nogui
+post-patch:
+ ${CP} ${FILESDIR}/stringmatch.* ${WRKSRC}
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/tex2rtf_nogui ${PREFIX}/bin/tex2rtf
+ ${INSTALL_PROGRAM} ${WRKSRC}/tex2rtf ${PREFIX}/bin/tex2rtf
+.include "../../x11/wxGTK/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r b4064cb3780f -r 70a6054e1ba3 converters/tex2rtf/distinfo
--- a/converters/tex2rtf/distinfo Tue Mar 30 18:09:43 2004 +0000
+++ b/converters/tex2rtf/distinfo Tue Mar 30 18:23:46 2004 +0000
@@ -1,8 +1,13 @@
-$NetBSD: distinfo,v 1.2 2003/12/20 16:00:56 ben Exp $
+$NetBSD: distinfo,v 1.3 2004/03/30 18:23:46 ben Exp $
-SHA1 (tex2rtf164_source.zip) = 553e76b3ffd7e0a670427ea27a4cdaab3cee4d72
-Size (tex2rtf164_source.zip) = 310555 bytes
-SHA1 (patch-aa) = 08b848150d26177e8401a0538fe9ea49395c1a5e
-SHA1 (patch-ab) = fbb7a7733670acc96f86765c7c3d34baeab4a061
-SHA1 (patch-ac) = 786e851e1a3968f7796c10f302bbb7f88ef42932
-SHA1 (patch-ad) = 1eadb381c0cfc436f5d35a314feb2d229af4be5a
+SHA1 (tex2rtf-2.01-source.tar.bz2) = 363d2b1944e6f6817c0af170b9fd10289d259fcb
+Size (tex2rtf-2.01-source.tar.bz2) = 183262 bytes
+SHA1 (patch-aa) = 40fe1026d45242e5b8c35eacb232c8a0a571e7ed
+SHA1 (patch-ab) = 1ccdfe65311489b730d5ce660f85e2abae80939b
+SHA1 (patch-ac) = 3bebebafc7c252387881bf0c290002413b9462de
+SHA1 (patch-ad) = ea3d458b2ef52aac5069aa4137a0138b3604b9bb
+SHA1 (patch-ae) = f818c53093befdfedb6ea4d1c57d1fb74bbdb738
+SHA1 (patch-af) = 8977d4aeb1dc383d62201f591aa82e241e725902
+SHA1 (patch-ag) = 10c5116760dde455fb4923ea1f6ca006019b4535
+SHA1 (patch-ah) = 906f6097afaf9b5e0e4568939c0e7bec31485244
+SHA1 (patch-ai) = 278ab730e4ca281409dc08a60695be979eac9387
diff -r b4064cb3780f -r 70a6054e1ba3 converters/tex2rtf/files/stringmatch.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/tex2rtf/files/stringmatch.cpp Tue Mar 30 18:23:46 2004 +0000
@@ -0,0 +1,44 @@
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+/* #include <wx/wxchar.h> */
+
+bool
+wxStringMatch2 (const wxChar *str1, const wxChar *str2, bool subString, bool exact)
+{
+ if (str1 == NULL || str2 == NULL)
+ return FALSE;
+ if (str1 == str2)
+ return TRUE;
+
+ if (subString)
+ {
+ int len1 = wxStrlen (str1);
+ int len2 = wxStrlen (str2);
+ int i;
+
+ // Search for str1 in str2
+ // Slow .... but acceptable for short strings
+ for (i = 0; i <= len2 - len1; i++)
+ {
+ if (wxStrnicmp (str1, str2 + i, len1) == 0)
+ return TRUE;
+ }
+ }
+ else if (exact)
+ {
+ if (wxStricmp (str1, str2) == 0)
+ return TRUE;
+ }
+ else
+ {
+ int len1 = wxStrlen (str1);
+ int len2 = wxStrlen (str2);
+
+ if (wxStrnicmp (str1, str2, wxMin (len1, len2)) == 0)
+ return TRUE;
+ }
+
+ return FALSE;
+}
diff -r b4064cb3780f -r 70a6054e1ba3 converters/tex2rtf/files/stringmatch.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/tex2rtf/files/stringmatch.h Tue Mar 30 18:23:46 2004 +0000
@@ -0,0 +1,5 @@
+#include "wx/object.h"
+#include "wx/list.h"
+#include "wx/filefn.h"
+
+WXDLLEXPORT bool wxStringMatch2(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE);
diff -r b4064cb3780f -r 70a6054e1ba3 converters/tex2rtf/patches/patch-aa
--- a/converters/tex2rtf/patches/patch-aa Tue Mar 30 18:09:43 2004 +0000
+++ b/converters/tex2rtf/patches/patch-aa Tue Mar 30 18:23:46 2004 +0000
@@ -1,13 +1,22 @@
-$NetBSD: patch-aa,v 1.1.1.1 2002/05/25 23:23:01 rh Exp $
+$NetBSD: patch-aa,v 1.2 2004/03/30 18:23:46 ben Exp $
---- make.env.orig Thu Sep 12 11:58:42 1996
-+++ make.env
-@@ -56,7 +56,7 @@
- # Sun with GCC: nothing
- # Solaris: -lgen -ldl -lsocket -lnsl
- # SGI: -lPW
--COMPLIBS=-lg++
-+COMPLIBS=-lstdc++
+--- tex2rtf.cpp.orig Wed Aug 7 16:04:05 2002
++++ tex2rtf.cpp
+@@ -330,7 +330,7 @@ bool MyApp::OnInit()
- # HP-specific compiler library: an AIAI convenience
- HPCOMPLIBS=
+ if (InputFile)
+ {
+- sprintf(buf, "Tex2RTF [%s]", FileNameFromPath(InputFile));
++ sprintf(buf, "Tex2RTF [%s]", wxFileNameFromPath(InputFile));
+ frame->SetTitle(buf);
+ }
+
+@@ -967,7 +967,7 @@ bool Go(void)
+
+ if (InputFile && OutputFile)
+ {
+- if (!FileExists(InputFile))
++ if (!wxFileExists(InputFile))
+ {
+ OnError("Cannot open input file!");
+ TexCleanUp();
diff -r b4064cb3780f -r 70a6054e1ba3 converters/tex2rtf/patches/patch-ab
--- a/converters/tex2rtf/patches/patch-ab Tue Mar 30 18:09:43 2004 +0000
+++ b/converters/tex2rtf/patches/patch-ab Tue Mar 30 18:23:46 2004 +0000
@@ -1,22 +1,159 @@
-$NetBSD: patch-ab,v 1.1.1.1 2002/05/25 23:23:01 rh Exp $
+$NetBSD: patch-ab,v 1.2 2004/03/30 18:23:46 ben Exp $
---- makefile.unx.orig Sun Nov 23 17:55:48 1997
-+++ makefile.unx
-@@ -2,7 +2,7 @@
- # Valid targets: xview, motif or nogui. These should produce
- # the executables tex2rtf_ol, tex2rtf_motif and tex2rtf_nogui respectively.
+--- htmlutil.cpp.orig Fri Jun 7 11:01:36 2002
++++ htmlutil.cpp
+@@ -1,4 +1,4 @@
+-/////////////////////////////////////////////////////////////////////////////
++////////////////////////////////////////////////////////////////////////////
+ // Name: htmlutil.cpp
+ // Purpose: Converts Latex to HTML
+ // Author: Julian Smart
+@@ -191,7 +191,7 @@ void ReopenFile(FILE **fd, char **fileNa
+ else
+ sprintf(buf, "%s%d.html", FileRoot, fileId);
+ if (*fileName) delete[] *fileName;
+- *fileName = copystring(FileNameFromPath(buf));
++ *fileName = copystring(wxFileNameFromPath(buf));
+ *fd = fopen(buf, "w");
+ fprintf(*fd, "<HTML>\n");
+ }
+@@ -426,13 +426,13 @@ void AddBrowseButtons(char *upLabel, cha
+ if (truncateFilenames)
+ {
+ char buf1[80];
+- strcpy(buf1, ConvertCase(FileNameFromPath(FileRoot)));
++ strcpy(buf1, ConvertCase(wxFileNameFromPath(FileRoot)));
+ sprintf(buf, "\n<A HREF=\"%s.%s\">%s</A> ", buf1, ConvertCase("htm"), contentsReference);
+ }
+ else
+ {
+ char buf1[80];
+- strcpy(buf1, ConvertCase(FileNameFromPath(FileRoot)));
++ strcpy(buf1, ConvertCase(wxFileNameFromPath(FileRoot)));
+ sprintf(buf, "\n<A HREF=\"%s%s\">%s</A> ", buf1, ConvertCase("_contents.html"), contentsReference);
+ }
+ // TexOutput("<NOFRAMES>");
+@@ -708,9 +708,9 @@ void HTMLOnMacro(int macroId, int no_arg
--WXDIR = ../../..
-+WXDIR = ..
+ char titleBuf[200];
+ if (truncateFilenames)
+- sprintf(titleBuf, "%s.htm", FileNameFromPath(FileRoot));
++ sprintf(titleBuf, "%s.htm", wxFileNameFromPath(FileRoot));
+ else
+- sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot));
++ sprintf(titleBuf, "%s_contents.html", wxFileNameFromPath(FileRoot));
+
+ fprintf(Chapters, "<A NAME=\"%s\"></A>", topicName);
+
+@@ -2708,9 +2708,9 @@ bool HTMLOnArgument(int macroId, int arg
+
+ char titleBuf[150];
+ if (truncateFilenames)
+- sprintf(titleBuf, "%s.htm", FileNameFromPath(FileRoot));
++ sprintf(titleBuf, "%s.htm", wxFileNameFromPath(FileRoot));
+ else
+- sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot));
++ sprintf(titleBuf, "%s_contents.html", wxFileNameFromPath(FileRoot));
+
+ HTMLHead();
+ TexOutput("<title>");
+@@ -2919,7 +2919,7 @@ bool HTMLGo(void)
+ OnError("Cannot open output file!");
+ return FALSE;
+ }
+- AddTexRef("contents", FileNameFromPath(TitlepageName), ContentsNameString);
++ AddTexRef("contents", wxFileNameFromPath(TitlepageName), ContentsNameString);
+
+ fprintf(Contents, "<P><P><H2>%s</H2><P><P>\n", ContentsNameString);
+
+@@ -3003,7 +3003,7 @@ bool HTMLGo(void)
+ if (contentsString)
+ fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", contentsString);
+ else
+- fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", FileNameFromPath(FileRoot));
++ fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", wxFileNameFromPath(FileRoot));
+ }
+
+ // Output frame information
+@@ -3017,8 +3017,8 @@ bool HTMLGo(void)
- # All common UNIX compiler flags and options are now in
- # this central makefile.
-@@ -25,7 +25,7 @@
+ fprintf(tmpTitle, "<FRAMESET COLS=\"30%%,70%%\">\n");
+
+- fprintf(tmpTitle, "<FRAME SRC=\"%s\">\n", ConvertCase(FileNameFromPath(contentsFrameName)));
+- fprintf(tmpTitle, "<FRAME SRC=\"%s\" NAME=\"mainwindow\">\n", ConvertCase(FileNameFromPath(firstFileName)));
++ fprintf(tmpTitle, "<FRAME SRC=\"%s\">\n", ConvertCase(wxFileNameFromPath(contentsFrameName)));
++ fprintf(tmpTitle, "<FRAME SRC=\"%s\" NAME=\"mainwindow\">\n", ConvertCase(wxFileNameFromPath(firstFileName)));
+ fprintf(tmpTitle, "</FRAMESET>\n");
+
+ fprintf(tmpTitle, "<NOFRAMES>\n");
+@@ -3049,7 +3049,7 @@ bool HTMLGo(void)
+ fprintf(tmpTitle, "\n</HTML>\n");
- TEX2ANYLIB = $(TEX2RTFDIR)/lib/libtex2any$(GUISUFFIX).a
+ fclose(tmpTitle);
+- if (FileExists(TitlepageName)) wxRemoveFile(TitlepageName);
++ if (wxFileExists(TitlepageName)) wxRemoveFile(TitlepageName);
+ if (!wxRenameFile("title.tmp", TitlepageName))
+ {
+ wxCopyFile("title.tmp", TitlepageName);
+@@ -3062,7 +3062,7 @@ bool HTMLGo(void)
+ if (lastTopic) delete[] lastTopic;
+ lastTopic = NULL;
+
+- if (FileExists(ContentsName)) wxRemoveFile(ContentsName);
++ if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName);
--INC = -I$(WXDIR)/include/base -I$(WXDIR)/include/x -I$(WXHELPDIR)/src $(COMPPATHS)
-+INC = -I$(WXDIR)/include/base -I$(WXDIR)/include/x -I$(WXHELPDIR)/src -I$(WXDIR)/src/wxwin $(COMPPATHS)
+ if (!wxRenameFile(TmpContentsName, ContentsName))
+ {
+@@ -3147,11 +3147,11 @@ void GenerateHTMLWorkshopFiles(char *fna
+ "Default topic=%s\n"
+ "Index file=%s.hhk\n"
+ "Title=",
+- FileNameFromPath(fname),
+- FileNameFromPath(fname),
+- FileNameFromPath(fname),
+- FileNameFromPath(TitlepageName),
+- FileNameFromPath(fname)
++ wxFileNameFromPath(fname),
++ wxFileNameFromPath(fname),
++ wxFileNameFromPath(fname),
++ wxFileNameFromPath(TitlepageName),
++ wxFileNameFromPath(fname)
+ );
+
+ if (DocumentTitle) {
+@@ -3162,19 +3162,19 @@ void GenerateHTMLWorkshopFiles(char *fna
- LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(TEX2RTFDIR)/lib
Home |
Main Index |
Thread Index |
Old Index