summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-08-31 04:30:46 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-08-31 04:30:46 +0200
commit5d683513832e8bae4f6b00b7e198c4db0bf96f6b (patch)
tree9dc4952fd37444cc68e9043006796add5432a394
parent24dc60bea262b34cf7d3a6d09c10cd770869e2c0 (diff)
downloadbibletime-5d683513.tar.gz
bibletime-5d683513.zip
Fix FTBFS with sword 1.7.x
-rw-r--r--bibletime/backend/centrydisplay.h12
-rw-r--r--bibletime/bibletime.cpp4
-rw-r--r--bibletime/frontend/btinstallmgr.h2
-rw-r--r--configure.in.in19
4 files changed, 36 insertions, 1 deletions
diff --git a/bibletime/backend/centrydisplay.h b/bibletime/backend/centrydisplay.h
index d800abe..832dd5f 100644
--- a/bibletime/backend/centrydisplay.h
+++ b/bibletime/backend/centrydisplay.h
@@ -13,6 +13,7 @@
#define CENTRYDISPLAY_H
//BibleTime includes
+#include "config.h"
#include "ctextrendering.h"
#include "cswordmoduleinfo.h"
#include "cswordbackend.h"
@@ -45,6 +46,17 @@ public:
* The displayoptions and filter options are used, too.
*/
virtual const TQString text( const ListCSwordModuleInfo& modules, const TQString& key, const CSwordBackend::DisplayOptions displayOptions, const CSwordBackend::FilterOptions filterOptions);
+
+#ifdef SWORD_API_1_7
+ /** casts a module to a character pointer and displays it to
+ * raw output (overriden for different display types and
+ * module types if necessary)
+ *
+ * @param imodule module to display
+ * @return error status
+ */
+ virtual char display(SWModule &imodule) { return 0; };
+#endif
};
diff --git a/bibletime/bibletime.cpp b/bibletime/bibletime.cpp
index 6dd5198..99f4d42 100644
--- a/bibletime/bibletime.cpp
+++ b/bibletime/bibletime.cpp
@@ -311,7 +311,11 @@ void BibleTime::processCommandline() {
KRandomSequence rs;
int newIndex = rs.getLong(maxIndex);
vk.setPosition(sword::TOP);
+#ifdef SWORD_API_1_7
+ vk.setIndex(newIndex);
+#else
vk.Index(newIndex);
+#endif
bibleKey = vk.key();
}
createReadDisplayWindow(bible, bibleKey);
diff --git a/bibletime/frontend/btinstallmgr.h b/bibletime/frontend/btinstallmgr.h
index bef03e8..dd003f8 100644
--- a/bibletime/frontend/btinstallmgr.h
+++ b/bibletime/frontend/btinstallmgr.h
@@ -19,7 +19,7 @@
//sword includes
#include <installmgr.h>
-#include <ftptrans.h>
+#include <ftplibftpt.h>
//TQt includes
#include <tqobject.h>
diff --git a/configure.in.in b/configure.in.in
index f91fc97..ad74532 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -78,6 +78,25 @@ CXXFLAGS="$cxx_flags_safe"
CFLAGS="$cflags_safe"
AC_LANG_RESTORE
+dnl Check bibletime API version
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+cxx_flags_safe="$CXXFLAGS"
+cflags_safe="$CFLAGS"
+CXXFLAGS="$CXXFLAGS -I$ac_cv_sword_incdir"
+CFLAGS="$CFLAGS -I$ac_cv_sword_incdir"
+AC_MSG_CHECKING([if Sword provides API 1.7.x])
+AC_TRY_COMPILE([#include <versekey.h>
+static sword::VerseKey staticKey;
+sword::VerseKey keyBound;
+],[keyBound = staticKey.getUpperBound();],
+[AC_MSG_RESULT(yes)
+AC_DEFINE(SWORD_API_1_7,1,[Defined if sword api is 1.7.x or newer])],
+AC_MSG_RESULT(no))
+CXXFLAGS="$cxx_flags_safe"
+CFLAGS="$cflags_safe"
+AC_LANG_RESTORE
+
dnl add here all your Makefiles. They are created by configure
AC_CONFIG_FILES([ README ])