How to link openssl statically

So I found this: https://github.com/sfackler/rust-openssl/issues/183

Which says essentiall OPENSSL_STATIC is ignore unless OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR are specified:

$ env
OPENSSL_STATIC=yes
OPENSSL_LIB_DIR=/usr/lib64/
OPENSSL_INCLUDE_DIR=/usr/include/
$ exa -1 /usr/lib64  | rg "ssl|crypto"
libssl.so -> libssl.so.1.1.0g
libssl.so.1.0.2m
libssl.so.1.1 -> libssl.so.1.1.0g
libssl.so.1.1.0g
libssl.so.10 -> libssl.so.1.0.2m
libssl3.so
libcrypto.so -> libcrypto.so.1.1.0g
libcrypto.so.1.0.2m
libcrypto.so.1.1 -> libcrypto.so.1.1.0g
libcrypto.so.1.1.0g
libcrypto.so.10 -> libcrypto.so.1.0.2m
libcryptopp.so.6 -> libcryptopp.so.6.0.0
libcryptopp.so.6.0.0
// and a few more

$ cargo clean
$ cargo build
   /// snip
   Compiling csv v1.0.0-beta.5
error: could not find native static library `ssl`, perhaps an -L flag is missing?

error: Could not compile `openssl-sys`.
warning: build failed, waiting for other jobs to finish...
error: build failed
     Running `rustc --crate-name openssl_sys /home/f/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.23/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=e45e5731dbca71b8 -C extra-filename=-e45e5731dbca71b8 --out-dir /home/f/Projects/myapp/target/debug/deps -L dependency=/home/f/Projects/myapp/target/debug/deps --extern libc=/home/f/Projects/myapp/target/debug/deps/liblibc-2c6ca039d96103da.rlib --cap-lints allow -L native=/usr/lib64/ --cfg 'osslconf="OPENSSL_NO_EC2M"' --cfg ossl110 --cfg ossl110f -l static=ssl -l static=crypto`

That's how far I get, but adding an -L flag does not seem to change much.

Any hints/help?