From 0b95458eb82de98b4e5cd11ab310183654ef37b9 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 23 Jan 2022 23:07:39 -0500 Subject: [bibletime]: upgrade to v3.0.2 --- libre/bibletime/PKGBUILD | 77 ++++++++++++++++++++++++++++++++++++-------- libre/bibletime/libre.patch | 49 ---------------------------- libre/bibletime/webkit.patch | 49 ++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 63 deletions(-) delete mode 100644 libre/bibletime/libre.patch create mode 100644 libre/bibletime/webkit.patch (limited to 'libre') diff --git a/libre/bibletime/PKGBUILD b/libre/bibletime/PKGBUILD index 09c30d4bc..a58cfda20 100644 --- a/libre/bibletime/PKGBUILD +++ b/libre/bibletime/PKGBUILD @@ -1,31 +1,79 @@ -# Maintainer (Arch): Felix Yan -# Maintainer (Arch): Alexander F Rødseth +# Maintainer (arch): Felix Yan +# Maintainer (arch): Alexander F Rødseth # Contributor: André Silva -# Contributor (Arch): SanskritFritz (gmail) -# Contributor (Arch): Tobias T. +# Contributor: SanskritFritz (gmail) +# Contributor: Tobias T. + + +# parabola changes and rationale: +# - replace blacklisted 'qt5-webengine' back-end with 'qt5-webkit' +# - pin to strongly-coupled dependency versions +# - FIXME: freeze at this version? - bibletime v>=3 does not support webkit? + pkgname=bibletime pkgver=2.11.2 pkgrel=1 -pkgrel+=.parabola1 +pkgrel+=.parabola2 pkgdesc='Bible study tool' -pkgdesc+=', with qt5-webkit-ng support' +pkgdesc+=', (webkit build)' arch=('x86_64') arch+=('i686' 'armv7h') url='http://www.bibletime.info/' license=('GPL2') -depends=('sword' 'clucene' 'qt5-webkit' 'qt5-svg') +depends=('sword' 'clucene' 'qt5-webengine' 'qt5-svg') +depends=( ${depends[*]/qt5-webengine/qt5-webkit} ) +depends_i686=(icu69) makedepends=('cmake' 'qt5-tools') -source=("$pkgname-$pkgver.tar.gz::https://github.com/bibletime/bibletime/archive/v$pkgver.tar.gz" - 'libre.patch') -sha512sums=('951c72dea1e281c0403284b36d680452ffb9dec180097faec49bc8536ad9a9e3cb543060b9972beae415e94467dbff6edcc253a0fda217cbb17a94fce40ff553' - '6d64be9904729b9bdf7a0464af8ba9e230b400ee461aca6dc8c7060c8bdb870ad61494ae3cd6a2f32a7ef45605b88671350c83e6cf9406f334242c63139cdc0c') +source=("$pkgname-$pkgver.tar.gz::https://github.com/bibletime/bibletime/archive/v$pkgver.tar.gz") +source+=('webkit.patch') +sha512sums=('951c72dea1e281c0403284b36d680452ffb9dec180097faec49bc8536ad9a9e3cb543060b9972beae415e94467dbff6edcc253a0fda217cbb17a94fce40ff553') +sha512sums+=('6d64be9904729b9bdf7a0464af8ba9e230b400ee461aca6dc8c7060c8bdb870ad61494ae3cd6a2f32a7ef45605b88671350c83e6cf9406f334242c63139cdc0c') + + +_version_constraint() # (dep_pkgname [precision]) +{ + local dep_pkgname=$1 + local req_precision=$2 + local full_version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1) + local n_dots=$(tmp=${full_version%-*} ; tmp=${tmp//[^\.]} ; echo "${#tmp}" ;) + local def_precision=$(( n_dots + 1 )) + local is_reqprecision_valid=$( [[ "${req_precision}" =~ ^[1-${def_precision}]$ ]] && echo 1 || echo 0 ) + local precision=$( (( is_reqprecision_valid )) && echo ${req_precision} || echo ${def_precision} ) + local pkgver_rx='[^-\.\ ]+' + local subver_rx='\.'${pkgver_rx} + local pkgrel_rx='[^-\ ]+' + local capture_rx=${pkgver_rx} + for (( n_dots=1 ; n_dots < precision ; ++n_dots )) ; do capture_rx+=${subver_rx} ; done ; + + if [[ "${full_version}" =~ ^(${capture_rx})(${subver_rx})*-(${pkgrel_rx})$ ]] + then local version=${BASH_REMATCH[1]} + local pkgrel=${BASH_REMATCH[3]%%.*} + local subver_inc=$(( ${version##*.} + 1 )) # right-trims from any non-numeric + local pkgrel_inc=$(( pkgrel + 1 )) + local version_min=$( (( ! is_reqprecision_valid )) && echo ${full_version%-*}-${pkgrel} || \ + echo ${version} ) + local version_max=$( ( (( ! is_reqprecision_valid )) && echo ${full_version%-*}-${pkgrel_inc} ) || \ + ( [[ "${version}" =~ \. ]] && echo ${version%.*}.${subver_inc} ) || \ + echo ${subver_inc} ) + local constraint_string="${dep_pkgname}>=${version_min} ${dep_pkgname}<${version_max}" + + echo "applied version constraint: '${constraint_string}'" >&2 + else echo "ERROR: _version_constraint() error parsing: dep_pkgname='${dep_pkgname}' full_version='${full_version}'" >&2 + exit 1 + fi + + echo -n "${constraint_string}" +} + prepare() { mkdir -p build cd bibletime-$pkgver - patch -p1 -i "$srcdir/libre.patch" + + echo "applying 'webkit.patch'" + patch -p1 -i "${srcdir}"/webkit.patch } build() { @@ -39,6 +87,7 @@ build() { package() { make -C build DESTDIR="$pkgdir" install -} -# vim:set ts=2 sw=2 et: + # pin to strongly-coupled dependency versions + depends=( ${depends[*]/sword/$(_version_constraint sword 3)} ) +} diff --git a/libre/bibletime/libre.patch b/libre/bibletime/libre.patch deleted file mode 100644 index d7c1a6ce0..000000000 --- a/libre/bibletime/libre.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- bibletime-2.11.2.orig/CMakeLists.txt 2018-06-18 15:07:00.000000000 -0500 -+++ bibletime-2.11.2/CMakeLists.txt 2020-04-10 12:50:57.857672342 -0500 -@@ -156,21 +156,10 @@ - ADD_DEFINITIONS("-DBT_MOBILE") - 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() -- --IF(USEWEBENGINE) -- ADD_DEFINITIONS("-DUSEWEBENGINE") --ENDIF() - - # Define $bibletime_SOURCES - INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/BTSourceFileList.cmake") -@@ -232,8 +221,6 @@ - - IF(${BIBLETIME_FRONTEND} STREQUAL "MOBILE") - TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebKitWidgets Qt5::Qml Qt5::Quick Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg) --ELSEIF(USEWEBENGINE) -- TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebEngine Qt5::WebEngineWidgets Qt5::WebChannel Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg) - ELSE() - TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebKit Qt5::WebKitWidgets Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg) - ENDIF() -@@ -288,13 +275,8 @@ - DESTINATION "${BT_SHARE_PATH}/bibletime/display-templates/") - - --IF(USEWEBENGINE) -- INSTALL(FILES "src/frontend/display/btwebengine.js" -- DESTINATION "${BT_SHARE_PATH}/bibletime/javascript/") --ELSE() -- INSTALL(FILES "src/frontend/display/bthtml.js" -- DESTINATION "${BT_SHARE_PATH}/bibletime/javascript/") --ENDIF() -+INSTALL(FILES "src/frontend/display/bthtml.js" -+ DESTINATION "${BT_SHARE_PATH}/bibletime/javascript/") - - INSTALL(FILES "docs/license.html" - DESTINATION "${BT_SHARE_PATH}/bibletime/license/") diff --git a/libre/bibletime/webkit.patch b/libre/bibletime/webkit.patch new file mode 100644 index 000000000..d7c1a6ce0 --- /dev/null +++ b/libre/bibletime/webkit.patch @@ -0,0 +1,49 @@ +--- bibletime-2.11.2.orig/CMakeLists.txt 2018-06-18 15:07:00.000000000 -0500 ++++ bibletime-2.11.2/CMakeLists.txt 2020-04-10 12:50:57.857672342 -0500 +@@ -156,21 +156,10 @@ + ADD_DEFINITIONS("-DBT_MOBILE") + 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() +- +-IF(USEWEBENGINE) +- ADD_DEFINITIONS("-DUSEWEBENGINE") +-ENDIF() + + # Define $bibletime_SOURCES + INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/cmake/BTSourceFileList.cmake") +@@ -232,8 +221,6 @@ + + IF(${BIBLETIME_FRONTEND} STREQUAL "MOBILE") + TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebKitWidgets Qt5::Qml Qt5::Quick Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg) +-ELSEIF(USEWEBENGINE) +- TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebEngine Qt5::WebEngineWidgets Qt5::WebChannel Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg) + ELSE() + TARGET_LINK_LIBRARIES("bibletime" Qt5::Widgets Qt5::WebKit Qt5::WebKitWidgets Qt5::Xml Qt5::Network Qt5::PrintSupport Qt5::Svg) + ENDIF() +@@ -288,13 +275,8 @@ + DESTINATION "${BT_SHARE_PATH}/bibletime/display-templates/") + + +-IF(USEWEBENGINE) +- INSTALL(FILES "src/frontend/display/btwebengine.js" +- DESTINATION "${BT_SHARE_PATH}/bibletime/javascript/") +-ELSE() +- INSTALL(FILES "src/frontend/display/bthtml.js" +- DESTINATION "${BT_SHARE_PATH}/bibletime/javascript/") +-ENDIF() ++INSTALL(FILES "src/frontend/display/bthtml.js" ++ DESTINATION "${BT_SHARE_PATH}/bibletime/javascript/") + + INSTALL(FILES "docs/license.html" + DESTINATION "${BT_SHARE_PATH}/bibletime/license/") -- cgit v1.2.3