mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 09:22:12 +08:00
rename bibletime-kde4 to bibletime and build against qt5
[testing]
This commit is contained in:
parent
4f3ef3fe16
commit
4bec912831
@ -1,32 +0,0 @@
|
||||
pkgname=bibletime-kde4
|
||||
origname=bibletime
|
||||
pkgver=2.10.1
|
||||
pkgrel=1
|
||||
pkgdesc="Bible software that uses the Sword Engine for KDE4"
|
||||
arch=('x86_64')
|
||||
url="http://www.blog.bibletime.info"
|
||||
license=('GPL2')
|
||||
depends=('qtwebkit' 'sword' 'openssl' 'clucene')
|
||||
makedepends=('cmake')
|
||||
categories=('education')
|
||||
source=(http://sourceforge.net/projects/bibletime/files/bibletime-$pkgver.tar.xz)
|
||||
md5sums=('ef4d189d53fd1608c56f4827947ffcf0')
|
||||
|
||||
build() {
|
||||
mkdir "$srcdir/$origname-$pkgver/build_dir"
|
||||
cd "$srcdir/$origname-$pkgver/build_dir"
|
||||
|
||||
CXXFLAGS+=" -fpermissive"
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBT_FORCE_USE_QT4=TRUE \
|
||||
..
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$origname-$pkgver/build_dir"
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
36
bibletime/PKGBUILD
Executable file
36
bibletime/PKGBUILD
Executable file
@ -0,0 +1,36 @@
|
||||
pkgname=bibletime
|
||||
pkgver=2.11.1
|
||||
pkgrel=1
|
||||
pkgdesc="Bible software that uses the Sword Engine for KDE4"
|
||||
arch=('x86_64')
|
||||
url='http://www.bibletime.info/'
|
||||
license=('GPL2')
|
||||
depends=('sword' 'clucene' 'qt5-webengine' 'qt5-svg')
|
||||
makedepends=('cmake' 'qt5-tools')
|
||||
replaces=('bibletime-kde4')
|
||||
provides=('bibletime-kde4')
|
||||
conflicts=('bibletime-kde4')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/bibletime/bibletime/archive/v$pkgver.tar.gz"
|
||||
qt5.11.patch)
|
||||
sha512sums=('ad718b2c7b6591991ffdcd00fdb9a2bcd7905bc5b8c8cf9828ce60e3a3b1ecbafb6fa06ac5689a1e8e33590439d8bc4cf69f0584bec30c3adb3c32cc14006342'
|
||||
'cbe076660075e2227fcc4abd26267cc2e47aa9929cb207ff9dddfefa78e8f822fda4f2389474920a6c1db10441a8775bf25bf320954bcceba20f9091a3324a69')
|
||||
|
||||
prepare() {
|
||||
mkdir -p build
|
||||
|
||||
cd bibletime-$pkgver
|
||||
patch -p1 -i ../qt5.11.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd build
|
||||
|
||||
cmake ../bibletime-$pkgver \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
make -C build DESTDIR="$pkgdir" install
|
||||
}
|
128
bibletime/qt5.11.patch
Normal file
128
bibletime/qt5.11.patch
Normal file
@ -0,0 +1,128 @@
|
||||
From ed8cb6bbebae11a992b707ad509183c4762d8696 Mon Sep 17 00:00:00 2001
|
||||
From: Gary Holmlund <gary.holmlund@gmail.com>
|
||||
Date: Tue, 5 Jun 2018 17:14:59 -0700
|
||||
Subject: [PATCH] Fix bug #140, No window text with Qt 5.11
|
||||
|
||||
---
|
||||
ChangeLog | 3 +++
|
||||
src/frontend/btwebenginepage.cpp | 9 ++++++---
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/frontend/btwebenginepage.cpp b/src/frontend/btwebenginepage.cpp
|
||||
index c818789de..584a6d5d3 100644
|
||||
--- a/src/frontend/btwebenginepage.cpp
|
||||
+++ b/src/frontend/btwebenginepage.cpp
|
||||
@@ -35,9 +35,12 @@ BtWebEnginePage::BtWebEnginePage(QObject *parent)
|
||||
}
|
||||
|
||||
bool BtWebEnginePage::acceptNavigationRequest(
|
||||
- const QUrl& url, NavigationType /*type*/, bool /*isMainFrame*/) {
|
||||
- emit linkClicked(url);
|
||||
- return false;
|
||||
+ const QUrl& url, NavigationType type, bool isMainFrame) {
|
||||
+ if (type == QWebEnginePage::NavigationTypeLinkClicked) {
|
||||
+ emit linkClicked(url);
|
||||
+ return false;
|
||||
+ }
|
||||
+ return QWebEnginePage::acceptNavigationRequest(url, type, isMainFrame);
|
||||
}
|
||||
|
||||
void BtWebEnginePage::addJavaScriptObject(const QString &name, QObject *object) {
|
||||
From 517d5be1f4c9e3eaad66a6a44c15e43f4d41b08e Mon Sep 17 00:00:00 2001
|
||||
From: Gary Holmlund <gary.holmlund@gmail.com>
|
||||
Date: Tue, 5 Jun 2018 17:12:14 -0700
|
||||
Subject: [PATCH] Fix cmake errors with Qt 5.11 and some cmake warnings.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 16 ++++++++++++----
|
||||
ChangeLog | 3 +++
|
||||
cmake/BTTests.cmake | 9 ++-------
|
||||
3 files changed, 17 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 27236aa7c..2b2f6c382 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,5 +1,6 @@
|
||||
PROJECT(bibletime CXX C)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
||||
+CMAKE_POLICY(SET CMP0028 NEW)
|
||||
|
||||
IF("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
MESSAGE(FATAL_ERROR "You probably didn't mean to run CMake from this directory. Now you have all messed up! You'd better delete CMakeFiles/ and CMakeCache.txt or things will break!")
|
||||
@@ -121,6 +122,10 @@ FIND_PACKAGE(Qt5Core REQUIRED)
|
||||
FIND_PACKAGE(Qt5LinguistTools REQUIRED)
|
||||
FIND_PACKAGE(Qt5Gui REQUIRED)
|
||||
FIND_PACKAGE(Qt5Widgets REQUIRED)
|
||||
+FIND_PACKAGE(Qt5Xml REQUIRED)
|
||||
+FIND_PACKAGE(Qt5Test REQUIRED)
|
||||
+FIND_PACKAGE(Qt5Svg REQUIRED)
|
||||
+FIND_PACKAGE(Qt5PrintSupport REQUIRED)
|
||||
|
||||
FIND_PACKAGE(CLucene REQUIRED)
|
||||
FIND_PACKAGE(Sword 1.7.0 REQUIRED)
|
||||
@@ -154,9 +159,12 @@ ENDIF()
|
||||
FIND_PACKAGE(Qt5WebEngine QUIET)
|
||||
IF(NOT Qt5WebEngine_FOUND)
|
||||
MESSAGE(STATUS "Using Qt WebKit")
|
||||
+ FIND_PACKAGE(Qt5WebKit REQUIRED)
|
||||
+ FIND_PACKAGE(Qt5WebKitWidgets REQUIRED)
|
||||
SET(USEWEBENGINE OFF)
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Using Qt WebEngine")
|
||||
+ FIND_PACKAGE(Qt5WebEngineWidgets REQUIRED)
|
||||
SET(USEWEBENGINE ON)
|
||||
ENDIF()
|
||||
|
||||
@@ -194,7 +202,7 @@ ADD_LIBRARY(
|
||||
STATIC
|
||||
${bibletime_COMMON_SOURCES}
|
||||
)
|
||||
-QT5_USE_MODULES(bibletime_common Widgets Xml)
|
||||
+TARGET_LINK_LIBRARIES(bibletime_common Qt5::Widgets Qt5::Xml)
|
||||
|
||||
IF(MSVC)
|
||||
ADD_EXECUTABLE("bibletime" WIN32 ${common_bibletime_SOURCES})
|
||||
@@ -222,11 +230,11 @@ TARGET_LINK_LIBRARIES("bibletime"
|
||||
)
|
||||
|
||||
IF(${BIBLETIME_FRONTEND} STREQUAL "MOBILE")
|
||||
- qt5_use_modules("bibletime" Widgets WebKitWidgets Qml Quick Xml Network PrintSupport Svg)
|
||||
+ TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebKitWidgets Qt5::Qml Qt5::Quick Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg)
|
||||
ELSEIF(USEWEBENGINE)
|
||||
- qt5_use_modules("bibletime" Widgets WebEngine WebEngineWidgets WebChannel Xml Network PrintSupport Svg)
|
||||
+ TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebEngine Qt5::WebEngineWidgets Qt5::WebChannel Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg)
|
||||
ELSE()
|
||||
- qt5_use_modules("bibletime" Widgets WebKit WebKitWidgets Xml Network PrintSupport Svg)
|
||||
+ TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebKit Qt5::WebKitWidgets Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg)
|
||||
ENDIF()
|
||||
|
||||
SET(BibleTime_LDFLAGS "")
|
||||
diff --git a/cmake/BTTests.cmake b/cmake/BTTests.cmake
|
||||
index c3e7aa7d8..aac7eb713 100644
|
||||
--- a/cmake/BTTests.cmake
|
||||
+++ b/cmake/BTTests.cmake
|
||||
@@ -1,11 +1,6 @@
|
||||
|
||||
ENABLE_TESTING(true)
|
||||
|
||||
-QT5_ADD_RESOURCES(test_RESOURCE_SOURCES
|
||||
- ${bibletime_SOURCE_DIR}/src/mobile/btm.qrc
|
||||
- ${bibletime_SOURCE_DIR}/i18n/messages/test_translate.qrc
|
||||
-)
|
||||
-
|
||||
SET(test_OTHER_SOURCES
|
||||
${bibletime_SOURCE_DIR}/src/frontend/messagedialog.cpp
|
||||
)
|
||||
@@ -15,10 +10,9 @@ FUNCTION(test_a_class testDir testClass )
|
||||
${testDir}/test_${testClass}.cpp
|
||||
${test_OTHER_SOURCES}
|
||||
${test_${testClass}_MOC_SRC}
|
||||
- ${test_RESOURCE_SOURCES}
|
||||
)
|
||||
SET_TARGET_PROPERTIES("test_${testClass}" PROPERTIES COMPILE_FLAGS ${Sword_CFLAGS_OTHER} -std=c++11 )
|
||||
- QT5_USE_MODULES(test_${testClass} Widgets Xml Network Test)
|
||||
+ TARGET_LINK_LIBRARIES(test_${testClass} Qt5::Widgets Qt5::Xml Qt5::Network Qt5::Test)
|
||||
TARGET_LINK_LIBRARIES(test_${testClass}
|
||||
bibletime_common
|
||||
${Sword_LDFLAGS}
|
Loading…
Reference in New Issue
Block a user