I don't know any open source software specific for masonry. I agree with Mohsen that you should implement OpenSEES or something like that, according to the specific properties of the masonry you need to model.
I have implemented a masonry panel into OpenSees but it works with a confining frame, it is only for confined masonry and infilled frames. If you want I can share the .dll file with you.