do not edit — generated by btf.
git.druid.rocksindexdruid520portsports/ssl/bearssl/add.sh

ports/ssl/bearssl/add.sh


set -e
 
git clone --branch v0.6 --depth 1 https://www.bearssl.org/git/BearSSL bearssl
cd bearssl
# only the static lib target, not "all" (which also wants the shared
# .so, the CLI tools, and the test suite): the shared-library link step
# fails outright on this system for a reason unrelated to bearssl
# itself -- confirmed for real, this exact ld ("GNU ld
# 2.47.50.20260906", a development-trunk build) rejects the .eh_frame
# content tcc-compiled objects produce when linking a shared object
# ("'.eh_frame_hdr' refers to overlapping FDEs", "final link failed:
# bad value"), while the plain static archive (ar, not ld) builds
# clean from the exact same object files. moot anyway: this system
# links everything static-pie, nothing here ever needed libbearssl.so.
#
# CC="$CC", not a hardcoded "tcc": this system's own "no C compiler
# beyond tcc" choice for this package lives in
# /etc/mpx.env.d/bearssl.env (site config, not this shared recipe) --
# make sure that file exists and exports CC before installing this
# port; without it, $CC is empty here and this fails outright
# ("make: W: No such file or directory", hit for real once already:
# an empty CC="" blanks bearssl's own Makefile default of "cc" rather
# than leaving it alone, and the first CFLAGS token gets interpreted
# as the program to exec).
make CC="$CC" build/libbearssl.a
mkdir -p $MP_PREFIX/lib $MP_PREFIX/include
install -m644 build/libbearssl.a $MP_PREFIX/lib/libbearssl.a
install -m644 inc/*.h $MP_PREFIX/include/
powered by btf.