How about wearing a diaper? Problem solved.
Just kidding. What's the problem with providing public urinals?
I don't get it.
Here is an simple example from Hamburg.
https://www.heringinternational.com/fileadmin/images/content...
You'll find something similar everywhere in Europe.
I had been in SF once. This was the smelliest city expierence I ever had yet.