Update to 5.7.2 and take over the maintainership

add dependency on ncurses5-compat-libs as binaries for CentOS 7 are
linked with ncurses 5 libraries. patchelf is no longer required.
This commit is contained in:
susurri 2022-12-29 04:40:39 +09:00
parent 189dfea493
commit bc96718947
2 changed files with 11 additions and 26 deletions

View file

@ -1,18 +1,18 @@
pkgbase = swift-bin
pkgdesc = Binary builds of the Swift programming language
pkgver = 5.6
pkgver = 5.7.2
pkgrel = 1
url = https://swift.org
arch = x86_64
license = apache
makedepends = patchelf
depends = libutil-linux
depends = libxml2
depends = ncurses5-compat-libs
optdepends = python36: required for REPL
provides = swift-language
replaces = swift-language-bin
options = !strip
source = https://swift.org/builds/swift-5.6-release/centos8/swift-5.6-RELEASE/swift-5.6-RELEASE-centos8.tar.gz
sha256sums = 80fa936a30bbc599a619d352fb271de4060bee9f04151cbfda3d755f4c9e4257
source = https://swift.org/builds/swift-5.7.2-release/centos7/swift-5.7.2-RELEASE/swift-5.7.2-RELEASE-centos7.tar.gz
sha256sums = 8622569f57c7e325ab02d5f6605e55d1e1fe04ab7ccae8fab8334532959750c6
pkgname = swift-bin

View file

@ -1,34 +1,26 @@
# Maintainer: Miten <git dot pub at icloud dot com>
# Maintainer: Susurri <susurrus dot silent at gmail dot com>
# Contributor: Miten <git dot pub at icloud dot com>
# Contributor: Ryan Gonzalez <rymg19 at gmail dot com>
# Contributor: Frederic Bezies <fredbezies at gmail dot com>, youngunix <>
pkgname=swift-bin
pkgver=5.6
pkgver=5.7.2
pkgrel=1
pkgdesc="Binary builds of the Swift programming language"
arch=('x86_64')
url="https://swift.org"
license=('apache')
depends=('libutil-linux' 'libxml2')
makedepends=('patchelf')
depends=('libutil-linux' 'libxml2' 'ncurses5-compat-libs')
optdepends=('python36: required for REPL')
options=('!strip')
provides=('swift-language')
replaces=('swift-language-bin')
source=("https://swift.org/builds/swift-$pkgver-release/centos8/swift-$pkgver-RELEASE/swift-$pkgver-RELEASE-centos8.tar.gz")
sha256sums=('80fa936a30bbc599a619d352fb271de4060bee9f04151cbfda3d755f4c9e4257')
source=("https://swift.org/builds/swift-$pkgver-release/centos7/swift-$pkgver-RELEASE/swift-$pkgver-RELEASE-centos7.tar.gz")
sha256sums=('8622569f57c7e325ab02d5f6605e55d1e1fe04ab7ccae8fab8334532959750c6')
package() {
find_elf_only() {
find "${pkgdir}/usr/lib/swift" \
-executable -type f \
'(' -path '*/bin/*' -o -name '*.so*' ')' \
-not -name '*.py' \
"$@"
}
mkdir -p "${pkgdir}/usr/lib/swift"
cp -Ppr "${srcdir}/swift-$pkgver-RELEASE-centos8"/usr/* "${pkgdir}/usr/lib/swift"
cp -Ppr "${srcdir}/swift-$pkgver-RELEASE-centos7"/usr/* "${pkgdir}/usr/lib/swift"
# Symlink the desired binaries to /usr/bin
mkdir -p "${pkgdir}/usr/bin"
@ -36,13 +28,6 @@ package() {
ln -s "/usr/lib/swift/bin/$bin" "${pkgdir}/usr/bin/$bin"
done
# Patch the binaries to use the changed ncurses names
patchelf=(patchelf)
for lib in ncurses panel form; do
patchelf+=(--replace-needed "lib${lib}.so.6" "lib${lib}w.so")
done
find_elf_only -exec "${patchelf[@]}" {} \;
install -dm755 "${pkgdir}/etc/ld.so.conf.d"
echo '/usr/lib/swift/lib/swift/linux' >> "${pkgdir}/etc/ld.so.conf.d/swift.conf"
}