Ravenports generated: 13 Aug 2019 12:20
[ravenports.git] / bucket_7B / rust
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               rust
4 VERSION=                1.36.0
5 KEYWORDS=               lang
6 VARIANTS=               standard
7 SDESC[standard]=        Systems programming language from Mozilla
8 HOMEPAGE=               https://www.rust-lang.org/
9 CONTACT=                Michael_Neumann[mneumann@ntecs.de]
10
11 DOWNLOAD_GROUPS=        main dflyboot
12 SITES[dflyboot]=        https://leaf.dragonflybsd.org/~marino/dports-src/rust/
13 SITES[main]=            https://static.rust-lang.org/dist/
14 DISTFILE[1]=            rustc-1.36.0-src.tar.xz:main
15 DISTFILE[2]=            rustc-1.35.0-x86_64-unknown-dragonfly.tar.zst:dflyboot
16 DISTFILE[3]=            rust-std-1.35.0-x86_64-unknown-dragonfly.tar.zst:dflyboot
17 DISTFILE[4]=            cargo-0.36.0-x86_64-unknown-dragonfly.tar.zst:dflyboot
18 DISTFILE[5]=            rustc-1.35.0-x86_64-unknown-freebsd.tar.gz:main
19 DISTFILE[6]=            rust-std-1.35.0-x86_64-unknown-freebsd.tar.gz:main
20 DISTFILE[7]=            cargo-0.36.0-x86_64-unknown-freebsd.tar.gz:main
21 DISTFILE[8]=            rustc-1.35.0-x86_64-unknown-linux-gnu.tar.gz:main
22 DISTFILE[9]=            rust-std-1.35.0-x86_64-unknown-linux-gnu.tar.gz:main
23 DISTFILE[10]=           cargo-0.36.0-x86_64-unknown-linux-gnu.tar.gz:main
24 DF_INDEX=               1
25 SPKGS[standard]=        single
26
27 OPTIONS_AVAILABLE=      none
28 OPTIONS_STANDARD=       none
29
30 ONLY_FOR_OPSYS=         dragonfly freebsd linux
31
32 BUILD_DEPENDS=          bash:primary:standard
33                         cmake:single:standard
34                         autoselect-python:single:standard
35 BUILDRUN_DEPENDS=       curl:primary:standard
36                         libssh2:single:standard
37                         libgit2:single:standard
38 EXRUN[single]=          gcc8:compilers:standard
39
40 USES=                   gmake ssl zlib python:build shebangfix ncurses
41                         execinfo c++:single
42
43 DISTNAME=               rustc-1.36.0-src
44 EXTRACT_ONLY=           1
45
46 LICENSE=                APACHE20:single MIT:single
47 LICENSE_TERMS=          single:{{WRKSRC}}/COPYRIGHT
48 LICENSE_FILE=           APACHE20:{{WRKSRC}}/LICENSE-APACHE
49                         MIT:{{WRKSRC}}/LICENSE-MIT
50 LICENSE_SCHEME=         dual
51
52 FPC_EQUIVALENT=         lang/rust
53 SHEBANG_FILES=          vendor/compiler_builtins/compiler-rt/lib/sanitizer_common/symbolizer/scripts/*.sh
54                         vendor/compiler_builtins/compiler-rt/lib/asan/scripts/asan_device_setup
55                         vendor/compiler_builtins/compiler-rt/lib/tsan/*.sh
56                         vendor/compiler_builtins/compiler-rt/lib/fuzzer/scripts/*.py
57                         vendor/compiler_builtins/compiler-rt/lib/dfsan/scripts/build-libc-list.py
58                         vendor/compiler_builtins/compiler-rt/lib/sanitizer_common/scripts/*.py
59                         vendor/compiler_builtins/compiler-rt/lib/asan/scripts/asan_symbolize.py
60                         src/libcore/unicode/unicode.py
61
62 MUST_CONFIGURE=         yes
63 CONFIGURE_ARGS=         --release-channel=stable
64                         --enable-rpath
65                         --enable-extended
66                         --enable-vendor
67                         --enable-locked-deps
68                         --local-rust-root={{WRKDIR}}/bootstrap
69                         --prefix={{PREFIX}}
70                         --disable-ninja
71                         --default-linker={{LOCALBASE}}/toolchain/gcc8/bin/cc
72
73 MAKE_ENV=               LD_LIBRARY_PATH={{WRKDIR}}/bootstrap/lib
74                         LIBGIT2_SYS_USE_PKG_CONFIG=1
75                         LIBSSH2_SYS_USE_PKG_CONFIG=1
76                         OPENSSL_NO_PKG_CONFIG=1
77                         RUST_BACKTRACE=1
78                         PROFILE=release
79                         OPENSSL_DIR="{{OPENSSLBASE}}"
80                         HOME="{{WRKDIR}}"
81
82 INSTALL_REQ_TOOLCHAIN=  yes
83
84 BLOCK_WATCHDOG=         yes
85
86 post-patch:
87         # Use rpath suitable for libz et al.
88         ${REINPLACE_CMD} -e 's|@PREFIX@|${PREFIX}|g' \
89                 -e 's|@OPENSSLLIB@|${OPENSSLLIB}|g' \
90                 ${WRKSRC}/src/bootstrap/bin/rustc.rs
91         # Disable vendor checksums
92         ${REINPLACE_CMD} -e 's/"files":{[^}]*}/"files":{}/' \
93                  ${WRKSRC}/vendor/*/.cargo-checksum.json
94         # for rust 1.36 bootstrap built with libressl 2.8
95         (cd ${LOCALBASE}/libressl/lib && \
96                 ${LN} -s libssl.so libssl.so.46 && \
97                 ${LN} -s libcrypto.so libcrypto.so.44)
98
99 post-configure-freebsd:
100         ${LN} -s ${LOCALBASE}/toolchain/gcc8/lib/libstdc++.so \
101         ${LOCALBASE}/lib/libc++.so
102
103 post-configure-dragonfly:
104         ${LN} -s ${LOCALBASE}/toolchain/gcc8/lib/libgcc_s.so \
105         ${WRKDIR}/bootstrap/lib/rustlib/${SFX}/lib/libgcc_pic.so
106
107 do-build:
108         (cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} \
109                 ${PYTHON_CMD} x.py build --verbose --config ./config.toml \
110                 --jobs ${MAKE_JOBS_NUMBER})
111
112 post-install:
113         ${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/install.log
114         ${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh
115         ${RM} -r ${STAGEDIR}${PREFIX}/share/doc/rust
116         # Taken from FreeBSD Ports
117         # In post-install, we use the manifests generated during Rust install
118         # to in turn generate the PLIST. We do that because several libraries
119         # have a computed filename based on the absolute path of the source
120         # files. As it is user-specific, we can't know the filename in advance.
121         #
122         # Both rustc and Cargo components install the same README.md and
123         # LICENSE files. The install process backs up the first copy to
124         # install the second. Thus here, we need to remove those backups.
125         # Actually we remove the entire share/doc/rust contents.
126         # We also need to dedup the entries in the generated PLIST, because
127         # both components manifests list them.
128         #
129         # We fix manpage entries in the generated manifests because Rust
130         # installs them uncompressed but the Ports framework compresses them.
131         for f in ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-*; do \
132             ${SED} -i'' -E \
133                 -e '/share\/doc\/rust/d' \
134                 -e 's|:${STAGEDIR}|:|' \
135                 -e 's|(man/man[1-9]/.*\.[0-9])|\1.gz|' \
136                 $$f; \
137             ${AWK} '\
138                 /^file:/ { \
139                     file=$$0; \
140                     sub(/^file:/, "", file); \
141                     print file; \
142                 } \
143                 /^dir:/ { \
144                     dir=$$0; \
145                     sub(/^dir:/, "", dir); \
146                     system("find ${STAGEDIR}" dir " -type f | ${SED} -E -e \"s|${STAGEDIR}||\""); \
147                 }' \
148                 $$f >> ${WRKDIR}/.manifest.gen.unsorted; \
149             ${RM} $$f; \
150         done
151         ${SORT} -u ${WRKDIR}/.manifest.gen.unsorted > ${WRKDIR}/.manifest.gen.sorted
152         ${CAT} ${WRKDIR}/.manifest.gen.sorted >> ${WRKDIR}/.manifest.single.mktmp
153         # Strip binaries and libraries
154         ${STRIP_CMD} \
155                 ${STAGEDIR}${PREFIX}/bin/cargo \
156                 ${STAGEDIR}${PREFIX}/bin/cargo-clippy \
157                 ${STAGEDIR}${PREFIX}/bin/cargo-miri \
158                 ${STAGEDIR}${PREFIX}/bin/cargo-fmt \
159                 ${STAGEDIR}${PREFIX}/bin/clippy-driver \
160                 ${STAGEDIR}${PREFIX}/bin/miri \
161                 ${STAGEDIR}${PREFIX}/bin/rls \
162                 ${STAGEDIR}${PREFIX}/bin/rustc \
163                 ${STAGEDIR}${PREFIX}/bin/rustdoc \
164                 ${STAGEDIR}${PREFIX}/bin/rustfmt \
165                 ${STAGEDIR}${PREFIX}/lib/*.so \
166                 ${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so \
167                 ${STAGEDIR}${PREFIX}/lib/rustlib/*/codegen-backends/*.so
168
169 post-build-freebsd:
170         ${RM} ${LOCALBASE}/lib/libc++.so
171
172 post-configure:
173         ${MKDIR} ${WRKDIR}/bootstrap
174         # Extract OS-specific bootstrap components
175         # then install bootstrap components
176         for F in ${SRC_RUSTC} ${SRC_RUSTSTD} ${SRC_CARGO}; do\
177            ${TAR} -C ${WRKDIR} -xf ${DISTDIR}/$$F.tar.${COMPEXT}\
178              --no-same-owner --no-same-permissions;\
179            ${LOCALBASE}/bin/bash ${WRKDIR}/$$F/install.sh\
180              --prefix=${WRKDIR}/bootstrap;\
181         done
182
183 do-install:
184         (cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} DESTDIR=${STAGEDIR} \
185                 ${PYTHON_CMD} x.py install --verbose --config ./config.toml \
186                 --jobs ${MAKE_JOBS_NUMBER})
187
188 [FILE:753:descriptions/desc.single]
189 Rust is a systems programming language that runs blazingly fast, prevents
190 segfaults, and guarantees thread safety.
191
192 Performance
193 Rust is blazingly fast and memory-efficient: with no runtime or garbage
194 collector, it can power performance-critical services, run on embedded
195 devices, and easily integrate with other languages.
196
197 Reliability
198 Rust's rich type system and ownership model guarantee memory-safety and
199 thread-safety -- and enable you to eliminate many classes of bugs at
200 compile-time.
201
202 Productivity
203 Rust has great documentation, a friendly compiler with useful error
204 messages, and top-notch tooling -- an integrated package manager and
205 build tool, smart multi-editor support with auto-completion and type
206 inspections, an auto-formatter, and more.
207
208
209 [FILE:1215:distinfo]
210 f51645b9f787af4a5d94db17f6af39db0c55980ed24fe366cad55b57900f8f2d     98707920 rustc-1.36.0-src.tar.xz
211 a4ffe540bd43855a76cd54c8e28e0751a6f3512511f18f4777a171dfff18bd4f     60880376 rustc-1.35.0-x86_64-unknown-dragonfly.tar.zst
212 e814ad1d0523cedea5089fd01d4807f5e77b7cd189d24870f36f94e219e24b68     65375837 rust-std-1.35.0-x86_64-unknown-dragonfly.tar.zst
213 cda34a18e582032c139df34885fccacde8d63d29a52dbc17694eaa469ef6ca1b      3641831 cargo-0.36.0-x86_64-unknown-dragonfly.tar.zst
214 d3b5a6cfa41264e1873287bdb89892a7edc40333d581f468890c68336f50a601     73812596 rustc-1.35.0-x86_64-unknown-freebsd.tar.gz
215 22e8a2deb83dac920237f810b612b7ea555b03f5830f413a94d007ec683de519     83588135 rust-std-1.35.0-x86_64-unknown-freebsd.tar.gz
216 3141668f12fd6d22f586ee56ff07977a6e969ffda6a51245f35865ca61714a5a      6235107 cargo-0.36.0-x86_64-unknown-freebsd.tar.gz
217 bb3a07a1f2fdc3eeeee25fc40131d3f05494e3838dfd4e9275475ffc500d7a9e    125764715 rustc-1.35.0-x86_64-unknown-linux-gnu.tar.gz
218 5dfa92661ff1a22680785bd6999b6117ae66841e2bd9e5318eb97002956131e4     78886921 rust-std-1.35.0-x86_64-unknown-linux-gnu.tar.gz
219 77586f2fb5b6f6caef0cb6d3cc32a18559d4fcd6a6db4e75f4b3fb7adb050437      6248658 cargo-0.36.0-x86_64-unknown-linux-gnu.tar.gz
220
221
222 [FILE:96:manifests/plist.single]
223 @comment generated from lib/rustlib/manifest-*
224 lib/rustlib/
225  components
226  rust-installer-version
227
228
229 [FILE:4857:patches/patch-fix-multiple-llvm-builds]
230 From d6bd0a479ceaf6abdd696c3b955a56f66275c562 Mon Sep 17 00:00:00 2001
231 From: Georgy Yakovlev <gyakovlev@gentoo.org>
232 Date: Sat, 25 May 2019 22:21:16 -0700
233 Subject: [PATCH] revert commits triggering multiple llvm rebuilds
234
235 this reverts the following commits
236 https://github.com/rust-lang/rust/commit/105692c3ad281c63bf0f75a26a66bb9cff5b4553
237 https://github.com/rust-lang/rust/commit/975ba58f42b34ff07cd7c2bd73350daed2057186
238 https://github.com/rust-lang/rust/commit/e1daa36ba7df88788c2684bbe5ff6eb37f1cda69
239 ---
240  src/bootstrap/llvm-rebuild-trigger |  4 +++
241  src/bootstrap/native.rs            | 46 +++++++++++++-----------------
242  2 files changed, 24 insertions(+), 26 deletions(-)
243  create mode 100644 src/bootstrap/llvm-rebuild-trigger
244
245 diff --git a/src/bootstrap/llvm-rebuild-trigger b/src/bootstrap/llvm-rebuild-trigger
246 new file mode 100644
247 index 0000000000..0f18c6a4ac
248 --- /dev/null   2019-08-13 13:32:28 UTC
249 +++ src/rustllvm/llvm-rebuild-trigger
250 @@ -0,0 +1,4 @@
251 +# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
252 +# The actual contents of this file do not matter, but to trigger a change on the
253 +# build bots then the contents should be changed so git updates the mtime.
254 +2019-03-18
255 --- src/bootstrap/native.rs.orig        2019-07-03 08:00:00 UTC
256 +++ src/bootstrap/native.rs
257 @@ -67,40 +67,30 @@ impl Step for Llvm {
258              }
259          }
260  
261 -        let (llvm_info, root, out_dir, llvm_config_ret_dir) = if emscripten {
262 -            let info = &builder.emscripten_llvm_info;
263 +        let rebuild_trigger = builder.src.join("src/rustllvm/llvm-rebuild-trigger");
264 +        let rebuild_trigger_contents = t!(fs::read_to_string(&rebuild_trigger));
265 +
266 +        let (out_dir, llvm_config_ret_dir) = if emscripten {
267              let dir = builder.emscripten_llvm_out(target);
268              let config_dir = dir.join("bin");
269 -            (info, "src/llvm-emscripten", dir, config_dir)
270 +            (dir, config_dir)
271          } else {
272 -            let info = &builder.in_tree_llvm_info;
273              let mut dir = builder.llvm_out(builder.config.build);
274              if !builder.config.build.contains("msvc") || builder.config.ninja {
275                  dir.push("build");
276              }
277 -            (info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
278 +            (builder.llvm_out(target), dir.join("bin"))
279          };
280 -
281 -        if !llvm_info.is_git() {
282 -            println!(
283 -                "git could not determine the LLVM submodule commit hash. \
284 -                Assuming that an LLVM build is necessary.",
285 -            );
286 -        }
287 -
288 +        let done_stamp = out_dir.join("llvm-finished-building");
289          let build_llvm_config = llvm_config_ret_dir
290              .join(exe("llvm-config", &*builder.config.build));
291 -        let done_stamp = out_dir.join("llvm-finished-building");
292 +        if done_stamp.exists() {
293 +            let done_contents = t!(fs::read_to_string(&done_stamp));
294  
295 -        if let Some(llvm_commit) = llvm_info.sha() {
296 -            if done_stamp.exists() {
297 -                let done_contents = t!(fs::read(&done_stamp));
298 -
299 -                // If LLVM was already built previously and the submodule's commit didn't change
300 -                // from the previous build, then no action is required.
301 -                if done_contents == llvm_commit.as_bytes() {
302 -                    return build_llvm_config
303 -                }
304 +            // If LLVM was already built previously and contents of the rebuild-trigger file
305 +            // didn't change from the previous build, then no action is required.
306 +            if done_contents == rebuild_trigger_contents {
307 +                return build_llvm_config
308              }
309          }
310  
311 @@ -111,6 +101,7 @@ impl Step for Llvm {
312          t!(fs::create_dir_all(&out_dir));
313  
314          // http://llvm.org/docs/CMake.html
315 +        let root = if self.emscripten { "src/llvm-emscripten" } else { "src/llvm-project/llvm" };
316          let mut cfg = cmake::Config::new(builder.src.join(root));
317  
318          let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) {
319 @@ -253,6 +244,11 @@ impl Step for Llvm {
320                  channel::CFG_RELEASE_NUM,
321                  builder.config.channel,
322              );
323 +            let llvm_info = if self.emscripten {
324 +                &builder.emscripten_llvm_info
325 +            } else {
326 +                &builder.in_tree_llvm_info
327 +            };
328              if let Some(sha) = llvm_info.sha_short() {
329                  default_suffix.push_str("-");
330                  default_suffix.push_str(sha);
331 @@ -285,9 +281,7 @@ impl Step for Llvm {
332  
333          cfg.build();
334  
335 -        if let Some(llvm_commit) = llvm_info.sha() {
336 -            t!(fs::write(&done_stamp, llvm_commit));
337 -        }
338 +        t!(fs::write(&done_stamp, &rebuild_trigger_contents));
339  
340          build_llvm_config
341      }
342
343
344 [FILE:500:patches/patch-src_bootstrap_bin_rustc.rs]
345 --- src/bootstrap/bin/rustc.rs.orig     2019-07-03 08:00:00 UTC
346 +++ src/bootstrap/bin/rustc.rs
347 @@ -239,7 +239,7 @@ fn main() {
348              } else if !target.contains("windows") &&
349                        !target.contains("wasm32") &&
350                        !target.contains("fuchsia") {
351 -                Some("-Wl,-rpath,$ORIGIN/../lib")
352 +                Some("-Wl,-z,origin -Wl,-rpath,$ORIGIN/../lib:@PREFIX@/lib:@OPENSSLLIB@ -L@PREFIX@/lib")
353              } else {
354                  None
355              };
356
357
358 [FILE:533:patches/patch-src_libunwind_build.rs]
359 --- src/libunwind/build.rs.orig 2019-07-03 08:00:00 UTC
360 +++ src/libunwind/build.rs
361 @@ -27,7 +27,7 @@ fn main() {
362      } else if target.contains("solaris") {
363          println!("cargo:rustc-link-lib=gcc_s");
364      } else if target.contains("dragonfly") {
365 -        println!("cargo:rustc-link-lib=gcc_pic");
366 +        println!("cargo:rustc-link-lib=gcc_s");
367      } else if target.contains("windows-gnu") {
368          println!("cargo:rustc-link-lib=static-nobundle=gcc_eh");
369          println!("cargo:rustc-link-lib=static-nobundle=pthread");
370
371
372 [FILE:498:patches/patch-vendor_openssl-src_src_lib.rs]
373 --- vendor/openssl-src/src/lib.rs.orig  2019-07-03 09:36:21 UTC
374 +++ vendor/openssl-src/src/lib.rs
375 @@ -145,6 +145,7 @@ impl Build {
376              "i686-linux-android" => "linux-elf",
377              "i686-pc-windows-gnu" => "mingw",
378              "i686-pc-windows-msvc" => "VC-WIN32",
379 +            "x86_64-unknown-dragonfly" => "BSD-x86_64",
380              "i686-unknown-freebsd" => "BSD-x86-elf",
381              "i686-unknown-linux-gnu" => "linux-elf",
382              "i686-unknown-linux-musl" => "linux-elf",
383
384
385 [FILE:789:patches/patch-vendor_openssl-sys_build_cfgs.rs]
386 --- vendor/openssl-sys/build/cfgs.rs.orig       2019-07-03 09:36:21 UTC
387 +++ vendor/openssl-sys/build/cfgs.rs
388 @@ -13,6 +13,9 @@ pub fn get(openssl_version: Option<u64>,
389          if libressl_version >= 0x2_07_00_00_0 {
390              cfgs.push("libressl270");
391          }
392 +        if libressl_version >= 0x2_07_01_00_0 {
393 +            cfgs.push("libressl271");
394 +        }
395          if libressl_version >= 0x2_07_03_00_0 {
396              cfgs.push("libressl273");
397          }
398 @@ -22,6 +25,9 @@ pub fn get(openssl_version: Option<u64>,
399          if libressl_version >= 0x2_08_01_00_0 {
400              cfgs.push("libressl281");
401          }
402 +        if libressl_version >= 0x2_09_01_00_0 {
403 +            cfgs.push("libressl291");
404 +        }
405      } else {
406          let openssl_version = openssl_version.unwrap();
407  
408
409
410 [FILE:705:patches/patch-vendor_openssl-sys_build_main.rs]
411 --- vendor/openssl-sys/build/main.rs.orig       2019-07-03 09:36:21 UTC
412 +++ vendor/openssl-sys/build/main.rs
413 @@ -199,6 +199,7 @@ See rust-openssl README for more informa
414              (8, 1) => ('8', '1'),
415              (8, _) => ('8', 'x'),
416              (9, 0) => ('9', '0'),
417 +            (9, _) => ('9', 'x'),
418              _ => version_error(),
419          };
420  
421 @@ -239,7 +240,7 @@ fn version_error() -> ! {
422          "
423  
424  This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
425 -through 2.9.0, but a different version of OpenSSL was found. The build is now aborting
426 +through 2.9.x, but a different version of OpenSSL was found. The build is now aborting
427  due to this version mismatch.
428  
429  "
430
431
432 [FILE:859:patches/patch-vendor_openssl-sys_src_crypto.rs]
433 --- vendor/openssl-sys/src/crypto.rs.orig       2019-07-03 09:36:21 UTC
434 +++ vendor/openssl-sys/src/crypto.rs
435 @@ -15,7 +15,13 @@ cfg_if! {
436      if #[cfg(ossl110)] {
437          pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
438          pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
439 -
440 +    } else if #[cfg(libressl)] {
441 +        pub const CRYPTO_EX_INDEX_SSL: c_int = 1;
442 +        pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 2;
443 +    }
444 +}
445 +cfg_if! {
446 +    if #[cfg(any(ossl110, libressl271))] {
447          extern "C" {
448              pub fn OpenSSL_version_num() -> c_ulong;
449              pub fn OpenSSL_version(key: c_int) -> *const c_char;
450 @@ -64,7 +70,7 @@ pub type CRYPTO_EX_free = unsafe extern
451      argp: *mut c_void,
452  );
453  extern "C" {
454 -    #[cfg(ossl110)]
455 +    #[cfg(any(ossl110, libressl))]
456      pub fn CRYPTO_get_ex_new_index(
457          class_index: c_int,
458          argl: c_long,
459
460
461 [FILE:297:patches/patch-vendor_openssl-sys_src_ssl.rs]
462 --- vendor/openssl-sys/src/ssl.rs.orig  2019-07-03 09:36:21 UTC
463 +++ vendor/openssl-sys/src/ssl.rs
464 @@ -1057,7 +1057,7 @@ extern "C" {
465  }
466  
467  cfg_if! {
468 -    if #[cfg(ossl110)] {
469 +    if #[cfg(any(ossl110, libressl291))] {
470          extern "C" {
471              pub fn TLS_method() -> *const SSL_METHOD;
472  
473
474
475 [FILE:647:patches/patch-vendor_openssl_build.rs]
476 --- vendor/openssl/build.rs.orig        2019-07-03 09:36:21 UTC
477 +++ vendor/openssl/build.rs
478 @@ -46,6 +46,10 @@ fn main() {
479              println!("cargo:rustc-cfg=libressl270");
480          }
481  
482 +        if version >= 0x2_07_01_00_0 {
483 +            println!("cargo:rustc-cfg=libressl271");
484 +        }
485 +
486          if version >= 0x2_07_03_00_0 {
487              println!("cargo:rustc-cfg=libressl273");
488          }
489 @@ -53,5 +57,9 @@ fn main() {
490          if version >= 0x2_08_00_00_0 {
491              println!("cargo:rustc-cfg=libressl280");
492          }
493 +
494 +        if version >= 0x2_09_01_00_0 {
495 +            println!("cargo:rustc-cfg=libressl291");
496 +        }
497      }
498  }
499
500
501 [FILE:873:patches/patch-vendor_openssl_src_ssl_mod.rs]
502 --- vendor/openssl/src/ssl/mod.rs.orig  2019-07-03 09:36:21 UTC
503 +++ vendor/openssl/src/ssl/mod.rs
504 @@ -3690,9 +3690,14 @@ cfg_if! {
505  }
506  
507  cfg_if! {
508 -    if #[cfg(ossl110)] {
509 +    if #[cfg(any(ossl110, libressl291))] {
510          use ffi::{TLS_method, DTLS_method};
511 -
512 +    } else {
513 +        use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method};
514 +    }
515 +}
516 +cfg_if! {
517 +    if #[cfg(ossl110)] {
518          unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
519              ffi::CRYPTO_get_ex_new_index(
520                  ffi::CRYPTO_EX_INDEX_SSL_CTX,
521 @@ -3715,8 +3720,6 @@ cfg_if! {
522              )
523          }
524      } else {
525 -        use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method};
526 -
527          unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int {
528              ffi::SSL_CTX_get_ex_new_index(0, ptr::null_mut(), None, None, Some(f))
529          }
530
531
532 [FILE:385:patches/patch-vendor_openssl_src_version.rs]
533 --- vendor/openssl/src/version.rs.orig  2019-07-03 09:36:21 UTC
534 +++ vendor/openssl/src/version.rs
535 @@ -14,7 +14,7 @@
536  use std::ffi::CStr;
537  
538  cfg_if! {
539 -    if #[cfg(ossl110)] {
540 +    if #[cfg(any(ossl110, libressl271))] {
541          use ffi::{
542              OPENSSL_VERSION, OPENSSL_CFLAGS, OPENSSL_BUILT_ON, OPENSSL_PLATFORM, OPENSSL_DIR,
543              OpenSSL_version_num, OpenSSL_version,
544
545
546 [FILE:559:files/special.mk]
547 .if "${OPSYS}" == "DragonFly"
548 BOOTSTRAP_RUST=         1.35.0
549 BOOTSTRAP_CARGO=        0.36.0
550 DF_INDEX+=              2 3 4
551 COMPEXT=                zst
552 .elif "${OPSYS}" == "FreeBSD"
553 BOOTSTRAP_RUST=         1.35.0
554 BOOTSTRAP_CARGO=        0.36.0
555 DF_INDEX+=              5 6 7
556 COMPEXT=                gz
557 .elif "${OPSYS}" == "Linux"
558 BOOTSTRAP_RUST=         1.35.0
559 BOOTSTRAP_CARGO=        0.36.0
560 DF_INDEX+=              8 9 10
561 COMPEXT=                gz
562 SFX=                    ${ARCH_STANDARD}-unknown-linux-gnu
563 .endif
564 SFX?=                   ${ARCH_STANDARD}-unknown-${OPSYS:tl}
565 SRC_RUSTC?=             rustc-${BOOTSTRAP_RUST}-${SFX}
566 SRC_RUSTSTD?=           rust-std-${BOOTSTRAP_RUST}-${SFX}
567 SRC_CARGO?=             cargo-${BOOTSTRAP_CARGO}-${SFX}
568