Skip to content

Commit 3eeba40

Browse files
committed
Add support for CMake repo in the spec files
1 parent ac22dc0 commit 3eeba40

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

platforms/Linux/amazonlinux/2/swift-lang.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Source16: https://github.com/apple/swift-syntax/archive/swift-%{swift_vers
2929
Source17: https://github.com/jpsim/Yams/archive/%{yams_version}.zip#/yams.tar.gz
3030
Source18: https://github.com/apple/swift-crypto/archive/refs/tags/%{swift_crypto_version}.tar.gz#/swift-crypto.tar.gz
3131
Source19: https://github.com/ninja-build/ninja/archive/refs/tags/v%{ninja_version}.tar.gz#/ninja.tar.gz
32+
Source20: https://github.com/KitWare/CMake/archive/refs/tags/v%{cmake_version}.tar.gz#/cmake.tar.gz
3233

3334
Patch0: patches/swift-api-checker.patch
3435
Patch1: patches/hwasan_symbolize.patch
@@ -91,7 +92,7 @@ importantly, Swift is designed to make writing and maintaining
9192
correct programs easier for the developer.
9293

9394
%prep
94-
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19
95+
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20
9596
# The Swift build script requires directories to be named
9697
# in a specific way so renaming the source directories is
9798
# necessary
@@ -113,6 +114,7 @@ mv swift-argument-parser-%{swift_argument_parser_version} swift-argument-parser
113114
mv swift-driver-swift-%{swift_version} swift-driver
114115
mv swift-crypto-%{swift_crypto_version} swift-crypto
115116
mv ninja-%{ninja_version} ninja
117+
mv CMake-%{cmake_version} cmake
116118

117119
# ICU
118120
mv icu-release-%{icu_version} icu

platforms/Linux/centos/7/build_rpm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pushd $HOME/rpmbuild/SPECS
3434
yum-builddep -y ./swift-lang.spec
3535
# Workaround to support clang-3.5 or a later version
3636
echo -e ". /opt/rh/sclo-git25/enable\n. /opt/rh/llvm-toolset-7/enable\n. /opt/rh/devtoolset-8/enable\n" >> $HOME/.bashrc
37+
source $HOME/.bashrc
3738
sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h
3839
# get the sources for Swift as defined in the spec file
3940
spectool -g -R ./swift-lang.spec

platforms/Linux/centos/7/swift-lang.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Source16: https://github.com/apple/swift-syntax/archive/swift-%{swift_vers
2929
Source17: https://github.com/jpsim/Yams/archive/%{yams_version}.zip#/yams.tar.gz
3030
Source18: https://github.com/apple/swift-crypto/archive/refs/tags/%{swift_crypto_version}.tar.gz#/swift-crypto.tar.gz
3131
Source19: https://github.com/ninja-build/ninja/archive/refs/tags/v%{ninja_version}.tar.gz#/ninja.tar.gz
32+
Source20: https://github.com/KitWare/CMake/archive/refs/tags/v%{cmake_version}.tar.gz#/cmake.tar.gz
3233

3334
Patch0: patches/swift-api-checker.patch
3435
Patch1: patches/hwasan_symbolize.patch
@@ -92,7 +93,7 @@ importantly, Swift is designed to make writing and maintaining
9293
correct programs easier for the developer.
9394

9495
%prep
95-
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19
96+
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20
9697
# The Swift build script requires directories to be named
9798
# in a specific way so renaming the source directories is
9899
# necessary
@@ -114,6 +115,7 @@ mv swift-argument-parser-%{swift_argument_parser_version} swift-argument-parser
114115
mv swift-driver-swift-%{swift_version} swift-driver
115116
mv swift-crypto-%{swift_crypto_version} swift-crypto
116117
mv ninja-%{ninja_version} ninja
118+
mv CMake-%{cmake_version} cmake
117119

118120
# ICU
119121
mv icu-release-%{icu_version} icu

platforms/Linux/centos/8/swift-lang.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Source16: https://github.com/apple/swift-syntax/archive/swift-%{swift_vers
2929
Source17: https://github.com/jpsim/Yams/archive/%{yams_version}.zip#/yams.tar.gz
3030
Source18: https://github.com/apple/swift-crypto/archive/refs/tags/%{swift_crypto_version}.tar.gz#/swift-crypto.tar.gz
3131
Source19: https://github.com/ninja-build/ninja/archive/refs/tags/v%{ninja_version}.tar.gz#/ninja.tar.gz
32+
Source20: https://github.com/KitWare/CMake/archive/refs/tags/v%{cmake_version}.tar.gz#/cmake.tar.gz
3233

3334
Patch0: patches/swift-api-checker.patch
3435
Patch1: patches/hwasan_symbolize.patch
@@ -91,7 +92,7 @@ importantly, Swift is designed to make writing and maintaining
9192
correct programs easier for the developer.
9293

9394
%prep
94-
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19
95+
%setup -q -c -n %{swift_source_location} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20
9596
# The Swift build script requires directories to be named
9697
# in a specific way so renaming the source directories is
9798
# necessary
@@ -113,6 +114,7 @@ mv swift-argument-parser-%{swift_argument_parser_version} swift-argument-parser
113114
mv swift-driver-swift-%{swift_version} swift-driver
114115
mv swift-crypto-%{swift_crypto_version} swift-crypto
115116
mv ninja-%{ninja_version} ninja
117+
mv CMake-%{cmake_version} cmake
116118

117119
# ICU
118120
mv icu-release-%{icu_version} icu

platforms/Linux/shared/RPM/metadata.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
%global swift_argument_parser_version 0.4.3
1515
%global swift_crypto_version 1.1.5
1616
%global ninja_version 1.10.2
17+
%global cmake_version 3.19.6
1718

1819
# locations
1920

0 commit comments

Comments
 (0)