Through government funds, as other public works projects are. Or if people want to privately create their own, they can do so, as long as the results are open.
How are public works projects funded now? Same way. And if corporations want to fund certain projects too, they can. It's simple, extrapolate how we fund current projects and do the same with software, it's not that complicated.