Commit b5995f2
0
plików
+0
dodanych
-0
usuniętych
@@ -106,30 +106,95 @@ footprint_rustc_man: "drwxr-xr-x\troot/root\tusr/share/man/\ndrwxr-xr-x\troot/ro
106
106
-rw-r--r--\troot/root\tusr/share/man/man1/cargo-version.1.gz\n-rw-r--r--\troot/root\tusr/share/man/man1/cargo-yank.1.gz\n\
107
107
-rw-r--r--\troot/root\tusr/share/man/man1/cargo.1.gz\n-rw-r--r--\troot/root\tusr/share/man/man1/rustc.1.gz\n-rw-r--r--\t\
108
108
root/root\tusr/share/man/man1/rustdoc.1.gz\n"
109
-build: "cd ${pkgname}-${pkgver}-src\nmv ../rust-openssl-0.10.78 .\ncat >> src/tools/cargo/Cargo.toml << EOF\n[patch.crates-io]\n\
110
- openssl = { path = \"../../../rust-openssl-0.10.78/openssl\" }\nopenssl-sys = { path = \"../../../rust-openssl-0.10.78/openssl-sys\"\
111
- \ }\nEOF\n\nsed -ri src/tools/cargo/Cargo.lock \\\n -e '/name = \"openssl-sys\"/,/^$/{/source|checksum/d;s/0.9.112/0.9.114/}'\
112
- \ \\\n -e '/name = \"openssl\"/,/^$/{/source|checksum/d;s/0.10.76/0.10.78/}' \\\n -e '/name = \"openssl-macros\"\
113
- /,/^$/{/source|checksum/d}'\nexport MAKEFLAGS=-j15\n cd ${pkgname}-${pkgver}-src\n cat <<EOF > config.toml\n# Tell x.py\
114
- \ the editors have reviewed the content of this file\n# and updated it to follow the major changes of the building system,\n\
115
- # so x.py will not warn us to do such a review.\nchange-id = 140732\n\n# see src/bootstrap/config.toml.example for more\
116
- \ possible options\n[llvm]\n# by default, rust will build for a myriad of architectures\ntargets = \"X86\"\n\n# When using\
117
- \ system llvm prefer shared libraries\nlink-shared = true\n\n# Do not download pre-built LLVM, instead either use the system\n\
118
- # LLVM or build LLVM from the shipped source.\ndownload-ci-llvm = false\n\n[build]\n# omit HTML docs to save time and space\
119
- \ (comment this to build them)\ndocs = false\n\n# install cargo as well as rust\nextended = true\n\n# Do not query new versions\
120
- \ of dependencies online.\nlocked-deps = true\n\n# Specify which extended tools (those from the default install).\ntools\
121
- \ = [\"cargo\", \"clippy\", \"rustfmt\"]\n\n# Use the source code shipped in the tarball for the dependencies.\n# The combination\
122
- \ of this and the \"locked-deps\" entry avoids downloading\n# many crates from Internet, and makes the Rustc build more\
123
- \ stable.\nvendor = true\n\n[install]\nprefix = \"/usr\"\ndocdir = \"share/doc/rustc\"\n\n[rust]\nchannel = \"stable\"\n\
124
- rpath = false\n\n# BLFS does not install the FileCheck executable from llvm,\n# so disable codegen tests\ncodegen-tests\
125
- \ = false\n\n# Don't download compiler components from the upstream CI:\n# it's only intended for developers working on\
126
- \ standard library\n# and tools, and it only works with the Rust Git repository.\ndownload-rustc = false\n\n# Don't build\
127
- \ lld which does not belong to this package and seems not\n# so useful for BLFS. Even if it turns out to be really useful\
128
- \ we'd build\n# it as a part of the LLVM package instead.\nlld = false\n\n[target.x86_64-unknown-linux-gnu]\n# NB the output\
129
- \ of llvm-config (i.e. help options) may be\n# dumped to the screen when config.toml is parsed.\nllvm-config = \"/usr/bin/llvm-config\"\
130
- \n\n[target.i686-unknown-linux-gnu]\n# NB the output of llvm-config (i.e. help options) may be\n# dumped to the screen when\
131
- \ config.toml is parsed.\nllvm-config = \"/usr/bin/llvm-config\"\n\nEOF\n\n export RUSTFLAGS=\"$RUSTFLAGS -C link-args=-lffi\"\
132
- \n python3 ./x.py build --exclude src/tools/miri\n export LIBSSH2_SYS_USE_PKG_CONFIG=1 \n DESTDIR=${PKGDIR} python3 ./x.py\
133
- \ install\n\n rm -rfv ${PKGDIR}/tmp\n"
134
-package: |
135
- true
109
+build: |
110
+ cd ${pkgname}-${pkgver}-src
111
+ mv ../rust-openssl-0.10.78 .
112
+ cat >> src/tools/cargo/Cargo.toml << EOF
113
+ [patch.crates-io]
114
+ openssl = { path = "../../rust-openssl-0.10.78/openssl" }
115
+ openssl-sys = { path = "../../rust-openssl-0.10.78/openssl-sys" }
116
+ EOF
117
+
118
+ sed -ri src/tools/cargo/Cargo.lock \
119
+ -e '/name = "openssl-sys"/,/^$/{/source|checksum/d;s/0.9.112/0.9.114/}' \
120
+ -e '/name = "openssl"/,/^$/{/source|checksum/d;s/0.10.76/0.10.78/}' \
121
+ -e '/name = "openssl-macros"/,/^$/{/source|checksum/d}'
122
+
123
+ export MAKEFLAGS=-j15
124
+
125
+ cat <<EOF > config.toml
126
+ # Tell x.py the editors have reviewed the content of this file
127
+ # and updated it to follow the major changes of the building system,
128
+ # so x.py will not warn us to do such a review.
129
+ change-id = 140732
130
+
131
+ # see src/bootstrap/config.toml.example for more possible options
132
+ [llvm]
133
+ # by default, rust will build for a myriad of architectures
134
+ targets = "X86"
135
+
136
+ # When using system llvm prefer shared libraries
137
+ link-shared = true
138
+
139
+ # Do not download pre-built LLVM, instead either use the system
140
+ # LLVM or build LLVM from the shipped source.
141
+ download-ci-llvm = false
142
+
143
+ [build]
144
+ # omit HTML docs to save time and space (comment this to build them)
145
+ docs = false
146
+
147
+ # install cargo as well as rust
148
+ extended = true
149
+
150
+ # Do not query new versions of dependencies online.
151
+ locked-deps = true
152
+
153
+ # Specify which extended tools (those from the default install).
154
+ tools = ["cargo", "clippy", "rustfmt"]
155
+
156
+ # Use the source code shipped in the tarball for the dependencies.
157
+ # The combination of this and the "locked-deps" entry avoids downloading
158
+ # many crates from Internet, and makes the Rustc build more stable.
159
+ vendor = true
160
+
161
+ [install]
162
+ prefix = "/usr"
163
+ docdir = "share/doc/rustc"
164
+
165
+ [rust]
166
+ channel = "stable"
167
+ rpath = false
168
+
169
+ # BLFS does not install the FileCheck executable from llvm,
170
+ # so disable codegen tests
171
+ codegen-tests = false
172
+
173
+ # Don't download compiler components from the upstream CI:
174
+ # it's only intended for developers working on standard library
175
+ # and tools, and it only works with the Rust Git repository.
176
+ download-rustc = false
177
+
178
+ # Don't build lld which does not belong to this package and seems not
179
+ # so useful for BLFS. Even if it turns out to be really useful we'd build
180
+ # it as a part of the LLVM package instead.
181
+ lld = false
182
+
183
+ [target.x86_64-unknown-linux-gnu]
184
+ # NB the output of llvm-config (i.e. help options) may be
185
+ # dumped to the screen when config.toml is parsed.
186
+ llvm-config = "/usr/bin/llvm-config"
187
+
188
+ [target.i686-unknown-linux-gnu]
189
+ # NB the output of llvm-config (i.e. help options) may be
190
+ # dumped to the screen when config.toml is parsed.
191
+ llvm-config = "/usr/bin/llvm-config"
192
+
193
+ EOF
194
+
195
+ export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"
196
+ python3 ./x.py build --exclude src/tools/miri
197
+ export LIBSSH2_SYS_USE_PKG_CONFIG=1
198
+ DESTDIR=${PKGDIR} python3 ./x.py install
199
+
200
+ rm -rfv ${PKGDIR}/tmp