Make 'PackageCollectionsSigningLibc' target conditional (#4311)
Make 'PackageCollectionsSigningLibc' target conditional (#4311)

* Make 'PackageCollectionsSigningLibc' target conditional

Motivation:
With https://github.com/apple/swift-crypto/pull/94, swift-crypto's
`Crypto` depends on `CCryptoBoringSSL` conditionally, on non-Apple
platforms only.

Since `PackageCollectionsSigningLibc` imports `CCryptoBoringSSL`
through `Crypto`, it fails to compile on Apple platforms.

Modifications:
Define `PackageCollectionsSigningLibc` target and associated
dependencies conditionally on platforms where it's available.

I tried using `.target(name:when:)` in combination with dynamic target
array, but got source not found error for
`PackageCollectionsSigningLibc`.

I also tried just changing target dependency on
`PackageCollectionsSigningLibc` to be conditional, but apparently
`PackageCollectionsSigningLibc` still gets compiled despite not being
used, thus causing build to fail.

* Reduce duplicate code
apple/swift-package-manager,abertelrud/swift-package-manager,apple/swift-package-manager,abertelrud/swift-package-manager,abertelrud/swift-package-manager,abertelrud/swift-package-manager,apple/swift-package-manager,apple/swift-package-manager,apple/swift-package-manager,abertelrud/swift-package-manager