summaryrefslogtreecommitdiff
path: root/libre/qutebrowser/PKGBUILD
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2023-09-15 09:02:35 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2023-09-15 09:31:14 -0400
commitd5a37be5d25b605a3896c6245d818bcd2614d57e (patch)
tree5031a4a0ac08f9793e0faecd22b94731accee88f /libre/qutebrowser/PKGBUILD
parent0707bfd6d1c76ca3f3174026b2473fbaff00eadc (diff)
housekeeping - nornmalize _version_constraint() implementations across PKGBUILDs
Diffstat (limited to 'libre/qutebrowser/PKGBUILD')
-rw-r--r--libre/qutebrowser/PKGBUILD16
1 files changed, 7 insertions, 9 deletions
diff --git a/libre/qutebrowser/PKGBUILD b/libre/qutebrowser/PKGBUILD
index de99c60de..33d157337 100644
--- a/libre/qutebrowser/PKGBUILD
+++ b/libre/qutebrowser/PKGBUILD
@@ -62,7 +62,7 @@ _version_constraint() # (dep_pkgname [precision])
local n_dots=$(tmp=${full_version%-*} ; tmp=${tmp//[^\.]} ; echo "${#tmp}" ;)
local def_precision=$(( n_dots + 1 ))
local is_prec_valid=$(( req_precision > 0 && req_precision <= def_precision ))
- local precision=$( (( is_prec_valid )) && echo ${req_precision} || echo ${def_precision} )
+ local precision=$((( is_prec_valid )) && echo ${req_precision} || echo ${def_precision})
local pkgver_rx='[0-9A-Za-z_]+'
pkgver_rx=$(sed 's|\]|\+]|' <<<${pkgver_rx}) # according to the wiki, '+' is not allowed,
# but some pkgver have it (eg: 5.15.10+kde+r130)
@@ -71,16 +71,16 @@ _version_constraint() # (dep_pkgname [precision])
local garbage_rx='[^0-9].*'
local capture_rx=${pkgver_rx}
for (( n_dots=1 ; n_dots < precision ; ++n_dots )) ; do capture_rx+=${subver_rx} ; done ;
- local version pkgrel has_split_char version_min version_max constraint_string
+ local version pkgrel has_dot_char version_min version_max constraint_string
declare -i subver subver_inc pkgrel_inc
if [[ "${full_version}" =~ ^(${capture_rx})(${subver_rx})*-(${pkgrel_rx}).*$ ]]
then version=${BASH_REMATCH[1]} # pkgver cut to the requested precision
#unused=${BASH_REMATCH[2]} # discarded pkgver segments
pkgrel=${BASH_REMATCH[3]} # pkgrel with non-numerics right-trimmed
- has_split_char=$(grep '\.' <<<${version} &> /dev/null ; echo $((! $?)) ; )
+ has_dot_char=$([[ "${version}" =~ \. ]] ; echo $(( ! $? )) ; )
subver=$(sed "s|${garbage_rx}||" <<<${version##*.}) # right-trim from any non-numeric
- version=$( ((has_split_char)) && echo ${version%.*}.${subver} || echo ${subver} )
+ version=$( (( has_dot_char )) && echo ${version%.*}.${subver} || echo ${subver} )
subver_inc=$(( subver + 1 ))
pkgrel_inc=$(( pkgrel + 1 ))
version_min=$( (( ! is_prec_valid )) && echo ${full_version%-*}-${pkgrel} || \
@@ -118,11 +118,9 @@ build() {
package() {
# pin to strongly-coupled dependency versions
- depends=( ${depends[*]/python-pyqt5/} )
- depends=( ${depends[*]/qt5-base/} )
- depends+=( $(_version_constraint python 2) \
- $(_version_constraint python-pyqt5 ) \
- $(_version_constraint qt5-base 3) )
+ depends+=( $(_version_constraint python 2) )
+ depends=( ${depends[*]/python-pyqt5/} $(_version_constraint python-pyqt5 ) )
+ depends=( ${depends[*]/qt5-base/} $(_version_constraint qt5-base 3) )
cd "$pkgname-$pkgver"
make -f misc/Makefile DESTDIR="$pkgdir" PREFIX=/usr install