[Pkg-crosswire-devel] [Branch ~pkgcrosswire/libsword/main] Rev 55: Adds two osis2mod patches from upstream svn.

noreply at launchpad.net noreply at launchpad.net
Fri May 29 07:58:08 BST 2009


------------------------------------------------------------
revno: 55
committer: Jonathan Marsden <jmarsden at fastmail.fm>
branch nick: main
timestamp: Thu 2009-05-28 23:31:53 -0700
message:
  Adds two osis2mod patches from upstream svn.
added:
  debian/patches/13_fix_osis2mod_compression_default.diff
  debian/patches/14_closing_section_not_chapter.diff
modified:
  debian/changelog
  debian/patches/series

=== modified file 'debian/changelog'
--- debian/changelog	2009-05-25 20:37:03 +0000
+++ debian/changelog	2009-05-29 06:31:53 +0000
@@ -6,11 +6,12 @@
     - Bump SONAME to 8 -- SWORD 1.6 is not backward compatible with 1.5.11.
   * debian/patches/series:
     - Remove 10_diatheke.diff -- included in upstream source.
-    - Add 11_regex_only_when_needed.diff.
   * debian/patches/:
     - Remove several old unused .diff files.
     - Add 11_regex_only_when_needed.diff to conditionally include regex lib.
     - Add 12_fix_compiler_warnings.diff to remove all compiler warnings.
+    - Add 13_fix_osis2mod_compression_default.diff from upstream svn.
+    - Add 14_closing_section_not_chapter.diff from upstream svn.
   * debian/libsword7.*: 
     - Rename to libsword8.*
     - Change libsword7 to libsword8 within files.
@@ -53,7 +54,7 @@
   [ Closed Bugs ]
   * FTBFS on intrepid (LP: #305172)
 
- -- Jonathan Marsden <jmarsden at fastmail.fm>  Mon, 25 May 2009 13:28:25 -0700
+ -- Jonathan Marsden <jmarsden at fastmail.fm>  Thu, 28 May 2009 23:16:23 -0700
 
 sword (1.5.11-1) experimental; urgency=low
 

=== added file 'debian/patches/13_fix_osis2mod_compression_default.diff'
--- debian/patches/13_fix_osis2mod_compression_default.diff	1970-01-01 00:00:00 +0000
+++ debian/patches/13_fix_osis2mod_compression_default.diff	2009-05-29 06:31:53 +0000
@@ -0,0 +1,15 @@
+Ensure LZSS compression is not accidentally enabled by default.
+This is svn revision 2416 in the upstream SWORD repository.
+Index: main/utilities/osis2mod.cpp
+===================================================================
+--- main.orig/utilities/osis2mod.cpp	2009-05-28 21:59:05.000000000 -0700
++++ main/utilities/osis2mod.cpp	2009-05-28 21:59:33.000000000 -0700
+@@ -1473,7 +1473,7 @@
+         if (compType == "ZIP") {
+                 compressor = new ZipCompress();
+         }
+-        else if (compType = "LZSS") {
++        else if (compType == "LZSS") {
+                 compressor = new LZSSCompress();
+         }
+ 

=== added file 'debian/patches/14_closing_section_not_chapter.diff'
--- debian/patches/14_closing_section_not_chapter.diff	1970-01-01 00:00:00 +0000
+++ debian/patches/14_closing_section_not_chapter.diff	2009-05-29 06:31:53 +0000
@@ -0,0 +1,94 @@
+Index: main/utilities/osis2mod.cpp
+===================================================================
+--- main.orig/utilities/osis2mod.cpp	2009-05-28 22:02:59.000000000 -0700
++++ main/utilities/osis2mod.cpp	2009-05-28 23:05:34.000000000 -0700
+@@ -612,6 +612,12 @@
+ 	// Flag used to indicate where useful text begins
+ 	static bool               firstDiv        = false;
+ 
++	// Retain the sID of book, chapter and verse (commentary) divs so that we can find them again.
++	// This relies on transformBSP.
++	static SWBuf              sidBook         = "";
++	static SWBuf              sidChapter      = "";
++	static SWBuf              sidVerse        = "";
++
+ 	// Stack of quote elements used to handle Words of Christ
+ 	static std::stack<XMLTag> quoteStack;
+ 
+@@ -628,9 +634,10 @@
+ 	static int                verseDepth      = 0;
+ 
+ 	int                       tagDepth        = tagStack.size();
+-	const char               *tokenName       = token.getName();
++	SWBuf                     tokenName       = token.getName();
+ 	bool                      isEndTag        = token.isEndTag() || token.getAttribute("eID");
+-	const char               *typeAttr        = token.getAttribute("type");
++	SWBuf                     typeAttr        = token.getAttribute("type");
++	SWBuf                     eidAttr         = token.getAttribute("eID");
+ 
+ 	// process start tags
+ 	if (!isEndTag) {
+@@ -688,6 +695,7 @@
+ 				currentVerse.Verse(0);
+ 				strcpy(currentOsisID, currentVerse.getOSISRef());
+ 
++				sidBook         = token.getAttribute("sID");
+ 				inChapter       = false;
+ 				inVerse         = false;
+ 				inPreVerse      = false;
+@@ -733,6 +741,7 @@
+ #endif
+ 				strcpy(currentOsisID, currentVerse.getOSISRef());
+ 
++				sidChapter      = token.getAttribute("sID");
+ 				inChapter       = true;
+ 				inVerse         = false;
+ 				inPreVerse      = false;
+@@ -772,7 +781,7 @@
+ 				// Did we have pre-verse material that needs to be marked?
+ 				if (inPreVerse) {
+ 					char genBuf[200];
+-					sprintf(genBuf, "<div type=\"x-milestone\" subType=\"x-preverse\" eID=\"pv%d\"/>", genID++);
++					sprintf(genBuf, "<div type=\"x-milestone\" subType=\"x-preverse\" eID=\"pv%d\"/>", genID);
+ 					text.append(genBuf);
+ 				}
+ 
+@@ -813,6 +822,7 @@
+ 				}
+ #endif
+ 
++				sidVerse        = token.getAttribute("sID");
+ 				inVerse         = true;
+ 				inPreVerse      = false;
+ 				inBookHeader    = false;
+@@ -966,8 +976,7 @@
+ 		}
+ 
+ 		// VERSE and COMMENTARY END
+-		if (!strcmp(tokenName, "verse") || (inVerse && !strcmp(tokenName, "div"))) {
+-
++		if ((!strcmp(tokenName, "verse")) || ((!strcmp(tokenName, "div")) && (eidAttr == sidVerse))) {
+ 			if (tagDepth != verseDepth) {
+ 				cout << "WARNING(NESTING): verse " << currentOsisID << " is not well formed:(" << verseDepth << "," << tagDepth << ")" << endl;
+ 			}
+@@ -1061,17 +1070,18 @@
+ 		// Also for material that goes with last entry
+ 		if (!inVerse && !inBookHeader && !inChapterHeader) {
+ 			// Is this the end of a chapter.
+-			if (tagDepth == chapterDepth && (!strcmp(tokenName, "div") || !strcmp(tokenName, "chapter"))) {
++			if (((!strcmp(tokenName, "div")) && (eidAttr == sidChapter)) || (!strcmp(tokenName, "chapter"))) {
+ 				text.append(token);
+ 				writeEntry(text);
+ 				inChapter    = false;
++				sidChapter   = "";
+ 				chapterDepth = 0;
+ 				verseDepth   = 0;
+ 				return true;
+ 			}
+ 
+ 			// Is it the end of a book
+-			if (tagDepth == bookDepth && (!strcmp(tokenName, "div"))) {
++			if ((!strcmp(tokenName, "div")) && (eidAttr == sidBook)) {
+ 				text.append(token);
+ 				writeEntry(text);
+ 				bookDepth    = 0;

=== modified file 'debian/patches/series'
--- debian/patches/series	2009-05-25 19:35:12 +0000
+++ debian/patches/series	2009-05-29 06:31:53 +0000
@@ -1,5 +1,6 @@
 02_libver.diff
 11_regex_only_when_needed.diff
 12_fix_compiler_warnings.diff
+13_fix_osis2mod_compression_default.diff
+14_closing_section_not_chapter.diff
 40_missing_includes.diff
-



--
lp:libsword
https://code.launchpad.net/~pkgcrosswire/libsword/main

Your team Crosswire Packaging Team is subscribed to branch lp:libsword.
To unsubscribe from this branch go to https://code.launchpad.net/~pkgcrosswire/libsword/main/+edit-subscription.




More information about the Pkg-crosswire-devel mailing list