It might be a small helpful addition to the ebuild to support either installed versions of openssl. (openssl-1.1.1 or openssl-compat:1.1.1) my current workaround is extending RDEPEND by the following: ssl? ( || ( =dev-libs/openssl-1.1*:0= dev-libs/openssl-compat:1.1.1 ) ) Maybe this can be adopted to be more compatible with openssl-3.0[~amd64] setups?
That's invalid, unfortunately. openssl-compat doesn't provide headers (intentionally) and is only for binary packages.