Generally, contributions of property are valued at FMV (fair market value) at the time of the donation.
However, there are exclusions. Property that would create ordinary income is limited to its basis.
Ordinary income property is property is that if you would have recognized ordinary income or shortterm capital gain had you sold it at fair market value on the date it was contributed. Examples of ordinary income property are inventory, works of art created by the donor, manuscripts prepared by the donor, and capital assets (defined later, under Capital Gain Property) held 1 year or less.
Thus, if you would have sold the grapefruit say for $75, and your basis in growing the fruit was $25. The donation would be $25. FMV of of $75 minus the $50 of "ordinary income" that would have been recognized had you sold the fruit, equaling your basis of $25.
If your basis in growing the fruit is $0.00, then the deductible amount of the donation is $0.00. All of the potential income would be ordinary income.
See the attached link for information. In the paragraphs at this link, are several other links. See especially Publications 526 and also 561.
https://www.irs.gov/charities-non-profits/charitable-organizations/charitable-contribution-deduction...
**Disclaimer: Effort has been made to offer correct information; but due to the discussion forum limitations, the poster disclaims any legal responsibility for the accuracy of the poster's response**