@@ -78,6 +78,20 @@ cd "$CURRENT_DIRECTORY"
78
78
SWIFT_VERSION=" $( " $SWIFT_TOOLCHAIN_HOME /bin/swift" --version | grep -Eo ' version [0-9.]+' | sed ' s/version //' ) "
79
79
echo " Swift version being packaged is $SWIFT_VERSION "
80
80
81
+ # Get the currently installed version for all of the packages that we need.
82
+ # This script assumes that it was run on the build machine and therefore
83
+ # that the packages on this machine correspond to those Swift was built
84
+ # against.
85
+ get_package_version ()
86
+ {
87
+ echo " $( pkg info " $1 " | grep Version | sed ' s/Version.*: //' ) "
88
+ }
89
+
90
+ LIBUUID_PKG_VERSION=$( get_package_version libuuid)
91
+ LIBXML2_PKG_VERSION=$( get_package_version libxml2)
92
+ PYTHON_PKG_VERSION=$( get_package_version python311)
93
+ SQLITE3_PKG_VERSION=$( get_package_version sqlite3)
94
+
81
95
# Create the manifest file. All fields below are required. pkg_create(3)
82
96
# will add additional fields as part of generating the package.
83
97
echo " Generating manifest..."
@@ -93,32 +107,20 @@ cat > "$METADATA_STAGING/manifest" <<EOF
93
107
"maintainer": "[email protected] ",
94
108
"www": "https://www.swift.org",
95
109
"deps": {
96
- "e2fsprogs-libuuid": {
97
- "version": "1.47.1",
98
- "origin": "misc/e2fsprogs-libuuid"
99
- },
100
- "libffi": {
101
- "version": "3.4.6",
102
- "origin": "devel/libffi"
110
+ "libuuid": {
111
+ "version": "$LIBUUID_PKG_VERSION ",
112
+ "origin": "misc/libuuid"
103
113
},
104
114
"libxml2": {
105
- "version": "2.11.9 ",
115
+ "version": "$LIBXML2_PKG_VERSION ",
106
116
"origin": "textproc/libxml2"
107
117
},
108
- "mpdecimal": {
109
- "version": "4.0.0",
110
- "origin": "math/mpdecimal",
111
- },
112
118
"python311": {
113
- "version": "3.11.11 ",
119
+ "version": "$PYTHON_PKG_VERSION ",
114
120
"origin": "lang/python311"
115
121
},
116
- "readline": {
117
- "version": "8.2.13_2",
118
- "origin": "devel/readline"
119
- },
120
122
"sqlite3": {
121
- "version": "3.46.1_1,1 ",
123
+ "version": "$SQLITE3_PKG_VERSION ",
122
124
"origin": "databases/sqlite3"
123
125
}
124
126
}
0 commit comments