summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openttd-git/PKGBUILD10
-rw-r--r--pin-dependencies.PKGBUILDpatch30
2 files changed, 23 insertions, 17 deletions
diff --git a/openttd-git/PKGBUILD b/openttd-git/PKGBUILD
index 3ca70e460..3583c144d 100644
--- a/openttd-git/PKGBUILD
+++ b/openttd-git/PKGBUILD
@@ -9,11 +9,10 @@ url="http://www.openttd.org"
license=('GPL2')
groups=()
depends=(
- 'fluidsynth'
- 'fontconfig'
- 'hicolor-icon-theme'
-)
-_pinned_dependencies=(
+ 'fluidsynth'
+ 'fontconfig'
+ 'hicolor-icon-theme'
+# _pinned_dependencies
'fluidsynth=2.1.3'
'fontconfig=2:2.13.91+24+g75eadca'
'freetype2=2.10.2'
@@ -25,6 +24,7 @@ _pinned_dependencies=(
'sdl2=2.0.12'
'xz=5.2.5'
'zlib=1:1.2.11'
+# _pinned_dependencies.end
)
makedepends=('git')
checkdepends=(
diff --git a/pin-dependencies.PKGBUILDpatch b/pin-dependencies.PKGBUILDpatch
index a06c768e0..4d5540699 100644
--- a/pin-dependencies.PKGBUILDpatch
+++ b/pin-dependencies.PKGBUILDpatch
@@ -45,9 +45,24 @@ if printf '%s\n' "${arch[@]}" | grep -qvxF any; then
| sed 's/[<>]\?=.*$//' \
| sort -u
) <(
- printf '%s\n' "${_pinned_dependencies[@]}" \
- | sed 's/=.*$//' \
- | sort -u
+ {
+ eval 'printf '"'"'%s\n'"'"' "${depends[@]}" "${depends_'"${CARCH}"'[@]}"' \
+ | sed 's/=.*$//' \
+ | sort -u
+ sed -n '
+ /^\s*# _pinned_dependencies$/,/^\s*# _pinned_dependencies\.end$/ p
+ ' "${OLDPWD}/PKGBUILD" \
+ | sed '
+ /^\s*#/d
+ s/^\s\+//
+ s/\s\+$//
+ s/^\(["'"'"']\)\(\S\+\)\1$/\2/
+ s/[<>]\?=.*$//
+ ' \
+ | sort -u
+ } \
+ | sort \
+ | uniq -d
)
); then
printf 'There are discrepancies between the _pinned_dependencies and the linked libraries in %s'"'"'s %s:\n' \
@@ -64,13 +79,4 @@ if printf '%s\n' "${arch[@]}" | grep -qvxF any; then
| sort -k1,1
return 1
fi
- depends+=(
- $(
- [ "${CARCH}" = 'x86_64' ] && _suffix='-64' || _suffix='-32'
- printf '%s\n' "${_pinned_dependencies[@]}" \
- | sed '
- /\.so=/ s/$/'"${_suffix}"'/
- '
- )
- )
fi