Skip to content

Commit 60a4074

Browse files
committed
srcpkgs: Avoid bashism comparison
1 parent 7b5b0fd commit 60a4074

File tree

13 files changed

+23
-20
lines changed

13 files changed

+23
-20
lines changed

srcpkgs/FlintQS/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ _check_factor() {
2323
factors=$(echo "$1" | src/QuadraticSieve | awk 'x{print}/FACTORS:/{x=1}' | sort -u)
2424
echo -n $factors | sed -e 's/ / * /'
2525
prod=$(echo $factors | sed -e 's/ /*/' | bc)
26-
if [ "$prod" == "$1" ] ; then
26+
if [ "$prod" = "$1" ] ; then
2727
echo " - OK"
2828
return 0
2929
else

srcpkgs/TheForceEngine/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
1818
configure_args="-DCMAKE_CXX_STANDARD_LIBRARIES=-lexecinfo"
1919
fi
2020

21-
if [ "$XBPS_TARGET_WORDSIZE" == "32" ]; then
21+
if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
2222
broken="Minimum requirements state 64-bit for GPU renderer"
2323
fi
2424

srcpkgs/clisp/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ case "$XBPS_TARGET_MACHINE" in
2828
i686-musl) broken="*** - MULTIPLE-VALUE-SETQ: variable EXTRA-FILE-TYPES has no value";;
2929
esac
3030

31-
if [ "$XBPS_TARGET_WORDSIZE" == 32 ]; then
31+
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
3232
CFLAGS+=" -falign-functions=4"
3333
fi
3434

srcpkgs/cross-x86_64-w64-mingw32/template

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ _mingw_headers() {
9393

9494
mkdir -p ${_builddir} && cd ${_builddir}
9595

96-
if [ "${_target##*-}" == "mingw32ucrt" ]; then
97-
_configure_args+=" --with-default-msvcrt=ucrt"
98-
else
96+
case "$_target" in
97+
-mingw32ucrt)
98+
_configure_args+=" --with-default-msvcrt=ucrt" ;;
99+
*)
99100
_configure_args+=" --with-default-msvcrt=msvcrt"
100-
fi
101+
esac
101102

102103
../mingw-w64-v${_mingw_version}/mingw-w64-headers/configure \
103104
--prefix=${_sysroot} \
@@ -155,11 +156,11 @@ _mingw_crt_build() {
155156

156157
msg_normal "Building MinGW CRT: ${_target}\n"
157158

158-
if [ ${_target} == "i686-w64-mingw32" ]; then
159+
if [ ${_target} = "i686-w64-mingw32" ]; then
159160
_crt_configure_args="--disable-lib64 --enable-lib32 --with-default-msvcrt=msvcrt"
160-
elif [ ${_target} == "x86_64-w64-mingw32" ]; then
161+
elif [ ${_target} = "x86_64-w64-mingw32" ]; then
161162
_crt_configure_args="--disable-lib32 --enable-lib64 --with-default-msvcrt=msvcrt"
162-
elif [ ${_target} == "x86_64-w64-mingw32ucrt" ]; then
163+
elif [ ${_target} = "x86_64-w64-mingw32ucrt" ]; then
163164
_crt_configure_args="--disable-lib32 --enable-lib64 --with-default-msvcrt=ucrt"
164165
fi
165166

srcpkgs/dlib/template

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ post_extract() {
3434
}
3535

3636
post_build() {
37-
if [[ "$XBPS_TARGET_MACHINE" == arm* ]]; then
37+
case "$XBPS_TARGET_MACHINE" in
38+
arm*)
3839
inc="include($(pwd)/$(find -name 'cross_*cmake'))"
3940
sed -i "1i$inc" tools/python/CMakeLists.txt
40-
fi
41+
;;
42+
esac
4143
python3 setup.py build --set DPYBIND11_FINDPYTHON=ON --set PYBIND11_USE_CROSSCOMPILING=ON \
4244
--no DLIB_USE_CUDA ${make_build_args}
4345
}

srcpkgs/docker-machine-driver-kvm/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ distfiles="https://github.com/tdilauro/docker-machine-kvm/archive/v${version}.ta
1515
checksum=9059d9b2221417fdba1d33505110b0ad833fe8abdc7314842b677e0241d5c719
1616
broken="missing go.mod"
1717

18-
if [ "$XBPS_TARGET_WORDSIZE" == "32" ]; then
18+
if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
1919
broken="github.com/libvirt/libvirt-go/connect.go:181:77: constant 2147483648 overflows ConnectGetAllDomainStatsFlags"
2020
fi

srcpkgs/git-annex/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ nocross=yes
2929
skip_extraction="basement-0.0.16.tar.gz memory-0.18.0.tar.gz cborg-0.2.10.0.tar.gz"
3030
disable_parallel_build=yes
3131

32-
if [ "$XBPS_TARGET_MACHINE" == "i686" ]; then
32+
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
3333
broken="ghc panic, likely https://gitlab.haskell.org/ghc/ghc/-/issues/25904"
3434
fi
3535

srcpkgs/golangci-lint/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ distfiles="https://github.com/golangci/golangci-lint/archive/v${version}.tar.gz"
1616
checksum=0ae50c50dbc7603ed27a6f559dca194cb8851f030410c5635270866e78cb3400
1717
_completions="bash zsh fish"
1818

19-
if [[ "$CROSS_BUILD" && "$XBPS_TARGET_MACHINE" == "aarch64-musl" ]]; then
19+
if [ "$CROSS_BUILD" -a "$XBPS_TARGET_MACHINE" = "aarch64-musl" ]; then
2020
broken="broken qemu"
2121
fi
2222

srcpkgs/gtk-sharp/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ lib32disabled=yes
1616

1717
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
1818
_have_mdoc="no"
19-
elif [[ $XBPS_TARGET_MACHINE == ppc* ]]; then
19+
elif [ "${XBPS_TARGET_MACHINE#ppc}" != "${XBPS_TARGET_MACHINE}" ]; then
2020
_have_mdoc="no"
2121
fi
2222

srcpkgs/ironbar/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ changelog="https://github.com/JakeStanger/ironbar/releases/"
1313
distfiles="https://github.com/JakeStanger/ironbar/archive/refs/tags/v${version}.tar.gz"
1414
checksum=5b4e96a5f1c96406fa99299b8ad2c0f97dc56c44237b8328cfb64c8daf17d3b5
1515

16-
if [ "${XBPS_WORDSIZE}" == "${XBPS_TARGET_WORDSIZE}" ]; then
16+
if [ "${XBPS_WORDSIZE}" = "${XBPS_TARGET_WORDSIZE}" ]; then
1717
makedepends+=" LuaJIT-devel"
1818
else
1919
# Disable cairo feature that requires LuaJIT; otherwise,

0 commit comments

Comments
 (0)