rpm: patch incorrect -flat_namespace usage (#87993)
rpm: patch incorrect -flat_namespace usage (#87993)

This is needed for bottling on Monterey.

While we're here, remove the unnecessary prepending to `PKG_CONFIG_PATH`
and the setting of `__SED`, as we no longer use a `sed` shim. Also avoid
hardcoding `homebrew` for `brew extract`, and fix the shims `inreplace`,
which now applies to Linux as well for the `curl` shim.
lemzwerg/homebrew-core,uyjulian/homebrew-core,Homebrew/homebrew-core,mfikes/homebrew-core,nbari/homebrew-core,filcab/homebrew-core,adam-moss/homebrew-core,nandub/homebrew-core,cblecker/homebrew-core,sjackman/homebrew-core,nandub/homebrew-core,mfikes/homebrew-core,cblecker/homebrew-core,stgraber/homebrew-core,zyedidia/homebrew-core,makigumo/homebrew-core,adam-moss/homebrew-core,nbari/homebrew-core,zyedidia/homebrew-core,Homebrew/homebrew-core,filcab/homebrew-core,uyjulian/homebrew-core,stgraber/homebrew-core,chrisfinazzo/homebrew-core,sjackman/homebrew-core,makigumo/homebrew-core,lemzwerg/homebrew-core,chrisfinazzo/homebrew-core