aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2014-07-15 13:44:04 -0700
committerNatanael Copa <ncopa@alpinelinux.org>2014-07-15 14:17:53 +0000
commit708e933b22f8c17cbeeb5a65c25aaf3104aeb446 (patch)
tree859d34696c76077810e3d22314877f7852df1e10
parent0e54ff14a89ae38646c1cf6db90f5fa882420086 (diff)
downloadaports-708e933b22f8c17cbeeb5a65c25aaf3104aeb446.tar.bz2
aports-708e933b22f8c17cbeeb5a65c25aaf3104aeb446.tar.xz
testing/sword: add new package
Sword is a library for free Bible software. It can also be used for other books. sword-utils contains a number of tools, including installmgr to add "modules" (books), diatheke to display them, and numerous file format converters. sword-lang contains config files to translate the names of the books of the Bible from English into various languages.
-rw-r--r--testing/sword/00-fflush.patch12
-rw-r--r--testing/sword/01-corediatheke.patch18
-rw-r--r--testing/sword/APKBUILD84
3 files changed, 114 insertions, 0 deletions
diff --git a/testing/sword/00-fflush.patch b/testing/sword/00-fflush.patch
new file mode 100644
index 0000000000..79f0649f65
--- /dev/null
+++ b/testing/sword/00-fflush.patch
@@ -0,0 +1,12 @@
+diff --git a/utilities/installmgr.cpp b/utilities/installmgr.cpp
+index b705c25..132314a 100644
+--- a/utilities/installmgr.cpp
++++ b/utilities/installmgr.cpp
+@@ -73,6 +73,7 @@ virtual bool isUserDisclaimerConfirmed() const {
+ cout << "If you understand this and are willing to enable remote source features\n";
+ cout << "then type yes at the prompt\n\n";
+ cout << "enable? [no] ";
++ fflush(stdout);
+
+ char prompt[10];
+ fgets(prompt, 9, stdin);
diff --git a/testing/sword/01-corediatheke.patch b/testing/sword/01-corediatheke.patch
new file mode 100644
index 0000000000..1db160b40d
--- /dev/null
+++ b/testing/sword/01-corediatheke.patch
@@ -0,0 +1,18 @@
+diff --git a/utilities/diatheke/corediatheke.cpp b/utilities/diatheke/corediatheke.cpp
+index 6e05e7c..c2b6efb 100644
+--- a/utilities/diatheke/corediatheke.cpp
++++ b/utilities/diatheke/corediatheke.cpp
+@@ -454,7 +454,6 @@ void doquery(unsigned long maxverses = -1, unsigned char outputformat = FMT_PLAI
+ if (font) { *output << "style=\"font:\"" << font << ";\" " ;}
+ if (strcmp(modlocale,locale) !=0 ) { *output << "lang=\"" << modlocale << "\"";}
+ *output << ">";
+- }
+ }
+
+ if (font && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) {
+@@ -498,4 +497,4 @@ void doquery(unsigned long maxverses = -1, unsigned char outputformat = FMT_PLAI
+ }
+
+ }
+-
++}
diff --git a/testing/sword/APKBUILD b/testing/sword/APKBUILD
new file mode 100644
index 0000000000..468fae2c38
--- /dev/null
+++ b/testing/sword/APKBUILD
@@ -0,0 +1,84 @@
+# Contributor: Isaac Dunham <ibid.ag@gmail.com>
+# Maintainer: Isaac Dunham <ibid.ag@gmail.com>
+pkgname=sword
+pkgver=1.7.3
+pkgrel=0
+pkgdesc="Library for free Bible software"
+url="http://www.crosswire.org/sword/"
+arch="all"
+license="GPL2"
+depends=""
+# all are optional but desireable; clucene-dev could be replaced with
+# new --with-cxx11regex or --with-internalregex,
+# but currently c++11 regex leads to this error in diatheke:
+# terminate called after throwing an instance of 'std::runtime_error'
+# what(): locale::facet::_S_create_c_locale name not valid
+# Aborted
+# This might be fixed by the musl locale rework.
+# curl-dev is needed for standard packages.
+depends_dev="zlib-dev icu-dev curl-dev clucene-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-utils"
+source="http://www.crosswire.org/ftpmirror/pub/sword/source/v1.7/sword-$pkgver.tar.gz
+ 00-fflush.patch
+ 01-corediatheke.patch"
+
+_builddir="$srcdir"/sword-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --with-icu --with-zlib \
+ --with-curl --with-curl_sftp \
+ --with-clucene=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+ for i in INSTALL README ChangeLog; do
+ install -Dm644 $i "$pkgdir"/usr/share/doc/sword/$i
+ done
+}
+
+lang() {
+ mkdir -p "$subpkgdir"/usr/share/sword/
+ mv "$pkgdir"/usr/share/sword/locales.d "$subpkgdir"/usr/share/sword/
+}
+
+utils() {
+ cd "$pkgdir"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv usr/bin/* "$subpkgdir"/usr/bin
+}
+
+md5sums="bd2ffadaa9f92f7b6e657e323e27a028 sword-1.7.3.tar.gz
+cce51448f99b7253a502266e268386b6 00-fflush.patch
+25a3a3118835150c84471dea439e8c33 01-corediatheke.patch"
+sha256sums="5a3d87ff155d5ecb0cfec052ba333b2b74d9273e2cc66fb1ca75747dfd8ea9ea sword-1.7.3.tar.gz
+4c6000d94428cb5150b7debc5a180c17e455ba718b6ef54fa937e9bb4f8c1b80 00-fflush.patch
+7ea0e188ae0d8dcfbd2833bf14d98edcfbea99eacf432c7bc5a3df59c9f72e60 01-corediatheke.patch"
+sha512sums="4805215954211584ed6b00869a31e1d317d9fa460db2d2e8c5c396f0154979949ec8b770ac8c6ff20106d8beea75d2a824c7e6b6ce5138fc3e558ab4b5614f2a sword-1.7.3.tar.gz
+6f6c13e7d04458e73d36c114017ad9e76e04c991adb8e457a0b55ce09fcaa95f33b2c26b73c2fd28591f07b69d3d03c1db6d08676001b3a45e0b66b22cb47dc0 00-fflush.patch
+177081a73de62f798f1cd2654a7f74d5626aac11a67b110e262e74b1c0d04b1e313ddb2dfbcaf6907c405b65ef82a94fd45c64d1dda66be51138a6ed78b79df6 01-corediatheke.patch"