summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-04 11:54:43 +0200
committerErich Eckner <git@eckner.net>2020-06-04 11:54:43 +0200
commit15961000ec8c159a1dd7d5f96c2267040c87822c (patch)
treef28dd284345a3c4a84b5dfe6541242dafa293d13
parentdbc36d8f2fbc0c7f83214bf3b904d6c669a03241 (diff)
downloadarchlinuxewe.git.save-15961000ec8c159a1dd7d5f96c2267040c87822c.tar.xz
pin-dependencies.PKGBUILDpatch: mark pinned_dependencies with a comment
-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 3ca70e46..3583c144 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 a06c768e..4d554069 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