academic/sword: Updated for version 1.9.0.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Tim Dickson 2022-04-13 07:57:15 +01:00 committed by Willy Sudiarto Raharjo
parent 88507b8b7a
commit a271e183c7
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 7 additions and 86 deletions

View file

@ -27,7 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=sword PRGNAM=sword
VERSION=${VERSION:-1.8.1} VERSION=${VERSION:-1.9.0}
BUILD=${BUILD:-3} BUILD=${BUILD:-3}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
@ -74,9 +74,6 @@ cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
#patch to fix pre-chapter text, required for xiphos. when sword tag>1.8.1
#remove this patch as it will be included.
patch -p0 -i $CWD/$PRGNAM.diff
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -85,11 +82,10 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
#now patch the automake stuff so it doesn't error on slackware's newer version #now patch the automake stuff so it doesn't error on slackware's newer version
#thanks to aur.archlinux.org for the information...
#since update to 1.8.1 first patch has to be commented out. we will get a bunch of
#warnings, but at least the library compiles
#sed -i 's/AM_INIT_AUTOMAKE$/AM_INIT_AUTOMAKE\(\[subdir\-objects\]\)/g' configure.ac
sed -i 's/ftemplate-depth-25/ftemplate-depth\=125/g' configure.ac sed -i 's/ftemplate-depth-25/ftemplate-depth\=125/g' configure.ac
#patch to remove subdir-objects warnings
sed -i 's/1.6/1.6 subdir-objects/g' lib/Makefile.am
./autogen.sh ./autogen.sh
#add workaround for compiling with more recent (>=61) versions of icu4c #add workaround for compiling with more recent (>=61) versions of icu4c
CFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" \ CFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" \

View file

@ -1,75 +0,0 @@
Index: src/mgr/stringmgr.cpp
===================================================================
--- src/mgr/stringmgr.cpp (revision 3718)
+++ src/mgr/stringmgr.cpp (revision 3721)
@@ -20,6 +20,7 @@
*
*/
+#include <ctype.h>
#include <stringmgr.h>
#include <swlog.h>
#include <localemgr.h>
Index: src/modules/filters/osisxhtml.cpp
===================================================================
--- src/modules/filters/osisxhtml.cpp (revision 3718)
+++ src/modules/filters/osisxhtml.cpp (revision 3721)
@@ -849,7 +849,11 @@
else if (tag.isEndTag()) {
outText("</div>", buf, u);
}
- else if (!(type == "colophon")) outText(tag, buf, u);
+ else if (!(type == "colophon")) {
+ if (tag.getAttribute("sID")) tag.setEmpty(false);
+ if (tag.getAttribute("eID")) tag.setEndTag(true);
+ outText(tag, buf, u);
+ }
}
else if (!strcmp(tag.getName(), "span")) {
Index: src/utilfuns/utilxml.cpp
===================================================================
--- src/utilfuns/utilxml.cpp (revision 3718)
+++ src/utilfuns/utilxml.cpp (revision 3721)
@@ -291,13 +291,16 @@
tag.append('/');
tag.append(getName());
- for (StringPairMap::iterator it = attributes.begin(); it != attributes.end(); it++) {
- //tag.appendFormatted(" %s=\"%s\"", it->first.c_str(), it->second.c_str());
- tag.append(' ');
- tag.append(it->first.c_str());
- tag.append((strchr(it->second.c_str(), '\"')) ? "=\'" : "=\"");
- tag.append(it->second.c_str());
- tag.append((strchr(it->second.c_str(), '\"'))? '\'' : '\"');
+
+ if (!isEndTag()) {
+ for (StringPairMap::iterator it = attributes.begin(); it != attributes.end(); it++) {
+ //tag.appendFormatted(" %s=\"%s\"", it->first.c_str(), it->second.c_str());
+ tag.append(' ');
+ tag.append(it->first.c_str());
+ tag.append((strchr(it->second.c_str(), '\"')) ? "=\'" : "=\"");
+ tag.append(it->second.c_str());
+ tag.append((strchr(it->second.c_str(), '\"'))? '\'' : '\"');
+ }
}
if (isEmpty())
Index: include/utilxml.h
===================================================================
--- include/utilxml.h (revision 3718)
+++ include/utilxml.h (revision 3721)
@@ -75,6 +75,13 @@
* otherwise, we return if we're a simple XML end </tag>.
*/
bool isEndTag(const char *eID = 0) const;
+ inline void setEndTag(bool value) {
+ if (!parsed)
+ parse();
+ endTag = value;
+ if (value)
+ empty = false;
+ }
const StringList getAttributeNames() const;
int getAttributePartCount(const char *attribName, char partSplit = '|') const;

View file

@ -1,8 +1,8 @@
PRGNAM="sword" PRGNAM="sword"
VERSION="1.8.1" VERSION="1.9.0"
HOMEPAGE="http://www.crosswire.org/sword" HOMEPAGE="http://www.crosswire.org/sword"
DOWNLOAD="http://crosswire.org/ftpmirror/pub/sword/source/v1.8/sword-1.8.1.tar.gz" DOWNLOAD="http://crosswire.org/ftpmirror/pub/sword/source/v1.9/sword-1.9.0.tar.gz"
MD5SUM="ddab24192104b15cbec72e569145ccd1" MD5SUM="7b86ab627993ef295307e3729d8edef2"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES=""