The story is, I believe, apocryphal; but the "brothers of Jesus, sons of Joseph" rejected sharing their inheritance with Jesus and James, a follower of Jesus and leader of the early church (per Acts), stated that he (James) would share one-half of his inheritance with Jesus.
This story is preserved in Menologion of the Holy Tradition,
When Joseph, after returning from Egypt, began to divide his land among his children born of his first wife,1 he also wished to give a portion to the Lord Jesus Who was born supernaturally and without corruption of the all-pure Virgin Mary, and Who was then but a little child. But three of Joseph's sons did not wish Christ to have a share, as He was born of another mother; only the fourth son, St. James, accepted Him as co-owner of his own portion, and hence was afterwards called the "Brother of God."
St. Dimitri of Rostov, Menologion, trans. Isaac E. Lambertsen, The Lives of the Holy Apostles, Holy Apostles Convent: Buena Vista, CO, 1988, p. 223-4.
1 "Salome, daughter of Haggai, the son of Barachiah, a brother of Saint Zacharias, the father of the holy Prophet John the Forerunner of the Lord." St. Dimitri of Rostov, Menologion, 223.
The story presupposes that Joseph had sons, so we can probably exclude the Western church in our search for the source. Catholic tradition came to hold Jerome’s ‘cousins’ theory of Jesus’ relation to James and his siblings, none of them children of Joseph.
The story further suggests that James was Joseph’s eldest son; as primogenitor he would have received a double-share of the inheritance and so able to share half with Jesus. This excludes the Helvidian view – that Jesus was the eldest of Joseph and Mary’s children – and instead points to the Epiphanian view, held by the Eastern Orthodox churches, that James etal were children of Joseph by a marriage prior to Mary, and so older than Jesus.
Since the Eastern Orthodox tradition is more likely to have preserved this story, our search for its specific source might focus there.