I imagine the process is quite involved for tax optimization reasons.
Donate your lowest cost basis stock and write off at current market value. Donate stock directly to avoid taxes incurred by selling. Lowest cost basis because that removes the largest unrealized capital gains from your personal portfolio. Maybe do so over some number of days to cost average if you are donating oodles like Buffet.
Even for much much smaller amounts, donations (of various kinds) of appreciated assets can use tax law to considerable advantage.